summaryrefslogtreecommitdiffstats
path: root/perl-install/authentication.pm
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-07-02 08:12:26 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-07-02 08:12:26 +0000
commit262d3b7f4eeeab90cb36846a9683438f7e1c3c63 (patch)
tree3ee4c22c742e56bc7207fe2d9383550d1275e798 /perl-install/authentication.pm
parentcab9f3882cedd1a27b0365aa9e3022a5f1ee71cc (diff)
downloaddrakx-backup-do-not-use-262d3b7f4eeeab90cb36846a9683438f7e1c3c63.tar
drakx-backup-do-not-use-262d3b7f4eeeab90cb36846a9683438f7e1c3c63.tar.gz
drakx-backup-do-not-use-262d3b7f4eeeab90cb36846a9683438f7e1c3c63.tar.bz2
drakx-backup-do-not-use-262d3b7f4eeeab90cb36846a9683438f7e1c3c63.tar.xz
drakx-backup-do-not-use-262d3b7f4eeeab90cb36846a9683438f7e1c3c63.zip
Add anonymous bind
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r--perl-install/authentication.pm22
1 files changed, 10 insertions, 12 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index a76f6798d..b48ef1819 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -51,23 +51,21 @@ 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};
$in->ask_from('',
- N("Authentication Active Directory"),
- [ { label => N("Domain"), val => \$val },
- { label => N("Server"), val => \$authentication->{AD_server} },
+ N("Authentication Active Directory") . "\n\n",
+ [{ label => N("Domain") . "\n", val => \$val },
+ { label => N("Server\n"), val => \$authentication->{AD_server} },
{ label => N("LDAP users database"), val => \$authentication->{AD_users_db} },
- { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, },
- { label => N("Password for user"), val => \$authentication->{AD_password}, disabled => sub { !$AD_user || $authentication->{sub_kind} eq 'anonymous' } },
- { label => N("LDAP Authentication"), 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("Chiffrement"), 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};