1 |
bytegw |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-openssh-1.12.0/root/etc/e-smith/templates/etc/ssh/sshd_config/40PermitRootLogin mezzanine_patched_e-smith-openssh-1.12.0/root/etc/e-smith/templates/etc/ssh/sshd_config/40PermitRootLogin |
2 |
|
|
--- e-smith-openssh-1.12.0/root/etc/e-smith/templates/etc/ssh/sshd_config/40PermitRootLogin 2007-12-17 17:08:31.000000000 -0700 |
3 |
|
|
+++ mezzanine_patched_e-smith-openssh-1.12.0/root/etc/e-smith/templates/etc/ssh/sshd_config/40PermitRootLogin 2007-12-17 17:07:04.000000000 -0700 |
4 |
|
|
@@ -1,7 +1,14 @@ |
5 |
|
|
{ |
6 |
|
|
my $PermitRootLogin = $sshd{'PermitRootLogin'} || "no"; |
7 |
|
|
my $status = $sshd{'status'} || 'disabled'; |
8 |
|
|
- $OUT .= "# sshd is currently disabled\n# " unless $status eq "enabled"; |
9 |
|
|
$OUT .= "PermitRootLogin "; |
10 |
|
|
- $OUT .= ($PermitRootLogin eq "yes") ? "yes" : "no"; |
11 |
|
|
+ if ( $status ne 'enabled' ) { |
12 |
|
|
+ $OUT .= 'no'; |
13 |
|
|
+ } elsif ( $PermitRootLogin eq 'yes' ) { |
14 |
|
|
+ $OUT .= 'yes'; |
15 |
|
|
+ } elsif ( $PermitRootLogin eq 'key' || $PermitRootLogin eq 'nopass' ) { |
16 |
|
|
+ $OUT .= 'without-password'; |
17 |
|
|
+ } else { |
18 |
|
|
+ $OUT .= 'no'; |
19 |
|
|
+ } |
20 |
|
|
} |