Bug 640027
Summary: | Naming attribute with a special char sequence parsing bug | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Andrey Ivanov <andrey.ivanov> | ||||
Component: | Database - Indexes/Searches | Assignee: | Noriko Hosoi <nhosoi> | ||||
Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2.6 | CC: | benl, nkinder, rmeggins, sramling | ||||
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: | 2011-01-03 19:54:12 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, 636700, 639035 | ||||||
Attachments: |
|
Description
Andrey Ivanov
2010-10-04 15:18:39 UTC
Thanks, Andrey. It's a bug... Although '+' is escaped, the normalizer is thinking it's a separator in the RDN. :( Hi Noriko. I thought the same thing about '+' but as i said it works only in the case '+=' followed by ';'. '+' itself is ok... Hi Andrey. Thanks for the quick input! Hmmm, the dn normalizer is confused more than I thought... Since you provided me the perl script to reproduce the bug, I have the duplicated case handy. (Thanks!) Let me go through the code... Created attachment 451775 [details]
git patch file (master)
Description: When DN is made from RDNs containing escaped plus
"\+", the dn normalizer considers the value could be nested multi-
valued RDNs. (e.g., cn=C\=Z\+A\=X\+B\=Y\,o\=O,o=OO)
In that case, multi-valued RDNs are sorted by the normalizer.
(==> cn=A\=X\+B\=Y\+C\=Z\,o\=O,o=OO)
The sample DN provided by Andrey Ivanov contains "\+", but that
is not a separator for the multi-valued RDNs:
cn=mytest\+\=-123'\;456,dc=example,dc=com
The dn normalizer should have checked the possibility, as well.
The check is added in this patch.
Also, sorting was not triggered if multi-valued RDNs are located
at the end of the value. (e.g., cn=C\=X\,B\=Y\+A\=Z,o=OO)
The bug was fixed, as well.
File: ldap/servers/slapd/dn.c
Reviewed by Nathan (Thank you!!). Pushed to master. $ git merge 640027 Updating c783496..9a00a44 Fast-forward ldap/servers/slapd/dn.c | 56 +++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 50 insertions(+), 6 deletions(-) $ git push Counting objects: 11, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 1.43 KiB, done. Total 6 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git c783496..9a00a44 master -> master Pushed to Directory_Server_8_2_Branch. Counting objects: 29, done. Delta compression using up to 2 threads. Compressing objects: 100% (21/21), done. Writing objects: 100% (21/21), 4.23 KiB, done. Total 21 (delta 15), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 1176d3f..975f86c ds82-local -> Directory_Server_8_2_Branch Bug verified with the redhat-ds-base 8.2.3 build. Steps to verify. 1. Add users from the ldif file. dn: cn=mytest\2B\3D-123'\3B456,dc=example,dc=com objectClass: top objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person sn: Last Name givenName: First Name cn: mytest+=-123';456 dn: cn=C\=Z\+A\=X\+B\=Y\,o\=O\,o=OO,dc=example,dc=com objectClass: top objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person sn: Last Name givenName: First Name cn: C=Z+A=X+B=Y,o=O,o=OO dn: cn="cn=A, ou=B, o=C", dc=example,dc=com objectClass: top objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person sn: Last Name givenName: First Name cn: "cn=A, ou=B, o=C" 2. Check whether the corresponding entries added to the LDAP. 3. Result: Successfully adds the corresponding entries as per the ldif file. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0003.html |