summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-03-29 16:30:35 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-03-29 16:30:35 -0500
commit52d15ff7179f2b53b82a086a52a06fbb6b6d68c3 (patch)
treeb134de4648be64a668c5ea5b9017b8de937ed178
parent1e9b6837271818706c284f8819cc0db733e738b4 (diff)
downloadlibtdeldap-52d15ff7179f2b53b82a086a52a06fbb6b6d68c3.tar.gz
libtdeldap-52d15ff7179f2b53b82a086a52a06fbb6b6d68c3.zip
Reload OpenLDAP when certificate file changes
-rw-r--r--src/libtdeldap.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp
index 5ba2676..0354fb4 100644
--- a/src/libtdeldap.cpp
+++ b/src/libtdeldap.cpp
@@ -73,6 +73,10 @@
#define CRON_UPDATE_NSS_FILE "/etc/cron.daily/upd-local-nss-db"
#define CRON_UPDATE_NSS_COMMAND "/usr/sbin/nss_updatedb ldap"
+// FIXME
+// This assumes Debian!
+#define CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_OPENLDAP_RELOAD_COMMAND "/etc/init.d/slapd force-reload"
+
int requested_ldap_version = LDAP_VERSION3;
char* ldap_user_and_operational_attributes[2] = {"*", "+"};
@@ -2803,6 +2807,7 @@ int LDAPManager::writePrimaryRealmCertificateUpdateCronFile(TQString *errstr) {
stream << "\n";
stream << "#!/bin/sh" << "\n";
stream << CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_COMMAND << "\n";
+ stream << CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_OPENLDAP_RELOAD_COMMAND << "\n";
file.close();