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 | 5559cdf5c2d3569f4e365f39c8515fe2917221f3 (patch) | |
tree | df0b3bd37971340442a4241849bf43841e31e8a6 /source4/winbind | |
parent | 59bc7cb0df59c0030ff404e845b3fda048c6ef73 (diff) | |
download | samba-5559cdf5c2d3569f4e365f39c8515fe2917221f3.tar.gz |
s4:winbind: let wb_lsa_lookupsids_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/winbind')
-rw-r--r-- | source4/winbind/wb_async_helpers.c | 10 | ||||
-rw-r--r-- | source4/winbind/wb_async_helpers.h | 1 | ||||
-rw-r--r-- | source4/winbind/wb_cmd_lookupsid.c | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c index 2a05f124656..816a930ffcb 100644 --- a/source4/winbind/wb_async_helpers.c +++ b/source4/winbind/wb_async_helpers.c @@ -46,7 +46,8 @@ struct lsa_lookupsids_state { static void lsa_lookupsids_recv_names(struct tevent_req *subreq); struct composite_context *wb_lsa_lookupsids_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_sids, const struct dom_sid **sids) @@ -56,7 +57,7 @@ struct composite_context *wb_lsa_lookupsids_send(TALLOC_CTX *mem_ctx, uint32_t i; struct tevent_req *subreq; - 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_lookupsids_state); @@ -91,9 +92,8 @@ struct composite_context *wb_lsa_lookupsids_send(TALLOC_CTX *mem_ctx, state->r.out.count = &state->count; state->r.out.domains = &state->domains; - subreq = dcerpc_lsa_LookupSids_r_send(state, - result->event_ctx, - lsa_pipe->binding_handle, + subreq = dcerpc_lsa_LookupSids_r_send(state, ev, + lsa_binding, &state->r); if (subreq == NULL) goto failed; tevent_req_set_callback(subreq, lsa_lookupsids_recv_names, state); diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index c930bc02a0f..359696da672 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -23,6 +23,7 @@ #define __WB_ASYNC_HELPERS_H__ struct dcerpc_pipe; +struct dcerpc_binding_handle; #include "librpc/gen_ndr/lsa.h" diff --git a/source4/winbind/wb_cmd_lookupsid.c b/source4/winbind/wb_cmd_lookupsid.c index 57d859fdf92..4996569bad8 100644 --- a/source4/winbind/wb_cmd_lookupsid.c +++ b/source4/winbind/wb_cmd_lookupsid.c @@ -76,7 +76,8 @@ static void lookupsid_recv_domain(struct composite_context *ctx) state->ctx->status = wb_sid2domain_recv(ctx, &domain); if (!composite_is_ok(state->ctx)) return; - ctx = wb_lsa_lookupsids_send(state, domain->libnet_ctx->lsa.pipe, + ctx = wb_lsa_lookupsids_send(state, state->ctx->event_ctx, + domain->libnet_ctx->lsa.lsa_handle, &domain->libnet_ctx->lsa.handle, 1, &state->sid); composite_continue(state->ctx, ctx, lookupsid_recv_names, state); } |