Bug 635987
| Summary: | Incorrect sub scope search result with ACL containing ldap:///self | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Andrey Ivanov <andrey.ivanov> | ||||||||
| Component: | Database - Indexes/Searches | Assignee: | Noriko Hosoi <nhosoi> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | low | ||||||||||
| Version: | 1.2.6 | CC: | rmeggins | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2015-12-07 16:36:27 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 576869, 639035 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Andrey Ivanov
2010-09-21 09:06:38 UTC
Created attachment 448655 [details]
LDIF test case for the bug
Created attachment 448824 [details]
git patch file (master)
Thank you so much, Andrey. This bug is pretty bad for the search when the basedn is a leaf in DIT as you discovered. Not just for the ACL, but there should have been a performance impact in such cases. As you guessed, it was introduced with the entryrdn. So, 389 v1.2.6 contains this bug (not 1.2.5 and older).
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.
Reviewed by Rich (Thanks!!!) Pushed to master. $ git merge 635987 Updating 62cc84c..8ac525e Fast-forward ldap/servers/slapd/back-ldbm/ldbm_search.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) $ git push Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 896 bytes, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 62cc84c..8ac525e master -> master Created attachment 449487 [details] revised git patch file (master) Thanks to Rich for analysing the bug introduced by the previous commit. The attached patch should fix it. Description: This commit made for the bug 635987 introduced a bug to replication. commit 8ac525e5ac997378f4f2a386e9b96568c8d66db5 Author: Noriko Hosoi <nhosoi> 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). Reviewed by Rich (Thank you!!!) Pushed to master. $ git push Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.04 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git dcfd94b..a7de5f2 master -> master Since nightly GER acceptance test passes 100%, mark verified. Ger run(o=ace industry,c=us) Tests PASS : 100% (360/360) |