mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
only optimize objectClass filters when (objectClass=*) is
presented... avoids (&(objectClass=*)(objectClass=foo)) problems.
This commit is contained in:
parent
07a6d6c208
commit
e6fdfd4cee
1 changed files with 6 additions and 3 deletions
|
|
@ -731,16 +731,19 @@ static int oc_filter(
|
|||
|
||||
switch(f->f_choice) {
|
||||
case LDAP_FILTER_PRESENT:
|
||||
if (f->f_desc == slap_schema.si_ad_objectClass)
|
||||
if (f->f_desc == slap_schema.si_ad_objectClass) {
|
||||
rc = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case LDAP_FILTER_AND:
|
||||
case LDAP_FILTER_OR:
|
||||
cur++;
|
||||
for (f=f->f_and; f; f=f->f_next)
|
||||
rc |= oc_filter(f, cur, max);
|
||||
for (f=f->f_and; f; f=f->f_next) {
|
||||
(void) oc_filter(f, cur, max);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue