diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-09-24 11:42:31 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-09-24 12:10:14 -0700 |
commit | a7de5f2a4323d224c63f722172eee8b63752fb45 (patch) | |
tree | 9729413f982be9753c9b87b786fa430d158bb53c /ldap/servers/slapd/back-ldbm | |
parent | dcfd94bd55a5e07f870f9ab1ea9d84a3f171b899 (diff) | |
download | ds-a7de5f2a4323d224c63f722172eee8b63752fb45.tar.gz ds-a7de5f2a4323d224c63f722172eee8b63752fb45.tar.xz ds-a7de5f2a4323d224c63f722172eee8b63752fb45.zip |
Bug 635987 - Incorrect sub scope search result with ACL containing ldap:///self
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).
Diffstat (limited to 'ldap/servers/slapd/back-ldbm')
-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 30674960..568d32c6 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_search.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c @@ -957,13 +957,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 ); |