Skip to content

Commit

Permalink
Support for LDAP_OPT_TIMEOUT
Browse files Browse the repository at this point in the history
OpenLDAP since 2.4 implements support for this option in ldap_result(),
among other things.
  • Loading branch information
Kazuo Ito authored and ksmurchison committed Oct 14, 2015
1 parent d1654b7 commit 6b2dddb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions saslauthd/lak.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6b2dddb

Please sign in to comment.