From 4417da4a7a6bf2022bd9632cb75a707b3f3b34d8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 16 Jul 2013 15:13:14 +0000 Subject: Index entryCSN Use more precise entryCSN timestamps --- src/ldapcontroller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.1