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:
leitner
2018-09-09 10:42:43 +00:00
parent 706ae2e927
commit f45346d608
2 changed files with 9 additions and 2 deletions

1
ldap.h
View File

@@ -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);

View File

@@ -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;
}
}
}
}