Bug 693962 - Full replica push loses some entries with multi-valued RDNs
https://bugzilla.redhat.com/show_bug.cgi?id=693962
Resolves: bug 693962
Bug Description: Full replica push loses some entries with multi-valued RDNs
Reviewed by: nhosoi (Thanks!)
Branch: RHEL-6
Fix Description: The code in _entryrdn_insert_key was assuming the srdn
passed in was already normalized. This is not true in some cases where
the data is coming from a source of old data such as replication with an
older server. The solution is to make sure the rdn code always
normalizes the code using slapi_dn_normalize_case_ext() instead of
slapi_dn_normalize_case() which now doesn't do any normalization, it just
converts the given string to lower case. I added a function
normalize_case_helper() to return a normalized dn as a copy or in place
depending on the arguments.
Tested with gdb - stepped through and verified the char arrays are correctly
replaced, and copy values are correctly assigned.
Used valgrind with online import to verify no leaks or errors.
Exported a netscaperoot ldif from an older 1.2.8 server and imported with
the new code. Verified that the dbscan -f entryrdn.db4 output was
identical between the two.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 2472169b3e077ff379812f9e91f439ce1e4edffb)
(cherry picked from commit 54b95201cfc274c72e2364f49fc21b8a8e8fa688)