diff options
Diffstat (limited to 'src/ldapcontroller.cpp')
-rw-r--r-- | src/ldapcontroller.cpp | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp index 88fc9a4..a774263 100644 --- a/src/ldapcontroller.cpp +++ b/src/ldapcontroller.cpp @@ -38,6 +38,7 @@ #include <tqcheckbox.h> #include "ldapcontroller.h" +#include "realmwizard.h" // FIXME // Connect this to CMake/Automake @@ -111,8 +112,19 @@ void LDAPController::systemRoleChanged() { m_base->systemRole->setCurrentItem(0); } else { - // RAJA FIXME - changed(); + // Something will probably change + save(); + + RealmWizard realmwizard(this, this); + if (realmwizard.exec() < 0) { + // Wizard was cancelled + // Back out all changes! + m_base->systemRole->setCurrentItem(ROLE_WORKSTATION); + save(); + } + + // Something probably changed + load(); } } if (m_base->systemRole->currentItem() == ROLE_WORKSTATION) { @@ -131,7 +143,7 @@ void LDAPController::load() { m_systemconfig->setGroup(NULL); m_base->systemEnableSupport->setChecked(m_systemconfig->readBoolEntry("EnableLDAP", false)); TQString ldapRole = m_systemconfig->readEntry("LDAPRole", "Workstation"); - if (ldapRole == "RealmController") { + if (ldapRole == "Realm Controller") { m_base->systemRole->setCurrentItem(ROLE_REALM_CONTROLLER); } else { @@ -145,7 +157,26 @@ void LDAPController::defaults() { } void LDAPController::save() { - // + m_systemconfig->setGroup(NULL); + m_systemconfig->writeEntry("EnableLDAP", m_base->systemEnableSupport->isChecked()); + m_systemconfig->writeEntry("LDAPRole", m_base->systemRole->currentText()); + + m_systemconfig->sync(); + + if (m_base->systemEnableSupport->isChecked()) { +// // Write the Kerberos5 configuration file +// writeKrb5ConfFile(); +// // Write the LDAP configuration file +// writeLDAPConfFile(); +// // Write the NSSwitch configuration file +// writeNSSwitchFile(); +// // Write the PAM configuration files +// writePAMFiles(); +// // Write the cron files +// writeCronFiles(); + } + + load(); } int LDAPController::buttons() { |