|
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 |
- |
|
|