summaryrefslogtreecommitdiffstats
path: root/perl-install/authentication.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-16 17:07:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-16 17:07:26 +0000
commit937376d49922a492766b6d54f7a11246fce0c086 (patch)
treeaddaef1df514c001907f8ac844901344076cac93 /perl-install/authentication.pm
parent282fa83f88553e07a28b281446d3ade5e7216515 (diff)
downloaddrakx-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/authentication.pm')
-rw-r--r--perl-install/authentication.pm11
1 files changed, 7 insertions, 4 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;
}