View | Details | Raw Unified | Return to bug 8148
Collapse All | Expand All

(-)a/C4/Auth.pm (+1 lines)
Lines 1544-1549 sub checkpw { Link Here
1544
    if ($ldap) {
1544
    if ($ldap) {
1545
        $debug and print STDERR "## checkpw - checking LDAP\n";
1545
        $debug and print STDERR "## checkpw - checking LDAP\n";
1546
        my ($retval,$retcard,$retuserid) = checkpw_ldap(@_);    # EXTERNAL AUTH
1546
        my ($retval,$retcard,$retuserid) = checkpw_ldap(@_);    # EXTERNAL AUTH
1547
        return 0 if $retval == -1;
1547
        ($retval) and return ($retval,$retcard,$retuserid);
1548
        ($retval) and return ($retval,$retcard,$retuserid);
1548
    }
1549
    }
1549
1550
(-)a/C4/Auth_with_ldap.pm (-3 / +4 lines)
Lines 88-94 sub search_method { Link Here
88
		  base => $base,
88
		  base => $base,
89
	 	filter => $filter,
89
	 	filter => $filter,
90
		# attrs => ['*'],
90
		# attrs => ['*'],
91
	) or die "LDAP search failed to return object.";
91
    );
92
    die "LDAP search failed to return object : " . $search->error if $search->code;
93
92
	my $count = $search->count;
94
	my $count = $search->count;
93
	if ($search->code > 0) {
95
	if ($search->code > 0) {
94
		warn sprintf("LDAP Auth rejected : %s gets %d hits\n", $filter->as_string, $count) . description($search);
96
		warn sprintf("LDAP Auth rejected : %s gets %d hits\n", $filter->as_string, $count) . description($search);
Lines 163-169 sub checkpw_ldap { Link Here
163
		my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword', value => $password );
165
		my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword', value => $password );
164
		if ($cmpmesg->code != 6) {
166
		if ($cmpmesg->code != 6) {
165
			warn "LDAP Auth rejected : invalid password for user '$userid'. " . description($cmpmesg);
167
			warn "LDAP Auth rejected : invalid password for user '$userid'. " . description($cmpmesg);
166
			return 0;
168
			return -1;
167
		}
169
		}
168
	}
170
	}
169
171
170
- 

Return to bug 8148