summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-17 16:30:51 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-17 16:30:51 +0000
commit937cc66de04f94b5931bea813dac215f677ad608 (patch)
tree93d996eead96e9ef423f3e629c6c5ceaa669a373
parent0f1c281ec14788740994ac6f5e581b64fd1141d2 (diff)
downloaddrakwizard-937cc66de04f94b5931bea813dac215f677ad608.tar
drakwizard-937cc66de04f94b5931bea813dac215f677ad608.tar.gz
drakwizard-937cc66de04f94b5931bea813dac215f677ad608.tar.bz2
drakwizard-937cc66de04f94b5931bea813dac215f677ad608.tar.xz
drakwizard-937cc66de04f94b5931bea813dac215f677ad608.zip
simplify...
the one who wrote this should be shot. twice.
-rwxr-xr-xsshd_wizard/Sshd.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/sshd_wizard/Sshd.pm b/sshd_wizard/Sshd.pm
index c232bc43..610e1e5e 100755
--- a/sshd_wizard/Sshd.pm
+++ b/sshd_wizard/Sshd.pm
@@ -80,8 +80,8 @@ $o->{pages} = {
config_step1 => {
name => N("SSH server, classical options"),
pre => sub {
- $sshd->{ListenAddress} and $o->{var}{ListenAddress} = $sshd->{ListenAddress} or $o->{var}{ListenAddress} = "0.0.0.0";
- $sshd->{Port} and $o->{var}{Port} = $sshd->{Port} or $o->{var}{Port} = "22";
+ $o->{var}{ListenAddress} = $sshd->{ListenAddress} || "0.0.0.0";
+ $o->{var}{Port} = $sshd->{Port} || "22";
$o->{var}{PermitRootLogin} ||= $sshd->{PermitRootLogin};
},
data => [
@@ -105,7 +105,7 @@ $o->{pages} = {
pre => sub {
$o->{var}{RSAAuthentication} ||= $sshd->{RSAAuthentication};
$o->{var}{PubkeyAuthentication} ||= $sshd->{PubkeyAuthentication};
- $sshd->{AuthorizedKeysFile} and $o->{var}{AuthorizedKeysFile} = $sshd->{AuthorizedKeysFile} or $o->{var}{AuthorizedKeysFile} = ".ssh/authorized_keys2";
+ $o->{var}{AuthorizedKeysFile} = $sshd->{AuthorizedKeysFile} || ".ssh/authorized_keys2";
$o->{var}{PasswordAuthentication} ||= $sshd->{PasswordAuthentication};
$o->{var}{IgnoreRhosts} ||= $sshd->{IgnoreRhosts};
$o->{var}{PermitEmptyPasswords} ||= $sshd->{PermitEmptyPasswords};
@@ -216,7 +216,7 @@ sub write_conf_restart_ssh {
sub global_config {
$sshd->{Port} = $o->{var}{Port};
# force sshd protocol 2
- $sshd->{Protocol} and $o->{var}{Protocol} = $sshd->{Protocol} or $o->{var}{Protocol} = "2";
+ $o->{var}{Protocol} = $sshd->{Protocol} || "2";
$o->{var}{ListenAddress} and $sshd->{ListenAddress} = $o->{var}{ListenAddress};
$o->{var}{SyslogFacility} and $sshd->{SyslogFacility} = $o->{var}{SyslogFacility};