summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap_async_connection.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index e176a709..570d6d49 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -100,8 +100,14 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx,
state->ev = ev;
state->opts = opts;
- state->uri = uri;
state->use_start_tls = use_start_tls;
+
+ state->uri = talloc_asprintf(state, "%s", uri);
+ if (!state->uri) {
+ talloc_zfree(req);
+ return NULL;
+ }
+
state->sh = sdap_handle_create(state);
if (!state->sh) {
talloc_zfree(req);
@@ -113,7 +119,7 @@ struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx,
timeout = dp_opt_get_int(state->opts->basic, SDAP_NETWORK_TIMEOUT);
- subreq = sss_ldap_init_send(state, ev, uri, sockaddr,
+ subreq = sss_ldap_init_send(state, ev, state->uri, sockaddr,
sizeof(struct sockaddr_storage),
timeout);
if (subreq == NULL) {