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

(-)a/C4/Auth.pm (+1 lines)
Lines 1506-1511 sub checkpw { Link Here
1506
    if ($ldap) {
1506
    if ($ldap) {
1507
        $debug and print STDERR "## checkpw - checking LDAP\n";
1507
        $debug and print STDERR "## checkpw - checking LDAP\n";
1508
        my ($retval,$retcard,$retuserid) = checkpw_ldap(@_);    # EXTERNAL AUTH
1508
        my ($retval,$retcard,$retuserid) = checkpw_ldap(@_);    # EXTERNAL AUTH
1509
        return 0 if $retval == -1;
1509
        ($retval) and return ($retval,$retcard,$retuserid);
1510
        ($retval) and return ($retval,$retcard,$retuserid);
1510
    }
1511
    }
1511
1512
(-)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