2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/cli_wbint.h"
9 struct rpccli_wbint_Ping_state
{
10 struct wbint_Ping orig
;
11 struct wbint_Ping tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_wbint_Ping_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_wbint_Ping_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 uint32_t _in_data
/* [in] */,
22 uint32_t *_out_data
/* [out] [ref] */)
24 struct tevent_req
*req
;
25 struct rpccli_wbint_Ping_state
*state
;
26 struct tevent_req
*subreq
;
28 req
= tevent_req_create(mem_ctx
, &state
,
29 struct rpccli_wbint_Ping_state
);
33 state
->out_mem_ctx
= NULL
;
34 state
->dispatch_recv
= cli
->dispatch_recv
;
37 state
->orig
.in
.in_data
= _in_data
;
40 state
->orig
.out
.out_data
= _out_data
;
42 state
->out_mem_ctx
= talloc_named_const(state
, 0,
43 "rpccli_wbint_Ping_out_memory");
44 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
45 return tevent_req_post(req
, ev
);
48 /* make a temporary copy, that we pass to the dispatch function */
49 state
->tmp
= state
->orig
;
51 subreq
= cli
->dispatch_send(state
, ev
, cli
,
55 if (tevent_req_nomem(subreq
, req
)) {
56 return tevent_req_post(req
, ev
);
58 tevent_req_set_callback(subreq
, rpccli_wbint_Ping_done
, req
);
62 static void rpccli_wbint_Ping_done(struct tevent_req
*subreq
)
64 struct tevent_req
*req
= tevent_req_callback_data(
65 subreq
, struct tevent_req
);
66 struct rpccli_wbint_Ping_state
*state
= tevent_req_data(
67 req
, struct rpccli_wbint_Ping_state
);
71 if (state
->out_mem_ctx
) {
72 mem_ctx
= state
->out_mem_ctx
;
77 status
= state
->dispatch_recv(subreq
, mem_ctx
);
79 if (!NT_STATUS_IS_OK(status
)) {
80 tevent_req_nterror(req
, status
);
84 /* Copy out parameters */
85 *state
->orig
.out
.out_data
= *state
->tmp
.out
.out_data
;
87 /* Reset temporary structure */
88 ZERO_STRUCT(state
->tmp
);
93 NTSTATUS
rpccli_wbint_Ping_recv(struct tevent_req
*req
,
96 struct rpccli_wbint_Ping_state
*state
= tevent_req_data(
97 req
, struct rpccli_wbint_Ping_state
);
100 if (tevent_req_is_nterror(req
, &status
)) {
101 tevent_req_received(req
);
105 /* Steal possbile out parameters to the callers context */
106 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
108 tevent_req_received(req
);
112 NTSTATUS
rpccli_wbint_Ping(struct rpc_pipe_client
*cli
,
114 uint32_t in_data
/* [in] */,
115 uint32_t *out_data
/* [out] [ref] */)
121 r
.in
.in_data
= in_data
;
123 status
= cli
->dispatch(cli
,
129 if (!NT_STATUS_IS_OK(status
)) {
133 if (NT_STATUS_IS_ERR(status
)) {
137 /* Return variables */
138 *out_data
= *r
.out
.out_data
;
144 struct rpccli_wbint_LookupSid_state
{
145 struct wbint_LookupSid orig
;
146 struct wbint_LookupSid tmp
;
147 TALLOC_CTX
*out_mem_ctx
;
148 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
151 static void rpccli_wbint_LookupSid_done(struct tevent_req
*subreq
);
153 struct tevent_req
*rpccli_wbint_LookupSid_send(TALLOC_CTX
*mem_ctx
,
154 struct tevent_context
*ev
,
155 struct rpc_pipe_client
*cli
,
156 struct dom_sid
*_sid
/* [in] [ref] */,
157 enum lsa_SidType
*_type
/* [out] [ref] */,
158 const char **_domain
/* [out] [ref,charset(UTF8)] */,
159 const char **_name
/* [out] [ref,charset(UTF8)] */)
161 struct tevent_req
*req
;
162 struct rpccli_wbint_LookupSid_state
*state
;
163 struct tevent_req
*subreq
;
165 req
= tevent_req_create(mem_ctx
, &state
,
166 struct rpccli_wbint_LookupSid_state
);
170 state
->out_mem_ctx
= NULL
;
171 state
->dispatch_recv
= cli
->dispatch_recv
;
174 state
->orig
.in
.sid
= _sid
;
177 state
->orig
.out
.type
= _type
;
178 state
->orig
.out
.domain
= _domain
;
179 state
->orig
.out
.name
= _name
;
182 ZERO_STRUCT(state
->orig
.out
.result
);
184 state
->out_mem_ctx
= talloc_named_const(state
, 0,
185 "rpccli_wbint_LookupSid_out_memory");
186 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
187 return tevent_req_post(req
, ev
);
190 /* make a temporary copy, that we pass to the dispatch function */
191 state
->tmp
= state
->orig
;
193 subreq
= cli
->dispatch_send(state
, ev
, cli
,
197 if (tevent_req_nomem(subreq
, req
)) {
198 return tevent_req_post(req
, ev
);
200 tevent_req_set_callback(subreq
, rpccli_wbint_LookupSid_done
, req
);
204 static void rpccli_wbint_LookupSid_done(struct tevent_req
*subreq
)
206 struct tevent_req
*req
= tevent_req_callback_data(
207 subreq
, struct tevent_req
);
208 struct rpccli_wbint_LookupSid_state
*state
= tevent_req_data(
209 req
, struct rpccli_wbint_LookupSid_state
);
213 if (state
->out_mem_ctx
) {
214 mem_ctx
= state
->out_mem_ctx
;
219 status
= state
->dispatch_recv(subreq
, mem_ctx
);
221 if (!NT_STATUS_IS_OK(status
)) {
222 tevent_req_nterror(req
, status
);
226 /* Copy out parameters */
227 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
228 *state
->orig
.out
.domain
= *state
->tmp
.out
.domain
;
229 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
232 state
->orig
.out
.result
= state
->tmp
.out
.result
;
234 /* Reset temporary structure */
235 ZERO_STRUCT(state
->tmp
);
237 tevent_req_done(req
);
240 NTSTATUS
rpccli_wbint_LookupSid_recv(struct tevent_req
*req
,
244 struct rpccli_wbint_LookupSid_state
*state
= tevent_req_data(
245 req
, struct rpccli_wbint_LookupSid_state
);
248 if (tevent_req_is_nterror(req
, &status
)) {
249 tevent_req_received(req
);
253 /* Steal possbile out parameters to the callers context */
254 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
257 *result
= state
->orig
.out
.result
;
259 tevent_req_received(req
);
263 NTSTATUS
rpccli_wbint_LookupSid(struct rpc_pipe_client
*cli
,
265 struct dom_sid
*sid
/* [in] [ref] */,
266 enum lsa_SidType
*type
/* [out] [ref] */,
267 const char **domain
/* [out] [ref,charset(UTF8)] */,
268 const char **name
/* [out] [ref,charset(UTF8)] */)
270 struct wbint_LookupSid r
;
276 status
= cli
->dispatch(cli
,
282 if (!NT_STATUS_IS_OK(status
)) {
286 if (NT_STATUS_IS_ERR(status
)) {
290 /* Return variables */
292 *domain
= *r
.out
.domain
;
299 struct rpccli_wbint_LookupName_state
{
300 struct wbint_LookupName orig
;
301 struct wbint_LookupName tmp
;
302 TALLOC_CTX
*out_mem_ctx
;
303 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
306 static void rpccli_wbint_LookupName_done(struct tevent_req
*subreq
);
308 struct tevent_req
*rpccli_wbint_LookupName_send(TALLOC_CTX
*mem_ctx
,
309 struct tevent_context
*ev
,
310 struct rpc_pipe_client
*cli
,
311 const char *_domain
/* [in] [ref,charset(UTF8)] */,
312 const char *_name
/* [in] [ref,charset(UTF8)] */,
313 uint32_t _flags
/* [in] */,
314 enum lsa_SidType
*_type
/* [out] [ref] */,
315 struct dom_sid
*_sid
/* [out] [ref] */)
317 struct tevent_req
*req
;
318 struct rpccli_wbint_LookupName_state
*state
;
319 struct tevent_req
*subreq
;
321 req
= tevent_req_create(mem_ctx
, &state
,
322 struct rpccli_wbint_LookupName_state
);
326 state
->out_mem_ctx
= NULL
;
327 state
->dispatch_recv
= cli
->dispatch_recv
;
330 state
->orig
.in
.domain
= _domain
;
331 state
->orig
.in
.name
= _name
;
332 state
->orig
.in
.flags
= _flags
;
335 state
->orig
.out
.type
= _type
;
336 state
->orig
.out
.sid
= _sid
;
339 ZERO_STRUCT(state
->orig
.out
.result
);
341 state
->out_mem_ctx
= talloc_named_const(state
, 0,
342 "rpccli_wbint_LookupName_out_memory");
343 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
344 return tevent_req_post(req
, ev
);
347 /* make a temporary copy, that we pass to the dispatch function */
348 state
->tmp
= state
->orig
;
350 subreq
= cli
->dispatch_send(state
, ev
, cli
,
352 NDR_WBINT_LOOKUPNAME
,
354 if (tevent_req_nomem(subreq
, req
)) {
355 return tevent_req_post(req
, ev
);
357 tevent_req_set_callback(subreq
, rpccli_wbint_LookupName_done
, req
);
361 static void rpccli_wbint_LookupName_done(struct tevent_req
*subreq
)
363 struct tevent_req
*req
= tevent_req_callback_data(
364 subreq
, struct tevent_req
);
365 struct rpccli_wbint_LookupName_state
*state
= tevent_req_data(
366 req
, struct rpccli_wbint_LookupName_state
);
370 if (state
->out_mem_ctx
) {
371 mem_ctx
= state
->out_mem_ctx
;
376 status
= state
->dispatch_recv(subreq
, mem_ctx
);
378 if (!NT_STATUS_IS_OK(status
)) {
379 tevent_req_nterror(req
, status
);
383 /* Copy out parameters */
384 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
385 *state
->orig
.out
.sid
= *state
->tmp
.out
.sid
;
388 state
->orig
.out
.result
= state
->tmp
.out
.result
;
390 /* Reset temporary structure */
391 ZERO_STRUCT(state
->tmp
);
393 tevent_req_done(req
);
396 NTSTATUS
rpccli_wbint_LookupName_recv(struct tevent_req
*req
,
400 struct rpccli_wbint_LookupName_state
*state
= tevent_req_data(
401 req
, struct rpccli_wbint_LookupName_state
);
404 if (tevent_req_is_nterror(req
, &status
)) {
405 tevent_req_received(req
);
409 /* Steal possbile out parameters to the callers context */
410 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
413 *result
= state
->orig
.out
.result
;
415 tevent_req_received(req
);
419 NTSTATUS
rpccli_wbint_LookupName(struct rpc_pipe_client
*cli
,
421 const char *domain
/* [in] [ref,charset(UTF8)] */,
422 const char *name
/* [in] [ref,charset(UTF8)] */,
423 uint32_t flags
/* [in] */,
424 enum lsa_SidType
*type
/* [out] [ref] */,
425 struct dom_sid
*sid
/* [out] [ref] */)
427 struct wbint_LookupName r
;
431 r
.in
.domain
= domain
;
435 status
= cli
->dispatch(cli
,
438 NDR_WBINT_LOOKUPNAME
,
441 if (!NT_STATUS_IS_OK(status
)) {
445 if (NT_STATUS_IS_ERR(status
)) {
449 /* Return variables */
457 struct rpccli_wbint_Sid2Uid_state
{
458 struct wbint_Sid2Uid orig
;
459 struct wbint_Sid2Uid tmp
;
460 TALLOC_CTX
*out_mem_ctx
;
461 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
464 static void rpccli_wbint_Sid2Uid_done(struct tevent_req
*subreq
);
466 struct tevent_req
*rpccli_wbint_Sid2Uid_send(TALLOC_CTX
*mem_ctx
,
467 struct tevent_context
*ev
,
468 struct rpc_pipe_client
*cli
,
469 const char *_dom_name
/* [in] [unique,charset(UTF8)] */,
470 struct dom_sid
*_sid
/* [in] [ref] */,
471 uint64_t *_uid
/* [out] [ref] */)
473 struct tevent_req
*req
;
474 struct rpccli_wbint_Sid2Uid_state
*state
;
475 struct tevent_req
*subreq
;
477 req
= tevent_req_create(mem_ctx
, &state
,
478 struct rpccli_wbint_Sid2Uid_state
);
482 state
->out_mem_ctx
= NULL
;
483 state
->dispatch_recv
= cli
->dispatch_recv
;
486 state
->orig
.in
.dom_name
= _dom_name
;
487 state
->orig
.in
.sid
= _sid
;
490 state
->orig
.out
.uid
= _uid
;
493 ZERO_STRUCT(state
->orig
.out
.result
);
495 state
->out_mem_ctx
= talloc_named_const(state
, 0,
496 "rpccli_wbint_Sid2Uid_out_memory");
497 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
498 return tevent_req_post(req
, ev
);
501 /* make a temporary copy, that we pass to the dispatch function */
502 state
->tmp
= state
->orig
;
504 subreq
= cli
->dispatch_send(state
, ev
, cli
,
508 if (tevent_req_nomem(subreq
, req
)) {
509 return tevent_req_post(req
, ev
);
511 tevent_req_set_callback(subreq
, rpccli_wbint_Sid2Uid_done
, req
);
515 static void rpccli_wbint_Sid2Uid_done(struct tevent_req
*subreq
)
517 struct tevent_req
*req
= tevent_req_callback_data(
518 subreq
, struct tevent_req
);
519 struct rpccli_wbint_Sid2Uid_state
*state
= tevent_req_data(
520 req
, struct rpccli_wbint_Sid2Uid_state
);
524 if (state
->out_mem_ctx
) {
525 mem_ctx
= state
->out_mem_ctx
;
530 status
= state
->dispatch_recv(subreq
, mem_ctx
);
532 if (!NT_STATUS_IS_OK(status
)) {
533 tevent_req_nterror(req
, status
);
537 /* Copy out parameters */
538 *state
->orig
.out
.uid
= *state
->tmp
.out
.uid
;
541 state
->orig
.out
.result
= state
->tmp
.out
.result
;
543 /* Reset temporary structure */
544 ZERO_STRUCT(state
->tmp
);
546 tevent_req_done(req
);
549 NTSTATUS
rpccli_wbint_Sid2Uid_recv(struct tevent_req
*req
,
553 struct rpccli_wbint_Sid2Uid_state
*state
= tevent_req_data(
554 req
, struct rpccli_wbint_Sid2Uid_state
);
557 if (tevent_req_is_nterror(req
, &status
)) {
558 tevent_req_received(req
);
562 /* Steal possbile out parameters to the callers context */
563 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
566 *result
= state
->orig
.out
.result
;
568 tevent_req_received(req
);
572 NTSTATUS
rpccli_wbint_Sid2Uid(struct rpc_pipe_client
*cli
,
574 const char *dom_name
/* [in] [unique,charset(UTF8)] */,
575 struct dom_sid
*sid
/* [in] [ref] */,
576 uint64_t *uid
/* [out] [ref] */)
578 struct wbint_Sid2Uid r
;
582 r
.in
.dom_name
= dom_name
;
585 status
= cli
->dispatch(cli
,
591 if (!NT_STATUS_IS_OK(status
)) {
595 if (NT_STATUS_IS_ERR(status
)) {
599 /* Return variables */
606 struct rpccli_wbint_Sid2Gid_state
{
607 struct wbint_Sid2Gid orig
;
608 struct wbint_Sid2Gid tmp
;
609 TALLOC_CTX
*out_mem_ctx
;
610 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
613 static void rpccli_wbint_Sid2Gid_done(struct tevent_req
*subreq
);
615 struct tevent_req
*rpccli_wbint_Sid2Gid_send(TALLOC_CTX
*mem_ctx
,
616 struct tevent_context
*ev
,
617 struct rpc_pipe_client
*cli
,
618 const char *_dom_name
/* [in] [unique,charset(UTF8)] */,
619 struct dom_sid
*_sid
/* [in] [ref] */,
620 uint64_t *_gid
/* [out] [ref] */)
622 struct tevent_req
*req
;
623 struct rpccli_wbint_Sid2Gid_state
*state
;
624 struct tevent_req
*subreq
;
626 req
= tevent_req_create(mem_ctx
, &state
,
627 struct rpccli_wbint_Sid2Gid_state
);
631 state
->out_mem_ctx
= NULL
;
632 state
->dispatch_recv
= cli
->dispatch_recv
;
635 state
->orig
.in
.dom_name
= _dom_name
;
636 state
->orig
.in
.sid
= _sid
;
639 state
->orig
.out
.gid
= _gid
;
642 ZERO_STRUCT(state
->orig
.out
.result
);
644 state
->out_mem_ctx
= talloc_named_const(state
, 0,
645 "rpccli_wbint_Sid2Gid_out_memory");
646 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
647 return tevent_req_post(req
, ev
);
650 /* make a temporary copy, that we pass to the dispatch function */
651 state
->tmp
= state
->orig
;
653 subreq
= cli
->dispatch_send(state
, ev
, cli
,
657 if (tevent_req_nomem(subreq
, req
)) {
658 return tevent_req_post(req
, ev
);
660 tevent_req_set_callback(subreq
, rpccli_wbint_Sid2Gid_done
, req
);
664 static void rpccli_wbint_Sid2Gid_done(struct tevent_req
*subreq
)
666 struct tevent_req
*req
= tevent_req_callback_data(
667 subreq
, struct tevent_req
);
668 struct rpccli_wbint_Sid2Gid_state
*state
= tevent_req_data(
669 req
, struct rpccli_wbint_Sid2Gid_state
);
673 if (state
->out_mem_ctx
) {
674 mem_ctx
= state
->out_mem_ctx
;
679 status
= state
->dispatch_recv(subreq
, mem_ctx
);
681 if (!NT_STATUS_IS_OK(status
)) {
682 tevent_req_nterror(req
, status
);
686 /* Copy out parameters */
687 *state
->orig
.out
.gid
= *state
->tmp
.out
.gid
;
690 state
->orig
.out
.result
= state
->tmp
.out
.result
;
692 /* Reset temporary structure */
693 ZERO_STRUCT(state
->tmp
);
695 tevent_req_done(req
);
698 NTSTATUS
rpccli_wbint_Sid2Gid_recv(struct tevent_req
*req
,
702 struct rpccli_wbint_Sid2Gid_state
*state
= tevent_req_data(
703 req
, struct rpccli_wbint_Sid2Gid_state
);
706 if (tevent_req_is_nterror(req
, &status
)) {
707 tevent_req_received(req
);
711 /* Steal possbile out parameters to the callers context */
712 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
715 *result
= state
->orig
.out
.result
;
717 tevent_req_received(req
);
721 NTSTATUS
rpccli_wbint_Sid2Gid(struct rpc_pipe_client
*cli
,
723 const char *dom_name
/* [in] [unique,charset(UTF8)] */,
724 struct dom_sid
*sid
/* [in] [ref] */,
725 uint64_t *gid
/* [out] [ref] */)
727 struct wbint_Sid2Gid r
;
731 r
.in
.dom_name
= dom_name
;
734 status
= cli
->dispatch(cli
,
740 if (!NT_STATUS_IS_OK(status
)) {
744 if (NT_STATUS_IS_ERR(status
)) {
748 /* Return variables */
755 struct rpccli_wbint_Uid2Sid_state
{
756 struct wbint_Uid2Sid orig
;
757 struct wbint_Uid2Sid tmp
;
758 TALLOC_CTX
*out_mem_ctx
;
759 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
762 static void rpccli_wbint_Uid2Sid_done(struct tevent_req
*subreq
);
764 struct tevent_req
*rpccli_wbint_Uid2Sid_send(TALLOC_CTX
*mem_ctx
,
765 struct tevent_context
*ev
,
766 struct rpc_pipe_client
*cli
,
767 const char *_dom_name
/* [in] [unique,charset(UTF8)] */,
768 uint64_t _uid
/* [in] */,
769 struct dom_sid
*_sid
/* [out] [ref] */)
771 struct tevent_req
*req
;
772 struct rpccli_wbint_Uid2Sid_state
*state
;
773 struct tevent_req
*subreq
;
775 req
= tevent_req_create(mem_ctx
, &state
,
776 struct rpccli_wbint_Uid2Sid_state
);
780 state
->out_mem_ctx
= NULL
;
781 state
->dispatch_recv
= cli
->dispatch_recv
;
784 state
->orig
.in
.dom_name
= _dom_name
;
785 state
->orig
.in
.uid
= _uid
;
788 state
->orig
.out
.sid
= _sid
;
791 ZERO_STRUCT(state
->orig
.out
.result
);
793 state
->out_mem_ctx
= talloc_named_const(state
, 0,
794 "rpccli_wbint_Uid2Sid_out_memory");
795 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
796 return tevent_req_post(req
, ev
);
799 /* make a temporary copy, that we pass to the dispatch function */
800 state
->tmp
= state
->orig
;
802 subreq
= cli
->dispatch_send(state
, ev
, cli
,
806 if (tevent_req_nomem(subreq
, req
)) {
807 return tevent_req_post(req
, ev
);
809 tevent_req_set_callback(subreq
, rpccli_wbint_Uid2Sid_done
, req
);
813 static void rpccli_wbint_Uid2Sid_done(struct tevent_req
*subreq
)
815 struct tevent_req
*req
= tevent_req_callback_data(
816 subreq
, struct tevent_req
);
817 struct rpccli_wbint_Uid2Sid_state
*state
= tevent_req_data(
818 req
, struct rpccli_wbint_Uid2Sid_state
);
822 if (state
->out_mem_ctx
) {
823 mem_ctx
= state
->out_mem_ctx
;
828 status
= state
->dispatch_recv(subreq
, mem_ctx
);
830 if (!NT_STATUS_IS_OK(status
)) {
831 tevent_req_nterror(req
, status
);
835 /* Copy out parameters */
836 *state
->orig
.out
.sid
= *state
->tmp
.out
.sid
;
839 state
->orig
.out
.result
= state
->tmp
.out
.result
;
841 /* Reset temporary structure */
842 ZERO_STRUCT(state
->tmp
);
844 tevent_req_done(req
);
847 NTSTATUS
rpccli_wbint_Uid2Sid_recv(struct tevent_req
*req
,
851 struct rpccli_wbint_Uid2Sid_state
*state
= tevent_req_data(
852 req
, struct rpccli_wbint_Uid2Sid_state
);
855 if (tevent_req_is_nterror(req
, &status
)) {
856 tevent_req_received(req
);
860 /* Steal possbile out parameters to the callers context */
861 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
864 *result
= state
->orig
.out
.result
;
866 tevent_req_received(req
);
870 NTSTATUS
rpccli_wbint_Uid2Sid(struct rpc_pipe_client
*cli
,
872 const char *dom_name
/* [in] [unique,charset(UTF8)] */,
873 uint64_t uid
/* [in] */,
874 struct dom_sid
*sid
/* [out] [ref] */)
876 struct wbint_Uid2Sid r
;
880 r
.in
.dom_name
= dom_name
;
883 status
= cli
->dispatch(cli
,
889 if (!NT_STATUS_IS_OK(status
)) {
893 if (NT_STATUS_IS_ERR(status
)) {
897 /* Return variables */
904 struct rpccli_wbint_Gid2Sid_state
{
905 struct wbint_Gid2Sid orig
;
906 struct wbint_Gid2Sid tmp
;
907 TALLOC_CTX
*out_mem_ctx
;
908 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
911 static void rpccli_wbint_Gid2Sid_done(struct tevent_req
*subreq
);
913 struct tevent_req
*rpccli_wbint_Gid2Sid_send(TALLOC_CTX
*mem_ctx
,
914 struct tevent_context
*ev
,
915 struct rpc_pipe_client
*cli
,
916 const char *_dom_name
/* [in] [unique,charset(UTF8)] */,
917 uint64_t _gid
/* [in] */,
918 struct dom_sid
*_sid
/* [out] [ref] */)
920 struct tevent_req
*req
;
921 struct rpccli_wbint_Gid2Sid_state
*state
;
922 struct tevent_req
*subreq
;
924 req
= tevent_req_create(mem_ctx
, &state
,
925 struct rpccli_wbint_Gid2Sid_state
);
929 state
->out_mem_ctx
= NULL
;
930 state
->dispatch_recv
= cli
->dispatch_recv
;
933 state
->orig
.in
.dom_name
= _dom_name
;
934 state
->orig
.in
.gid
= _gid
;
937 state
->orig
.out
.sid
= _sid
;
940 ZERO_STRUCT(state
->orig
.out
.result
);
942 state
->out_mem_ctx
= talloc_named_const(state
, 0,
943 "rpccli_wbint_Gid2Sid_out_memory");
944 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
945 return tevent_req_post(req
, ev
);
948 /* make a temporary copy, that we pass to the dispatch function */
949 state
->tmp
= state
->orig
;
951 subreq
= cli
->dispatch_send(state
, ev
, cli
,
955 if (tevent_req_nomem(subreq
, req
)) {
956 return tevent_req_post(req
, ev
);
958 tevent_req_set_callback(subreq
, rpccli_wbint_Gid2Sid_done
, req
);
962 static void rpccli_wbint_Gid2Sid_done(struct tevent_req
*subreq
)
964 struct tevent_req
*req
= tevent_req_callback_data(
965 subreq
, struct tevent_req
);
966 struct rpccli_wbint_Gid2Sid_state
*state
= tevent_req_data(
967 req
, struct rpccli_wbint_Gid2Sid_state
);
971 if (state
->out_mem_ctx
) {
972 mem_ctx
= state
->out_mem_ctx
;
977 status
= state
->dispatch_recv(subreq
, mem_ctx
);
979 if (!NT_STATUS_IS_OK(status
)) {
980 tevent_req_nterror(req
, status
);
984 /* Copy out parameters */
985 *state
->orig
.out
.sid
= *state
->tmp
.out
.sid
;
988 state
->orig
.out
.result
= state
->tmp
.out
.result
;
990 /* Reset temporary structure */
991 ZERO_STRUCT(state
->tmp
);
993 tevent_req_done(req
);
996 NTSTATUS
rpccli_wbint_Gid2Sid_recv(struct tevent_req
*req
,
1000 struct rpccli_wbint_Gid2Sid_state
*state
= tevent_req_data(
1001 req
, struct rpccli_wbint_Gid2Sid_state
);
1004 if (tevent_req_is_nterror(req
, &status
)) {
1005 tevent_req_received(req
);
1009 /* Steal possbile out parameters to the callers context */
1010 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1013 *result
= state
->orig
.out
.result
;
1015 tevent_req_received(req
);
1016 return NT_STATUS_OK
;
1019 NTSTATUS
rpccli_wbint_Gid2Sid(struct rpc_pipe_client
*cli
,
1020 TALLOC_CTX
*mem_ctx
,
1021 const char *dom_name
/* [in] [unique,charset(UTF8)] */,
1022 uint64_t gid
/* [in] */,
1023 struct dom_sid
*sid
/* [out] [ref] */)
1025 struct wbint_Gid2Sid r
;
1029 r
.in
.dom_name
= dom_name
;
1032 status
= cli
->dispatch(cli
,
1038 if (!NT_STATUS_IS_OK(status
)) {
1042 if (NT_STATUS_IS_ERR(status
)) {
1046 /* Return variables */
1050 return r
.out
.result
;
1053 struct rpccli_wbint_AllocateUid_state
{
1054 struct wbint_AllocateUid orig
;
1055 struct wbint_AllocateUid tmp
;
1056 TALLOC_CTX
*out_mem_ctx
;
1057 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1060 static void rpccli_wbint_AllocateUid_done(struct tevent_req
*subreq
);
1062 struct tevent_req
*rpccli_wbint_AllocateUid_send(TALLOC_CTX
*mem_ctx
,
1063 struct tevent_context
*ev
,
1064 struct rpc_pipe_client
*cli
,
1065 uint64_t *_uid
/* [out] [ref] */)
1067 struct tevent_req
*req
;
1068 struct rpccli_wbint_AllocateUid_state
*state
;
1069 struct tevent_req
*subreq
;
1071 req
= tevent_req_create(mem_ctx
, &state
,
1072 struct rpccli_wbint_AllocateUid_state
);
1076 state
->out_mem_ctx
= NULL
;
1077 state
->dispatch_recv
= cli
->dispatch_recv
;
1081 /* Out parameters */
1082 state
->orig
.out
.uid
= _uid
;
1085 ZERO_STRUCT(state
->orig
.out
.result
);
1087 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1088 "rpccli_wbint_AllocateUid_out_memory");
1089 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1090 return tevent_req_post(req
, ev
);
1093 /* make a temporary copy, that we pass to the dispatch function */
1094 state
->tmp
= state
->orig
;
1096 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1098 NDR_WBINT_ALLOCATEUID
,
1100 if (tevent_req_nomem(subreq
, req
)) {
1101 return tevent_req_post(req
, ev
);
1103 tevent_req_set_callback(subreq
, rpccli_wbint_AllocateUid_done
, req
);
1107 static void rpccli_wbint_AllocateUid_done(struct tevent_req
*subreq
)
1109 struct tevent_req
*req
= tevent_req_callback_data(
1110 subreq
, struct tevent_req
);
1111 struct rpccli_wbint_AllocateUid_state
*state
= tevent_req_data(
1112 req
, struct rpccli_wbint_AllocateUid_state
);
1114 TALLOC_CTX
*mem_ctx
;
1116 if (state
->out_mem_ctx
) {
1117 mem_ctx
= state
->out_mem_ctx
;
1122 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1123 TALLOC_FREE(subreq
);
1124 if (!NT_STATUS_IS_OK(status
)) {
1125 tevent_req_nterror(req
, status
);
1129 /* Copy out parameters */
1130 *state
->orig
.out
.uid
= *state
->tmp
.out
.uid
;
1133 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1135 /* Reset temporary structure */
1136 ZERO_STRUCT(state
->tmp
);
1138 tevent_req_done(req
);
1141 NTSTATUS
rpccli_wbint_AllocateUid_recv(struct tevent_req
*req
,
1142 TALLOC_CTX
*mem_ctx
,
1145 struct rpccli_wbint_AllocateUid_state
*state
= tevent_req_data(
1146 req
, struct rpccli_wbint_AllocateUid_state
);
1149 if (tevent_req_is_nterror(req
, &status
)) {
1150 tevent_req_received(req
);
1154 /* Steal possbile out parameters to the callers context */
1155 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1158 *result
= state
->orig
.out
.result
;
1160 tevent_req_received(req
);
1161 return NT_STATUS_OK
;
1164 NTSTATUS
rpccli_wbint_AllocateUid(struct rpc_pipe_client
*cli
,
1165 TALLOC_CTX
*mem_ctx
,
1166 uint64_t *uid
/* [out] [ref] */)
1168 struct wbint_AllocateUid r
;
1173 status
= cli
->dispatch(cli
,
1176 NDR_WBINT_ALLOCATEUID
,
1179 if (!NT_STATUS_IS_OK(status
)) {
1183 if (NT_STATUS_IS_ERR(status
)) {
1187 /* Return variables */
1191 return r
.out
.result
;
1194 struct rpccli_wbint_AllocateGid_state
{
1195 struct wbint_AllocateGid orig
;
1196 struct wbint_AllocateGid tmp
;
1197 TALLOC_CTX
*out_mem_ctx
;
1198 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1201 static void rpccli_wbint_AllocateGid_done(struct tevent_req
*subreq
);
1203 struct tevent_req
*rpccli_wbint_AllocateGid_send(TALLOC_CTX
*mem_ctx
,
1204 struct tevent_context
*ev
,
1205 struct rpc_pipe_client
*cli
,
1206 uint64_t *_gid
/* [out] [ref] */)
1208 struct tevent_req
*req
;
1209 struct rpccli_wbint_AllocateGid_state
*state
;
1210 struct tevent_req
*subreq
;
1212 req
= tevent_req_create(mem_ctx
, &state
,
1213 struct rpccli_wbint_AllocateGid_state
);
1217 state
->out_mem_ctx
= NULL
;
1218 state
->dispatch_recv
= cli
->dispatch_recv
;
1222 /* Out parameters */
1223 state
->orig
.out
.gid
= _gid
;
1226 ZERO_STRUCT(state
->orig
.out
.result
);
1228 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1229 "rpccli_wbint_AllocateGid_out_memory");
1230 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1231 return tevent_req_post(req
, ev
);
1234 /* make a temporary copy, that we pass to the dispatch function */
1235 state
->tmp
= state
->orig
;
1237 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1239 NDR_WBINT_ALLOCATEGID
,
1241 if (tevent_req_nomem(subreq
, req
)) {
1242 return tevent_req_post(req
, ev
);
1244 tevent_req_set_callback(subreq
, rpccli_wbint_AllocateGid_done
, req
);
1248 static void rpccli_wbint_AllocateGid_done(struct tevent_req
*subreq
)
1250 struct tevent_req
*req
= tevent_req_callback_data(
1251 subreq
, struct tevent_req
);
1252 struct rpccli_wbint_AllocateGid_state
*state
= tevent_req_data(
1253 req
, struct rpccli_wbint_AllocateGid_state
);
1255 TALLOC_CTX
*mem_ctx
;
1257 if (state
->out_mem_ctx
) {
1258 mem_ctx
= state
->out_mem_ctx
;
1263 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1264 TALLOC_FREE(subreq
);
1265 if (!NT_STATUS_IS_OK(status
)) {
1266 tevent_req_nterror(req
, status
);
1270 /* Copy out parameters */
1271 *state
->orig
.out
.gid
= *state
->tmp
.out
.gid
;
1274 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1276 /* Reset temporary structure */
1277 ZERO_STRUCT(state
->tmp
);
1279 tevent_req_done(req
);
1282 NTSTATUS
rpccli_wbint_AllocateGid_recv(struct tevent_req
*req
,
1283 TALLOC_CTX
*mem_ctx
,
1286 struct rpccli_wbint_AllocateGid_state
*state
= tevent_req_data(
1287 req
, struct rpccli_wbint_AllocateGid_state
);
1290 if (tevent_req_is_nterror(req
, &status
)) {
1291 tevent_req_received(req
);
1295 /* Steal possbile out parameters to the callers context */
1296 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1299 *result
= state
->orig
.out
.result
;
1301 tevent_req_received(req
);
1302 return NT_STATUS_OK
;
1305 NTSTATUS
rpccli_wbint_AllocateGid(struct rpc_pipe_client
*cli
,
1306 TALLOC_CTX
*mem_ctx
,
1307 uint64_t *gid
/* [out] [ref] */)
1309 struct wbint_AllocateGid r
;
1314 status
= cli
->dispatch(cli
,
1317 NDR_WBINT_ALLOCATEGID
,
1320 if (!NT_STATUS_IS_OK(status
)) {
1324 if (NT_STATUS_IS_ERR(status
)) {
1328 /* Return variables */
1332 return r
.out
.result
;
1335 struct rpccli_wbint_QueryUser_state
{
1336 struct wbint_QueryUser orig
;
1337 struct wbint_QueryUser tmp
;
1338 TALLOC_CTX
*out_mem_ctx
;
1339 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1342 static void rpccli_wbint_QueryUser_done(struct tevent_req
*subreq
);
1344 struct tevent_req
*rpccli_wbint_QueryUser_send(TALLOC_CTX
*mem_ctx
,
1345 struct tevent_context
*ev
,
1346 struct rpc_pipe_client
*cli
,
1347 struct dom_sid
*_sid
/* [in] [ref] */,
1348 struct wbint_userinfo
*_info
/* [out] [ref] */)
1350 struct tevent_req
*req
;
1351 struct rpccli_wbint_QueryUser_state
*state
;
1352 struct tevent_req
*subreq
;
1354 req
= tevent_req_create(mem_ctx
, &state
,
1355 struct rpccli_wbint_QueryUser_state
);
1359 state
->out_mem_ctx
= NULL
;
1360 state
->dispatch_recv
= cli
->dispatch_recv
;
1363 state
->orig
.in
.sid
= _sid
;
1365 /* Out parameters */
1366 state
->orig
.out
.info
= _info
;
1369 ZERO_STRUCT(state
->orig
.out
.result
);
1371 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1372 "rpccli_wbint_QueryUser_out_memory");
1373 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1374 return tevent_req_post(req
, ev
);
1377 /* make a temporary copy, that we pass to the dispatch function */
1378 state
->tmp
= state
->orig
;
1380 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1382 NDR_WBINT_QUERYUSER
,
1384 if (tevent_req_nomem(subreq
, req
)) {
1385 return tevent_req_post(req
, ev
);
1387 tevent_req_set_callback(subreq
, rpccli_wbint_QueryUser_done
, req
);
1391 static void rpccli_wbint_QueryUser_done(struct tevent_req
*subreq
)
1393 struct tevent_req
*req
= tevent_req_callback_data(
1394 subreq
, struct tevent_req
);
1395 struct rpccli_wbint_QueryUser_state
*state
= tevent_req_data(
1396 req
, struct rpccli_wbint_QueryUser_state
);
1398 TALLOC_CTX
*mem_ctx
;
1400 if (state
->out_mem_ctx
) {
1401 mem_ctx
= state
->out_mem_ctx
;
1406 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1407 TALLOC_FREE(subreq
);
1408 if (!NT_STATUS_IS_OK(status
)) {
1409 tevent_req_nterror(req
, status
);
1413 /* Copy out parameters */
1414 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
1417 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1419 /* Reset temporary structure */
1420 ZERO_STRUCT(state
->tmp
);
1422 tevent_req_done(req
);
1425 NTSTATUS
rpccli_wbint_QueryUser_recv(struct tevent_req
*req
,
1426 TALLOC_CTX
*mem_ctx
,
1429 struct rpccli_wbint_QueryUser_state
*state
= tevent_req_data(
1430 req
, struct rpccli_wbint_QueryUser_state
);
1433 if (tevent_req_is_nterror(req
, &status
)) {
1434 tevent_req_received(req
);
1438 /* Steal possbile out parameters to the callers context */
1439 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1442 *result
= state
->orig
.out
.result
;
1444 tevent_req_received(req
);
1445 return NT_STATUS_OK
;
1448 NTSTATUS
rpccli_wbint_QueryUser(struct rpc_pipe_client
*cli
,
1449 TALLOC_CTX
*mem_ctx
,
1450 struct dom_sid
*sid
/* [in] [ref] */,
1451 struct wbint_userinfo
*info
/* [out] [ref] */)
1453 struct wbint_QueryUser r
;
1459 status
= cli
->dispatch(cli
,
1462 NDR_WBINT_QUERYUSER
,
1465 if (!NT_STATUS_IS_OK(status
)) {
1469 if (NT_STATUS_IS_ERR(status
)) {
1473 /* Return variables */
1474 *info
= *r
.out
.info
;
1477 return r
.out
.result
;
1480 struct rpccli_wbint_LookupUserAliases_state
{
1481 struct wbint_LookupUserAliases orig
;
1482 struct wbint_LookupUserAliases tmp
;
1483 TALLOC_CTX
*out_mem_ctx
;
1484 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1487 static void rpccli_wbint_LookupUserAliases_done(struct tevent_req
*subreq
);
1489 struct tevent_req
*rpccli_wbint_LookupUserAliases_send(TALLOC_CTX
*mem_ctx
,
1490 struct tevent_context
*ev
,
1491 struct rpc_pipe_client
*cli
,
1492 struct wbint_SidArray
*_sids
/* [in] [ref] */,
1493 struct wbint_RidArray
*_rids
/* [out] [ref] */)
1495 struct tevent_req
*req
;
1496 struct rpccli_wbint_LookupUserAliases_state
*state
;
1497 struct tevent_req
*subreq
;
1499 req
= tevent_req_create(mem_ctx
, &state
,
1500 struct rpccli_wbint_LookupUserAliases_state
);
1504 state
->out_mem_ctx
= NULL
;
1505 state
->dispatch_recv
= cli
->dispatch_recv
;
1508 state
->orig
.in
.sids
= _sids
;
1510 /* Out parameters */
1511 state
->orig
.out
.rids
= _rids
;
1514 ZERO_STRUCT(state
->orig
.out
.result
);
1516 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1517 "rpccli_wbint_LookupUserAliases_out_memory");
1518 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1519 return tevent_req_post(req
, ev
);
1522 /* make a temporary copy, that we pass to the dispatch function */
1523 state
->tmp
= state
->orig
;
1525 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1527 NDR_WBINT_LOOKUPUSERALIASES
,
1529 if (tevent_req_nomem(subreq
, req
)) {
1530 return tevent_req_post(req
, ev
);
1532 tevent_req_set_callback(subreq
, rpccli_wbint_LookupUserAliases_done
, req
);
1536 static void rpccli_wbint_LookupUserAliases_done(struct tevent_req
*subreq
)
1538 struct tevent_req
*req
= tevent_req_callback_data(
1539 subreq
, struct tevent_req
);
1540 struct rpccli_wbint_LookupUserAliases_state
*state
= tevent_req_data(
1541 req
, struct rpccli_wbint_LookupUserAliases_state
);
1543 TALLOC_CTX
*mem_ctx
;
1545 if (state
->out_mem_ctx
) {
1546 mem_ctx
= state
->out_mem_ctx
;
1551 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1552 TALLOC_FREE(subreq
);
1553 if (!NT_STATUS_IS_OK(status
)) {
1554 tevent_req_nterror(req
, status
);
1558 /* Copy out parameters */
1559 *state
->orig
.out
.rids
= *state
->tmp
.out
.rids
;
1562 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1564 /* Reset temporary structure */
1565 ZERO_STRUCT(state
->tmp
);
1567 tevent_req_done(req
);
1570 NTSTATUS
rpccli_wbint_LookupUserAliases_recv(struct tevent_req
*req
,
1571 TALLOC_CTX
*mem_ctx
,
1574 struct rpccli_wbint_LookupUserAliases_state
*state
= tevent_req_data(
1575 req
, struct rpccli_wbint_LookupUserAliases_state
);
1578 if (tevent_req_is_nterror(req
, &status
)) {
1579 tevent_req_received(req
);
1583 /* Steal possbile out parameters to the callers context */
1584 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1587 *result
= state
->orig
.out
.result
;
1589 tevent_req_received(req
);
1590 return NT_STATUS_OK
;
1593 NTSTATUS
rpccli_wbint_LookupUserAliases(struct rpc_pipe_client
*cli
,
1594 TALLOC_CTX
*mem_ctx
,
1595 struct wbint_SidArray
*sids
/* [in] [ref] */,
1596 struct wbint_RidArray
*rids
/* [out] [ref] */)
1598 struct wbint_LookupUserAliases r
;
1604 status
= cli
->dispatch(cli
,
1607 NDR_WBINT_LOOKUPUSERALIASES
,
1610 if (!NT_STATUS_IS_OK(status
)) {
1614 if (NT_STATUS_IS_ERR(status
)) {
1618 /* Return variables */
1619 *rids
= *r
.out
.rids
;
1622 return r
.out
.result
;
1625 struct rpccli_wbint_LookupUserGroups_state
{
1626 struct wbint_LookupUserGroups orig
;
1627 struct wbint_LookupUserGroups tmp
;
1628 TALLOC_CTX
*out_mem_ctx
;
1629 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1632 static void rpccli_wbint_LookupUserGroups_done(struct tevent_req
*subreq
);
1634 struct tevent_req
*rpccli_wbint_LookupUserGroups_send(TALLOC_CTX
*mem_ctx
,
1635 struct tevent_context
*ev
,
1636 struct rpc_pipe_client
*cli
,
1637 struct dom_sid
*_sid
/* [in] [ref] */,
1638 struct wbint_SidArray
*_sids
/* [out] [ref] */)
1640 struct tevent_req
*req
;
1641 struct rpccli_wbint_LookupUserGroups_state
*state
;
1642 struct tevent_req
*subreq
;
1644 req
= tevent_req_create(mem_ctx
, &state
,
1645 struct rpccli_wbint_LookupUserGroups_state
);
1649 state
->out_mem_ctx
= NULL
;
1650 state
->dispatch_recv
= cli
->dispatch_recv
;
1653 state
->orig
.in
.sid
= _sid
;
1655 /* Out parameters */
1656 state
->orig
.out
.sids
= _sids
;
1659 ZERO_STRUCT(state
->orig
.out
.result
);
1661 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1662 "rpccli_wbint_LookupUserGroups_out_memory");
1663 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1664 return tevent_req_post(req
, ev
);
1667 /* make a temporary copy, that we pass to the dispatch function */
1668 state
->tmp
= state
->orig
;
1670 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1672 NDR_WBINT_LOOKUPUSERGROUPS
,
1674 if (tevent_req_nomem(subreq
, req
)) {
1675 return tevent_req_post(req
, ev
);
1677 tevent_req_set_callback(subreq
, rpccli_wbint_LookupUserGroups_done
, req
);
1681 static void rpccli_wbint_LookupUserGroups_done(struct tevent_req
*subreq
)
1683 struct tevent_req
*req
= tevent_req_callback_data(
1684 subreq
, struct tevent_req
);
1685 struct rpccli_wbint_LookupUserGroups_state
*state
= tevent_req_data(
1686 req
, struct rpccli_wbint_LookupUserGroups_state
);
1688 TALLOC_CTX
*mem_ctx
;
1690 if (state
->out_mem_ctx
) {
1691 mem_ctx
= state
->out_mem_ctx
;
1696 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1697 TALLOC_FREE(subreq
);
1698 if (!NT_STATUS_IS_OK(status
)) {
1699 tevent_req_nterror(req
, status
);
1703 /* Copy out parameters */
1704 *state
->orig
.out
.sids
= *state
->tmp
.out
.sids
;
1707 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1709 /* Reset temporary structure */
1710 ZERO_STRUCT(state
->tmp
);
1712 tevent_req_done(req
);
1715 NTSTATUS
rpccli_wbint_LookupUserGroups_recv(struct tevent_req
*req
,
1716 TALLOC_CTX
*mem_ctx
,
1719 struct rpccli_wbint_LookupUserGroups_state
*state
= tevent_req_data(
1720 req
, struct rpccli_wbint_LookupUserGroups_state
);
1723 if (tevent_req_is_nterror(req
, &status
)) {
1724 tevent_req_received(req
);
1728 /* Steal possbile out parameters to the callers context */
1729 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1732 *result
= state
->orig
.out
.result
;
1734 tevent_req_received(req
);
1735 return NT_STATUS_OK
;
1738 NTSTATUS
rpccli_wbint_LookupUserGroups(struct rpc_pipe_client
*cli
,
1739 TALLOC_CTX
*mem_ctx
,
1740 struct dom_sid
*sid
/* [in] [ref] */,
1741 struct wbint_SidArray
*sids
/* [out] [ref] */)
1743 struct wbint_LookupUserGroups r
;
1749 status
= cli
->dispatch(cli
,
1752 NDR_WBINT_LOOKUPUSERGROUPS
,
1755 if (!NT_STATUS_IS_OK(status
)) {
1759 if (NT_STATUS_IS_ERR(status
)) {
1763 /* Return variables */
1764 *sids
= *r
.out
.sids
;
1767 return r
.out
.result
;
1770 struct rpccli_wbint_QuerySequenceNumber_state
{
1771 struct wbint_QuerySequenceNumber orig
;
1772 struct wbint_QuerySequenceNumber tmp
;
1773 TALLOC_CTX
*out_mem_ctx
;
1774 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1777 static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req
*subreq
);
1779 struct tevent_req
*rpccli_wbint_QuerySequenceNumber_send(TALLOC_CTX
*mem_ctx
,
1780 struct tevent_context
*ev
,
1781 struct rpc_pipe_client
*cli
,
1782 uint32_t *_sequence
/* [out] [ref] */)
1784 struct tevent_req
*req
;
1785 struct rpccli_wbint_QuerySequenceNumber_state
*state
;
1786 struct tevent_req
*subreq
;
1788 req
= tevent_req_create(mem_ctx
, &state
,
1789 struct rpccli_wbint_QuerySequenceNumber_state
);
1793 state
->out_mem_ctx
= NULL
;
1794 state
->dispatch_recv
= cli
->dispatch_recv
;
1798 /* Out parameters */
1799 state
->orig
.out
.sequence
= _sequence
;
1802 ZERO_STRUCT(state
->orig
.out
.result
);
1804 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1805 "rpccli_wbint_QuerySequenceNumber_out_memory");
1806 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1807 return tevent_req_post(req
, ev
);
1810 /* make a temporary copy, that we pass to the dispatch function */
1811 state
->tmp
= state
->orig
;
1813 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1815 NDR_WBINT_QUERYSEQUENCENUMBER
,
1817 if (tevent_req_nomem(subreq
, req
)) {
1818 return tevent_req_post(req
, ev
);
1820 tevent_req_set_callback(subreq
, rpccli_wbint_QuerySequenceNumber_done
, req
);
1824 static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req
*subreq
)
1826 struct tevent_req
*req
= tevent_req_callback_data(
1827 subreq
, struct tevent_req
);
1828 struct rpccli_wbint_QuerySequenceNumber_state
*state
= tevent_req_data(
1829 req
, struct rpccli_wbint_QuerySequenceNumber_state
);
1831 TALLOC_CTX
*mem_ctx
;
1833 if (state
->out_mem_ctx
) {
1834 mem_ctx
= state
->out_mem_ctx
;
1839 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1840 TALLOC_FREE(subreq
);
1841 if (!NT_STATUS_IS_OK(status
)) {
1842 tevent_req_nterror(req
, status
);
1846 /* Copy out parameters */
1847 *state
->orig
.out
.sequence
= *state
->tmp
.out
.sequence
;
1850 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1852 /* Reset temporary structure */
1853 ZERO_STRUCT(state
->tmp
);
1855 tevent_req_done(req
);
1858 NTSTATUS
rpccli_wbint_QuerySequenceNumber_recv(struct tevent_req
*req
,
1859 TALLOC_CTX
*mem_ctx
,
1862 struct rpccli_wbint_QuerySequenceNumber_state
*state
= tevent_req_data(
1863 req
, struct rpccli_wbint_QuerySequenceNumber_state
);
1866 if (tevent_req_is_nterror(req
, &status
)) {
1867 tevent_req_received(req
);
1871 /* Steal possbile out parameters to the callers context */
1872 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1875 *result
= state
->orig
.out
.result
;
1877 tevent_req_received(req
);
1878 return NT_STATUS_OK
;
1881 NTSTATUS
rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client
*cli
,
1882 TALLOC_CTX
*mem_ctx
,
1883 uint32_t *sequence
/* [out] [ref] */)
1885 struct wbint_QuerySequenceNumber r
;
1890 status
= cli
->dispatch(cli
,
1893 NDR_WBINT_QUERYSEQUENCENUMBER
,
1896 if (!NT_STATUS_IS_OK(status
)) {
1900 if (NT_STATUS_IS_ERR(status
)) {
1904 /* Return variables */
1905 *sequence
= *r
.out
.sequence
;
1908 return r
.out
.result
;
1911 struct rpccli_wbint_LookupGroupMembers_state
{
1912 struct wbint_LookupGroupMembers orig
;
1913 struct wbint_LookupGroupMembers tmp
;
1914 TALLOC_CTX
*out_mem_ctx
;
1915 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1918 static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req
*subreq
);
1920 struct tevent_req
*rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX
*mem_ctx
,
1921 struct tevent_context
*ev
,
1922 struct rpc_pipe_client
*cli
,
1923 struct dom_sid
*_sid
/* [in] [ref] */,
1924 enum lsa_SidType _type
/* [in] */,
1925 struct wbint_Principals
*_members
/* [out] [ref] */)
1927 struct tevent_req
*req
;
1928 struct rpccli_wbint_LookupGroupMembers_state
*state
;
1929 struct tevent_req
*subreq
;
1931 req
= tevent_req_create(mem_ctx
, &state
,
1932 struct rpccli_wbint_LookupGroupMembers_state
);
1936 state
->out_mem_ctx
= NULL
;
1937 state
->dispatch_recv
= cli
->dispatch_recv
;
1940 state
->orig
.in
.sid
= _sid
;
1941 state
->orig
.in
.type
= _type
;
1943 /* Out parameters */
1944 state
->orig
.out
.members
= _members
;
1947 ZERO_STRUCT(state
->orig
.out
.result
);
1949 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1950 "rpccli_wbint_LookupGroupMembers_out_memory");
1951 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1952 return tevent_req_post(req
, ev
);
1955 /* make a temporary copy, that we pass to the dispatch function */
1956 state
->tmp
= state
->orig
;
1958 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1960 NDR_WBINT_LOOKUPGROUPMEMBERS
,
1962 if (tevent_req_nomem(subreq
, req
)) {
1963 return tevent_req_post(req
, ev
);
1965 tevent_req_set_callback(subreq
, rpccli_wbint_LookupGroupMembers_done
, req
);
1969 static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req
*subreq
)
1971 struct tevent_req
*req
= tevent_req_callback_data(
1972 subreq
, struct tevent_req
);
1973 struct rpccli_wbint_LookupGroupMembers_state
*state
= tevent_req_data(
1974 req
, struct rpccli_wbint_LookupGroupMembers_state
);
1976 TALLOC_CTX
*mem_ctx
;
1978 if (state
->out_mem_ctx
) {
1979 mem_ctx
= state
->out_mem_ctx
;
1984 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1985 TALLOC_FREE(subreq
);
1986 if (!NT_STATUS_IS_OK(status
)) {
1987 tevent_req_nterror(req
, status
);
1991 /* Copy out parameters */
1992 *state
->orig
.out
.members
= *state
->tmp
.out
.members
;
1995 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1997 /* Reset temporary structure */
1998 ZERO_STRUCT(state
->tmp
);
2000 tevent_req_done(req
);
2003 NTSTATUS
rpccli_wbint_LookupGroupMembers_recv(struct tevent_req
*req
,
2004 TALLOC_CTX
*mem_ctx
,
2007 struct rpccli_wbint_LookupGroupMembers_state
*state
= tevent_req_data(
2008 req
, struct rpccli_wbint_LookupGroupMembers_state
);
2011 if (tevent_req_is_nterror(req
, &status
)) {
2012 tevent_req_received(req
);
2016 /* Steal possbile out parameters to the callers context */
2017 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2020 *result
= state
->orig
.out
.result
;
2022 tevent_req_received(req
);
2023 return NT_STATUS_OK
;
2026 NTSTATUS
rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client
*cli
,
2027 TALLOC_CTX
*mem_ctx
,
2028 struct dom_sid
*sid
/* [in] [ref] */,
2029 enum lsa_SidType type
/* [in] */,
2030 struct wbint_Principals
*members
/* [out] [ref] */)
2032 struct wbint_LookupGroupMembers r
;
2039 status
= cli
->dispatch(cli
,
2042 NDR_WBINT_LOOKUPGROUPMEMBERS
,
2045 if (!NT_STATUS_IS_OK(status
)) {
2049 if (NT_STATUS_IS_ERR(status
)) {
2053 /* Return variables */
2054 *members
= *r
.out
.members
;
2057 return r
.out
.result
;
2060 struct rpccli_wbint_QueryUserList_state
{
2061 struct wbint_QueryUserList orig
;
2062 struct wbint_QueryUserList tmp
;
2063 TALLOC_CTX
*out_mem_ctx
;
2064 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2067 static void rpccli_wbint_QueryUserList_done(struct tevent_req
*subreq
);
2069 struct tevent_req
*rpccli_wbint_QueryUserList_send(TALLOC_CTX
*mem_ctx
,
2070 struct tevent_context
*ev
,
2071 struct rpc_pipe_client
*cli
,
2072 struct wbint_userinfos
*_users
/* [out] [ref] */)
2074 struct tevent_req
*req
;
2075 struct rpccli_wbint_QueryUserList_state
*state
;
2076 struct tevent_req
*subreq
;
2078 req
= tevent_req_create(mem_ctx
, &state
,
2079 struct rpccli_wbint_QueryUserList_state
);
2083 state
->out_mem_ctx
= NULL
;
2084 state
->dispatch_recv
= cli
->dispatch_recv
;
2088 /* Out parameters */
2089 state
->orig
.out
.users
= _users
;
2092 ZERO_STRUCT(state
->orig
.out
.result
);
2094 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2095 "rpccli_wbint_QueryUserList_out_memory");
2096 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2097 return tevent_req_post(req
, ev
);
2100 /* make a temporary copy, that we pass to the dispatch function */
2101 state
->tmp
= state
->orig
;
2103 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2105 NDR_WBINT_QUERYUSERLIST
,
2107 if (tevent_req_nomem(subreq
, req
)) {
2108 return tevent_req_post(req
, ev
);
2110 tevent_req_set_callback(subreq
, rpccli_wbint_QueryUserList_done
, req
);
2114 static void rpccli_wbint_QueryUserList_done(struct tevent_req
*subreq
)
2116 struct tevent_req
*req
= tevent_req_callback_data(
2117 subreq
, struct tevent_req
);
2118 struct rpccli_wbint_QueryUserList_state
*state
= tevent_req_data(
2119 req
, struct rpccli_wbint_QueryUserList_state
);
2121 TALLOC_CTX
*mem_ctx
;
2123 if (state
->out_mem_ctx
) {
2124 mem_ctx
= state
->out_mem_ctx
;
2129 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2130 TALLOC_FREE(subreq
);
2131 if (!NT_STATUS_IS_OK(status
)) {
2132 tevent_req_nterror(req
, status
);
2136 /* Copy out parameters */
2137 *state
->orig
.out
.users
= *state
->tmp
.out
.users
;
2140 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2142 /* Reset temporary structure */
2143 ZERO_STRUCT(state
->tmp
);
2145 tevent_req_done(req
);
2148 NTSTATUS
rpccli_wbint_QueryUserList_recv(struct tevent_req
*req
,
2149 TALLOC_CTX
*mem_ctx
,
2152 struct rpccli_wbint_QueryUserList_state
*state
= tevent_req_data(
2153 req
, struct rpccli_wbint_QueryUserList_state
);
2156 if (tevent_req_is_nterror(req
, &status
)) {
2157 tevent_req_received(req
);
2161 /* Steal possbile out parameters to the callers context */
2162 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2165 *result
= state
->orig
.out
.result
;
2167 tevent_req_received(req
);
2168 return NT_STATUS_OK
;
2171 NTSTATUS
rpccli_wbint_QueryUserList(struct rpc_pipe_client
*cli
,
2172 TALLOC_CTX
*mem_ctx
,
2173 struct wbint_userinfos
*users
/* [out] [ref] */)
2175 struct wbint_QueryUserList r
;
2180 status
= cli
->dispatch(cli
,
2183 NDR_WBINT_QUERYUSERLIST
,
2186 if (!NT_STATUS_IS_OK(status
)) {
2190 if (NT_STATUS_IS_ERR(status
)) {
2194 /* Return variables */
2195 *users
= *r
.out
.users
;
2198 return r
.out
.result
;
2201 struct rpccli_wbint_QueryGroupList_state
{
2202 struct wbint_QueryGroupList orig
;
2203 struct wbint_QueryGroupList tmp
;
2204 TALLOC_CTX
*out_mem_ctx
;
2205 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2208 static void rpccli_wbint_QueryGroupList_done(struct tevent_req
*subreq
);
2210 struct tevent_req
*rpccli_wbint_QueryGroupList_send(TALLOC_CTX
*mem_ctx
,
2211 struct tevent_context
*ev
,
2212 struct rpc_pipe_client
*cli
,
2213 struct wbint_Principals
*_groups
/* [out] [ref] */)
2215 struct tevent_req
*req
;
2216 struct rpccli_wbint_QueryGroupList_state
*state
;
2217 struct tevent_req
*subreq
;
2219 req
= tevent_req_create(mem_ctx
, &state
,
2220 struct rpccli_wbint_QueryGroupList_state
);
2224 state
->out_mem_ctx
= NULL
;
2225 state
->dispatch_recv
= cli
->dispatch_recv
;
2229 /* Out parameters */
2230 state
->orig
.out
.groups
= _groups
;
2233 ZERO_STRUCT(state
->orig
.out
.result
);
2235 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2236 "rpccli_wbint_QueryGroupList_out_memory");
2237 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2238 return tevent_req_post(req
, ev
);
2241 /* make a temporary copy, that we pass to the dispatch function */
2242 state
->tmp
= state
->orig
;
2244 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2246 NDR_WBINT_QUERYGROUPLIST
,
2248 if (tevent_req_nomem(subreq
, req
)) {
2249 return tevent_req_post(req
, ev
);
2251 tevent_req_set_callback(subreq
, rpccli_wbint_QueryGroupList_done
, req
);
2255 static void rpccli_wbint_QueryGroupList_done(struct tevent_req
*subreq
)
2257 struct tevent_req
*req
= tevent_req_callback_data(
2258 subreq
, struct tevent_req
);
2259 struct rpccli_wbint_QueryGroupList_state
*state
= tevent_req_data(
2260 req
, struct rpccli_wbint_QueryGroupList_state
);
2262 TALLOC_CTX
*mem_ctx
;
2264 if (state
->out_mem_ctx
) {
2265 mem_ctx
= state
->out_mem_ctx
;
2270 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2271 TALLOC_FREE(subreq
);
2272 if (!NT_STATUS_IS_OK(status
)) {
2273 tevent_req_nterror(req
, status
);
2277 /* Copy out parameters */
2278 *state
->orig
.out
.groups
= *state
->tmp
.out
.groups
;
2281 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2283 /* Reset temporary structure */
2284 ZERO_STRUCT(state
->tmp
);
2286 tevent_req_done(req
);
2289 NTSTATUS
rpccli_wbint_QueryGroupList_recv(struct tevent_req
*req
,
2290 TALLOC_CTX
*mem_ctx
,
2293 struct rpccli_wbint_QueryGroupList_state
*state
= tevent_req_data(
2294 req
, struct rpccli_wbint_QueryGroupList_state
);
2297 if (tevent_req_is_nterror(req
, &status
)) {
2298 tevent_req_received(req
);
2302 /* Steal possbile out parameters to the callers context */
2303 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2306 *result
= state
->orig
.out
.result
;
2308 tevent_req_received(req
);
2309 return NT_STATUS_OK
;
2312 NTSTATUS
rpccli_wbint_QueryGroupList(struct rpc_pipe_client
*cli
,
2313 TALLOC_CTX
*mem_ctx
,
2314 struct wbint_Principals
*groups
/* [out] [ref] */)
2316 struct wbint_QueryGroupList r
;
2321 status
= cli
->dispatch(cli
,
2324 NDR_WBINT_QUERYGROUPLIST
,
2327 if (!NT_STATUS_IS_OK(status
)) {
2331 if (NT_STATUS_IS_ERR(status
)) {
2335 /* Return variables */
2336 *groups
= *r
.out
.groups
;
2339 return r
.out
.result
;
2342 struct rpccli_wbint_DsGetDcName_state
{
2343 struct wbint_DsGetDcName orig
;
2344 struct wbint_DsGetDcName tmp
;
2345 TALLOC_CTX
*out_mem_ctx
;
2346 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2349 static void rpccli_wbint_DsGetDcName_done(struct tevent_req
*subreq
);
2351 struct tevent_req
*rpccli_wbint_DsGetDcName_send(TALLOC_CTX
*mem_ctx
,
2352 struct tevent_context
*ev
,
2353 struct rpc_pipe_client
*cli
,
2354 const char *_domain_name
/* [in] [ref,charset(UTF8)] */,
2355 struct GUID
*_domain_guid
/* [in] [unique] */,
2356 const char *_site_name
/* [in] [unique,charset(UTF8)] */,
2357 uint32_t _flags
/* [in] */,
2358 struct netr_DsRGetDCNameInfo
**_dc_info
/* [out] [ref] */)
2360 struct tevent_req
*req
;
2361 struct rpccli_wbint_DsGetDcName_state
*state
;
2362 struct tevent_req
*subreq
;
2364 req
= tevent_req_create(mem_ctx
, &state
,
2365 struct rpccli_wbint_DsGetDcName_state
);
2369 state
->out_mem_ctx
= NULL
;
2370 state
->dispatch_recv
= cli
->dispatch_recv
;
2373 state
->orig
.in
.domain_name
= _domain_name
;
2374 state
->orig
.in
.domain_guid
= _domain_guid
;
2375 state
->orig
.in
.site_name
= _site_name
;
2376 state
->orig
.in
.flags
= _flags
;
2378 /* Out parameters */
2379 state
->orig
.out
.dc_info
= _dc_info
;
2382 ZERO_STRUCT(state
->orig
.out
.result
);
2384 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2385 "rpccli_wbint_DsGetDcName_out_memory");
2386 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2387 return tevent_req_post(req
, ev
);
2390 /* make a temporary copy, that we pass to the dispatch function */
2391 state
->tmp
= state
->orig
;
2393 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2395 NDR_WBINT_DSGETDCNAME
,
2397 if (tevent_req_nomem(subreq
, req
)) {
2398 return tevent_req_post(req
, ev
);
2400 tevent_req_set_callback(subreq
, rpccli_wbint_DsGetDcName_done
, req
);
2404 static void rpccli_wbint_DsGetDcName_done(struct tevent_req
*subreq
)
2406 struct tevent_req
*req
= tevent_req_callback_data(
2407 subreq
, struct tevent_req
);
2408 struct rpccli_wbint_DsGetDcName_state
*state
= tevent_req_data(
2409 req
, struct rpccli_wbint_DsGetDcName_state
);
2411 TALLOC_CTX
*mem_ctx
;
2413 if (state
->out_mem_ctx
) {
2414 mem_ctx
= state
->out_mem_ctx
;
2419 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2420 TALLOC_FREE(subreq
);
2421 if (!NT_STATUS_IS_OK(status
)) {
2422 tevent_req_nterror(req
, status
);
2426 /* Copy out parameters */
2427 *state
->orig
.out
.dc_info
= *state
->tmp
.out
.dc_info
;
2430 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2432 /* Reset temporary structure */
2433 ZERO_STRUCT(state
->tmp
);
2435 tevent_req_done(req
);
2438 NTSTATUS
rpccli_wbint_DsGetDcName_recv(struct tevent_req
*req
,
2439 TALLOC_CTX
*mem_ctx
,
2442 struct rpccli_wbint_DsGetDcName_state
*state
= tevent_req_data(
2443 req
, struct rpccli_wbint_DsGetDcName_state
);
2446 if (tevent_req_is_nterror(req
, &status
)) {
2447 tevent_req_received(req
);
2451 /* Steal possbile out parameters to the callers context */
2452 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2455 *result
= state
->orig
.out
.result
;
2457 tevent_req_received(req
);
2458 return NT_STATUS_OK
;
2461 NTSTATUS
rpccli_wbint_DsGetDcName(struct rpc_pipe_client
*cli
,
2462 TALLOC_CTX
*mem_ctx
,
2463 const char *domain_name
/* [in] [ref,charset(UTF8)] */,
2464 struct GUID
*domain_guid
/* [in] [unique] */,
2465 const char *site_name
/* [in] [unique,charset(UTF8)] */,
2466 uint32_t flags
/* [in] */,
2467 struct netr_DsRGetDCNameInfo
**dc_info
/* [out] [ref] */)
2469 struct wbint_DsGetDcName r
;
2473 r
.in
.domain_name
= domain_name
;
2474 r
.in
.domain_guid
= domain_guid
;
2475 r
.in
.site_name
= site_name
;
2478 status
= cli
->dispatch(cli
,
2481 NDR_WBINT_DSGETDCNAME
,
2484 if (!NT_STATUS_IS_OK(status
)) {
2488 if (NT_STATUS_IS_ERR(status
)) {
2492 /* Return variables */
2493 *dc_info
= *r
.out
.dc_info
;
2496 return r
.out
.result
;
2499 struct rpccli_wbint_LookupRids_state
{
2500 struct wbint_LookupRids orig
;
2501 struct wbint_LookupRids tmp
;
2502 TALLOC_CTX
*out_mem_ctx
;
2503 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2506 static void rpccli_wbint_LookupRids_done(struct tevent_req
*subreq
);
2508 struct tevent_req
*rpccli_wbint_LookupRids_send(TALLOC_CTX
*mem_ctx
,
2509 struct tevent_context
*ev
,
2510 struct rpc_pipe_client
*cli
,
2511 struct wbint_RidArray
*_rids
/* [in] [ref] */,
2512 const char **_domain_name
/* [out] [ref,charset(UTF8)] */,
2513 struct wbint_Principals
*_names
/* [out] [ref] */)
2515 struct tevent_req
*req
;
2516 struct rpccli_wbint_LookupRids_state
*state
;
2517 struct tevent_req
*subreq
;
2519 req
= tevent_req_create(mem_ctx
, &state
,
2520 struct rpccli_wbint_LookupRids_state
);
2524 state
->out_mem_ctx
= NULL
;
2525 state
->dispatch_recv
= cli
->dispatch_recv
;
2528 state
->orig
.in
.rids
= _rids
;
2530 /* Out parameters */
2531 state
->orig
.out
.domain_name
= _domain_name
;
2532 state
->orig
.out
.names
= _names
;
2535 ZERO_STRUCT(state
->orig
.out
.result
);
2537 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2538 "rpccli_wbint_LookupRids_out_memory");
2539 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2540 return tevent_req_post(req
, ev
);
2543 /* make a temporary copy, that we pass to the dispatch function */
2544 state
->tmp
= state
->orig
;
2546 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2548 NDR_WBINT_LOOKUPRIDS
,
2550 if (tevent_req_nomem(subreq
, req
)) {
2551 return tevent_req_post(req
, ev
);
2553 tevent_req_set_callback(subreq
, rpccli_wbint_LookupRids_done
, req
);
2557 static void rpccli_wbint_LookupRids_done(struct tevent_req
*subreq
)
2559 struct tevent_req
*req
= tevent_req_callback_data(
2560 subreq
, struct tevent_req
);
2561 struct rpccli_wbint_LookupRids_state
*state
= tevent_req_data(
2562 req
, struct rpccli_wbint_LookupRids_state
);
2564 TALLOC_CTX
*mem_ctx
;
2566 if (state
->out_mem_ctx
) {
2567 mem_ctx
= state
->out_mem_ctx
;
2572 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2573 TALLOC_FREE(subreq
);
2574 if (!NT_STATUS_IS_OK(status
)) {
2575 tevent_req_nterror(req
, status
);
2579 /* Copy out parameters */
2580 *state
->orig
.out
.domain_name
= *state
->tmp
.out
.domain_name
;
2581 *state
->orig
.out
.names
= *state
->tmp
.out
.names
;
2584 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2586 /* Reset temporary structure */
2587 ZERO_STRUCT(state
->tmp
);
2589 tevent_req_done(req
);
2592 NTSTATUS
rpccli_wbint_LookupRids_recv(struct tevent_req
*req
,
2593 TALLOC_CTX
*mem_ctx
,
2596 struct rpccli_wbint_LookupRids_state
*state
= tevent_req_data(
2597 req
, struct rpccli_wbint_LookupRids_state
);
2600 if (tevent_req_is_nterror(req
, &status
)) {
2601 tevent_req_received(req
);
2605 /* Steal possbile out parameters to the callers context */
2606 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2609 *result
= state
->orig
.out
.result
;
2611 tevent_req_received(req
);
2612 return NT_STATUS_OK
;
2615 NTSTATUS
rpccli_wbint_LookupRids(struct rpc_pipe_client
*cli
,
2616 TALLOC_CTX
*mem_ctx
,
2617 struct wbint_RidArray
*rids
/* [in] [ref] */,
2618 const char **domain_name
/* [out] [ref,charset(UTF8)] */,
2619 struct wbint_Principals
*names
/* [out] [ref] */)
2621 struct wbint_LookupRids r
;
2627 status
= cli
->dispatch(cli
,
2630 NDR_WBINT_LOOKUPRIDS
,
2633 if (!NT_STATUS_IS_OK(status
)) {
2637 if (NT_STATUS_IS_ERR(status
)) {
2641 /* Return variables */
2642 *domain_name
= *r
.out
.domain_name
;
2643 *names
= *r
.out
.names
;
2646 return r
.out
.result
;
2649 struct rpccli_wbint_CheckMachineAccount_state
{
2650 struct wbint_CheckMachineAccount orig
;
2651 struct wbint_CheckMachineAccount tmp
;
2652 TALLOC_CTX
*out_mem_ctx
;
2653 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2656 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req
*subreq
);
2658 struct tevent_req
*rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX
*mem_ctx
,
2659 struct tevent_context
*ev
,
2660 struct rpc_pipe_client
*cli
)
2662 struct tevent_req
*req
;
2663 struct rpccli_wbint_CheckMachineAccount_state
*state
;
2664 struct tevent_req
*subreq
;
2666 req
= tevent_req_create(mem_ctx
, &state
,
2667 struct rpccli_wbint_CheckMachineAccount_state
);
2671 state
->out_mem_ctx
= NULL
;
2672 state
->dispatch_recv
= cli
->dispatch_recv
;
2676 /* Out parameters */
2679 ZERO_STRUCT(state
->orig
.out
.result
);
2681 /* make a temporary copy, that we pass to the dispatch function */
2682 state
->tmp
= state
->orig
;
2684 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2686 NDR_WBINT_CHECKMACHINEACCOUNT
,
2688 if (tevent_req_nomem(subreq
, req
)) {
2689 return tevent_req_post(req
, ev
);
2691 tevent_req_set_callback(subreq
, rpccli_wbint_CheckMachineAccount_done
, req
);
2695 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req
*subreq
)
2697 struct tevent_req
*req
= tevent_req_callback_data(
2698 subreq
, struct tevent_req
);
2699 struct rpccli_wbint_CheckMachineAccount_state
*state
= tevent_req_data(
2700 req
, struct rpccli_wbint_CheckMachineAccount_state
);
2702 TALLOC_CTX
*mem_ctx
;
2704 if (state
->out_mem_ctx
) {
2705 mem_ctx
= state
->out_mem_ctx
;
2710 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2711 TALLOC_FREE(subreq
);
2712 if (!NT_STATUS_IS_OK(status
)) {
2713 tevent_req_nterror(req
, status
);
2717 /* Copy out parameters */
2720 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2722 /* Reset temporary structure */
2723 ZERO_STRUCT(state
->tmp
);
2725 tevent_req_done(req
);
2728 NTSTATUS
rpccli_wbint_CheckMachineAccount_recv(struct tevent_req
*req
,
2729 TALLOC_CTX
*mem_ctx
,
2732 struct rpccli_wbint_CheckMachineAccount_state
*state
= tevent_req_data(
2733 req
, struct rpccli_wbint_CheckMachineAccount_state
);
2736 if (tevent_req_is_nterror(req
, &status
)) {
2737 tevent_req_received(req
);
2741 /* Steal possbile out parameters to the callers context */
2742 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2745 *result
= state
->orig
.out
.result
;
2747 tevent_req_received(req
);
2748 return NT_STATUS_OK
;
2751 NTSTATUS
rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client
*cli
,
2752 TALLOC_CTX
*mem_ctx
)
2754 struct wbint_CheckMachineAccount r
;
2759 status
= cli
->dispatch(cli
,
2762 NDR_WBINT_CHECKMACHINEACCOUNT
,
2765 if (!NT_STATUS_IS_OK(status
)) {
2769 if (NT_STATUS_IS_ERR(status
)) {
2773 /* Return variables */
2776 return r
.out
.result
;
2779 struct rpccli_wbint_ChangeMachineAccount_state
{
2780 struct wbint_ChangeMachineAccount orig
;
2781 struct wbint_ChangeMachineAccount tmp
;
2782 TALLOC_CTX
*out_mem_ctx
;
2783 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2786 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req
*subreq
);
2788 struct tevent_req
*rpccli_wbint_ChangeMachineAccount_send(TALLOC_CTX
*mem_ctx
,
2789 struct tevent_context
*ev
,
2790 struct rpc_pipe_client
*cli
)
2792 struct tevent_req
*req
;
2793 struct rpccli_wbint_ChangeMachineAccount_state
*state
;
2794 struct tevent_req
*subreq
;
2796 req
= tevent_req_create(mem_ctx
, &state
,
2797 struct rpccli_wbint_ChangeMachineAccount_state
);
2801 state
->out_mem_ctx
= NULL
;
2802 state
->dispatch_recv
= cli
->dispatch_recv
;
2806 /* Out parameters */
2809 ZERO_STRUCT(state
->orig
.out
.result
);
2811 /* make a temporary copy, that we pass to the dispatch function */
2812 state
->tmp
= state
->orig
;
2814 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2816 NDR_WBINT_CHANGEMACHINEACCOUNT
,
2818 if (tevent_req_nomem(subreq
, req
)) {
2819 return tevent_req_post(req
, ev
);
2821 tevent_req_set_callback(subreq
, rpccli_wbint_ChangeMachineAccount_done
, req
);
2825 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req
*subreq
)
2827 struct tevent_req
*req
= tevent_req_callback_data(
2828 subreq
, struct tevent_req
);
2829 struct rpccli_wbint_ChangeMachineAccount_state
*state
= tevent_req_data(
2830 req
, struct rpccli_wbint_ChangeMachineAccount_state
);
2832 TALLOC_CTX
*mem_ctx
;
2834 if (state
->out_mem_ctx
) {
2835 mem_ctx
= state
->out_mem_ctx
;
2840 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2841 TALLOC_FREE(subreq
);
2842 if (!NT_STATUS_IS_OK(status
)) {
2843 tevent_req_nterror(req
, status
);
2847 /* Copy out parameters */
2850 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2852 /* Reset temporary structure */
2853 ZERO_STRUCT(state
->tmp
);
2855 tevent_req_done(req
);
2858 NTSTATUS
rpccli_wbint_ChangeMachineAccount_recv(struct tevent_req
*req
,
2859 TALLOC_CTX
*mem_ctx
,
2862 struct rpccli_wbint_ChangeMachineAccount_state
*state
= tevent_req_data(
2863 req
, struct rpccli_wbint_ChangeMachineAccount_state
);
2866 if (tevent_req_is_nterror(req
, &status
)) {
2867 tevent_req_received(req
);
2871 /* Steal possbile out parameters to the callers context */
2872 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2875 *result
= state
->orig
.out
.result
;
2877 tevent_req_received(req
);
2878 return NT_STATUS_OK
;
2881 NTSTATUS
rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client
*cli
,
2882 TALLOC_CTX
*mem_ctx
)
2884 struct wbint_ChangeMachineAccount r
;
2889 status
= cli
->dispatch(cli
,
2892 NDR_WBINT_CHANGEMACHINEACCOUNT
,
2895 if (!NT_STATUS_IS_OK(status
)) {
2899 if (NT_STATUS_IS_ERR(status
)) {
2903 /* Return variables */
2906 return r
.out
.result
;
2909 struct rpccli_wbint_PingDc_state
{
2910 struct wbint_PingDc orig
;
2911 struct wbint_PingDc tmp
;
2912 TALLOC_CTX
*out_mem_ctx
;
2913 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2916 static void rpccli_wbint_PingDc_done(struct tevent_req
*subreq
);
2918 struct tevent_req
*rpccli_wbint_PingDc_send(TALLOC_CTX
*mem_ctx
,
2919 struct tevent_context
*ev
,
2920 struct rpc_pipe_client
*cli
)
2922 struct tevent_req
*req
;
2923 struct rpccli_wbint_PingDc_state
*state
;
2924 struct tevent_req
*subreq
;
2926 req
= tevent_req_create(mem_ctx
, &state
,
2927 struct rpccli_wbint_PingDc_state
);
2931 state
->out_mem_ctx
= NULL
;
2932 state
->dispatch_recv
= cli
->dispatch_recv
;
2936 /* Out parameters */
2939 ZERO_STRUCT(state
->orig
.out
.result
);
2941 /* make a temporary copy, that we pass to the dispatch function */
2942 state
->tmp
= state
->orig
;
2944 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2948 if (tevent_req_nomem(subreq
, req
)) {
2949 return tevent_req_post(req
, ev
);
2951 tevent_req_set_callback(subreq
, rpccli_wbint_PingDc_done
, req
);
2955 static void rpccli_wbint_PingDc_done(struct tevent_req
*subreq
)
2957 struct tevent_req
*req
= tevent_req_callback_data(
2958 subreq
, struct tevent_req
);
2959 struct rpccli_wbint_PingDc_state
*state
= tevent_req_data(
2960 req
, struct rpccli_wbint_PingDc_state
);
2962 TALLOC_CTX
*mem_ctx
;
2964 if (state
->out_mem_ctx
) {
2965 mem_ctx
= state
->out_mem_ctx
;
2970 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2971 TALLOC_FREE(subreq
);
2972 if (!NT_STATUS_IS_OK(status
)) {
2973 tevent_req_nterror(req
, status
);
2977 /* Copy out parameters */
2980 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2982 /* Reset temporary structure */
2983 ZERO_STRUCT(state
->tmp
);
2985 tevent_req_done(req
);
2988 NTSTATUS
rpccli_wbint_PingDc_recv(struct tevent_req
*req
,
2989 TALLOC_CTX
*mem_ctx
,
2992 struct rpccli_wbint_PingDc_state
*state
= tevent_req_data(
2993 req
, struct rpccli_wbint_PingDc_state
);
2996 if (tevent_req_is_nterror(req
, &status
)) {
2997 tevent_req_received(req
);
3001 /* Steal possbile out parameters to the callers context */
3002 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3005 *result
= state
->orig
.out
.result
;
3007 tevent_req_received(req
);
3008 return NT_STATUS_OK
;
3011 NTSTATUS
rpccli_wbint_PingDc(struct rpc_pipe_client
*cli
,
3012 TALLOC_CTX
*mem_ctx
)
3014 struct wbint_PingDc r
;
3019 status
= cli
->dispatch(cli
,
3025 if (!NT_STATUS_IS_OK(status
)) {
3029 if (NT_STATUS_IS_ERR(status
)) {
3033 /* Return variables */
3036 return r
.out
.result
;
3039 struct rpccli_wbint_SetMapping_state
{
3040 struct wbint_SetMapping orig
;
3041 struct wbint_SetMapping tmp
;
3042 TALLOC_CTX
*out_mem_ctx
;
3043 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3046 static void rpccli_wbint_SetMapping_done(struct tevent_req
*subreq
);
3048 struct tevent_req
*rpccli_wbint_SetMapping_send(TALLOC_CTX
*mem_ctx
,
3049 struct tevent_context
*ev
,
3050 struct rpc_pipe_client
*cli
,
3051 struct dom_sid
*_sid
/* [in] [ref] */,
3052 enum wbint_IdType _type
/* [in] */,
3053 uint64_t _id
/* [in] */)
3055 struct tevent_req
*req
;
3056 struct rpccli_wbint_SetMapping_state
*state
;
3057 struct tevent_req
*subreq
;
3059 req
= tevent_req_create(mem_ctx
, &state
,
3060 struct rpccli_wbint_SetMapping_state
);
3064 state
->out_mem_ctx
= NULL
;
3065 state
->dispatch_recv
= cli
->dispatch_recv
;
3068 state
->orig
.in
.sid
= _sid
;
3069 state
->orig
.in
.type
= _type
;
3070 state
->orig
.in
.id
= _id
;
3072 /* Out parameters */
3075 ZERO_STRUCT(state
->orig
.out
.result
);
3077 /* make a temporary copy, that we pass to the dispatch function */
3078 state
->tmp
= state
->orig
;
3080 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3082 NDR_WBINT_SETMAPPING
,
3084 if (tevent_req_nomem(subreq
, req
)) {
3085 return tevent_req_post(req
, ev
);
3087 tevent_req_set_callback(subreq
, rpccli_wbint_SetMapping_done
, req
);
3091 static void rpccli_wbint_SetMapping_done(struct tevent_req
*subreq
)
3093 struct tevent_req
*req
= tevent_req_callback_data(
3094 subreq
, struct tevent_req
);
3095 struct rpccli_wbint_SetMapping_state
*state
= tevent_req_data(
3096 req
, struct rpccli_wbint_SetMapping_state
);
3098 TALLOC_CTX
*mem_ctx
;
3100 if (state
->out_mem_ctx
) {
3101 mem_ctx
= state
->out_mem_ctx
;
3106 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3107 TALLOC_FREE(subreq
);
3108 if (!NT_STATUS_IS_OK(status
)) {
3109 tevent_req_nterror(req
, status
);
3113 /* Copy out parameters */
3116 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3118 /* Reset temporary structure */
3119 ZERO_STRUCT(state
->tmp
);
3121 tevent_req_done(req
);
3124 NTSTATUS
rpccli_wbint_SetMapping_recv(struct tevent_req
*req
,
3125 TALLOC_CTX
*mem_ctx
,
3128 struct rpccli_wbint_SetMapping_state
*state
= tevent_req_data(
3129 req
, struct rpccli_wbint_SetMapping_state
);
3132 if (tevent_req_is_nterror(req
, &status
)) {
3133 tevent_req_received(req
);
3137 /* Steal possbile out parameters to the callers context */
3138 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3141 *result
= state
->orig
.out
.result
;
3143 tevent_req_received(req
);
3144 return NT_STATUS_OK
;
3147 NTSTATUS
rpccli_wbint_SetMapping(struct rpc_pipe_client
*cli
,
3148 TALLOC_CTX
*mem_ctx
,
3149 struct dom_sid
*sid
/* [in] [ref] */,
3150 enum wbint_IdType type
/* [in] */,
3151 uint64_t id
/* [in] */)
3153 struct wbint_SetMapping r
;
3161 status
= cli
->dispatch(cli
,
3164 NDR_WBINT_SETMAPPING
,
3167 if (!NT_STATUS_IS_OK(status
)) {
3171 if (NT_STATUS_IS_ERR(status
)) {
3175 /* Return variables */
3178 return r
.out
.result
;
3181 struct rpccli_wbint_RemoveMapping_state
{
3182 struct wbint_RemoveMapping orig
;
3183 struct wbint_RemoveMapping tmp
;
3184 TALLOC_CTX
*out_mem_ctx
;
3185 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3188 static void rpccli_wbint_RemoveMapping_done(struct tevent_req
*subreq
);
3190 struct tevent_req
*rpccli_wbint_RemoveMapping_send(TALLOC_CTX
*mem_ctx
,
3191 struct tevent_context
*ev
,
3192 struct rpc_pipe_client
*cli
,
3193 struct dom_sid
*_sid
/* [in] [ref] */,
3194 enum wbint_IdType _type
/* [in] */,
3195 uint64_t _id
/* [in] */)
3197 struct tevent_req
*req
;
3198 struct rpccli_wbint_RemoveMapping_state
*state
;
3199 struct tevent_req
*subreq
;
3201 req
= tevent_req_create(mem_ctx
, &state
,
3202 struct rpccli_wbint_RemoveMapping_state
);
3206 state
->out_mem_ctx
= NULL
;
3207 state
->dispatch_recv
= cli
->dispatch_recv
;
3210 state
->orig
.in
.sid
= _sid
;
3211 state
->orig
.in
.type
= _type
;
3212 state
->orig
.in
.id
= _id
;
3214 /* Out parameters */
3217 ZERO_STRUCT(state
->orig
.out
.result
);
3219 /* make a temporary copy, that we pass to the dispatch function */
3220 state
->tmp
= state
->orig
;
3222 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3224 NDR_WBINT_REMOVEMAPPING
,
3226 if (tevent_req_nomem(subreq
, req
)) {
3227 return tevent_req_post(req
, ev
);
3229 tevent_req_set_callback(subreq
, rpccli_wbint_RemoveMapping_done
, req
);
3233 static void rpccli_wbint_RemoveMapping_done(struct tevent_req
*subreq
)
3235 struct tevent_req
*req
= tevent_req_callback_data(
3236 subreq
, struct tevent_req
);
3237 struct rpccli_wbint_RemoveMapping_state
*state
= tevent_req_data(
3238 req
, struct rpccli_wbint_RemoveMapping_state
);
3240 TALLOC_CTX
*mem_ctx
;
3242 if (state
->out_mem_ctx
) {
3243 mem_ctx
= state
->out_mem_ctx
;
3248 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3249 TALLOC_FREE(subreq
);
3250 if (!NT_STATUS_IS_OK(status
)) {
3251 tevent_req_nterror(req
, status
);
3255 /* Copy out parameters */
3258 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3260 /* Reset temporary structure */
3261 ZERO_STRUCT(state
->tmp
);
3263 tevent_req_done(req
);
3266 NTSTATUS
rpccli_wbint_RemoveMapping_recv(struct tevent_req
*req
,
3267 TALLOC_CTX
*mem_ctx
,
3270 struct rpccli_wbint_RemoveMapping_state
*state
= tevent_req_data(
3271 req
, struct rpccli_wbint_RemoveMapping_state
);
3274 if (tevent_req_is_nterror(req
, &status
)) {
3275 tevent_req_received(req
);
3279 /* Steal possbile out parameters to the callers context */
3280 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3283 *result
= state
->orig
.out
.result
;
3285 tevent_req_received(req
);
3286 return NT_STATUS_OK
;
3289 NTSTATUS
rpccli_wbint_RemoveMapping(struct rpc_pipe_client
*cli
,
3290 TALLOC_CTX
*mem_ctx
,
3291 struct dom_sid
*sid
/* [in] [ref] */,
3292 enum wbint_IdType type
/* [in] */,
3293 uint64_t id
/* [in] */)
3295 struct wbint_RemoveMapping r
;
3303 status
= cli
->dispatch(cli
,
3306 NDR_WBINT_REMOVEMAPPING
,
3309 if (!NT_STATUS_IS_OK(status
)) {
3313 if (NT_STATUS_IS_ERR(status
)) {
3317 /* Return variables */
3320 return r
.out
.result
;
3323 struct rpccli_wbint_SetHWM_state
{
3324 struct wbint_SetHWM orig
;
3325 struct wbint_SetHWM tmp
;
3326 TALLOC_CTX
*out_mem_ctx
;
3327 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3330 static void rpccli_wbint_SetHWM_done(struct tevent_req
*subreq
);
3332 struct tevent_req
*rpccli_wbint_SetHWM_send(TALLOC_CTX
*mem_ctx
,
3333 struct tevent_context
*ev
,
3334 struct rpc_pipe_client
*cli
,
3335 enum wbint_IdType _type
/* [in] */,
3336 uint64_t _id
/* [in] */)
3338 struct tevent_req
*req
;
3339 struct rpccli_wbint_SetHWM_state
*state
;
3340 struct tevent_req
*subreq
;
3342 req
= tevent_req_create(mem_ctx
, &state
,
3343 struct rpccli_wbint_SetHWM_state
);
3347 state
->out_mem_ctx
= NULL
;
3348 state
->dispatch_recv
= cli
->dispatch_recv
;
3351 state
->orig
.in
.type
= _type
;
3352 state
->orig
.in
.id
= _id
;
3354 /* Out parameters */
3357 ZERO_STRUCT(state
->orig
.out
.result
);
3359 /* make a temporary copy, that we pass to the dispatch function */
3360 state
->tmp
= state
->orig
;
3362 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3366 if (tevent_req_nomem(subreq
, req
)) {
3367 return tevent_req_post(req
, ev
);
3369 tevent_req_set_callback(subreq
, rpccli_wbint_SetHWM_done
, req
);
3373 static void rpccli_wbint_SetHWM_done(struct tevent_req
*subreq
)
3375 struct tevent_req
*req
= tevent_req_callback_data(
3376 subreq
, struct tevent_req
);
3377 struct rpccli_wbint_SetHWM_state
*state
= tevent_req_data(
3378 req
, struct rpccli_wbint_SetHWM_state
);
3380 TALLOC_CTX
*mem_ctx
;
3382 if (state
->out_mem_ctx
) {
3383 mem_ctx
= state
->out_mem_ctx
;
3388 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3389 TALLOC_FREE(subreq
);
3390 if (!NT_STATUS_IS_OK(status
)) {
3391 tevent_req_nterror(req
, status
);
3395 /* Copy out parameters */
3398 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3400 /* Reset temporary structure */
3401 ZERO_STRUCT(state
->tmp
);
3403 tevent_req_done(req
);
3406 NTSTATUS
rpccli_wbint_SetHWM_recv(struct tevent_req
*req
,
3407 TALLOC_CTX
*mem_ctx
,
3410 struct rpccli_wbint_SetHWM_state
*state
= tevent_req_data(
3411 req
, struct rpccli_wbint_SetHWM_state
);
3414 if (tevent_req_is_nterror(req
, &status
)) {
3415 tevent_req_received(req
);
3419 /* Steal possbile out parameters to the callers context */
3420 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3423 *result
= state
->orig
.out
.result
;
3425 tevent_req_received(req
);
3426 return NT_STATUS_OK
;
3429 NTSTATUS
rpccli_wbint_SetHWM(struct rpc_pipe_client
*cli
,
3430 TALLOC_CTX
*mem_ctx
,
3431 enum wbint_IdType type
/* [in] */,
3432 uint64_t id
/* [in] */)
3434 struct wbint_SetHWM r
;
3441 status
= cli
->dispatch(cli
,
3447 if (!NT_STATUS_IS_OK(status
)) {
3451 if (NT_STATUS_IS_ERR(status
)) {
3455 /* Return variables */
3458 return r
.out
.result
;