summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-09-21 15:12:07 -0700
committerRich Megginson <rmeggins@redhat.com>2010-09-23 15:31:20 -0600
commit343bb5840e0367524cd39fc4ab99bf22d63dc89f (patch)
tree0e186a7b847a0c2408dafcb1a09a6e06b65b490c
parent2ad2d36ca4cf9de5b79382ac3a906a254ddb20c2 (diff)
downloadds-343bb5840e0367524cd39fc4ab99bf22d63dc89f.tar.gz
ds-343bb5840e0367524cd39fc4ab99bf22d63dc89f.tar.xz
ds-343bb5840e0367524cd39fc4ab99bf22d63dc89f.zip
Bug 635987 - Incorrect sub scope search result with
ACL containing ldap:///self https://bugzilla.redhat.com/show_bug.cgi?id=635987 Description: When a basedn has no descendants, the code to take an intersection of idl (which was returned from the filter search -- filter_candidates) and the basedn was skipped in subtree_candidates (ldbm_search.c). Regardless of descendants, the intersection should be taken for the idl and a tree starting with the basedn. Note: This bug was introduced with entryrdn. (cherry picked from commit 8ac525e5ac997378f4f2a386e9b96568c8d66db5)
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_search.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 0010a58a..478d18be 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -948,12 +948,10 @@ subtree_candidates(
} else if (!has_tombstone_filter) {
*err = ldbm_ancestorid_read(be, NULL, e->ep_id, &descendants);
}
- if (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);
}
return( candidates );