mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#2506 - fix prev patch, don't ignore undefined filters. treat as False,
test_filter will never match them anyway.
This commit is contained in:
parent
b6ef8c1876
commit
fb52e37e06
@ -60,6 +60,11 @@ bdb_filter_candidates(
|
||||
switch ( f->f_choice ) {
|
||||
case SLAPD_FILTER_COMPUTED:
|
||||
switch( f->f_result ) {
|
||||
case SLAPD_COMPARE_UNDEFINED:
|
||||
/* This technically is not the same as FALSE, but it
|
||||
* certainly will produce no matches.
|
||||
*/
|
||||
/* FALLTHRU */
|
||||
case LDAP_COMPARE_FALSE:
|
||||
BDB_IDL_ZERO( ids );
|
||||
break;
|
||||
@ -67,7 +72,8 @@ bdb_filter_candidates(
|
||||
struct bdb_info *bdb = (struct bdb_info *)op->o_bd->be_private;
|
||||
BDB_IDL_ALL( bdb, ids );
|
||||
} break;
|
||||
case SLAPD_COMPARE_UNDEFINED:
|
||||
case LDAP_SUCCESS:
|
||||
/* this is a pre-computed scope, leave it alone */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -232,11 +238,6 @@ list_candidates(
|
||||
#endif
|
||||
|
||||
for ( f = flist; f != NULL; f = f->f_next ) {
|
||||
/* Ignore undefined filters */
|
||||
if ( f->f_choice == SLAPD_FILTER_COMPUTED &&
|
||||
f->f_result == SLAPD_COMPARE_UNDEFINED ) {
|
||||
continue;
|
||||
}
|
||||
rc = bdb_filter_candidates( op, f, save, tmp,
|
||||
save+BDB_IDL_UM_SIZE );
|
||||
|
||||
|
@ -1556,7 +1556,7 @@ static int search_candidates(
|
||||
f.f_and = &nf;
|
||||
/* Dummy; we compute scope separately now */
|
||||
nf.f_choice = SLAPD_FILTER_COMPUTED;
|
||||
nf.f_result = SLAPD_COMPARE_UNDEFINED;
|
||||
nf.f_result = LDAP_SUCCESS;
|
||||
nf.f_next = xf.f_or == op->oq_search.rs_filter
|
||||
? op->oq_search.rs_filter : &xf ;
|
||||
/* Filter depth increased again, adding dummy clause */
|
||||
|
@ -51,8 +51,7 @@ filter_candidates(
|
||||
switch( f->f_result ) {
|
||||
case SLAPD_COMPARE_UNDEFINED:
|
||||
/* This technically is not the same as FALSE, but it
|
||||
* certainly will produce no matches. list_candidates
|
||||
* will take care of ignoring this filter.
|
||||
* certainly will produce no matches.
|
||||
*/
|
||||
/* FALLTHRU */
|
||||
case LDAP_COMPARE_FALSE:
|
||||
@ -709,10 +708,6 @@ list_candidates(
|
||||
|
||||
idl = NULL;
|
||||
for ( f = flist; f != NULL; f = f->f_next ) {
|
||||
if ( f->f_choice == SLAPD_FILTER_COMPUTED &&
|
||||
f->f_result == SLAPD_COMPARE_UNDEFINED ) {
|
||||
continue;
|
||||
}
|
||||
if ( (tmp = filter_candidates( op, f )) == NULL &&
|
||||
ftype == LDAP_FILTER_AND ) {
|
||||
#ifdef NEW_LOGGING
|
||||
|
Loading…
Reference in New Issue
Block a user