Special thanks to Andrey Ivanov for the discussion. It was very helpful. I revised the patch to adjust the parent DN if it's different from the existing one in DB.
https://bugzilla.redhat.com/show_bug.cgi?id=628300
https://bugzilla.redhat.com/attachment.cgi?id=442069&action=diff https://bugzilla.redhat.com/attachment.cgi?id=442069&action=diff
Description: Code for supporting entrydn (added for Bug 578296) contained a bug. If an entry was found in the entry cache, id2entry_ext returned it without adding the entrydn attribute value. This patch fixes the problem. In addition, if the parent DN in the to-be-added entry is not identical to the real parent DN (e.g., dc=eXAmple vs. dc=example), replace the string with the real parent DN. This check& replace is done only when the parent entry is in the entry cache not to sacrifice the performance.
And sorry to dear Reviewers, I could not resist fixing 3 indentations... --noriko
https://bugzilla.redhat.com/show_bug.cgi?id=628300
https://bugzilla.redhat.com/attachment.cgi?id=442238&action=diff https://bugzilla.redhat.com/attachment.cgi?id=442238&action=edit
Thanks to Andrey for testing the patch I sent out for reviewing. He found a bug in the patch, which forgot to return found entries to the cache.
Description: Code for supporting entrydn (added for Bug 578296) contained a bug. If an entry was found in the entry cache, id2entry_ext returned it without adding the entrydn attribute value. This patch fixes the problem. In addition, if the parent DN in the to-be-added entry is not identical to the real parent DN (e.g., dc=eXAmple vs. dc=example), replace the string with the real parent DN. This check& replace is done only when the parent entry is in the entry cache not to sacrifice the performance.
389-devel@lists.fedoraproject.org