Blame SOURCES/0032-Ticket-49443-scope-one-searches-in-1.3.7-give-incorr.patch

081b2d
From 5f38be985bc98969b0fdaa6ece8f84b11bdddc2f Mon Sep 17 00:00:00 2001
081b2d
From: Ludwig Krispenz <lkrispen@redhat.com>
081b2d
Date: Thu, 9 Nov 2017 10:20:44 +0100
081b2d
Subject: [PATCH] Ticket 49443 - scope one searches in 1.3.7 give incorrect
081b2d
 results
081b2d
081b2d
Bug: if a onelevel search is done for an unidexed attribute, the filter test is skipped
081b2d
     and all children of the search base are returned
081b2d
081b2d
Fix: enforce filter test if allids
081b2d
081b2d
Reviewed by: Mark, thanks
081b2d
---
081b2d
 ldap/servers/slapd/back-ldbm/idl_set.c | 5 +++++
081b2d
 1 file changed, 5 insertions(+)
081b2d
081b2d
diff --git a/ldap/servers/slapd/back-ldbm/idl_set.c b/ldap/servers/slapd/back-ldbm/idl_set.c
081b2d
index ba39ff03f..b68e7ab76 100644
081b2d
--- a/ldap/servers/slapd/back-ldbm/idl_set.c
081b2d
+++ b/ldap/servers/slapd/back-ldbm/idl_set.c
081b2d
@@ -349,6 +349,11 @@ idl_set_intersect(IDListSet *idl_set, backend *be)
081b2d
 {
081b2d
     IDList *result_list = NULL;
081b2d
 
081b2d
+    if (idl_set->allids) {
081b2d
+        /* if any component was allids we have to apply the filtertest */
081b2d
+        slapi_be_set_flag(be, SLAPI_BE_FLAG_DONT_BYPASS_FILTERTEST);
081b2d
+    }
081b2d
+
081b2d
     if (idl_set->allids != 0 && idl_set->count == 0) {
081b2d
         /*
081b2d
          * We only have allids, so must be allids.
081b2d
-- 
081b2d
2.13.6
081b2d