summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-04-15 11:30:55 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-04-26 09:55:09 -0400
commit15cb60aa3de20f3d6869fb7b4b3fcac2b6b1dca4 (patch)
tree7029d14fca5c95ba9ea0e6d728c4d42504b7ce1d
parentd2934799b38e4a6d912a67bc685b362691b96c82 (diff)
downloadsssd-15cb60aa3de20f3d6869fb7b4b3fcac2b6b1dca4.tar.gz
sssd-15cb60aa3de20f3d6869fb7b4b3fcac2b6b1dca4.tar.xz
sssd-15cb60aa3de20f3d6869fb7b4b3fcac2b6b1dca4.zip
Set LDAP_OPT_RESTART for all LDAP connections
-rw-r--r--src/providers/ldap/sdap_async_connection.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 2acbbb896..083bc0cc0 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -90,6 +90,13 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx,
goto fail;
}
+ /* TODO: maybe this can be remove when we go async, currently we need it
+ * to handle EINTR during poll(). */
+ ret = ldap_set_option(state->sh->ldap, LDAP_OPT_RESTART, LDAP_OPT_ON);
+ if (ret != LDAP_OPT_SUCCESS) {
+ DEBUG(1, ("Failed to set restart option.\n"));
+ }
+
/* Set Network Timeout */
tv.tv_sec = dp_opt_get_int(opts->basic, SDAP_NETWORK_TIMEOUT);
tv.tv_usec = 0;
@@ -522,13 +529,6 @@ static struct tevent_req *sasl_bind_send(TALLOC_CTX *memctx,
DEBUG(4, ("Executing sasl bind mech: %s, user: %s\n",
sasl_mech, sasl_user));
- /* Until ldap_sasl_interactive_bind_s() is async we may want to set
- * LDAP_OPT_RESTART to handle EINTR during poll(). */
- ret = ldap_set_option(state->sh->ldap, LDAP_OPT_RESTART, LDAP_OPT_ON);
- if (ret != LDAP_OPT_SUCCESS) {
- DEBUG(1, ("Failed to set restart option.\n"));
- }
-
/* FIXME: Warning, this is a sync call!
* No async variant exist in openldap libraries yet */