From: Pierangelo Masarati Date: Thu, 5 May 2005 12:01:12 +0000 (+0000) Subject: fix previous commit: don't loop on undefined; return success with no data in case... X-Git-Tag: OPENLDAP_AC_BP~734 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ad34dc76b37c04eaca4f018cc4db2d49238b6c0;p=openldap fix previous commit: don't loop on undefined; return success with no data in case of undefined filter --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index bde4326a9d..fd57590a13 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -93,7 +93,8 @@ munge_filter( } } else { - continue; + gotit = 0; + goto done; } oldfilter = *filter; @@ -123,6 +124,7 @@ munge_filter( gotit = 1; } +done:; Debug( LDAP_DEBUG_ARGS, "<= ldap_back_munge_filter \"%s\" (%d)\n", filter->bv_val, gotit, 0 ); @@ -227,7 +229,11 @@ fail:; if ( munge_filter( op, &filter ) ) { goto retry; } - /* fallthru */ + + /* invalid filters return success with no data */ + rs->sr_err = LDAP_SUCCESS; + rs->sr_text = NULL; + goto finish; default: rs->sr_err = slap_map_api2result( rs );