From 255923bbbdd445bbb8e6e930ad427c4067eb305b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 12 Feb 2004 14:08:15 +0000 Subject: - install ldap packages *before* doing ldapsearch - pam*.so modules do not have /lib/security/ prefix anymore --- perl-install/authentication.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl-install/authentication.pm') diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index c085adc35..df9eeb2d4 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -64,14 +64,13 @@ sub set { log::l("authentication::set $kind with $val"); if ($kind eq 'LDAP') { + $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs)); my $domain = $netc->{LDAPDOMAIN} || do { my $s = run_program::rooted_get_stdout($::prefix, 'ldapsearch', '-x', '-h', $val, '-b', '', '-s', 'base', '+'); first($s =~ /namingContexts: (.+)/); } or log::l("no ldap domain found on server $val"), return; - $in->do_pkgs->install(qw(openldap-clients nss_ldap pam_ldap autofs)); - set_nsswitch_priority('ldap'); set_pam_authentication('ldap'); set_ldap_conf($domain, $val, 1); @@ -116,7 +115,7 @@ sub pam_modules() { 'pam_ldap', 'pam_winbind', 'pam_mkhomedir'; } sub pam_module_from_path { - $_[0] && $_[0] =~ m|/lib/security/(pam_.*)\.so| && $1; + $_[0] && $_[0] =~ m|(/lib/security/)?(pam_.*)\.so| && $2; } sub pam_module_to_path { "/lib/security/$_[0].so"; -- cgit v1.2.1