From 6b2dddb732643fa741101832c4fc0411c694b545 Mon Sep 17 00:00:00 2001 From: Kazuo Ito Date: Mon, 28 Sep 2015 16:46:07 +0200 Subject: [PATCH] Support for LDAP_OPT_TIMEOUT OpenLDAP since 2.4 implements support for this option in ldap_result(), among other things. --- saslauthd/lak.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/saslauthd/lak.c b/saslauthd/lak.c index 419a658..f667073 100644 --- a/saslauthd/lak.c +++ b/saslauthd/lak.c @@ -838,6 +838,11 @@ static int lak_connect( syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec); } + rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout)); + if (rc != LDAP_OPT_SUCCESS) { + syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec); + } + rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit)); if (rc != LDAP_OPT_SUCCESS) { syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMELIMIT %d.", lak->conf->time_limit); -- 2.20.1