remove debug printf from acl
add return value comment to ldap.h actually double-check index "maybe" hits in lookupdn
This commit is contained in:
1
ldap.h
1
ldap.h
@@ -5,6 +5,7 @@
|
||||
#include <inttypes.h>
|
||||
#include "asn1.h"
|
||||
|
||||
/* return zero if same, otherwise nonzero */
|
||||
int matchstring(struct string* s,const char* c);
|
||||
int matchcasestring(struct string* s,const char* c);
|
||||
int matchprefix(struct string* s,const char* c);
|
||||
|
||||
10
tinyldap.c
10
tinyldap.c
@@ -1431,8 +1431,14 @@ static int lookupdn(struct string* dn,size_t* index, struct hashnode** hn) {
|
||||
}
|
||||
for (; i<=result.last; ++i) {
|
||||
if (isset(&result,i)) {
|
||||
*index=i;
|
||||
return 1;
|
||||
uint32 j;
|
||||
uint32_unpack(map+indices_offset+4*i,&j);
|
||||
uint32 k;
|
||||
uint32_unpack(map+j+8,&k);
|
||||
if (!matchstring(dn,map+k)) {
|
||||
*index=i;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user