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.
Created attachment 362155 [details] trivial fix proposal
Created attachment 362157 [details] New trivial fix proposal Oops, I had some incorrect logic from an earlier version of the fix.
Hi Ulf, Your fix looks good. To follow the review process, could you send out your review request containing the description and the diff to 389-devel? Having multiple reviewers is always good... :) Thanks! --noriko
Created attachment 362704 [details] git style patch file for ldap/servers/slapd/back-ldbm/import-threads.c $ 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
verified - RHEL 4 version: redhat-ds-base-8.2.0-2010060704.el4dsrv 1. Added user and modified user as Directory Manager # entry-id: 10 dn: uid=john.doe,ou=People,dc=example,dc=com uid: john.doe sn: Doe givenName: John cn: DOE John objectClass: inetorgperson objectClass: organizationalPerson objectClass: person objectClass: top creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20100607140355Z modifyTimestamp: 20100607140402Z nsUniqueId: 7e2f3a01-1dd211b2-ac1b8690-64170000 description: This is a new description. 2. ran db2ldif 3. deleted user, added user back and modified user as admin # entry-id: 11 dn: uid=john.doe,ou=People,dc=example,dc=com uid: john.doe givenName: John objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetorgperson sn: Doe cn: DOE John creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoo t createTimestamp: 20100607140937Z modifyTimestamp: 20100607141014Z nsUniqueId: 30ff9802-1dd211b2-ac1c8690-64170000 description: This is another new description. 4. ran ldif2db # entry-id: 10 dn: uid=john.doe,ou=People,dc=example,dc=com nsUniqueId: 7e2f3a01-1dd211b2-ac1b8690-64170000 uid: john.doe sn: Doe givenName: John cn: DOE John objectClass: inetorgperson objectClass: organizationalPerson objectClass: person objectClass: top creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20100607140355Z modifyTimestamp: 20100607140402Z description: This is a new description.