struct groupinfo_state {
- struct dcerpc_pipe *pipe;
+ struct dcerpc_binding_handle *binding_handle;
struct policy_handle domain_handle;
struct policy_handle group_handle;
uint16_t level;
/* send request */
subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
- s->pipe->binding_handle,
+ s->binding_handle,
&s->opengroup);
if (composite_nomem(subreq, c)) return;
/* queue rpc call, set event handling and new state */
subreq = dcerpc_samr_QueryGroupInfo_r_send(s,
c->event_ctx,
- s->pipe->binding_handle,
+ s->binding_handle,
&s->querygroupinfo);
if (composite_nomem(subreq, c)) return;
/* queue rpc call, set event handling and new state */
subreq = dcerpc_samr_Close_r_send(s, c->event_ctx,
- s->pipe->binding_handle,
+ s->binding_handle,
&s->samrclose);
if (composite_nomem(subreq, c)) return;
* @param p dce/rpc call pipe
* @param io arguments and results of the call
*/
-struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
- TALLOC_CTX *mem_ctx,
+struct composite_context *libnet_rpc_groupinfo_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *b,
struct libnet_rpc_groupinfo *io,
void (*monitor)(struct monitor_msg*))
{
struct dom_sid *sid;
struct tevent_req *subreq;
- if (!p || !io) return NULL;
+ if (!b || !io) return NULL;
- c = composite_create(mem_ctx, dcerpc_event_context(p));
+ c = composite_create(mem_ctx, ev);
if (c == NULL) return c;
s = talloc_zero(c, struct groupinfo_state);
c->private_data = s;
s->level = io->in.level;
- s->pipe = p;
+ s->binding_handle= b;
s->domain_handle = io->in.domain_handle;
s->monitor_fn = monitor;
/* send request */
subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
- p->binding_handle,
+ s->binding_handle,
&s->opengroup);
if (composite_nomem(subreq, c)) return c;
/* send request */
subreq = dcerpc_samr_LookupNames_r_send(s, c->event_ctx,
- p->binding_handle,
+ s->binding_handle,
&s->lookup);
if (composite_nomem(subreq, c)) return c;
TALLOC_CTX *mem_ctx,
struct libnet_rpc_groupinfo *io)
{
- struct composite_context *c = libnet_rpc_groupinfo_send(p, mem_ctx, io, NULL);
+ struct composite_context *c = libnet_rpc_groupinfo_send(mem_ctx,
+ p->conn->event_ctx,
+ p->binding_handle,
+ io, NULL);
return libnet_rpc_groupinfo_recv(c, mem_ctx, io);
}
s->info.in.level = GROUPINFOALL;
/* send the request */
- info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn);
+ info_req = libnet_rpc_groupinfo_send(s, s->ctx->event_ctx,
+ s->ctx->samr.samr_handle,
+ &s->info, s->monitor_fn);
if (composite_nomem(info_req, c)) return c;
/* set the next stage */
s->info.in.level = GROUPINFOALL;
/* send the request */
- info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn);
+ info_req = libnet_rpc_groupinfo_send(s, s->ctx->event_ctx,
+ s->ctx->samr.samr_handle,
+ &s->info, s->monitor_fn);
if (composite_nomem(info_req, c)) return;
/* set the next stage */
s->info.in.level = GROUPINFOALL;
/* send the request */
- info_req = libnet_rpc_groupinfo_send(s->ctx->samr.pipe, s, &s->info, s->monitor_fn);
+ info_req = libnet_rpc_groupinfo_send(s, s->ctx->event_ctx,
+ s->ctx->samr.samr_handle,
+ &s->info, s->monitor_fn);
if (composite_nomem(info_req, c)) return;
/* set the next stage */