summaryrefslogtreecommitdiffstats
path: root/perl-install/authentication.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-02 08:49:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-02 08:49:20 +0000
commite8b4b73b251c85a4a49a541e319ab7e95088eec7 (patch)
treec73e025d161622348be905834de4103781b9dd50 /perl-install/authentication.pm
parent114ecae4e367f0c9ddce7a54bd15d75867963b92 (diff)
downloaddrakx-backup-do-not-use-e8b4b73b251c85a4a49a541e319ab7e95088eec7.tar
drakx-backup-do-not-use-e8b4b73b251c85a4a49a541e319ab7e95088eec7.tar.gz
drakx-backup-do-not-use-e8b4b73b251c85a4a49a541e319ab7e95088eec7.tar.bz2
drakx-backup-do-not-use-e8b4b73b251c85a4a49a541e319ab7e95088eec7.tar.xz
drakx-backup-do-not-use-e8b4b73b251c85a4a49a541e319ab7e95088eec7.zip
cleanup
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r--perl-install/authentication.pm18
1 files changed, 8 insertions, 10 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index b48ef1819..110f270bf 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -51,21 +51,19 @@ sub ask_parameters {
kerberos => N("security layout (SASL/Kerberos)"),
);
- my $anonymous = "1";
my $AD_user = $authentication->{AD_user} =~ /(.*)\@\Q$val\E$/ ? $1 : $authentication->{AD_user};
+ my $anonymous = $AD_user;
$in->ask_from('',
- N("Authentication Active Directory") . "\n\n",
- [{ label => N("Domain") . "\n", val => \$val },
- { label => N("Server\n"), val => \$authentication->{AD_server} },
+ N("Authentication Active Directory"),
+ [ { label => N("Domain"), val => \$val },
+ { label => N("Server"), val => \$authentication->{AD_server} },
{ label => N("LDAP users database"), val => \$authentication->{AD_users_db} },
- { label => N("Use Anonymous BIND "), val => \$anonymous, type => bool },
- { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $anonymous}},
- { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { $anonymous }},
- { label => N("Chiffrement"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } },
+ { label => N("Use Anonymous BIND "), val => \$anonymous, type => 'bool' },
+ { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $anonymous } },
+ { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { $anonymous } },
+ { label => N("Encryption"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } },
]) or return;
-
-
$authentication->{AD_user} = !$AD_user || $authentication->{sub_kind} eq 'anonymous' ? '' :
$AD_user =~ /@/ ? $AD_user : "$AD_user\@$val";
$authentication->{AD_password} = '' if !$authentication->{AD_user};