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