diff options
Diffstat (limited to 'src/ldapcontroller.cpp')
-rw-r--r-- | src/ldapcontroller.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp index ad2e313..d88bd34 100644 --- a/src/ldapcontroller.cpp +++ b/src/ldapcontroller.cpp @@ -45,6 +45,7 @@ #include <tqcheckbox.h> #include <ktempdir.h> #include <kprocess.h> +#include <knuminput.h> #include <tdesu/process.h> #include <libtdeldap.h> #include <tdefiledialog.h> @@ -143,6 +144,10 @@ LDAPController::LDAPController(TQWidget *parent, const char *name, const TQStrin connect(m_base->multiMasterReplicationMappings, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(multiMasterReplicationHighlighted())); connect(m_base->multiMasterReplicationMappings, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(modifySelectedMultiMasterReplication())); + connect(m_base->advancedCaCertExpiry, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(caCertExpiryChanged())); + connect(m_base->advancedKerberosCertExpiry, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(kerberosCertExpiryChanged())); + connect(m_base->advancedLdapCertExpiry, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(ldapCertExpiryChanged())); + m_fqdn = LDAPManager::getMachineFQDN(); m_roleFullyConfigured = true; @@ -378,6 +383,9 @@ void LDAPController::load() { // Load cert config m_systemconfig->setGroup("Certificates"); + m_certconfig.caExpiryDays = m_systemconfig->readNumEntry("caExpiryDays", KERBEROS_PKI_PEMKEY_EXPIRY_DAYS); + m_certconfig.kerberosExpiryDays = m_systemconfig->readNumEntry("kerberosExpiryDays", KERBEROS_PKI_KRB_EXPIRY_DAYS); + m_certconfig.ldapExpiryDays = m_systemconfig->readNumEntry("ldapExpiryDays", KERBEROS_PKI_LDAP_EXPIRY_DAYS); m_certconfig.countryName = m_systemconfig->readEntry("countryName"); m_certconfig.stateOrProvinceName = m_systemconfig->readEntry("stateOrProvinceName"); m_certconfig.localityName = m_systemconfig->readEntry("localityName"); @@ -461,6 +469,10 @@ void LDAPController::load() { m_base->caSetMaster->setEnabled(true); } + m_base->advancedCaCertExpiry->setValue(m_certconfig.caExpiryDays); + m_base->advancedKerberosCertExpiry->setValue(m_certconfig.kerberosExpiryDays); + m_base->advancedLdapCertExpiry->setValue(m_certconfig.ldapExpiryDays); + updateCertDisplay(); m_certRefreshTimer.start(60*1000); } @@ -908,6 +920,24 @@ void LDAPController::defaults() { // } +void LDAPController::caCertExpiryChanged() { + m_certconfig.caExpiryDays = m_base->advancedCaCertExpiry->value(); + + emit(changed()); +} + +void LDAPController::kerberosCertExpiryChanged() { + m_certconfig.kerberosExpiryDays = m_base->advancedKerberosCertExpiry->value(); + + emit(changed()); +} + +void LDAPController::ldapCertExpiryChanged() { + m_certconfig.ldapExpiryDays = m_base->advancedLdapCertExpiry->value(); + + emit(changed()); +} + void LDAPController::save() { TQString prevRole = m_systemconfig->readEntry("LDAPRole", "Workstation"); @@ -922,6 +952,9 @@ void LDAPController::save() { // Write cert config m_systemconfig->setGroup("Certificates"); + m_systemconfig->writeEntry("caExpiryDays", m_certconfig.caExpiryDays); + m_systemconfig->writeEntry("kerberosExpiryDays", m_certconfig.kerberosExpiryDays); + m_systemconfig->writeEntry("ldapExpiryDays", m_certconfig.ldapExpiryDays); m_systemconfig->writeEntry("countryName", m_certconfig.countryName); m_systemconfig->writeEntry("stateOrProvinceName", m_certconfig.stateOrProvinceName); m_systemconfig->writeEntry("localityName", m_certconfig.localityName); |