Set syncrepl TSL CA certificate by default

pull/1/head
Timothy Pearson 11 years ago
parent b1f6ac87e8
commit 999fcba2da

@ -147,6 +147,7 @@ LDAPController::LDAPController(TQWidget *parent, const char *name, const TQStrin
connect(m_base->multiMasterReplicationMappings, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(modifySelectedMultiMasterReplication())); connect(m_base->multiMasterReplicationMappings, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(modifySelectedMultiMasterReplication()));
m_fqdn = LDAPManager::getMachineFQDN(); m_fqdn = LDAPManager::getMachineFQDN();
m_roleFullyConfigured = true;
// FIXME // FIXME
// This assumes Debian! // This assumes Debian!
@ -201,6 +202,8 @@ void LDAPController::systemRoleChanged() {
m_base->systemRole->setCurrentItem(previousRole); m_base->systemRole->setCurrentItem(previousRole);
} }
else { else {
m_roleFullyConfigured = false;
// Something will probably change // Something will probably change
save(); save();
@ -215,6 +218,8 @@ void LDAPController::systemRoleChanged() {
// Wizard completed; commit changes // Wizard completed; commit changes
save(); save();
} }
m_roleFullyConfigured = true;
// Something probably changed // Something probably changed
load(); load();
@ -238,6 +243,8 @@ void LDAPController::systemRoleChanged() {
m_base->systemRole->setCurrentItem(previousRole); m_base->systemRole->setCurrentItem(previousRole);
} }
else { else {
m_roleFullyConfigured = false;
// Something will probably change // Something will probably change
save(); save();
@ -252,6 +259,8 @@ void LDAPController::systemRoleChanged() {
// Wizard completed; commit changes // Wizard completed; commit changes
save(); save();
} }
m_roleFullyConfigured = true;
// Something probably changed // Something probably changed
load(); load();
@ -417,9 +426,15 @@ void LDAPController::load() {
// Get builtin TDE account mappings from LDAP // Get builtin TDE account mappings from LDAP
LDAPTDEBuiltinsInfo builtins = ldap_mgr->getTDEBuiltinMappings(&errorstring); LDAPTDEBuiltinsInfo builtins = ldap_mgr->getTDEBuiltinMappings(&errorstring);
if (m_roleFullyConfigured && errorstring != "") {
KMessageBox::error(0, errorstring);
}
// Get replication mappings from LDAP // Get replication mappings from LDAP
LDAPMasterReplicationInfo replicationsettings = ldap_mgr->getLDAPMasterReplicationSettings(&errorstring); LDAPMasterReplicationInfo replicationsettings = ldap_mgr->getLDAPMasterReplicationSettings(&errorstring);
if (m_roleFullyConfigured && errorstring != "") {
KMessageBox::error(0, errorstring);
}
m_base->advancedEnableMultiMasterReplication->setChecked(replicationsettings.enabled); m_base->advancedEnableMultiMasterReplication->setChecked(replicationsettings.enabled);
m_base->multiMasterReplicationMappings->clear(); m_base->multiMasterReplicationMappings->clear();
LDAPMasterReplicationMap::iterator it; LDAPMasterReplicationMap::iterator it;
@ -429,6 +444,9 @@ void LDAPController::load() {
// Get certificate settings from LDAP // Get certificate settings from LDAP
TQString realmCAMaster = ldap_mgr->getRealmCAMaster(&errorstring); TQString realmCAMaster = ldap_mgr->getRealmCAMaster(&errorstring);
if (m_roleFullyConfigured && errorstring != "") {
KMessageBox::error(0, errorstring);
}
delete ldap_mgr; delete ldap_mgr;
delete credentials; delete credentials;
@ -948,6 +966,8 @@ void LDAPController::save() {
m_systemconfig->setGroup("Replication"); m_systemconfig->setGroup("Replication");
replicationSettings.syncPassword = m_systemconfig->readEntry("Password"); replicationSettings.syncPassword = m_systemconfig->readEntry("Password");
m_systemconfig->setGroup(NULL); m_systemconfig->setGroup(NULL);
// Use the TDE LDAP CA for replication TLS
replicationSettings.caCertificateFile = KERBEROS_PKI_PEM_FILE;
replicationSettings.ignore_ssl_failure = m_base->ignoreReplicationSSLFailures->isChecked(); replicationSettings.ignore_ssl_failure = m_base->ignoreReplicationSSLFailures->isChecked();

@ -111,6 +111,7 @@ class LDAPController: public TDECModule
TQString m_fqdn; TQString m_fqdn;
int m_prevRole; int m_prevRole;
bool m_roleFullyConfigured;
TQString m_ldapUserName; TQString m_ldapUserName;
TQString m_ldapGroupName; TQString m_ldapGroupName;

Loading…
Cancel
Save