6230a71
commit c9447e1c3ffba88783e5d9396b832be82d3c78fc
6230a71
Author: Kazuo Ito <ito.kazuo@oss.ntt.co.jp>
6230a71
Date:   Wed Dec 10 12:03:29 2008 +0900
6230a71
6230a71
    support for LDAP_OPT_TIMEOUT
6230a71
    
6230a71
    OpenLDAP since 2.4 implements support for this option in ldap_result(),
6230a71
    among other things.
6230a71
6230a71
diff --git a/saslauthd/lak.c b/saslauthd/lak.c
6230a71
index 803d51f..8714265 100644
6230a71
--- a/saslauthd/lak.c
6230a71
+++ b/saslauthd/lak.c
6230a71
@@ -833,6 +833,11 @@ static int lak_connect(
6230a71
 		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
6230a71
 	}
6230a71
 
6230a71
+	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout));
6230a71
+	if (rc != LDAP_OPT_SUCCESS) {
6230a71
+		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
6230a71
+	}
6230a71
+
6230a71
 	rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit));
6230a71
 	if (rc != LDAP_OPT_SUCCESS) {
6230a71
 		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMELIMIT %d.", lak->conf->time_limit);