summaryrefslogtreecommitdiffstats
path: root/src/ldapcontroller.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-16 15:13:14 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-16 15:13:14 +0000
commit4417da4a7a6bf2022bd9632cb75a707b3f3b34d8 (patch)
treec6f093f9c5ef25a325a5e2da4d67df06cd354831 /src/ldapcontroller.cpp
parentf668a7a584e91990eefdb0ae32bebfa99aa042e8 (diff)
downloadkcmldapcontroller-4417da4a7a6bf2022bd9632cb75a707b3f3b34d8.tar.gz
kcmldapcontroller-4417da4a7a6bf2022bd9632cb75a707b3f3b34d8.zip
Index entryCSN
Use more precise entryCSN timestamps
Diffstat (limited to 'src/ldapcontroller.cpp')
-rw-r--r--src/ldapcontroller.cpp6
1 files changed, 5 insertions, 1 deletions
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);