diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-16 15:13:14 +0000 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-16 15:13:14 +0000 |
commit | 4417da4a7a6bf2022bd9632cb75a707b3f3b34d8 (patch) | |
tree | c6f093f9c5ef25a325a5e2da4d67df06cd354831 | |
parent | f668a7a584e91990eefdb0ae32bebfa99aa042e8 (diff) | |
download | kcmldapcontroller-4417da4a7a6bf2022bd9632cb75a707b3f3b34d8.tar.gz kcmldapcontroller-4417da4a7a6bf2022bd9632cb75a707b3f3b34d8.zip |
Index entryCSN
Use more precise entryCSN timestamps
-rw-r--r-- | confskel/openldap/ldif/config.ldif | 2 | ||||
-rw-r--r-- | confskel/openldap/ldif/moduleConfig.ldif | 2 | ||||
-rw-r--r-- | confskel/openldap/ldif/olcConfig.ldif | 2 | ||||
-rw-r--r-- | confskel/openldap/ldif/olcDatabase.ldif | 3 | ||||
-rw-r--r-- | confskel/openldap/ldif/schema.ldif | 2 | ||||
-rw-r--r-- | confskel/openldap/skel.ldif | 36 | ||||
-rw-r--r-- | src/ldapcontroller.cpp | 6 |
7 files changed, 29 insertions, 24 deletions
diff --git a/confskel/openldap/ldif/config.ldif b/confskel/openldap/ldif/config.ldif index 1d3b2d6..901e58f 100644 --- a/confskel/openldap/ldif/config.ldif +++ b/confskel/openldap/ldif/config.ldif @@ -39,7 +39,7 @@ olcWriteTimeout: 0 structuralObjectClass: olcGlobal creatorsName: cn=config createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 entryUUID: @@@ENTRYUUID@@@ modifiersName: cn=config modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/confskel/openldap/ldif/moduleConfig.ldif b/confskel/openldap/ldif/moduleConfig.ldif index 880cb21..1e65f27 100644 --- a/confskel/openldap/ldif/moduleConfig.ldif +++ b/confskel/openldap/ldif/moduleConfig.ldif @@ -11,7 +11,7 @@ olcModuleLoad: {5}ppolicy structuralObjectClass: olcModuleList creatorsName: cn=config createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 entryUUID: @@@ENTRYUUID@@@ modifiersName: cn=config modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/confskel/openldap/ldif/olcConfig.ldif b/confskel/openldap/ldif/olcConfig.ldif index 7b468e7..72ae6a7 100644 --- a/confskel/openldap/ldif/olcConfig.ldif +++ b/confskel/openldap/ldif/olcConfig.ldif @@ -19,7 +19,7 @@ olcMonitoring: FALSE structuralObjectClass: olcDatabaseConfig creatorsName: cn=config createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 entryUUID: @@@ENTRYUUID@@@ modifiersName: cn=config modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/confskel/openldap/ldif/olcDatabase.ldif b/confskel/openldap/ldif/olcDatabase.ldif index 7149c8d..d960379 100644 --- a/confskel/openldap/ldif/olcDatabase.ldif +++ b/confskel/openldap/ldif/olcDatabase.ldif @@ -33,6 +33,7 @@ olcDbConfig: {2}set_lg_bsize 2097152 olcDbNoSync: FALSE olcDbDirtyRead: FALSE olcDbIDLcacheSize: 0 +olcDbIndex: entryCSN eq olcDbIndex: objectClass eq olcDbIndex: krb5PrincipalName eq,pres olcDbIndex: cn eq,pres,subinitial @@ -50,7 +51,7 @@ olcPlugin: postoperation @@@TDELIBDIR@@@/slapi-acl-manager.so plugin_init adming structuralObjectClass: olcHdbConfig creatorsName: cn=config createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 entryUUID: @@@ENTRYUUID@@@ modifiersName: cn=config modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/confskel/openldap/ldif/schema.ldif b/confskel/openldap/ldif/schema.ldif index b8a7529..5cd57e4 100644 --- a/confskel/openldap/ldif/schema.ldif +++ b/confskel/openldap/ldif/schema.ldif @@ -807,6 +807,6 @@ olcLdapSyntaxes: ( 1.3.6.1.4.1.4203.666.2.1 DESC 'OpenLDAP Experimental ACI' ) structuralObjectClass: olcSchemaConfig creatorsName: cn=config createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=config modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/confskel/openldap/skel.ldif b/confskel/openldap/skel.ldif index a5ace18..1755554 100644 --- a/confskel/openldap/skel.ldif +++ b/confskel/openldap/skel.ldif @@ -17,10 +17,10 @@ OpenLDAPaci: 3#subtree#grant;r,w,s,c;[all]#access-id#uid=@@@ADMINUSER@@@,ou=user structuralObjectClass: organization creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z -contextCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +contextCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 dn: ou=realm,@@@REALM_DCNAME@@@ emscontainertype: EmsControl @@ -34,7 +34,7 @@ emsmodelclass: EMSOrganizationalUnit structuralObjectClass: organizationalUnit creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -50,7 +50,7 @@ emsmodelclass: EMSOrganizationalUnit structuralObjectClass: organizationalUnit creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -66,7 +66,7 @@ cn: Master Services structuralObjectClass: organizationalUnit creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -84,7 +84,7 @@ krb5RealmName: @@@REALM_UCNAME@@@ structuralObjectClass: namedObject creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -94,7 +94,7 @@ cn: TDE Realm Data structuralObjectClass: namedObject creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -110,7 +110,7 @@ objectClass: emsIgnore structuralObjectClass: organization creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -126,7 +126,7 @@ objectClass: emsIgnore structuralObjectClass: organization creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -142,7 +142,7 @@ emsmodelclass: EMSOrganizationalUnit structuralObjectClass: organizationalUnit creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -168,7 +168,7 @@ emsmodelclass: EMSGroup structuralObjectClass: groupOfNames creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -194,7 +194,7 @@ emsmodelclass: EMSGroup structuralObjectClass: groupOfNames creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -220,7 +220,7 @@ emsmodelclass: EMSGroup structuralObjectClass: groupOfNames creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -236,7 +236,7 @@ emsmodelclass: EMSOrganizationalUnit structuralObjectClass: organizationalUnit creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -276,7 +276,7 @@ creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z krb5KeyVersionNumber: 1 krb5EncryptionType: 23 -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -289,7 +289,7 @@ tdeBuiltinAccount: TRUE structuralObjectClass: applicationProcess creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ modifyTimestamp: @@@TIMESTAMP@@@Z @@ -306,6 +306,6 @@ builtinMachineAdminGroup: cn=@@@LOCALADMINGROUP@@@,ou=groups,ou=core,ou=realm,@@ builtinStandardUserGroup: cn=@@@STANDARDUSERGROUP@@@,ou=groups,ou=core,ou=realm,@@@REALM_DCNAME@@@ creatorsName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ createTimestamp: @@@TIMESTAMP@@@Z -entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000 +entryCSN: @@@TIMESTAMP@@@.@@@TIMESTAMP_MICROSECONDS@@@Z#000000#000#000000 modifiersName: cn=@@@ROOTUSER@@@,@@@REALM_DCNAME@@@ -modifyTimestamp: @@@TIMESTAMP@@@Z
\ No newline at end of file +modifyTimestamp: @@@TIMESTAMP@@@Z diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp index bf7a067..5f653d1 100644 --- a/src/ldapcontroller.cpp +++ b/src/ldapcontroller.cpp @@ -995,7 +995,8 @@ void replacePlaceholdersInFile(TQString infile, TQString outfile, LDAPRealmConfi TQString simpledcname = domainChunks[0]; TQString simpledcnamecap = simpledcname.lower(); simpledcnamecap[0] = simpledcnamecap[0].upper(); - TQString timestamp = TQDateTime::currentDateTime().toString(TQt::ISODate); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); + TQString timestamp = currentDateTime.toString(TQt::ISODate); timestamp.replace("-", ""); timestamp.replace(":", ""); timestamp.replace("T", ""); @@ -1004,6 +1005,8 @@ void replacePlaceholdersInFile(TQString infile, TQString outfile, LDAPRealmConfi uuid = randomUUID.toString(); uuid.replace("{", ""); uuid.replace("}", ""); + TQString timestamp_us; + timestamp_us = timestamp_us.sprintf("%06d", currentDateTime.time().msec()*1000); TQString kdc_certfile = KERBEROS_PKI_KDC_FILE; TQString kdc_keyfile = KERBEROS_PKI_KDCKEY_FILE; @@ -1044,6 +1047,7 @@ void replacePlaceholdersInFile(TQString infile, TQString outfile, LDAPRealmConfi line.replace("@@@REALM_SIMPLE_CP_NAME@@@", simpledcnamecap); line.replace("@@@REALM_SIMPLE_LC_NAME@@@", simpledcname.lower()); line.replace("@@@TIMESTAMP@@@", timestamp); + line.replace("@@@TIMESTAMP_MICROSECONDS@@@", timestamp_us); line.replace("@@@ENTRYUUID@@@", uuid); line.replace("@@@LDAP_KEYTAB_FILE@@@", LDAP_KEYTAB_FILE); line.replace("@@@LDAP_USER_NAME@@@", ldapusername); |