amoralej / rpms / 389-ds-base

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

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

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