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

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