From 6a9bf734145dcf142f0d99d1fc00784db625048b Mon Sep 17 00:00:00 2001 From: Vicent Guardiola Date: Fri, 2 Jul 2004 04:40:48 +0000 Subject: remove anonymous entry --- perl-install/authentication.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index 762320c32..a76f6798d 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -45,12 +45,18 @@ sub ask_parameters { $authentication->{AD_users_db} ||= 'cn=users,' . domain_to_ldap_domain($val); my %sub_kinds = my @sub_kinds = ( - anonymous => N("anonymous"), simple => N("simple"), tls => N("TLS"), ssl => N("SSL"), kerberos => N("security layout (SASL/Kerberos)"), ); + + + + + + + my $AD_user = $authentication->{AD_user} =~ /(.*)\@\Q$val\E$/ ? $1 : $authentication->{AD_user}; $in->ask_from('', @@ -58,13 +64,15 @@ sub ask_parameters { [ { label => N("Domain"), val => \$val }, { label => N("Server"), val => \$authentication->{AD_server} }, { label => N("LDAP users database"), val => \$authentication->{AD_users_db} }, - { label => N("LDAP Authentication"), val => \$authentication->{sub_kind}, list => [ map { $_->[0] } group_by2(@sub_kinds) ], format => sub { $sub_kinds{$_[0]} } }, - { label => N("LDAP user allowed to browse the Active Directory"), val => \$AD_user, disabled => sub { $authentication->{sub_kind} eq 'anonymous' } }, + { 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]} } }, ]) 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}; + + } elsif ($kind eq 'NIS') { $val ||= 'broadcast'; $in->ask_from('', -- cgit v1.2.1