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

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

Return to bug 8148