diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-06-28 18:04:35 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-06-28 18:10:59 +1000 |
commit | 485a6354e5c41cc16bfa3b93e05c72e4685720ee (patch) | |
tree | c19b85e9e3d47343eac5290f68764bd0b2cd80da /source4/winbind | |
parent | 261d41a639b2a5deb14d875d3fafc7eb3b996d4c (diff) | |
download | samba-485a6354e5c41cc16bfa3b93e05c72e4685720ee.tar.gz samba-485a6354e5c41cc16bfa3b93e05c72e4685720ee.tar.bz2 samba-485a6354e5c41cc16bfa3b93e05c72e4685720ee.zip |
Fix the wbinfo test on the LDAP backend.
The problem was that we would do a blocking wait for the LDAP server,
which was also blocking on us returning (because we were in single
process mode).
The LDAP connection being made here is useless anyway, and will need
to be an async ldb_connect() before anybody reintroucues it (nobody in
their right mind would program a winbindd backend on pure LDAP, when
the ldb abstraction is available).
Andrew Bartlett
(This used to be commit 23280b2e6ed5afb968bf0b8c40febb085eed38a1)
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/wb_init_domain.c | 32 | ||||
-rw-r--r-- | source4/winbind/wb_server.h | 2 |
2 files changed, 0 insertions, 34 deletions
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c index 8b82ab711e..c6dee825a9 100644 --- a/source4/winbind/wb_init_domain.c +++ b/source4/winbind/wb_init_domain.c @@ -76,7 +76,6 @@ static void init_domain_recv_netlogonpipe(struct composite_context *ctx); static void init_domain_recv_lsa_pipe(struct composite_context *ctx); static void init_domain_recv_lsa_policy(struct rpc_request *req); static void init_domain_recv_queryinfo(struct rpc_request *req); -static void init_domain_recv_ldapconn(struct composite_context *ctx); static void init_domain_recv_samr(struct composite_context *ctx); static struct dcerpc_binding *init_domain_binding(struct init_domain_state *state, @@ -401,37 +400,6 @@ static void init_domain_recv_samr(struct composite_context *ctx) state->domain->libnet_ctx->samr.name = state->domain->info->name; state->domain->libnet_ctx->samr.sid = state->domain->info->sid; - state->domain->ldap_conn = - ldap4_new_connection(state->domain, state->domain->libnet_ctx->lp_ctx, state->ctx->event_ctx); - composite_nomem(state->domain->ldap_conn, state->ctx); - - ldap_url = talloc_asprintf(state, "ldap://%s/", - state->domain->dc_address); - composite_nomem(ldap_url, state->ctx); - - ctx = ldap_connect_send(state->domain->ldap_conn, ldap_url); - composite_continue(state->ctx, ctx, init_domain_recv_ldapconn, state); -} - -static void init_domain_recv_ldapconn(struct composite_context *ctx) -{ - struct init_domain_state *state = - talloc_get_type(ctx->async.private_data, - struct init_domain_state); - - state->ctx->status = ldap_connect_recv(ctx); - if (NT_STATUS_IS_OK(state->ctx->status)) { - state->domain->ldap_conn->host = - talloc_strdup(state->domain->ldap_conn, - state->domain->dc_name); - state->ctx->status = - ldap_bind_sasl(state->domain->ldap_conn, - state->domain->libnet_ctx->cred, - state->domain->libnet_ctx->lp_ctx); - DEBUG(0, ("ldap_bind returned %s\n", - nt_errstr(state->ctx->status))); - } - composite_done(state->ctx); } diff --git a/source4/winbind/wb_server.h b/source4/winbind/wb_server.h index ce972932f5..5a7ba7b401 100644 --- a/source4/winbind/wb_server.h +++ b/source4/winbind/wb_server.h @@ -69,8 +69,6 @@ struct wbsrv_domain { struct dcerpc_binding *samr_binding; - struct ldap_connection *ldap_conn; - struct dcerpc_pipe *netlogon_pipe; struct dcerpc_binding *netlogon_binding; }; |