Summary: ldif2db replaces existing modify/create name and timestamps https://bugzilla.redhat.com/show_bug.cgi?id=525007
[Problem Description] 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.
[Fix Description] 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 attributes.
[Proposed Fix] https://bugzilla.redhat.com/attachment.cgi?id=362157
Thanks to Ulf for his contribution! The fix was reviewed and pushed to master.
$ git merge work Updating b5b57df..467df90 Fast forward 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) To ssh://git.fedorahosted.org/git/389/ds.git b5b57df..467df90 master -> master
--noriko
Subject: [PATCH] 525007 ldif2db replaces existing modify/create name and timestamps
Fix contributed by Ulf Weltman (ulf.weltman@hp.com)
Description From Ulf Weltman (ulf.weltman@hp.com) In previous releases, if LDIF being imported contained createTimestamp, creatorsName, modifyTimestamp, or modifiersName, those values would be kept in the imported entries. BZ# 462922 added code to insert those attributes during 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 https://bugzilla.redhat.com/show_bug.cgi?id=525007
[Problem Description] 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.
[Fix Description] 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 attributes.
[Proposed Fix] https://bugzilla.redhat.com/attachment.cgi?id=362157
-- 389-devel mailing list 389-devel@redhat.com https://www.redhat.com/mailman/listinfo/fedora-directory-devel
389-devel@lists.fedoraproject.org