From 326dd6bdb8683aaf04a829c87e695547400ccf9c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 7 Jun 2012 18:46:07 -0500 Subject: [PATCH] Move realm load into ldap library --- src/ldapbonding.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/src/ldapbonding.cpp b/src/ldapbonding.cpp index 4d939b3..97117e8 100644 --- a/src/ldapbonding.cpp +++ b/src/ldapbonding.cpp @@ -158,38 +158,7 @@ void LDAPConfig::load(bool useDefaults ) // Load realms m_realms.clear(); - TQStringList cfgRealms = systemconfig->groupList(); - for (TQStringList::Iterator it(cfgRealms.begin()); it != cfgRealms.end(); ++it) { - if ((*it).startsWith("LDAPRealm-")) { - systemconfig->setGroup(*it); - TQString realmName=*it; - realmName.remove(0,strlen("LDAPRealm-")); - if (!m_realms.contains(realmName)) { - // Read in realm data - LDAPRealmConfig realmcfg; - realmcfg.name = realmName; - if (thisIsMyMachine) { - realmcfg.bonded = systemconfig->readBoolEntry("bonded"); - } - else { - realmcfg.bonded = false; - } - realmcfg.uid_offset = systemconfig->readNumEntry("uid_offset"); - realmcfg.gid_offset = systemconfig->readNumEntry("gid_offset"); - realmcfg.domain_mappings = systemconfig->readListEntry("domain_mappings"); - realmcfg.kdc = systemconfig->readEntry("kdc"); - realmcfg.kdc_port = systemconfig->readNumEntry("kdc_port"); - realmcfg.admin_server = systemconfig->readEntry("admin_server"); - realmcfg.admin_server_port = systemconfig->readNumEntry("admin_server_port"); - realmcfg.pkinit_require_eku = systemconfig->readBoolEntry("pkinit_require_eku"); - realmcfg.pkinit_require_krbtgt_otherName = systemconfig->readBoolEntry("pkinit_require_krbtgt_otherName"); - realmcfg.win2k_pkinit = systemconfig->readBoolEntry("win2k_pkinit"); - realmcfg.win2k_pkinit_require_binding = systemconfig->readBoolEntry("win2k_pkinit_require_binding"); - // Add realm to list - m_realms.insert(realmName, realmcfg); - } - } - } + m_realms = LDAPManager::readTDERealmList(systemconfig, !thisIsMyMachine); base->ticketLifetime->setValue(m_ticketLifetime);