diff options
Diffstat (limited to 'src/providers/ldap/sdap_async_connection.c')
-rw-r--r-- | src/providers/ldap/sdap_async_connection.c | 10 |
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); |