andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

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

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