summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-11 15:16:43 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-11 15:16:43 +0000
commitf35e568ef49de330e089a774a857d0bddbc89787 (patch)
tree5e9f6947472ae7051b1e78429d2c03aa8cdf527b
parent253f6abaf56ce0008b11aa4db03f09d024efc7ab (diff)
downloadkcmldapcontroller-f35e568e.tar.gz
kcmldapcontroller-f35e568e.zip
Add missing entryUUID values to base LDAP databases
-rw-r--r--confskel/openldap/ldif/config.ldif1
-rw-r--r--confskel/openldap/ldif/moduleConfig.ldif1
-rw-r--r--confskel/openldap/ldif/olcConfig.ldif1
-rw-r--r--confskel/openldap/ldif/olcDatabase.ldif1
-rw-r--r--src/ldapcontroller.cpp7
5 files changed, 11 insertions, 0 deletions
diff --git a/confskel/openldap/ldif/config.ldif b/confskel/openldap/ldif/config.ldif
index 2c07bb9..1d3b2d6 100644
--- a/confskel/openldap/ldif/config.ldif
+++ b/confskel/openldap/ldif/config.ldif
@@ -40,5 +40,6 @@ structuralObjectClass: olcGlobal
creatorsName: cn=config
createTimestamp: @@@TIMESTAMP@@@Z
entryCSN: @@@TIMESTAMP@@@.000000Z#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 e4d9bb0..880cb21 100644
--- a/confskel/openldap/ldif/moduleConfig.ldif
+++ b/confskel/openldap/ldif/moduleConfig.ldif
@@ -12,5 +12,6 @@ structuralObjectClass: olcModuleList
creatorsName: cn=config
createTimestamp: @@@TIMESTAMP@@@Z
entryCSN: @@@TIMESTAMP@@@.000000Z#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 a705bae..7b468e7 100644
--- a/confskel/openldap/ldif/olcConfig.ldif
+++ b/confskel/openldap/ldif/olcConfig.ldif
@@ -20,5 +20,6 @@ structuralObjectClass: olcDatabaseConfig
creatorsName: cn=config
createTimestamp: @@@TIMESTAMP@@@Z
entryCSN: @@@TIMESTAMP@@@.000000Z#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 e45e186..7149c8d 100644
--- a/confskel/openldap/ldif/olcDatabase.ldif
+++ b/confskel/openldap/ldif/olcDatabase.ldif
@@ -51,5 +51,6 @@ structuralObjectClass: olcHdbConfig
creatorsName: cn=config
createTimestamp: @@@TIMESTAMP@@@Z
entryCSN: @@@TIMESTAMP@@@.000000Z#000000#000#000000
+entryUUID: @@@ENTRYUUID@@@
modifiersName: cn=config
modifyTimestamp: @@@TIMESTAMP@@@Z
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp
index cdf31e9..64831c8 100644
--- a/src/ldapcontroller.cpp
+++ b/src/ldapcontroller.cpp
@@ -23,6 +23,7 @@
#include <netdb.h>
#include <pwd.h>
+#include <tquuid.h>
#include <tqlayout.h>
#include <tqtabwidget.h>
@@ -998,6 +999,11 @@ void replacePlaceholdersInFile(TQString infile, TQString outfile, LDAPRealmConfi
timestamp.replace("-", "");
timestamp.replace(":", "");
timestamp.replace("T", "");
+ TQString uuid;
+ TQUuid randomUUID = TQUuid::createUuid();
+ uuid = randomUUID.toString();
+ uuid.replace("{", "");
+ uuid.replace("}", "");
TQString kdc_certfile = KERBEROS_PKI_KDC_FILE;
TQString kdc_keyfile = KERBEROS_PKI_KDCKEY_FILE;
@@ -1038,6 +1044,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("@@@ENTRYUUID@@@", uuid);
line.replace("@@@LDAP_KEYTAB_FILE@@@", LDAP_KEYTAB_FILE);
line.replace("@@@LDAP_USER_NAME@@@", ldapusername);
line.replace("@@@LDAP_GROUP_NAME@@@", ldapgroupname);