diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-09-24 11:42:31 -0700 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-09-24 13:11:47 -0600 |
commit | 53f788bbae3f6c0a27466764c50b1858a69d1220 (patch) | |
tree | f7be78b260554061c5e529347cfee9d29d615c44 | |
parent | 343bb5840e0367524cd39fc4ab99bf22d63dc89f (diff) | |
download | ds-53f788bbae3f6c0a27466764c50b1858a69d1220.tar.gz ds-53f788bbae3f6c0a27466764c50b1858a69d1220.tar.xz ds-53f788bbae3f6c0a27466764c50b1858a69d1220.zip |
Bug 635987 - Incorrect sub scope search result with ACL containing ldap:///self389-ds-base-1.2.6.1
https://bugzilla.redhat.com/show_bug.cgi?id=635987
Description:
This commit made for the bug 635987 introduced a bug to replication.
commit 8ac525e5ac997378f4f2a386e9b96568c8d66db5
Author: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue Sep 21 15:12:07 2010 -0700
subtree_candidates (ldbm_search.c)
If you do have a tombstone filter, descendants will be NULL,
and idl_intersection of candidates and descendents will wipe
out all of the candidates, leaving just the one entry, e->ep_id.
Changed to call idl_intersection only when the filter is not
for tombstone or entryrdn_get_noancestorid (false, by default).
(cherry picked from commit a7de5f2a4323d224c63f722172eee8b63752fb45)
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_search.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c index 478d18be..1b7c2e97 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_search.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c @@ -945,13 +945,17 @@ subtree_candidates( *err = entryrdn_get_subordinates(be, slapi_entry_get_sdn_const(e->ep_entry), e->ep_id, &descendants, NULL); + idl_insert(&descendants, e->ep_id); + candidates = idl_intersection(be, candidates, descendants); + idl_free(tmp); + idl_free(descendants); } else if (!has_tombstone_filter) { *err = ldbm_ancestorid_read(be, NULL, e->ep_id, &descendants); - } - idl_insert(&descendants, e->ep_id); - candidates = idl_intersection(be, candidates, descendants); - idl_free(tmp); - idl_free(descendants); + idl_insert(&descendants, e->ep_id); + candidates = idl_intersection(be, candidates, descendants); + idl_free(tmp); + idl_free(descendants); + } /* else == has_tombstone_filter: do nothing */ } return( candidates ); |