From d18b1d105c928363eddec87af37fda0757cfb440 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Jul 01 2021 09:13:12 +0000 Subject: 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 Signed-off-by: Thierry Bordaz --- 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;