summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-04-14 15:58:05 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-04-14 15:58:05 +0000
commit790c029f058ac1f565ddd5fffeed9c042ef2e142 (patch)
treeb668638474a66e22a1372e7956dc12761fd069c7
parent60477e6339922616359e7da62787fe7d7c43c03e (diff)
downloaddrakx-790c029f058ac1f565ddd5fffeed9c042ef2e142.tar
drakx-790c029f058ac1f565ddd5fffeed9c042ef2e142.tar.gz
drakx-790c029f058ac1f565ddd5fffeed9c042ef2e142.tar.bz2
drakx-790c029f058ac1f565ddd5fffeed9c042ef2e142.tar.xz
drakx-790c029f058ac1f565ddd5fffeed9c042ef2e142.zip
Correctly handling LDAP auth (#43062).
-rw-r--r--perl-install/authentication.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm
index d159b36c4..fba1b7290 100644
--- a/perl-install/authentication.pm
+++ b/perl-install/authentication.pm
@@ -101,6 +101,9 @@ sub ask_parameters {
#$authentication->{nssgrp} = "0";
$authentication->{ccreds} = 1;
+ # this package must be installed for 'Fetch DN' button to actually work
+ $in->do_pkgs->ensure_are_installed([ 'openldap-clients' ], 1) or return;
+
$in->ask_from('', N(" "),
[ { label => N("Welcome to the Authentication Wizard"), title => 1 },
{},
@@ -351,6 +354,10 @@ server=$authentication->{LDAP_server}
realm=$authentication->{LDAPDOMAIN}
EOF
+ if ($authentication->{ccreds}) {
+ run_program::rooted($::prefix, '/usr/sbin/nss_updatedb.cron'); # updates offline cache.
+ }
+
} elsif ($kind eq 'KRB5') {
configure_krb5_for_AD($authentication);
@@ -612,7 +619,7 @@ sub set_pam_authentication {
sub set_nsswitch_priority {
#my (@kinds) = @_;
my ($kinds, $connected) = @_;
- my @known = qw(nis ldap winbind);
+ my @known = qw(nis ldap winbind compat);
substInFile {
if (my ($database, $l) = /^(\s*(?:passwd|shadow|group|automount):\s*)(.*)/) {
my @l = difference2([ split(' ', $l) ], \@known);
@@ -914,7 +921,6 @@ sub get_server_for_domain {
sub fetch_dn {
my ($srv) = @_;
- #print "$srv";
my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $srv, '-b', '', '-s', 'base', '+');
$authentication->{LDAPDOMAIN} = first($s =~ /namingContexts: (.+)/);
return $authentication->{LDAPDOMAIN};