Bug 574167
Summary: | An escaped space at the end of the RDN value is not handled correctly | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Noriko Hosoi <nhosoi> | ||||||
Component: | Database - Import/Export | Assignee: | Noriko Hosoi <nhosoi> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 1.2.6 | CC: | jgalipea | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-12-07 16:57:21 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: | 434914 | ||||||||
Attachments: |
|
Description
Noriko Hosoi
2010-03-16 19:13:27 UTC
Created attachment 409555 [details]
git patch file (master)
Files:
ldap/ldif/template-suffix-db.ldif.in
ldap/servers/slapd/dn.c
Bug Description: If a DN contains "\ " at the end of its RDN,
it's be converted to "\20" by slapi_dn_normalize_ext in the
add operation. But the following search returns ' ' (not
an escaped space).
Fix Description: When slapi_dn_normalize_ext was applied to a
string which contains "\20", it converted the string to ' '.
This fix changes the behaviour so that the string "\20" in
DN remains untouched.
Also, this patch includes a fix to add a default suffix value
with no double quotes in template-suffix-db.ldif.in. We keep
double quoted suffix for the backward compatibility.
Created attachment 409577 [details]
test data (suffix: dc=example,dc=com)
How to verify the bug:
1) add the test data
$ /usr/lib[64]/mozldap/ldapmodify -a -f /path/to/test.ldif
2) run the search and see these 6 DNs
$ /usr/lib[64]/mozldap/ldapsearch -b "dc=example,dc=com" "(ou=#*)" dn
dn: ou=\23,dc=example,dc=com
dn: ou=\23\20,dc=example,dc=com
dn: ou=\23#,dc=example,dc=com
dn: ou=\23\3C,dc=example,dc=com
dn: ou=\23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/,dc=example,dc=com
dn: ou=\23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/\20,dc=example,dc=com
Reviewed by Nathan (Thank you!!) Pushed to master. $ git merge work Updating b65b3c9..0501282 Fast forward ldap/ldif/template-suffix-db.ldif.in | 1 + ldap/servers/slapd/dn.c | 29 ++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) $ git push Counting objects: 15, done. Delta compression using 4 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 1.37 KiB, done. Total 8 (delta 6), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git b65b3c9..0501282 master -> master fix verified - redhat-ds-base-8.2.0-2010050604.el5dsrv - RHEL 5.5 32 bit ldapsearch -x -h hostname.redhat.com -p 389 -D "cn=Directory Manager" -w secret -b "dc=example, dc=com" "(ou=#*)" dn # extended LDIF # # LDAPv3 # base <dc=example, dc=com> with scope subtree # filter: (ou=#*) # requesting: dn # # \23, example.com dn: ou=\23,dc=example,dc=com # \23\20, example.com dn: ou=\23\20,dc=example,dc=com # \23#, example.com dn: ou=\23#,dc=example,dc=com # \23\3C, example.com dn: ou=\23\3C,dc=example,dc=com # \23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/, example.com dn: ou=\23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/,dc=example,dc=com # \23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/\20, example.com dn: ou=\23\2C\2B\22\5C\3E:\3D\3C\3C\3E\3B/\20,dc=example,dc=com # search result search: 2 result: 0 Success # numResponses: 7 # numEntries: 6 |