diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-16 17:07:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-16 17:07:26 +0000 |
commit | 937376d49922a492766b6d54f7a11246fce0c086 (patch) | |
tree | addaef1df514c001907f8ac844901344076cac93 /perl-install | |
parent | 282fa83f88553e07a28b281446d3ade5e7216515 (diff) | |
download | drakx-937376d49922a492766b6d54f7a11246fce0c086.tar drakx-937376d49922a492766b6d54f7a11246fce0c086.tar.gz drakx-937376d49922a492766b6d54f7a11246fce0c086.tar.bz2 drakx-937376d49922a492766b6d54f7a11246fce0c086.tar.xz drakx-937376d49922a492766b6d54f7a11246fce0c086.zip |
keep current authentication kind, even if not completly accepted
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); |