From d30933af36cc593cb4442669dda1ee4fbe722055 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 5 May 2005 00:31:11 +0000 Subject: [PATCH] fix previous commit --- servers/slapd/back-ldap/search.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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=*))"; } } -- 2.39.5