summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_connection.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-11-28 14:16:52 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-02-10 19:54:57 +0100
commit4811057a37549a6ef3a2b04f8bcce8b64d44f581 (patch)
treee18ceac102e500ffefc10da83503027c2950d3db /src/providers/ldap/sdap_async_connection.c
parent2cbb879c517f2c756a2eb3962527979bac01ddab (diff)
downloadsssd-4811057a37549a6ef3a2b04f8bcce8b64d44f581.tar.gz
sssd-4811057a37549a6ef3a2b04f8bcce8b64d44f581.tar.xz
sssd-4811057a37549a6ef3a2b04f8bcce8b64d44f581.zip
Enable libldap debuggingldapdebug
Diffstat (limited to 'src/providers/ldap/sdap_async_connection.c')
-rw-r--r--src/providers/ldap/sdap_async_connection.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 20f282e3d..0dfcfc637 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -70,6 +70,7 @@ struct sdap_connect_state {
struct sdap_msg *reply;
int result;
+ int old_ldap_debug;
};
static void sdap_sys_connect_done(struct tevent_req *subreq);
@@ -129,6 +130,13 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx,
goto fail;
}
+ ret = sss_ldap_set_debug(&state->old_ldap_debug);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ ("Could not set extra LDAP debugging\n"));
+ /* Not fatal, carry on */
+ }
+
tevent_req_set_callback(subreq, sdap_sys_connect_done, req);
return req;
@@ -425,6 +433,8 @@ int sdap_connect_recv(struct tevent_req *req,
struct sdap_connect_state *state = tevent_req_data(req,
struct sdap_connect_state);
+ sss_ldap_reset_debug(state->old_ldap_debug);
+
TEVENT_REQ_RETURN_ON_ERROR(req);
*sh = talloc_steal(memctx, state->sh);