Thanks to Ulf for his contribution! The fix was reviewed and pushed to
$ git merge work
ldap/servers/slapd/back-ldbm/import-threads.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
$ git push
Counting objects: 13, done.
Delta compression using 2 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.17 KiB, done.
Total 7 (delta 5), reused 0 (delta 0)
b5b57df..467df90 master -> master
Subject: [PATCH] 525007 ldif2db replaces existing modify/create name
Fix contributed by Ulf Weltman (ulf.weltman(a)hp.com)
Description From Ulf Weltman (ulf.weltman(a)hp.com)
In previous releases, if LDIF being imported contained createTimestamp,
creatorsName, modifyTimestamp, or modifiersName, those values would be
the imported entries. BZ# 462922 added code to insert those
import but it clobbers any values existing in the LDIF being
imported. I think
the imported values should take precedence, this would be useful during
migration for example.
If anyone wants to take advantage of the new behavior where the server
provisions new values, they can strip out the values from the LDIF before
importing or they can set nsslapd-exclude-from-export to not export those
attributes before importing.
See also https://bugzilla.redhat.com/show_bug.cgi?id=525007
Reviewed by richm, nkinder, and nhosoi
On 09/25/2009 10:49 AM, Ulf Weltman wrote:
Summary: ldif2db replaces existing modify/create name and timestamps
LDIF that is imported might contain createTimestamp, creatorsName,
modifyTimestamp, or modifiersName. The import code since FDS 1.2
inserts these attributes but it should only do so if they're missing;
any existing values should take precedence.
Only insert the attributes if they don't already exist in the entry.
attrlist_find() rather than slapi_entry_attr_find() is used because
the latter reports attributes with empty values as being missing
389-devel mailing list