From d570e736dba4c500198bab19fe5c8e6cc3faefde Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Tue, 20 Jun 2006 20:41:28 +0000 Subject: use list_ref and val_ref --- sshd_wizard/Sshd.pm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'sshd_wizard') diff --git a/sshd_wizard/Sshd.pm b/sshd_wizard/Sshd.pm index 2b60d415..f770c856 100755 --- a/sshd_wizard/Sshd.pm +++ b/sshd_wizard/Sshd.pm @@ -82,7 +82,7 @@ $o->{pages} = { $o->{var}{PermitRootLogin} ||= $sshd->{PermitRootLogin}; }, data => [ - { label => N('Permit root login:'), val => \$o->{var}{PermitRootLogin}, fixed_list => \@yesnoother }, + { label => N('Permit root login:'), val => \$o->{var}{PermitRootLogin}, list_ref => \@yesnoother }, { label => N('Listen address:'), val => \$o->{var}{ListenAddress}, help => N('Specifies the local addresses sshd should listen on.') }, { label => N('Port number:'), val => \$o->{var}{Port}, help => N('Specifies the port number that sshd listens on. The default is 22.') }, ], @@ -108,12 +108,12 @@ $o->{pages} = { $o->{var}{PermitEmptyPasswords} ||= $sshd->{PermitEmptyPasswords}; }, data => [ - { label => N('RSA auth:'), val => \$o->{var}{RSAAuthentication}, fixed_list => \@yesorno }, - { label => N('PubKey auth:'), val => \$o->{var}{PubkeyAuthentication}, fixed_list => \@yesorno }, + { label => N('RSA auth:'), val => \$o->{var}{RSAAuthentication}, list_ref => \@yesorno }, + { label => N('PubKey auth:'), val => \$o->{var}{PubkeyAuthentication}, list_ref => \@yesorno }, { label => N('Auth key file:'), val => \$o->{var}{AuthorizedKeysFile} }, - { label => N('Password auth:'), val => \$o->{var}{PasswordAuthentication}, fixed_list => \@yesorno }, - { label => N('Ignore rhosts file:'), val => \$o->{var}{IgnoreRhosts}, fixed_list => \@yesorno }, - { label => N('Permit empty password:'), val => \$o->{var}{PermitEmptyPasswords}, fixed_list => \@yesorno }, + { label => N('Password auth:'), val => \$o->{var}{PasswordAuthentication}, list_ref => \@yesorno }, + { label => N('Ignore rhosts file:'), val => \$o->{var}{IgnoreRhosts}, list_ref => \@yesorno }, + { label => N('Permit empty password:'), val => \$o->{var}{PermitEmptyPasswords}, list_ref => \@yesorno }, ], next => 'log_options', }, @@ -124,8 +124,8 @@ $o->{pages} = { $o->{var}{LogLevel} ||= $sshd->{LogLevel}; }, data => [ - { label => N('Syslog facility:'), val => \$o->{var}{SyslogFacility}, fixed_list => \@syslog }, - { label => N('Log level:'), val => \$o->{var}{LogLevel}, fixed_list => \@loglevel }, + { label => N('Syslog facility:'), val => \$o->{var}{SyslogFacility}, list_ref => \@syslog }, + { label => N('Log level:'), val => \$o->{var}{LogLevel}, list_ref => \@loglevel }, ], next => 'login_options', }, @@ -139,9 +139,9 @@ $o->{pages} = { }, data => [ { label => N('Login Grace time:'), val => \$o->{var}{LoginGraceTime}, help => N('The server disconnects after this time if the user has not successfully logged in. If the value is 0, there is no time limit. The default is 120 seconds.') }, - { label => N('Keep alive:'), val => \$o->{var}{KeepAlive}, fixed_list => \@yesorno }, - { label => N('Print motd:'), val => \$o->{var}{PrintMotd}, fixed_list => \@yesorno }, - { label => N('Print last log:'), val => \$o->{var}{PrintLastLog}, fixed_list => \@yesorno }, + { label => N('Keep alive:'), val => \$o->{var}{KeepAlive}, list_ref => \@yesorno }, + { label => N('Print motd:'), val => \$o->{var}{PrintMotd}, list_ref => \@yesorno }, + { label => N('Print last log:'), val => \$o->{var}{PrintLastLog}, list_ref => \@yesorno }, ], complete => sub { if ($o->{var}{LoginGraceTime} !~ /^\d+$/ and $o->{var}{LoginGraceTime}) { $::in->ask_warn(N('Error'), N('Login grace time should be a number')); return 1; } @@ -157,7 +157,7 @@ $o->{pages} = { }, data => [ - { label => N('Strict modes:'), val => \$o->{var}{StrictModes}, fixed_list => \@yesorno }, + { label => N('Strict modes:'), val => \$o->{var}{StrictModes}, list_ref => \@yesorno }, { label => N('Allow users:'), val => \$o->{var}{AllowUsers}, help => N('If specified, login is allowed only for user names that match one of the patterns. ie: erwan aginies guibo') }, { label => N('Deny users:'), val => \$o->{var}{DenyUsers}, help => N('Login is disallowed for user names that match one of the patterns. ie: pirate guillomovitch') }, ], @@ -170,17 +170,17 @@ $o->{pages} = { $o->{var}{X11Forwarding} ||= $sshd->{X11Forwarding}; }, data => [ - { label => N('Compression:'), val => \$o->{var}{Compression}, fixed_list => \@yesorno }, - { label => N('X11 forwarding:'), val => \$o->{var}{X11Forwarding}, fixed_list => \@yesorno }, + { label => N('Compression:'), val => \$o->{var}{Compression}, list_ref => \@yesorno }, + { label => N('X11 forwarding:'), val => \$o->{var}{X11Forwarding}, list_ref => \@yesorno }, ], next => 'summary', }, summary => { name => N('Summary of OpenSSH configuration.'), data => [ - { label => N('Permit root login:'), fixed_val => \$o->{var}{PermitRootLogin} }, - { label => N('Listen address:'), fixed_val => \$o->{var}{ListenAddress} }, - { label => N('Port number:'), fixed_val => \$o->{var}{Port} }, + { label => N('Permit root login:'), val_ref => \$o->{var}{PermitRootLogin} }, + { label => N('Listen address:'), val_ref => \$o->{var}{ListenAddress} }, + { label => N('Port number:'), val_ref => \$o->{var}{Port} }, ], post => \&do_it, next => 'end', -- cgit v1.2.1