summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-01 16:44:31 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-06-01 16:44:31 -0500
commit7df2e830ef2d9005a27e0a295988fece9911c0f5 (patch)
tree3cb2c3ef8626470dade8432b5cc4f0788c42bf38
parent4c434b19f0b9b697dd91f6830edc17c085244b99 (diff)
downloadkcmldapcontroller-7df2e830ef2d9005a27e0a295988fece9911c0f5.tar.gz
kcmldapcontroller-7df2e830ef2d9005a27e0a295988fece9911c0f5.zip
Add confskel installation
-rw-r--r--confskel/Makefile.am10
-rw-r--r--src/ldapcontroller.cpp18
-rw-r--r--subdirs1
3 files changed, 28 insertions, 1 deletions
diff --git a/confskel/Makefile.am b/confskel/Makefile.am
new file mode 100644
index 0000000..911d979
--- /dev/null
+++ b/confskel/Makefile.am
@@ -0,0 +1,10 @@
+confskeldir = $(kde_datadir)/kcmldapcontroller/skel
+
+heimdalskeldir = $(confskeldir)/heimdal
+heimdalskel_DATA = heimdal/*
+
+ldapskeldir = $(confskeldir)/openldap
+ldapskel_DATA = openldap/skel.ldif
+
+ldapconfskeldir = $(ldapskeldir)/ldap
+ldapconfskel_DATA = openldap/ldap/* \ No newline at end of file
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp
index bfb2e2c..0b30db9 100644
--- a/src/ldapcontroller.cpp
+++ b/src/ldapcontroller.cpp
@@ -40,6 +40,7 @@
#include <kcombobox.h>
#include <kmessagebox.h>
#include <tqcheckbox.h>
+#include <ktempdir.h>
#include "ldapcontroller.h"
#include "realmwizard.h"
@@ -224,13 +225,28 @@ void LDAPController::save() {
load();
}
+void replacePlaceholdersInFile(TQString infile, TQString outfile) {
+ // RAJA FIXME
+}
+
int LDAPController::createNewLDAPRealm(TQWidget* dialogparent, LDAPRealmConfig realmconfig, TQString adminUserName, const char * adminPassword, TQString adminRealm, TQString *errstr) {
ProcessingDialog pdialog(dialogparent);
pdialog.setStatusMessage(i18n("Loading data for realm deployment..."));
pdialog.raise();
pdialog.setActiveWindow();
tqApp->processEvents();
- // Copy all config files to the temporary directory
+
+ // Find the templates
+ TQString templateDir = locate("data", "kcmldapcontroller/skel");
+printf("[RAJA DEBUG 100.0] templateDir: %s\n\r", templateDir.ascii()); fflush(stdout);
+ if (templateDir == "") {
+ pdialog.closeDialog();
+ return -1;
+ }
+
+ KTempDir configTempDir;
+ configTempDir.setAutoDelete(true);
+ replacePlaceholdersInFile(templateDir + "heimdal/heimdal.defaults", configTempDir.name() + "heimdal/heimdal.defaults");
// RAJA FIXME
pdialog.closeDialog();
diff --git a/subdirs b/subdirs
index 0e67810..531519e 100644
--- a/subdirs
+++ b/subdirs
@@ -1,3 +1,4 @@
doc
po
src
+confskel \ No newline at end of file