summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-07-23 10:57:32 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-07-23 10:57:32 +0000
commitf7031301ae94e7f8ead3fcabf8c77208aea82438 (patch)
tree478eb299de10aa0daf48983b75f5cee09be1101b
parentd0951d751b0dff4a8de6f6db761e0cf86dec0c24 (diff)
downloaddrakx-f7031301ae94e7f8ead3fcabf8c77208aea82438.tar
drakx-f7031301ae94e7f8ead3fcabf8c77208aea82438.tar.gz
drakx-f7031301ae94e7f8ead3fcabf8c77208aea82438.tar.bz2
drakx-f7031301ae94e7f8ead3fcabf8c77208aea82438.tar.xz
drakx-f7031301ae94e7f8ead3fcabf8c77208aea82438.zip
remove print coin and pwet in find_srv_name function
clean function find_srv_name
-rw-r--r--perl-install/authentication.pm31
1 files changed, 10 insertions, 21 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index a8791ad82..0b64ca17d 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -2,7 +2,6 @@ package authentication; # $Id$
use common;
use any;
-use Data::Dumper;
use Net::DNS;
sub kinds() {
@@ -62,17 +61,13 @@ sub ask_parameters {
{ label => N("LDAP Server"), val => \$authentication->{LDAP_server} },
]) or return;
} elsif ($kind eq 'AD') {
+
$authentication->{AD_domain} ||= $netc->{DOMAINNAME};
- #$authentication->{AD_server} ||= 'kerberos.' . $authentication->{AD_domain};
$authentication->{AD_users_db} ||= 'cn=users,' . domain_to_ldap_domain($authentication->{AD_domain});
- $authentication->{AD_users_idmap} ||= 'ou=idmap,' . domain_to_ldap_domain($authentication->{AD_domain});
- find_srv_name($domain);
- foreach (@data) {
- print $_."\n";
- }
+ find_srv_name($authentication->{AD_domain});
+ $authentication->{AD_server} ||= $data[0] if @data;
-
my %sub_kinds = my @sub_kinds = (
simple => N("simple"),
tls => N("TLS"),
@@ -87,7 +82,7 @@ sub ask_parameters {
N("Authentication Active Directory"),
[ { label => N("Domain"), val => \$authentication->{AD_domain} },
#{ label => N("Server"), val => \$authentication->{AD_server} },
- { label => N("Server"), type => 'bool', val => \@data },
+ { label => N("Server"), type => 'combo', val => \$authentication->{AD_server}, list => \@data , not_edit => 0 },
{ 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 } },
@@ -522,19 +517,13 @@ sub krb5_conf_update {
sub find_srv_name {
- my $domain = $_;
- print "$domain\n";
- print "coin coin \n";
- print "pwet pwet \n";
+ my ($domain) = @_;
my $res = Net::DNS::Resolver->new;
- #my $query = $res->query("_ldap._tcp.".$domain, "srv");
- my $query = $res->query("_ldap._tcp.support.mandrakesoft.com", "srv");
-
-#print Data::Dumper::Dumper($query);
-foreach ($query->answer) {
- my $srv = ($query->answer)[$_];
- #print $_->target."\n";
- push (@data,$_->target);
+ my $dom = "_ldap._tcp.".$domain;
+ my $query = $res->query("$dom", "srv");
+ foreach ($query->answer) {
+ my $srv = ($query->answer)[$_];
+ push (@data,$_->target);
}
return @data;
}