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 struct wbint_Principals *_names /* [out] [ref] */)
2514 struct tevent_req *req;
2515 struct rpccli_wbint_LookupRids_state *state;
2516 struct tevent_req *subreq;
2518 req = tevent_req_create(mem_ctx, &state,
2519 struct rpccli_wbint_LookupRids_state);
2523 state->out_mem_ctx = NULL;
2524 state->dispatch_recv = cli->dispatch_recv;
2527 state->orig.in.rids = _rids;
2529 /* Out parameters */
2530 state->orig.out.names = _names;
2533 ZERO_STRUCT(state->orig.out.result);
2535 state->out_mem_ctx = talloc_named_const(state, 0,
2536 "rpccli_wbint_LookupRids_out_memory");
2537 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2538 return tevent_req_post(req, ev);
2541 /* make a temporary copy, that we pass to the dispatch function */
2542 state->tmp = state->orig;
2544 subreq = cli->dispatch_send(state, ev, cli,
2546 NDR_WBINT_LOOKUPRIDS,
2548 if (tevent_req_nomem(subreq, req)) {
2549 return tevent_req_post(req, ev);
2551 tevent_req_set_callback(subreq, rpccli_wbint_LookupRids_done, req);
2555 static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq)
2557 struct tevent_req *req = tevent_req_callback_data(
2558 subreq, struct tevent_req);
2559 struct rpccli_wbint_LookupRids_state *state = tevent_req_data(
2560 req, struct rpccli_wbint_LookupRids_state);
2562 TALLOC_CTX *mem_ctx;
2564 if (state->out_mem_ctx) {
2565 mem_ctx = state->out_mem_ctx;
2570 status = state->dispatch_recv(subreq, mem_ctx);
2571 TALLOC_FREE(subreq);
2572 if (!NT_STATUS_IS_OK(status)) {
2573 tevent_req_nterror(req, status);
2577 /* Copy out parameters */
2578 *state->orig.out.names = *state->tmp.out.names;
2581 state->orig.out.result = state->tmp.out.result;
2583 /* Reset temporary structure */
2584 ZERO_STRUCT(state->tmp);
2586 tevent_req_done(req);
2589 NTSTATUS rpccli_wbint_LookupRids_recv(struct tevent_req *req,
2590 TALLOC_CTX *mem_ctx,
2593 struct rpccli_wbint_LookupRids_state *state = tevent_req_data(
2594 req, struct rpccli_wbint_LookupRids_state);
2597 if (tevent_req_is_nterror(req, &status)) {
2598 tevent_req_received(req);
2602 /* Steal possbile out parameters to the callers context */
2603 talloc_steal(mem_ctx, state->out_mem_ctx);
2606 *result = state->orig.out.result;
2608 tevent_req_received(req);
2609 return NT_STATUS_OK;
2612 NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
2613 TALLOC_CTX *mem_ctx,
2614 struct wbint_RidArray *rids /* [in] [ref] */,
2615 struct wbint_Principals *names /* [out] [ref] */)
2617 struct wbint_LookupRids r;
2623 status = cli->dispatch(cli,
2626 NDR_WBINT_LOOKUPRIDS,
2629 if (!NT_STATUS_IS_OK(status)) {
2633 if (NT_STATUS_IS_ERR(status)) {
2637 /* Return variables */
2638 *names = *r.out.names;
2641 return r.out.result;
2644 struct rpccli_wbint_CheckMachineAccount_state {
2645 struct wbint_CheckMachineAccount orig;
2646 struct wbint_CheckMachineAccount tmp;
2647 TALLOC_CTX *out_mem_ctx;
2648 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2651 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq);
2653 struct tevent_req *rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
2654 struct tevent_context *ev,
2655 struct rpc_pipe_client *cli)
2657 struct tevent_req *req;
2658 struct rpccli_wbint_CheckMachineAccount_state *state;
2659 struct tevent_req *subreq;
2661 req = tevent_req_create(mem_ctx, &state,
2662 struct rpccli_wbint_CheckMachineAccount_state);
2666 state->out_mem_ctx = NULL;
2667 state->dispatch_recv = cli->dispatch_recv;
2671 /* Out parameters */
2674 ZERO_STRUCT(state->orig.out.result);
2676 /* make a temporary copy, that we pass to the dispatch function */
2677 state->tmp = state->orig;
2679 subreq = cli->dispatch_send(state, ev, cli,
2681 NDR_WBINT_CHECKMACHINEACCOUNT,
2683 if (tevent_req_nomem(subreq, req)) {
2684 return tevent_req_post(req, ev);
2686 tevent_req_set_callback(subreq, rpccli_wbint_CheckMachineAccount_done, req);
2690 static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
2692 struct tevent_req *req = tevent_req_callback_data(
2693 subreq, struct tevent_req);
2694 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
2695 req, struct rpccli_wbint_CheckMachineAccount_state);
2697 TALLOC_CTX *mem_ctx;
2699 if (state->out_mem_ctx) {
2700 mem_ctx = state->out_mem_ctx;
2705 status = state->dispatch_recv(subreq, mem_ctx);
2706 TALLOC_FREE(subreq);
2707 if (!NT_STATUS_IS_OK(status)) {
2708 tevent_req_nterror(req, status);
2712 /* Copy out parameters */
2715 state->orig.out.result = state->tmp.out.result;
2717 /* Reset temporary structure */
2718 ZERO_STRUCT(state->tmp);
2720 tevent_req_done(req);
2723 NTSTATUS rpccli_wbint_CheckMachineAccount_recv(struct tevent_req *req,
2724 TALLOC_CTX *mem_ctx,
2727 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
2728 req, struct rpccli_wbint_CheckMachineAccount_state);
2731 if (tevent_req_is_nterror(req, &status)) {
2732 tevent_req_received(req);
2736 /* Steal possbile out parameters to the callers context */
2737 talloc_steal(mem_ctx, state->out_mem_ctx);
2740 *result = state->orig.out.result;
2742 tevent_req_received(req);
2743 return NT_STATUS_OK;
2746 NTSTATUS rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client *cli,
2747 TALLOC_CTX *mem_ctx)
2749 struct wbint_CheckMachineAccount r;
2754 status = cli->dispatch(cli,
2757 NDR_WBINT_CHECKMACHINEACCOUNT,
2760 if (!NT_STATUS_IS_OK(status)) {
2764 if (NT_STATUS_IS_ERR(status)) {
2768 /* Return variables */
2771 return r.out.result;
2774 struct rpccli_wbint_ChangeMachineAccount_state {
2775 struct wbint_ChangeMachineAccount orig;
2776 struct wbint_ChangeMachineAccount tmp;
2777 TALLOC_CTX *out_mem_ctx;
2778 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2781 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq);
2783 struct tevent_req *rpccli_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx,
2784 struct tevent_context *ev,
2785 struct rpc_pipe_client *cli)
2787 struct tevent_req *req;
2788 struct rpccli_wbint_ChangeMachineAccount_state *state;
2789 struct tevent_req *subreq;
2791 req = tevent_req_create(mem_ctx, &state,
2792 struct rpccli_wbint_ChangeMachineAccount_state);
2796 state->out_mem_ctx = NULL;
2797 state->dispatch_recv = cli->dispatch_recv;
2801 /* Out parameters */
2804 ZERO_STRUCT(state->orig.out.result);
2806 /* make a temporary copy, that we pass to the dispatch function */
2807 state->tmp = state->orig;
2809 subreq = cli->dispatch_send(state, ev, cli,
2811 NDR_WBINT_CHANGEMACHINEACCOUNT,
2813 if (tevent_req_nomem(subreq, req)) {
2814 return tevent_req_post(req, ev);
2816 tevent_req_set_callback(subreq, rpccli_wbint_ChangeMachineAccount_done, req);
2820 static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq)
2822 struct tevent_req *req = tevent_req_callback_data(
2823 subreq, struct tevent_req);
2824 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data(
2825 req, struct rpccli_wbint_ChangeMachineAccount_state);
2827 TALLOC_CTX *mem_ctx;
2829 if (state->out_mem_ctx) {
2830 mem_ctx = state->out_mem_ctx;
2835 status = state->dispatch_recv(subreq, mem_ctx);
2836 TALLOC_FREE(subreq);
2837 if (!NT_STATUS_IS_OK(status)) {
2838 tevent_req_nterror(req, status);
2842 /* Copy out parameters */
2845 state->orig.out.result = state->tmp.out.result;
2847 /* Reset temporary structure */
2848 ZERO_STRUCT(state->tmp);
2850 tevent_req_done(req);
2853 NTSTATUS rpccli_wbint_ChangeMachineAccount_recv(struct tevent_req *req,
2854 TALLOC_CTX *mem_ctx,
2857 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data(
2858 req, struct rpccli_wbint_ChangeMachineAccount_state);
2861 if (tevent_req_is_nterror(req, &status)) {
2862 tevent_req_received(req);
2866 /* Steal possbile out parameters to the callers context */
2867 talloc_steal(mem_ctx, state->out_mem_ctx);
2870 *result = state->orig.out.result;
2872 tevent_req_received(req);
2873 return NT_STATUS_OK;
2876 NTSTATUS rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client *cli,
2877 TALLOC_CTX *mem_ctx)
2879 struct wbint_ChangeMachineAccount r;
2884 status = cli->dispatch(cli,
2887 NDR_WBINT_CHANGEMACHINEACCOUNT,
2890 if (!NT_STATUS_IS_OK(status)) {
2894 if (NT_STATUS_IS_ERR(status)) {
2898 /* Return variables */
2901 return r.out.result;
2904 struct rpccli_wbint_SetMapping_state {
2905 struct wbint_SetMapping orig;
2906 struct wbint_SetMapping tmp;
2907 TALLOC_CTX *out_mem_ctx;
2908 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2911 static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq);
2913 struct tevent_req *rpccli_wbint_SetMapping_send(TALLOC_CTX *mem_ctx,
2914 struct tevent_context *ev,
2915 struct rpc_pipe_client *cli,
2916 struct dom_sid *_sid /* [in] [ref] */,
2917 enum wbint_IdType _type /* [in] */,
2918 uint64_t _id /* [in] */)
2920 struct tevent_req *req;
2921 struct rpccli_wbint_SetMapping_state *state;
2922 struct tevent_req *subreq;
2924 req = tevent_req_create(mem_ctx, &state,
2925 struct rpccli_wbint_SetMapping_state);
2929 state->out_mem_ctx = NULL;
2930 state->dispatch_recv = cli->dispatch_recv;
2933 state->orig.in.sid = _sid;
2934 state->orig.in.type = _type;
2935 state->orig.in.id = _id;
2937 /* Out parameters */
2940 ZERO_STRUCT(state->orig.out.result);
2942 /* make a temporary copy, that we pass to the dispatch function */
2943 state->tmp = state->orig;
2945 subreq = cli->dispatch_send(state, ev, cli,
2947 NDR_WBINT_SETMAPPING,
2949 if (tevent_req_nomem(subreq, req)) {
2950 return tevent_req_post(req, ev);
2952 tevent_req_set_callback(subreq, rpccli_wbint_SetMapping_done, req);
2956 static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq)
2958 struct tevent_req *req = tevent_req_callback_data(
2959 subreq, struct tevent_req);
2960 struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
2961 req, struct rpccli_wbint_SetMapping_state);
2963 TALLOC_CTX *mem_ctx;
2965 if (state->out_mem_ctx) {
2966 mem_ctx = state->out_mem_ctx;
2971 status = state->dispatch_recv(subreq, mem_ctx);
2972 TALLOC_FREE(subreq);
2973 if (!NT_STATUS_IS_OK(status)) {
2974 tevent_req_nterror(req, status);
2978 /* Copy out parameters */
2981 state->orig.out.result = state->tmp.out.result;
2983 /* Reset temporary structure */
2984 ZERO_STRUCT(state->tmp);
2986 tevent_req_done(req);
2989 NTSTATUS rpccli_wbint_SetMapping_recv(struct tevent_req *req,
2990 TALLOC_CTX *mem_ctx,
2993 struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
2994 req, struct rpccli_wbint_SetMapping_state);
2997 if (tevent_req_is_nterror(req, &status)) {
2998 tevent_req_received(req);
3002 /* Steal possbile out parameters to the callers context */
3003 talloc_steal(mem_ctx, state->out_mem_ctx);
3006 *result = state->orig.out.result;
3008 tevent_req_received(req);
3009 return NT_STATUS_OK;
3012 NTSTATUS rpccli_wbint_SetMapping(struct rpc_pipe_client *cli,
3013 TALLOC_CTX *mem_ctx,
3014 struct dom_sid *sid /* [in] [ref] */,
3015 enum wbint_IdType type /* [in] */,
3016 uint64_t id /* [in] */)
3018 struct wbint_SetMapping r;
3026 status = cli->dispatch(cli,
3029 NDR_WBINT_SETMAPPING,
3032 if (!NT_STATUS_IS_OK(status)) {
3036 if (NT_STATUS_IS_ERR(status)) {
3040 /* Return variables */
3043 return r.out.result;
3046 struct rpccli_wbint_RemoveMapping_state {
3047 struct wbint_RemoveMapping orig;
3048 struct wbint_RemoveMapping tmp;
3049 TALLOC_CTX *out_mem_ctx;
3050 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3053 static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq);
3055 struct tevent_req *rpccli_wbint_RemoveMapping_send(TALLOC_CTX *mem_ctx,
3056 struct tevent_context *ev,
3057 struct rpc_pipe_client *cli,
3058 struct dom_sid *_sid /* [in] [ref] */,
3059 enum wbint_IdType _type /* [in] */,
3060 uint64_t _id /* [in] */)
3062 struct tevent_req *req;
3063 struct rpccli_wbint_RemoveMapping_state *state;
3064 struct tevent_req *subreq;
3066 req = tevent_req_create(mem_ctx, &state,
3067 struct rpccli_wbint_RemoveMapping_state);
3071 state->out_mem_ctx = NULL;
3072 state->dispatch_recv = cli->dispatch_recv;
3075 state->orig.in.sid = _sid;
3076 state->orig.in.type = _type;
3077 state->orig.in.id = _id;
3079 /* Out parameters */
3082 ZERO_STRUCT(state->orig.out.result);
3084 /* make a temporary copy, that we pass to the dispatch function */
3085 state->tmp = state->orig;
3087 subreq = cli->dispatch_send(state, ev, cli,
3089 NDR_WBINT_REMOVEMAPPING,
3091 if (tevent_req_nomem(subreq, req)) {
3092 return tevent_req_post(req, ev);
3094 tevent_req_set_callback(subreq, rpccli_wbint_RemoveMapping_done, req);
3098 static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq)
3100 struct tevent_req *req = tevent_req_callback_data(
3101 subreq, struct tevent_req);
3102 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
3103 req, struct rpccli_wbint_RemoveMapping_state);
3105 TALLOC_CTX *mem_ctx;
3107 if (state->out_mem_ctx) {
3108 mem_ctx = state->out_mem_ctx;
3113 status = state->dispatch_recv(subreq, mem_ctx);
3114 TALLOC_FREE(subreq);
3115 if (!NT_STATUS_IS_OK(status)) {
3116 tevent_req_nterror(req, status);
3120 /* Copy out parameters */
3123 state->orig.out.result = state->tmp.out.result;
3125 /* Reset temporary structure */
3126 ZERO_STRUCT(state->tmp);
3128 tevent_req_done(req);
3131 NTSTATUS rpccli_wbint_RemoveMapping_recv(struct tevent_req *req,
3132 TALLOC_CTX *mem_ctx,
3135 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
3136 req, struct rpccli_wbint_RemoveMapping_state);
3139 if (tevent_req_is_nterror(req, &status)) {
3140 tevent_req_received(req);
3144 /* Steal possbile out parameters to the callers context */
3145 talloc_steal(mem_ctx, state->out_mem_ctx);
3148 *result = state->orig.out.result;
3150 tevent_req_received(req);
3151 return NT_STATUS_OK;
3154 NTSTATUS rpccli_wbint_RemoveMapping(struct rpc_pipe_client *cli,
3155 TALLOC_CTX *mem_ctx,
3156 struct dom_sid *sid /* [in] [ref] */,
3157 enum wbint_IdType type /* [in] */,
3158 uint64_t id /* [in] */)
3160 struct wbint_RemoveMapping r;
3168 status = cli->dispatch(cli,
3171 NDR_WBINT_REMOVEMAPPING,
3174 if (!NT_STATUS_IS_OK(status)) {
3178 if (NT_STATUS_IS_ERR(status)) {
3182 /* Return variables */
3185 return r.out.result;
3188 struct rpccli_wbint_SetHWM_state {
3189 struct wbint_SetHWM orig;
3190 struct wbint_SetHWM tmp;
3191 TALLOC_CTX *out_mem_ctx;
3192 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3195 static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq);
3197 struct tevent_req *rpccli_wbint_SetHWM_send(TALLOC_CTX *mem_ctx,
3198 struct tevent_context *ev,
3199 struct rpc_pipe_client *cli,
3200 enum wbint_IdType _type /* [in] */,
3201 uint64_t _id /* [in] */)
3203 struct tevent_req *req;
3204 struct rpccli_wbint_SetHWM_state *state;
3205 struct tevent_req *subreq;
3207 req = tevent_req_create(mem_ctx, &state,
3208 struct rpccli_wbint_SetHWM_state);
3212 state->out_mem_ctx = NULL;
3213 state->dispatch_recv = cli->dispatch_recv;
3216 state->orig.in.type = _type;
3217 state->orig.in.id = _id;
3219 /* Out parameters */
3222 ZERO_STRUCT(state->orig.out.result);
3224 /* make a temporary copy, that we pass to the dispatch function */
3225 state->tmp = state->orig;
3227 subreq = cli->dispatch_send(state, ev, cli,
3231 if (tevent_req_nomem(subreq, req)) {
3232 return tevent_req_post(req, ev);
3234 tevent_req_set_callback(subreq, rpccli_wbint_SetHWM_done, req);
3238 static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq)
3240 struct tevent_req *req = tevent_req_callback_data(
3241 subreq, struct tevent_req);
3242 struct rpccli_wbint_SetHWM_state *state = tevent_req_data(
3243 req, struct rpccli_wbint_SetHWM_state);
3245 TALLOC_CTX *mem_ctx;
3247 if (state->out_mem_ctx) {
3248 mem_ctx = state->out_mem_ctx;
3253 status = state->dispatch_recv(subreq, mem_ctx);
3254 TALLOC_FREE(subreq);
3255 if (!NT_STATUS_IS_OK(status)) {
3256 tevent_req_nterror(req, status);
3260 /* Copy out parameters */
3263 state->orig.out.result = state->tmp.out.result;
3265 /* Reset temporary structure */
3266 ZERO_STRUCT(state->tmp);
3268 tevent_req_done(req);
3271 NTSTATUS rpccli_wbint_SetHWM_recv(struct tevent_req *req,
3272 TALLOC_CTX *mem_ctx,
3275 struct rpccli_wbint_SetHWM_state *state = tevent_req_data(
3276 req, struct rpccli_wbint_SetHWM_state);
3279 if (tevent_req_is_nterror(req, &status)) {
3280 tevent_req_received(req);
3284 /* Steal possbile out parameters to the callers context */
3285 talloc_steal(mem_ctx, state->out_mem_ctx);
3288 *result = state->orig.out.result;
3290 tevent_req_received(req);
3291 return NT_STATUS_OK;
3294 NTSTATUS rpccli_wbint_SetHWM(struct rpc_pipe_client *cli,
3295 TALLOC_CTX *mem_ctx,
3296 enum wbint_IdType type /* [in] */,
3297 uint64_t id /* [in] */)
3299 struct wbint_SetHWM r;
3306 status = cli->dispatch(cli,
3312 if (!NT_STATUS_IS_OK(status)) {
3316 if (NT_STATUS_IS_ERR(status)) {
3320 /* Return variables */
3323 return r.out.result;