diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-01-06 17:49:26 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-01-06 17:49:26 -0600 |
commit | 571e1739fb4f6cf77c1e7297670801114b6de717 (patch) | |
tree | 2a13cfd3c285b2a04e1963c85879a103264c65e5 /src/libtdeldap.cpp | |
parent | 39c401b796d4f896dd66e2b55287e8f18e564939 (diff) | |
download | libtdeldap-571e1739fb4f6cf77c1e7297670801114b6de717.tar.gz libtdeldap-571e1739fb4f6cf77c1e7297670801114b6de717.zip |
Fix LDAP CA root file configuration
Diffstat (limited to 'src/libtdeldap.cpp')
-rw-r--r-- | src/libtdeldap.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index a416db0..8cf4bdd 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -2772,7 +2772,7 @@ int LDAPManager::moveKerberosEntries(TQString newSuffix, TQString* errstr) { return -1; } -int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, TQString *errstr) { +int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr) { KSimpleConfig* systemconfig; TQString m_defaultRealm; int m_ldapVersion; @@ -2812,7 +2812,12 @@ int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, TQString *errstr) { stream << "bind_policy " << m_bindPolicy.lower() << "\n"; stream << "pam_password " << m_passwordHash.lower() << "\n"; stream << "nss_initgroups_ignoreusers " << m_ignoredUsers << "\n"; - stream << "tls_cacert " << KERBEROS_PKI_PUBLICDIR << realmcfg.admin_server << ".ldap.crt\n"; + if (machineRole == ROLE_WORKSTATION) { + stream << "tls_cacert " << KERBEROS_PKI_PUBLICDIR << realmcfg.admin_server << ".ldap.crt\n"; + } + else { + stream << "tls_cacert " << KERBEROS_PKI_PEM_FILE << "\n"; + } } file.close(); |