slapi-nis/SOURCES/slapi-nis-bz1958909.patch

42 lines
1.3 KiB
Diff

From d18b1d105c928363eddec87af37fda0757cfb440 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Thu, 1 Jul 2021 11:37:38 +0300
Subject: [PATCH] back-sch: reuse backend_should_descend
When backend_search_find_set_dn_cb() is called, use the same logic as in
other callbacks -- identify whether we should descend into the group by
using backend_should_descend().
The issue was introduced in 2015 with ID Views support but was masked
until 61ea8f6a104da25329e301a8f56944f860de8177 as we always felt through
to the full scan of the groups anyway. with the latter change the
fell-through part was removed.
Resolves: rhbz#1958909
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: Thierry Bordaz <tbordaz@redhat.com>
---
src/back-sch.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/back-sch.c b/src/back-sch.c
index d806627..0ed06fb 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1369,8 +1369,9 @@ backend_search_find_set_dn_cb(const char *group, void *cb_data)
/* Check the group itself. */
group_dn = slapi_sdn_new_dn_byval(group);
- if (slapi_sdn_scope_test(group_dn, cbdata->target_dn,
- cbdata->scope) == 1) {
+ if (backend_should_descend(group_dn,
+ cbdata->target_dn,
+ cbdata->scope)) {
cbdata->answer = TRUE;
slapi_sdn_free(&group_dn);
return TRUE;
--
2.31.1