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