]> git.sur5r.net Git - openldap/commitdiff
fix previous commit
authorPierangelo Masarati <ando@openldap.org>
Thu, 5 May 2005 00:31:11 +0000 (00:31 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 5 May 2005 00:31:11 +0000 (00:31 +0000)
servers/slapd/back-ldap/search.c

index 3ee82956df15a42ee545a399c0faf8eabdc1dba8..37aae39db13ae09aae3cb00ab067e1674f045ed5 100644 (file)
@@ -118,11 +118,22 @@ ldap_back_search(
 
        /* deal with <draft-zeilenga-ldap-t-f> 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=*))";
                }
        }