diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-01-14 12:11:17 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-01-16 16:22:52 +0100 |
commit | ad14fb95453a9c3a0902047520bb460eca181c31 (patch) | |
tree | 85075c01e0dae6cdeb166ca1e0d009a7e60c875c /source4 | |
parent | 5559cdf5c2d3569f4e365f39c8515fe2917221f3 (diff) | |
download | samba-ad14fb95453a9c3a0902047520bb460eca181c31.tar.gz samba-ad14fb95453a9c3a0902047520bb460eca181c31.tar.xz samba-ad14fb95453a9c3a0902047520bb460eca181c31.zip |
s4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/winbind/wb_async_helpers.c | 10 | ||||
-rw-r--r-- | source4/winbind/wb_cmd_lookupname.c | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c index 816a930ffcb..4ea528bf0f5 100644 --- a/source4/winbind/wb_async_helpers.c +++ b/source4/winbind/wb_async_helpers.c @@ -209,7 +209,8 @@ struct lsa_lookupnames_state { static void lsa_lookupnames_recv_sids(struct tevent_req *subreq); struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx, - struct dcerpc_pipe *lsa_pipe, + struct tevent_context *ev, + struct dcerpc_binding_handle *lsa_binding, struct policy_handle *handle, uint32_t num_names, const char **names) @@ -221,7 +222,7 @@ struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx, struct lsa_String *lsa_names; uint32_t i; - result = composite_create(mem_ctx, lsa_pipe->conn->event_ctx); + result = composite_create(mem_ctx, ev); if (result == NULL) goto failed; state = talloc(result, struct lsa_lookupnames_state); @@ -254,9 +255,8 @@ struct composite_context *wb_lsa_lookupnames_send(TALLOC_CTX *mem_ctx, state->r.out.sids = &state->sids; state->r.out.domains = &state->domains; - subreq = dcerpc_lsa_LookupNames_r_send(state, - result->event_ctx, - lsa_pipe->binding_handle, + subreq = dcerpc_lsa_LookupNames_r_send(state, ev, + lsa_binding, &state->r); if (subreq == NULL) goto failed; tevent_req_set_callback(subreq, lsa_lookupnames_recv_sids, state); diff --git a/source4/winbind/wb_cmd_lookupname.c b/source4/winbind/wb_cmd_lookupname.c index 5178187ea8b..7761dcea4f1 100644 --- a/source4/winbind/wb_cmd_lookupname.c +++ b/source4/winbind/wb_cmd_lookupname.c @@ -75,7 +75,8 @@ static void lookupname_recv_domain(struct composite_context *ctx) state->ctx->status = wb_sid2domain_recv(ctx, &domain); if (!composite_is_ok(state->ctx)) return; - ctx = wb_lsa_lookupnames_send(state, domain->libnet_ctx->lsa.pipe, + ctx = wb_lsa_lookupnames_send(state, state->ctx->event_ctx, + domain->libnet_ctx->lsa.lsa_handle, &domain->libnet_ctx->lsa.handle, 1, &state->name); composite_continue(state->ctx, ctx, lookupname_recv_sids, state); } |