diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/authentication.pm | 11 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index f69be8833..08bad2cc7 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -13,13 +13,18 @@ sub kind2description { } sub to_kind { my ($authentication) = @_; - (find { defined $authentication->{$_} } kinds()) || 'local'; + (find { exists $authentication->{$_} } kinds()) || 'local'; } sub ask_parameters { my ($in, $netc, $authentication, $kind) = @_; - my $val = $authentication->{$kind}; + #- keep only this authentication kind + foreach (kinds()) { + delete $authentication->{$_} if $_ ne $kind; + } + + my $val = $authentication->{$kind} ||= ''; if ($kind eq 'LDAP') { $val ||= 'ldap.' . $netc->{DOMAINNAME}; @@ -47,8 +52,6 @@ sub ask_parameters { { label => N("Domain Admin Password"), val => \$authentication->{winpass}, hidden => 1 }, ]) or return; } - #- keep only one authentication - delete $authentication->{$_} foreach kinds(); $authentication->{$kind} = $val; 1; } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 9584ac00b..12970008a 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1165,10 +1165,6 @@ sub setRootPassword { { label => N("Authentication"), val => \$authentication_kind, list => [ authentication::kinds() ], format => \&authentication::kind2description, advanced => 1 }, ]) or delete $sup->{password}; - #- keep only one authentication - delete $o->{authentication}{$_} foreach authentication::kinds(); - $o->{authentication}{$authentication_kind} ||= ''; - authentication::ask_parameters($o, $o->{netc}, $o->{authentication}, $authentication_kind) or goto &setRootPassword; } install_steps::setRootPassword($o); |