[Koha-bugs] [Bug 7099] ActiveDirectory authentication thru LDAP doesn't work when principal_name is used with update or replicate

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 27 09:40:12 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7099

--- Comment #2 from wallen_tan at southville.edu.ph 2011-10-27 07:40:12 UTC ---
Proposed solution:

--- Auth_with_ldap.pm.old       2011-10-27 15:30:52.808209008 +0800
+++ Auth_with_ldap.pm   2011-10-27 15:23:00.788208927 +0800
@@ -55,7 +55,7 @@
 my $base      = $ldap->{base}          or die ldapserver_error('base');
 $ldapname     = $ldap->{user}          ;
 $ldappassword = $ldap->{pass}          ;
-our %mapping  = %{$ldap->{mapping}} || (); #   or die
ldapserver_error('mapping');
+our %mapping  = %{$ldap->{mapping}}; # or die ldapserver_error('mapping');
 my @mapkeys = keys %mapping;
 $debug and print STDERR "Got ", scalar(@mapkeys), " ldap mapkeys (  total  ):
", join ' ', @mapkeys, "\n";
 @mapkeys = grep {defined $mapping{$_}->{is}} @mapkeys;
@@ -119,6 +119,10 @@
             $debug and warn "LDAP bind failed as kohauser $principal_name: ".
description($res);
             return 0;
         }
+
+               #Create an entry for userldapentry even during principal name
auth
+               my $search = search_method($db, $userid) or return 0;   #
warnings are in the sub
+        $userldapentry = $search->shift_entry;
        } else {
         my $search = search_method($db, $userid) or return 0;   # warnings are
in the sub
         $userldapentry = $search->shift_entry;

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list