From: Pierangelo Masarati Date: Thu, 5 May 2005 00:31:11 +0000 (+0000) Subject: fix previous commit X-Git-Tag: OPENLDAP_AC_BP~736 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d30933af36cc593cb4442669dda1ee4fbe722055;p=openldap fix previous commit --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 3ee82956df..37aae39db1 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -118,11 +118,22 @@ ldap_back_search( /* deal with filters */ filter = op->ors_filterstr.bv_val; - if ( li->flags & LDAP_BACK_F_SUPPORT_T_F ) { - if ( bvmatch( &op->ors_filterstr, &bv_true ) ) { + if ( bvmatch( &op->ors_filterstr, &bv_true ) ) { + if ( li->flags & LDAP_BACK_F_SUPPORT_T_F ) { filter = "(&)"; - } else if ( bvmatch( &op->ors_filterstr, &bv_false ) ) { + + } else { + /* better than nothing... */ + filter = "(objectClass=*)"; + } + + } else if ( bvmatch( &op->ors_filterstr, &bv_false ) ) { + if ( li->flags & LDAP_BACK_F_SUPPORT_T_F ) { filter = "(|)"; + + } else { + /* better than nothing... */ + filter = "(!(objectClass=*))"; } }