From 7df2e830ef2d9005a27e0a295988fece9911c0f5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Jun 2012 16:44:31 -0500 Subject: Add confskel installation --- src/ldapcontroller.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/ldapcontroller.cpp') 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 #include #include +#include #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(); -- cgit v1.2.1