1 /* client functions auto-generated by pidl */
5 #include "lib/util/tevent_ntstatus.h"
6 #include "bin/default/source3/librpc/gen_ndr/ndr_wbint.h"
7 #include "bin/default/source3/librpc/gen_ndr/ndr_wbint_c.h"
9 /* wbint - client functions generated by pidl */
11 struct dcerpc_wbint_Ping_r_state {
12 TALLOC_CTX *out_mem_ctx;
15 static void dcerpc_wbint_Ping_r_done(struct tevent_req *subreq);
17 struct tevent_req *dcerpc_wbint_Ping_r_send(TALLOC_CTX *mem_ctx,
18 struct tevent_context *ev,
19 struct dcerpc_binding_handle *h,
22 struct tevent_req *req;
23 struct dcerpc_wbint_Ping_r_state *state;
24 struct tevent_req *subreq;
26 req = tevent_req_create(mem_ctx, &state,
27 struct dcerpc_wbint_Ping_r_state);
32 state->out_mem_ctx = talloc_new(state);
33 if (tevent_req_nomem(state->out_mem_ctx, req)) {
34 return tevent_req_post(req, ev);
37 subreq = dcerpc_binding_handle_call_send(state, ev, h,
38 NULL, &ndr_table_wbint,
39 NDR_WBINT_PING, state->out_mem_ctx, r);
40 if (tevent_req_nomem(subreq, req)) {
41 return tevent_req_post(req, ev);
43 tevent_req_set_callback(subreq, dcerpc_wbint_Ping_r_done, req);
48 static void dcerpc_wbint_Ping_r_done(struct tevent_req *subreq)
50 struct tevent_req *req =
51 tevent_req_callback_data(subreq,
55 status = dcerpc_binding_handle_call_recv(subreq);
57 if (tevent_req_nterror(req, status)) {
64 NTSTATUS dcerpc_wbint_Ping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
66 struct dcerpc_wbint_Ping_r_state *state =
68 struct dcerpc_wbint_Ping_r_state);
71 if (tevent_req_is_nterror(req, &status)) {
72 tevent_req_received(req);
76 talloc_steal(mem_ctx, state->out_mem_ctx);
78 tevent_req_received(req);
82 NTSTATUS dcerpc_wbint_Ping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Ping *r)
86 status = dcerpc_binding_handle_call(h,
87 NULL, &ndr_table_wbint,
88 NDR_WBINT_PING, mem_ctx, r);
93 struct dcerpc_wbint_Ping_state {
94 struct wbint_Ping orig;
95 struct wbint_Ping tmp;
96 TALLOC_CTX *out_mem_ctx;
99 static void dcerpc_wbint_Ping_done(struct tevent_req *subreq);
101 struct tevent_req *dcerpc_wbint_Ping_send(TALLOC_CTX *mem_ctx,
102 struct tevent_context *ev,
103 struct dcerpc_binding_handle *h,
104 uint32_t _in_data /* [in] */,
105 uint32_t *_out_data /* [out] [ref] */)
107 struct tevent_req *req;
108 struct dcerpc_wbint_Ping_state *state;
109 struct tevent_req *subreq;
111 req = tevent_req_create(mem_ctx, &state,
112 struct dcerpc_wbint_Ping_state);
116 state->out_mem_ctx = NULL;
119 state->orig.in.in_data = _in_data;
122 state->orig.out.out_data = _out_data;
124 state->out_mem_ctx = talloc_named_const(state, 0,
125 "dcerpc_wbint_Ping_out_memory");
126 if (tevent_req_nomem(state->out_mem_ctx, req)) {
127 return tevent_req_post(req, ev);
130 /* make a temporary copy, that we pass to the dispatch function */
131 state->tmp = state->orig;
133 subreq = dcerpc_wbint_Ping_r_send(state, ev, h, &state->tmp);
134 if (tevent_req_nomem(subreq, req)) {
135 return tevent_req_post(req, ev);
137 tevent_req_set_callback(subreq, dcerpc_wbint_Ping_done, req);
141 static void dcerpc_wbint_Ping_done(struct tevent_req *subreq)
143 struct tevent_req *req = tevent_req_callback_data(
144 subreq, struct tevent_req);
145 struct dcerpc_wbint_Ping_state *state = tevent_req_data(
146 req, struct dcerpc_wbint_Ping_state);
150 if (state->out_mem_ctx) {
151 mem_ctx = state->out_mem_ctx;
156 status = dcerpc_wbint_Ping_r_recv(subreq, mem_ctx);
158 if (tevent_req_nterror(req, status)) {
162 /* Copy out parameters */
163 *state->orig.out.out_data = *state->tmp.out.out_data;
165 /* Reset temporary structure */
166 ZERO_STRUCT(state->tmp);
168 tevent_req_done(req);
171 NTSTATUS dcerpc_wbint_Ping_recv(struct tevent_req *req,
174 struct dcerpc_wbint_Ping_state *state = tevent_req_data(
175 req, struct dcerpc_wbint_Ping_state);
178 if (tevent_req_is_nterror(req, &status)) {
179 tevent_req_received(req);
183 /* Steal possible out parameters to the callers context */
184 talloc_steal(mem_ctx, state->out_mem_ctx);
186 tevent_req_received(req);
190 NTSTATUS dcerpc_wbint_Ping(struct dcerpc_binding_handle *h,
192 uint32_t _in_data /* [in] */,
193 uint32_t *_out_data /* [out] [ref] */)
199 r.in.in_data = _in_data;
201 status = dcerpc_wbint_Ping_r(h, mem_ctx, &r);
202 if (!NT_STATUS_IS_OK(status)) {
206 /* Return variables */
207 *_out_data = *r.out.out_data;
214 struct dcerpc_wbint_LookupSid_r_state {
215 TALLOC_CTX *out_mem_ctx;
218 static void dcerpc_wbint_LookupSid_r_done(struct tevent_req *subreq);
220 struct tevent_req *dcerpc_wbint_LookupSid_r_send(TALLOC_CTX *mem_ctx,
221 struct tevent_context *ev,
222 struct dcerpc_binding_handle *h,
223 struct wbint_LookupSid *r)
225 struct tevent_req *req;
226 struct dcerpc_wbint_LookupSid_r_state *state;
227 struct tevent_req *subreq;
229 req = tevent_req_create(mem_ctx, &state,
230 struct dcerpc_wbint_LookupSid_r_state);
235 state->out_mem_ctx = talloc_new(state);
236 if (tevent_req_nomem(state->out_mem_ctx, req)) {
237 return tevent_req_post(req, ev);
240 subreq = dcerpc_binding_handle_call_send(state, ev, h,
241 NULL, &ndr_table_wbint,
242 NDR_WBINT_LOOKUPSID, state->out_mem_ctx, r);
243 if (tevent_req_nomem(subreq, req)) {
244 return tevent_req_post(req, ev);
246 tevent_req_set_callback(subreq, dcerpc_wbint_LookupSid_r_done, req);
251 static void dcerpc_wbint_LookupSid_r_done(struct tevent_req *subreq)
253 struct tevent_req *req =
254 tevent_req_callback_data(subreq,
258 status = dcerpc_binding_handle_call_recv(subreq);
260 if (tevent_req_nterror(req, status)) {
264 tevent_req_done(req);
267 NTSTATUS dcerpc_wbint_LookupSid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
269 struct dcerpc_wbint_LookupSid_r_state *state =
271 struct dcerpc_wbint_LookupSid_r_state);
274 if (tevent_req_is_nterror(req, &status)) {
275 tevent_req_received(req);
279 talloc_steal(mem_ctx, state->out_mem_ctx);
281 tevent_req_received(req);
285 NTSTATUS dcerpc_wbint_LookupSid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupSid *r)
289 status = dcerpc_binding_handle_call(h,
290 NULL, &ndr_table_wbint,
291 NDR_WBINT_LOOKUPSID, mem_ctx, r);
296 struct dcerpc_wbint_LookupSid_state {
297 struct wbint_LookupSid orig;
298 struct wbint_LookupSid tmp;
299 TALLOC_CTX *out_mem_ctx;
302 static void dcerpc_wbint_LookupSid_done(struct tevent_req *subreq);
304 struct tevent_req *dcerpc_wbint_LookupSid_send(TALLOC_CTX *mem_ctx,
305 struct tevent_context *ev,
306 struct dcerpc_binding_handle *h,
307 struct dom_sid *_sid /* [in] [ref] */,
308 enum lsa_SidType *_type /* [out] [ref] */,
309 const char **_domain /* [out] [ref,charset(UTF8)] */,
310 const char **_name /* [out] [ref,charset(UTF8)] */)
312 struct tevent_req *req;
313 struct dcerpc_wbint_LookupSid_state *state;
314 struct tevent_req *subreq;
316 req = tevent_req_create(mem_ctx, &state,
317 struct dcerpc_wbint_LookupSid_state);
321 state->out_mem_ctx = NULL;
324 state->orig.in.sid = _sid;
327 state->orig.out.type = _type;
328 state->orig.out.domain = _domain;
329 state->orig.out.name = _name;
332 ZERO_STRUCT(state->orig.out.result);
334 state->out_mem_ctx = talloc_named_const(state, 0,
335 "dcerpc_wbint_LookupSid_out_memory");
336 if (tevent_req_nomem(state->out_mem_ctx, req)) {
337 return tevent_req_post(req, ev);
340 /* make a temporary copy, that we pass to the dispatch function */
341 state->tmp = state->orig;
343 subreq = dcerpc_wbint_LookupSid_r_send(state, ev, h, &state->tmp);
344 if (tevent_req_nomem(subreq, req)) {
345 return tevent_req_post(req, ev);
347 tevent_req_set_callback(subreq, dcerpc_wbint_LookupSid_done, req);
351 static void dcerpc_wbint_LookupSid_done(struct tevent_req *subreq)
353 struct tevent_req *req = tevent_req_callback_data(
354 subreq, struct tevent_req);
355 struct dcerpc_wbint_LookupSid_state *state = tevent_req_data(
356 req, struct dcerpc_wbint_LookupSid_state);
360 if (state->out_mem_ctx) {
361 mem_ctx = state->out_mem_ctx;
366 status = dcerpc_wbint_LookupSid_r_recv(subreq, mem_ctx);
368 if (tevent_req_nterror(req, status)) {
372 /* Copy out parameters */
373 *state->orig.out.type = *state->tmp.out.type;
374 *state->orig.out.domain = *state->tmp.out.domain;
375 *state->orig.out.name = *state->tmp.out.name;
378 state->orig.out.result = state->tmp.out.result;
380 /* Reset temporary structure */
381 ZERO_STRUCT(state->tmp);
383 tevent_req_done(req);
386 NTSTATUS dcerpc_wbint_LookupSid_recv(struct tevent_req *req,
390 struct dcerpc_wbint_LookupSid_state *state = tevent_req_data(
391 req, struct dcerpc_wbint_LookupSid_state);
394 if (tevent_req_is_nterror(req, &status)) {
395 tevent_req_received(req);
399 /* Steal possible out parameters to the callers context */
400 talloc_steal(mem_ctx, state->out_mem_ctx);
403 *result = state->orig.out.result;
405 tevent_req_received(req);
409 NTSTATUS dcerpc_wbint_LookupSid(struct dcerpc_binding_handle *h,
411 struct dom_sid *_sid /* [in] [ref] */,
412 enum lsa_SidType *_type /* [out] [ref] */,
413 const char **_domain /* [out] [ref,charset(UTF8)] */,
414 const char **_name /* [out] [ref,charset(UTF8)] */,
417 struct wbint_LookupSid r;
423 status = dcerpc_wbint_LookupSid_r(h, mem_ctx, &r);
424 if (!NT_STATUS_IS_OK(status)) {
428 /* Return variables */
429 *_type = *r.out.type;
430 *_domain = *r.out.domain;
431 *_name = *r.out.name;
434 *result = r.out.result;
439 struct dcerpc_wbint_LookupSids_r_state {
440 TALLOC_CTX *out_mem_ctx;
443 static void dcerpc_wbint_LookupSids_r_done(struct tevent_req *subreq);
445 struct tevent_req *dcerpc_wbint_LookupSids_r_send(TALLOC_CTX *mem_ctx,
446 struct tevent_context *ev,
447 struct dcerpc_binding_handle *h,
448 struct wbint_LookupSids *r)
450 struct tevent_req *req;
451 struct dcerpc_wbint_LookupSids_r_state *state;
452 struct tevent_req *subreq;
454 req = tevent_req_create(mem_ctx, &state,
455 struct dcerpc_wbint_LookupSids_r_state);
460 state->out_mem_ctx = talloc_new(state);
461 if (tevent_req_nomem(state->out_mem_ctx, req)) {
462 return tevent_req_post(req, ev);
465 subreq = dcerpc_binding_handle_call_send(state, ev, h,
466 NULL, &ndr_table_wbint,
467 NDR_WBINT_LOOKUPSIDS, state->out_mem_ctx, r);
468 if (tevent_req_nomem(subreq, req)) {
469 return tevent_req_post(req, ev);
471 tevent_req_set_callback(subreq, dcerpc_wbint_LookupSids_r_done, req);
476 static void dcerpc_wbint_LookupSids_r_done(struct tevent_req *subreq)
478 struct tevent_req *req =
479 tevent_req_callback_data(subreq,
483 status = dcerpc_binding_handle_call_recv(subreq);
485 if (tevent_req_nterror(req, status)) {
489 tevent_req_done(req);
492 NTSTATUS dcerpc_wbint_LookupSids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
494 struct dcerpc_wbint_LookupSids_r_state *state =
496 struct dcerpc_wbint_LookupSids_r_state);
499 if (tevent_req_is_nterror(req, &status)) {
500 tevent_req_received(req);
504 talloc_steal(mem_ctx, state->out_mem_ctx);
506 tevent_req_received(req);
510 NTSTATUS dcerpc_wbint_LookupSids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupSids *r)
514 status = dcerpc_binding_handle_call(h,
515 NULL, &ndr_table_wbint,
516 NDR_WBINT_LOOKUPSIDS, mem_ctx, r);
521 struct dcerpc_wbint_LookupSids_state {
522 struct wbint_LookupSids orig;
523 struct wbint_LookupSids tmp;
524 TALLOC_CTX *out_mem_ctx;
527 static void dcerpc_wbint_LookupSids_done(struct tevent_req *subreq);
529 struct tevent_req *dcerpc_wbint_LookupSids_send(TALLOC_CTX *mem_ctx,
530 struct tevent_context *ev,
531 struct dcerpc_binding_handle *h,
532 struct lsa_SidArray *_sids /* [in] [ref] */,
533 struct lsa_RefDomainList *_domains /* [out] [ref] */,
534 struct lsa_TransNameArray *_names /* [out] [ref] */)
536 struct tevent_req *req;
537 struct dcerpc_wbint_LookupSids_state *state;
538 struct tevent_req *subreq;
540 req = tevent_req_create(mem_ctx, &state,
541 struct dcerpc_wbint_LookupSids_state);
545 state->out_mem_ctx = NULL;
548 state->orig.in.sids = _sids;
551 state->orig.out.domains = _domains;
552 state->orig.out.names = _names;
555 ZERO_STRUCT(state->orig.out.result);
557 state->out_mem_ctx = talloc_named_const(state, 0,
558 "dcerpc_wbint_LookupSids_out_memory");
559 if (tevent_req_nomem(state->out_mem_ctx, req)) {
560 return tevent_req_post(req, ev);
563 /* make a temporary copy, that we pass to the dispatch function */
564 state->tmp = state->orig;
566 subreq = dcerpc_wbint_LookupSids_r_send(state, ev, h, &state->tmp);
567 if (tevent_req_nomem(subreq, req)) {
568 return tevent_req_post(req, ev);
570 tevent_req_set_callback(subreq, dcerpc_wbint_LookupSids_done, req);
574 static void dcerpc_wbint_LookupSids_done(struct tevent_req *subreq)
576 struct tevent_req *req = tevent_req_callback_data(
577 subreq, struct tevent_req);
578 struct dcerpc_wbint_LookupSids_state *state = tevent_req_data(
579 req, struct dcerpc_wbint_LookupSids_state);
583 if (state->out_mem_ctx) {
584 mem_ctx = state->out_mem_ctx;
589 status = dcerpc_wbint_LookupSids_r_recv(subreq, mem_ctx);
591 if (tevent_req_nterror(req, status)) {
595 /* Copy out parameters */
596 *state->orig.out.domains = *state->tmp.out.domains;
597 *state->orig.out.names = *state->tmp.out.names;
600 state->orig.out.result = state->tmp.out.result;
602 /* Reset temporary structure */
603 ZERO_STRUCT(state->tmp);
605 tevent_req_done(req);
608 NTSTATUS dcerpc_wbint_LookupSids_recv(struct tevent_req *req,
612 struct dcerpc_wbint_LookupSids_state *state = tevent_req_data(
613 req, struct dcerpc_wbint_LookupSids_state);
616 if (tevent_req_is_nterror(req, &status)) {
617 tevent_req_received(req);
621 /* Steal possible out parameters to the callers context */
622 talloc_steal(mem_ctx, state->out_mem_ctx);
625 *result = state->orig.out.result;
627 tevent_req_received(req);
631 NTSTATUS dcerpc_wbint_LookupSids(struct dcerpc_binding_handle *h,
633 struct lsa_SidArray *_sids /* [in] [ref] */,
634 struct lsa_RefDomainList *_domains /* [out] [ref] */,
635 struct lsa_TransNameArray *_names /* [out] [ref] */,
638 struct wbint_LookupSids r;
644 status = dcerpc_wbint_LookupSids_r(h, mem_ctx, &r);
645 if (!NT_STATUS_IS_OK(status)) {
649 /* Return variables */
650 *_domains = *r.out.domains;
651 *_names = *r.out.names;
654 *result = r.out.result;
659 struct dcerpc_wbint_LookupName_r_state {
660 TALLOC_CTX *out_mem_ctx;
663 static void dcerpc_wbint_LookupName_r_done(struct tevent_req *subreq);
665 struct tevent_req *dcerpc_wbint_LookupName_r_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 struct dcerpc_binding_handle *h,
668 struct wbint_LookupName *r)
670 struct tevent_req *req;
671 struct dcerpc_wbint_LookupName_r_state *state;
672 struct tevent_req *subreq;
674 req = tevent_req_create(mem_ctx, &state,
675 struct dcerpc_wbint_LookupName_r_state);
680 state->out_mem_ctx = talloc_new(state);
681 if (tevent_req_nomem(state->out_mem_ctx, req)) {
682 return tevent_req_post(req, ev);
685 subreq = dcerpc_binding_handle_call_send(state, ev, h,
686 NULL, &ndr_table_wbint,
687 NDR_WBINT_LOOKUPNAME, state->out_mem_ctx, r);
688 if (tevent_req_nomem(subreq, req)) {
689 return tevent_req_post(req, ev);
691 tevent_req_set_callback(subreq, dcerpc_wbint_LookupName_r_done, req);
696 static void dcerpc_wbint_LookupName_r_done(struct tevent_req *subreq)
698 struct tevent_req *req =
699 tevent_req_callback_data(subreq,
703 status = dcerpc_binding_handle_call_recv(subreq);
705 if (tevent_req_nterror(req, status)) {
709 tevent_req_done(req);
712 NTSTATUS dcerpc_wbint_LookupName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
714 struct dcerpc_wbint_LookupName_r_state *state =
716 struct dcerpc_wbint_LookupName_r_state);
719 if (tevent_req_is_nterror(req, &status)) {
720 tevent_req_received(req);
724 talloc_steal(mem_ctx, state->out_mem_ctx);
726 tevent_req_received(req);
730 NTSTATUS dcerpc_wbint_LookupName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupName *r)
734 status = dcerpc_binding_handle_call(h,
735 NULL, &ndr_table_wbint,
736 NDR_WBINT_LOOKUPNAME, mem_ctx, r);
741 struct dcerpc_wbint_LookupName_state {
742 struct wbint_LookupName orig;
743 struct wbint_LookupName tmp;
744 TALLOC_CTX *out_mem_ctx;
747 static void dcerpc_wbint_LookupName_done(struct tevent_req *subreq);
749 struct tevent_req *dcerpc_wbint_LookupName_send(TALLOC_CTX *mem_ctx,
750 struct tevent_context *ev,
751 struct dcerpc_binding_handle *h,
752 const char *_domain /* [in] [ref,charset(UTF8)] */,
753 const char *_name /* [in] [ref,charset(UTF8)] */,
754 uint32_t _flags /* [in] */,
755 enum lsa_SidType *_type /* [out] [ref] */,
756 struct dom_sid *_sid /* [out] [ref] */)
758 struct tevent_req *req;
759 struct dcerpc_wbint_LookupName_state *state;
760 struct tevent_req *subreq;
762 req = tevent_req_create(mem_ctx, &state,
763 struct dcerpc_wbint_LookupName_state);
767 state->out_mem_ctx = NULL;
770 state->orig.in.domain = _domain;
771 state->orig.in.name = _name;
772 state->orig.in.flags = _flags;
775 state->orig.out.type = _type;
776 state->orig.out.sid = _sid;
779 ZERO_STRUCT(state->orig.out.result);
781 state->out_mem_ctx = talloc_named_const(state, 0,
782 "dcerpc_wbint_LookupName_out_memory");
783 if (tevent_req_nomem(state->out_mem_ctx, req)) {
784 return tevent_req_post(req, ev);
787 /* make a temporary copy, that we pass to the dispatch function */
788 state->tmp = state->orig;
790 subreq = dcerpc_wbint_LookupName_r_send(state, ev, h, &state->tmp);
791 if (tevent_req_nomem(subreq, req)) {
792 return tevent_req_post(req, ev);
794 tevent_req_set_callback(subreq, dcerpc_wbint_LookupName_done, req);
798 static void dcerpc_wbint_LookupName_done(struct tevent_req *subreq)
800 struct tevent_req *req = tevent_req_callback_data(
801 subreq, struct tevent_req);
802 struct dcerpc_wbint_LookupName_state *state = tevent_req_data(
803 req, struct dcerpc_wbint_LookupName_state);
807 if (state->out_mem_ctx) {
808 mem_ctx = state->out_mem_ctx;
813 status = dcerpc_wbint_LookupName_r_recv(subreq, mem_ctx);
815 if (tevent_req_nterror(req, status)) {
819 /* Copy out parameters */
820 *state->orig.out.type = *state->tmp.out.type;
821 *state->orig.out.sid = *state->tmp.out.sid;
824 state->orig.out.result = state->tmp.out.result;
826 /* Reset temporary structure */
827 ZERO_STRUCT(state->tmp);
829 tevent_req_done(req);
832 NTSTATUS dcerpc_wbint_LookupName_recv(struct tevent_req *req,
836 struct dcerpc_wbint_LookupName_state *state = tevent_req_data(
837 req, struct dcerpc_wbint_LookupName_state);
840 if (tevent_req_is_nterror(req, &status)) {
841 tevent_req_received(req);
845 /* Steal possible out parameters to the callers context */
846 talloc_steal(mem_ctx, state->out_mem_ctx);
849 *result = state->orig.out.result;
851 tevent_req_received(req);
855 NTSTATUS dcerpc_wbint_LookupName(struct dcerpc_binding_handle *h,
857 const char *_domain /* [in] [ref,charset(UTF8)] */,
858 const char *_name /* [in] [ref,charset(UTF8)] */,
859 uint32_t _flags /* [in] */,
860 enum lsa_SidType *_type /* [out] [ref] */,
861 struct dom_sid *_sid /* [out] [ref] */,
864 struct wbint_LookupName r;
868 r.in.domain = _domain;
872 status = dcerpc_wbint_LookupName_r(h, mem_ctx, &r);
873 if (!NT_STATUS_IS_OK(status)) {
877 /* Return variables */
878 *_type = *r.out.type;
882 *result = r.out.result;
887 struct dcerpc_wbint_Sids2UnixIDs_r_state {
888 TALLOC_CTX *out_mem_ctx;
891 static void dcerpc_wbint_Sids2UnixIDs_r_done(struct tevent_req *subreq);
893 struct tevent_req *dcerpc_wbint_Sids2UnixIDs_r_send(TALLOC_CTX *mem_ctx,
894 struct tevent_context *ev,
895 struct dcerpc_binding_handle *h,
896 struct wbint_Sids2UnixIDs *r)
898 struct tevent_req *req;
899 struct dcerpc_wbint_Sids2UnixIDs_r_state *state;
900 struct tevent_req *subreq;
902 req = tevent_req_create(mem_ctx, &state,
903 struct dcerpc_wbint_Sids2UnixIDs_r_state);
908 state->out_mem_ctx = talloc_new(state);
909 if (tevent_req_nomem(state->out_mem_ctx, req)) {
910 return tevent_req_post(req, ev);
913 subreq = dcerpc_binding_handle_call_send(state, ev, h,
914 NULL, &ndr_table_wbint,
915 NDR_WBINT_SIDS2UNIXIDS, state->out_mem_ctx, r);
916 if (tevent_req_nomem(subreq, req)) {
917 return tevent_req_post(req, ev);
919 tevent_req_set_callback(subreq, dcerpc_wbint_Sids2UnixIDs_r_done, req);
924 static void dcerpc_wbint_Sids2UnixIDs_r_done(struct tevent_req *subreq)
926 struct tevent_req *req =
927 tevent_req_callback_data(subreq,
931 status = dcerpc_binding_handle_call_recv(subreq);
933 if (tevent_req_nterror(req, status)) {
937 tevent_req_done(req);
940 NTSTATUS dcerpc_wbint_Sids2UnixIDs_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
942 struct dcerpc_wbint_Sids2UnixIDs_r_state *state =
944 struct dcerpc_wbint_Sids2UnixIDs_r_state);
947 if (tevent_req_is_nterror(req, &status)) {
948 tevent_req_received(req);
952 talloc_steal(mem_ctx, state->out_mem_ctx);
954 tevent_req_received(req);
958 NTSTATUS dcerpc_wbint_Sids2UnixIDs_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Sids2UnixIDs *r)
962 status = dcerpc_binding_handle_call(h,
963 NULL, &ndr_table_wbint,
964 NDR_WBINT_SIDS2UNIXIDS, mem_ctx, r);
969 struct dcerpc_wbint_Sids2UnixIDs_state {
970 struct wbint_Sids2UnixIDs orig;
971 struct wbint_Sids2UnixIDs tmp;
972 TALLOC_CTX *out_mem_ctx;
975 static void dcerpc_wbint_Sids2UnixIDs_done(struct tevent_req *subreq);
977 struct tevent_req *dcerpc_wbint_Sids2UnixIDs_send(TALLOC_CTX *mem_ctx,
978 struct tevent_context *ev,
979 struct dcerpc_binding_handle *h,
980 struct lsa_RefDomainList *_domains /* [in] [ref] */,
981 struct wbint_TransIDArray *_ids /* [in,out] [ref] */)
983 struct tevent_req *req;
984 struct dcerpc_wbint_Sids2UnixIDs_state *state;
985 struct tevent_req *subreq;
987 req = tevent_req_create(mem_ctx, &state,
988 struct dcerpc_wbint_Sids2UnixIDs_state);
992 state->out_mem_ctx = NULL;
995 state->orig.in.domains = _domains;
996 state->orig.in.ids = _ids;
999 state->orig.out.ids = _ids;
1002 ZERO_STRUCT(state->orig.out.result);
1004 state->out_mem_ctx = talloc_named_const(state, 0,
1005 "dcerpc_wbint_Sids2UnixIDs_out_memory");
1006 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1007 return tevent_req_post(req, ev);
1010 /* make a temporary copy, that we pass to the dispatch function */
1011 state->tmp = state->orig;
1013 subreq = dcerpc_wbint_Sids2UnixIDs_r_send(state, ev, h, &state->tmp);
1014 if (tevent_req_nomem(subreq, req)) {
1015 return tevent_req_post(req, ev);
1017 tevent_req_set_callback(subreq, dcerpc_wbint_Sids2UnixIDs_done, req);
1021 static void dcerpc_wbint_Sids2UnixIDs_done(struct tevent_req *subreq)
1023 struct tevent_req *req = tevent_req_callback_data(
1024 subreq, struct tevent_req);
1025 struct dcerpc_wbint_Sids2UnixIDs_state *state = tevent_req_data(
1026 req, struct dcerpc_wbint_Sids2UnixIDs_state);
1028 TALLOC_CTX *mem_ctx;
1030 if (state->out_mem_ctx) {
1031 mem_ctx = state->out_mem_ctx;
1036 status = dcerpc_wbint_Sids2UnixIDs_r_recv(subreq, mem_ctx);
1037 TALLOC_FREE(subreq);
1038 if (tevent_req_nterror(req, status)) {
1042 /* Copy out parameters */
1043 *state->orig.out.ids = *state->tmp.out.ids;
1046 state->orig.out.result = state->tmp.out.result;
1048 /* Reset temporary structure */
1049 ZERO_STRUCT(state->tmp);
1051 tevent_req_done(req);
1054 NTSTATUS dcerpc_wbint_Sids2UnixIDs_recv(struct tevent_req *req,
1055 TALLOC_CTX *mem_ctx,
1058 struct dcerpc_wbint_Sids2UnixIDs_state *state = tevent_req_data(
1059 req, struct dcerpc_wbint_Sids2UnixIDs_state);
1062 if (tevent_req_is_nterror(req, &status)) {
1063 tevent_req_received(req);
1067 /* Steal possible out parameters to the callers context */
1068 talloc_steal(mem_ctx, state->out_mem_ctx);
1071 *result = state->orig.out.result;
1073 tevent_req_received(req);
1074 return NT_STATUS_OK;
1077 NTSTATUS dcerpc_wbint_Sids2UnixIDs(struct dcerpc_binding_handle *h,
1078 TALLOC_CTX *mem_ctx,
1079 struct lsa_RefDomainList *_domains /* [in] [ref] */,
1080 struct wbint_TransIDArray *_ids /* [in,out] [ref] */,
1083 struct wbint_Sids2UnixIDs r;
1087 r.in.domains = _domains;
1090 status = dcerpc_wbint_Sids2UnixIDs_r(h, mem_ctx, &r);
1091 if (!NT_STATUS_IS_OK(status)) {
1095 /* Return variables */
1099 *result = r.out.result;
1101 return NT_STATUS_OK;
1104 struct dcerpc_wbint_Uid2Sid_r_state {
1105 TALLOC_CTX *out_mem_ctx;
1108 static void dcerpc_wbint_Uid2Sid_r_done(struct tevent_req *subreq);
1110 struct tevent_req *dcerpc_wbint_Uid2Sid_r_send(TALLOC_CTX *mem_ctx,
1111 struct tevent_context *ev,
1112 struct dcerpc_binding_handle *h,
1113 struct wbint_Uid2Sid *r)
1115 struct tevent_req *req;
1116 struct dcerpc_wbint_Uid2Sid_r_state *state;
1117 struct tevent_req *subreq;
1119 req = tevent_req_create(mem_ctx, &state,
1120 struct dcerpc_wbint_Uid2Sid_r_state);
1125 state->out_mem_ctx = talloc_new(state);
1126 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1127 return tevent_req_post(req, ev);
1130 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1131 NULL, &ndr_table_wbint,
1132 NDR_WBINT_UID2SID, state->out_mem_ctx, r);
1133 if (tevent_req_nomem(subreq, req)) {
1134 return tevent_req_post(req, ev);
1136 tevent_req_set_callback(subreq, dcerpc_wbint_Uid2Sid_r_done, req);
1141 static void dcerpc_wbint_Uid2Sid_r_done(struct tevent_req *subreq)
1143 struct tevent_req *req =
1144 tevent_req_callback_data(subreq,
1148 status = dcerpc_binding_handle_call_recv(subreq);
1149 TALLOC_FREE(subreq);
1150 if (tevent_req_nterror(req, status)) {
1154 tevent_req_done(req);
1157 NTSTATUS dcerpc_wbint_Uid2Sid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1159 struct dcerpc_wbint_Uid2Sid_r_state *state =
1160 tevent_req_data(req,
1161 struct dcerpc_wbint_Uid2Sid_r_state);
1164 if (tevent_req_is_nterror(req, &status)) {
1165 tevent_req_received(req);
1169 talloc_steal(mem_ctx, state->out_mem_ctx);
1171 tevent_req_received(req);
1172 return NT_STATUS_OK;
1175 NTSTATUS dcerpc_wbint_Uid2Sid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Uid2Sid *r)
1179 status = dcerpc_binding_handle_call(h,
1180 NULL, &ndr_table_wbint,
1181 NDR_WBINT_UID2SID, mem_ctx, r);
1186 struct dcerpc_wbint_Uid2Sid_state {
1187 struct wbint_Uid2Sid orig;
1188 struct wbint_Uid2Sid tmp;
1189 TALLOC_CTX *out_mem_ctx;
1192 static void dcerpc_wbint_Uid2Sid_done(struct tevent_req *subreq);
1194 struct tevent_req *dcerpc_wbint_Uid2Sid_send(TALLOC_CTX *mem_ctx,
1195 struct tevent_context *ev,
1196 struct dcerpc_binding_handle *h,
1197 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
1198 uint64_t _uid /* [in] */,
1199 struct dom_sid *_sid /* [out] [ref] */)
1201 struct tevent_req *req;
1202 struct dcerpc_wbint_Uid2Sid_state *state;
1203 struct tevent_req *subreq;
1205 req = tevent_req_create(mem_ctx, &state,
1206 struct dcerpc_wbint_Uid2Sid_state);
1210 state->out_mem_ctx = NULL;
1213 state->orig.in.dom_name = _dom_name;
1214 state->orig.in.uid = _uid;
1216 /* Out parameters */
1217 state->orig.out.sid = _sid;
1220 ZERO_STRUCT(state->orig.out.result);
1222 state->out_mem_ctx = talloc_named_const(state, 0,
1223 "dcerpc_wbint_Uid2Sid_out_memory");
1224 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1225 return tevent_req_post(req, ev);
1228 /* make a temporary copy, that we pass to the dispatch function */
1229 state->tmp = state->orig;
1231 subreq = dcerpc_wbint_Uid2Sid_r_send(state, ev, h, &state->tmp);
1232 if (tevent_req_nomem(subreq, req)) {
1233 return tevent_req_post(req, ev);
1235 tevent_req_set_callback(subreq, dcerpc_wbint_Uid2Sid_done, req);
1239 static void dcerpc_wbint_Uid2Sid_done(struct tevent_req *subreq)
1241 struct tevent_req *req = tevent_req_callback_data(
1242 subreq, struct tevent_req);
1243 struct dcerpc_wbint_Uid2Sid_state *state = tevent_req_data(
1244 req, struct dcerpc_wbint_Uid2Sid_state);
1246 TALLOC_CTX *mem_ctx;
1248 if (state->out_mem_ctx) {
1249 mem_ctx = state->out_mem_ctx;
1254 status = dcerpc_wbint_Uid2Sid_r_recv(subreq, mem_ctx);
1255 TALLOC_FREE(subreq);
1256 if (tevent_req_nterror(req, status)) {
1260 /* Copy out parameters */
1261 *state->orig.out.sid = *state->tmp.out.sid;
1264 state->orig.out.result = state->tmp.out.result;
1266 /* Reset temporary structure */
1267 ZERO_STRUCT(state->tmp);
1269 tevent_req_done(req);
1272 NTSTATUS dcerpc_wbint_Uid2Sid_recv(struct tevent_req *req,
1273 TALLOC_CTX *mem_ctx,
1276 struct dcerpc_wbint_Uid2Sid_state *state = tevent_req_data(
1277 req, struct dcerpc_wbint_Uid2Sid_state);
1280 if (tevent_req_is_nterror(req, &status)) {
1281 tevent_req_received(req);
1285 /* Steal possible out parameters to the callers context */
1286 talloc_steal(mem_ctx, state->out_mem_ctx);
1289 *result = state->orig.out.result;
1291 tevent_req_received(req);
1292 return NT_STATUS_OK;
1295 NTSTATUS dcerpc_wbint_Uid2Sid(struct dcerpc_binding_handle *h,
1296 TALLOC_CTX *mem_ctx,
1297 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
1298 uint64_t _uid /* [in] */,
1299 struct dom_sid *_sid /* [out] [ref] */,
1302 struct wbint_Uid2Sid r;
1306 r.in.dom_name = _dom_name;
1309 status = dcerpc_wbint_Uid2Sid_r(h, mem_ctx, &r);
1310 if (!NT_STATUS_IS_OK(status)) {
1314 /* Return variables */
1318 *result = r.out.result;
1320 return NT_STATUS_OK;
1323 struct dcerpc_wbint_Gid2Sid_r_state {
1324 TALLOC_CTX *out_mem_ctx;
1327 static void dcerpc_wbint_Gid2Sid_r_done(struct tevent_req *subreq);
1329 struct tevent_req *dcerpc_wbint_Gid2Sid_r_send(TALLOC_CTX *mem_ctx,
1330 struct tevent_context *ev,
1331 struct dcerpc_binding_handle *h,
1332 struct wbint_Gid2Sid *r)
1334 struct tevent_req *req;
1335 struct dcerpc_wbint_Gid2Sid_r_state *state;
1336 struct tevent_req *subreq;
1338 req = tevent_req_create(mem_ctx, &state,
1339 struct dcerpc_wbint_Gid2Sid_r_state);
1344 state->out_mem_ctx = talloc_new(state);
1345 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1346 return tevent_req_post(req, ev);
1349 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1350 NULL, &ndr_table_wbint,
1351 NDR_WBINT_GID2SID, state->out_mem_ctx, r);
1352 if (tevent_req_nomem(subreq, req)) {
1353 return tevent_req_post(req, ev);
1355 tevent_req_set_callback(subreq, dcerpc_wbint_Gid2Sid_r_done, req);
1360 static void dcerpc_wbint_Gid2Sid_r_done(struct tevent_req *subreq)
1362 struct tevent_req *req =
1363 tevent_req_callback_data(subreq,
1367 status = dcerpc_binding_handle_call_recv(subreq);
1368 TALLOC_FREE(subreq);
1369 if (tevent_req_nterror(req, status)) {
1373 tevent_req_done(req);
1376 NTSTATUS dcerpc_wbint_Gid2Sid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1378 struct dcerpc_wbint_Gid2Sid_r_state *state =
1379 tevent_req_data(req,
1380 struct dcerpc_wbint_Gid2Sid_r_state);
1383 if (tevent_req_is_nterror(req, &status)) {
1384 tevent_req_received(req);
1388 talloc_steal(mem_ctx, state->out_mem_ctx);
1390 tevent_req_received(req);
1391 return NT_STATUS_OK;
1394 NTSTATUS dcerpc_wbint_Gid2Sid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_Gid2Sid *r)
1398 status = dcerpc_binding_handle_call(h,
1399 NULL, &ndr_table_wbint,
1400 NDR_WBINT_GID2SID, mem_ctx, r);
1405 struct dcerpc_wbint_Gid2Sid_state {
1406 struct wbint_Gid2Sid orig;
1407 struct wbint_Gid2Sid tmp;
1408 TALLOC_CTX *out_mem_ctx;
1411 static void dcerpc_wbint_Gid2Sid_done(struct tevent_req *subreq);
1413 struct tevent_req *dcerpc_wbint_Gid2Sid_send(TALLOC_CTX *mem_ctx,
1414 struct tevent_context *ev,
1415 struct dcerpc_binding_handle *h,
1416 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
1417 uint64_t _gid /* [in] */,
1418 struct dom_sid *_sid /* [out] [ref] */)
1420 struct tevent_req *req;
1421 struct dcerpc_wbint_Gid2Sid_state *state;
1422 struct tevent_req *subreq;
1424 req = tevent_req_create(mem_ctx, &state,
1425 struct dcerpc_wbint_Gid2Sid_state);
1429 state->out_mem_ctx = NULL;
1432 state->orig.in.dom_name = _dom_name;
1433 state->orig.in.gid = _gid;
1435 /* Out parameters */
1436 state->orig.out.sid = _sid;
1439 ZERO_STRUCT(state->orig.out.result);
1441 state->out_mem_ctx = talloc_named_const(state, 0,
1442 "dcerpc_wbint_Gid2Sid_out_memory");
1443 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1444 return tevent_req_post(req, ev);
1447 /* make a temporary copy, that we pass to the dispatch function */
1448 state->tmp = state->orig;
1450 subreq = dcerpc_wbint_Gid2Sid_r_send(state, ev, h, &state->tmp);
1451 if (tevent_req_nomem(subreq, req)) {
1452 return tevent_req_post(req, ev);
1454 tevent_req_set_callback(subreq, dcerpc_wbint_Gid2Sid_done, req);
1458 static void dcerpc_wbint_Gid2Sid_done(struct tevent_req *subreq)
1460 struct tevent_req *req = tevent_req_callback_data(
1461 subreq, struct tevent_req);
1462 struct dcerpc_wbint_Gid2Sid_state *state = tevent_req_data(
1463 req, struct dcerpc_wbint_Gid2Sid_state);
1465 TALLOC_CTX *mem_ctx;
1467 if (state->out_mem_ctx) {
1468 mem_ctx = state->out_mem_ctx;
1473 status = dcerpc_wbint_Gid2Sid_r_recv(subreq, mem_ctx);
1474 TALLOC_FREE(subreq);
1475 if (tevent_req_nterror(req, status)) {
1479 /* Copy out parameters */
1480 *state->orig.out.sid = *state->tmp.out.sid;
1483 state->orig.out.result = state->tmp.out.result;
1485 /* Reset temporary structure */
1486 ZERO_STRUCT(state->tmp);
1488 tevent_req_done(req);
1491 NTSTATUS dcerpc_wbint_Gid2Sid_recv(struct tevent_req *req,
1492 TALLOC_CTX *mem_ctx,
1495 struct dcerpc_wbint_Gid2Sid_state *state = tevent_req_data(
1496 req, struct dcerpc_wbint_Gid2Sid_state);
1499 if (tevent_req_is_nterror(req, &status)) {
1500 tevent_req_received(req);
1504 /* Steal possible out parameters to the callers context */
1505 talloc_steal(mem_ctx, state->out_mem_ctx);
1508 *result = state->orig.out.result;
1510 tevent_req_received(req);
1511 return NT_STATUS_OK;
1514 NTSTATUS dcerpc_wbint_Gid2Sid(struct dcerpc_binding_handle *h,
1515 TALLOC_CTX *mem_ctx,
1516 const char *_dom_name /* [in] [unique,charset(UTF8)] */,
1517 uint64_t _gid /* [in] */,
1518 struct dom_sid *_sid /* [out] [ref] */,
1521 struct wbint_Gid2Sid r;
1525 r.in.dom_name = _dom_name;
1528 status = dcerpc_wbint_Gid2Sid_r(h, mem_ctx, &r);
1529 if (!NT_STATUS_IS_OK(status)) {
1533 /* Return variables */
1537 *result = r.out.result;
1539 return NT_STATUS_OK;
1542 struct dcerpc_wbint_AllocateUid_r_state {
1543 TALLOC_CTX *out_mem_ctx;
1546 static void dcerpc_wbint_AllocateUid_r_done(struct tevent_req *subreq);
1548 struct tevent_req *dcerpc_wbint_AllocateUid_r_send(TALLOC_CTX *mem_ctx,
1549 struct tevent_context *ev,
1550 struct dcerpc_binding_handle *h,
1551 struct wbint_AllocateUid *r)
1553 struct tevent_req *req;
1554 struct dcerpc_wbint_AllocateUid_r_state *state;
1555 struct tevent_req *subreq;
1557 req = tevent_req_create(mem_ctx, &state,
1558 struct dcerpc_wbint_AllocateUid_r_state);
1563 state->out_mem_ctx = talloc_new(state);
1564 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1565 return tevent_req_post(req, ev);
1568 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1569 NULL, &ndr_table_wbint,
1570 NDR_WBINT_ALLOCATEUID, state->out_mem_ctx, r);
1571 if (tevent_req_nomem(subreq, req)) {
1572 return tevent_req_post(req, ev);
1574 tevent_req_set_callback(subreq, dcerpc_wbint_AllocateUid_r_done, req);
1579 static void dcerpc_wbint_AllocateUid_r_done(struct tevent_req *subreq)
1581 struct tevent_req *req =
1582 tevent_req_callback_data(subreq,
1586 status = dcerpc_binding_handle_call_recv(subreq);
1587 TALLOC_FREE(subreq);
1588 if (tevent_req_nterror(req, status)) {
1592 tevent_req_done(req);
1595 NTSTATUS dcerpc_wbint_AllocateUid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1597 struct dcerpc_wbint_AllocateUid_r_state *state =
1598 tevent_req_data(req,
1599 struct dcerpc_wbint_AllocateUid_r_state);
1602 if (tevent_req_is_nterror(req, &status)) {
1603 tevent_req_received(req);
1607 talloc_steal(mem_ctx, state->out_mem_ctx);
1609 tevent_req_received(req);
1610 return NT_STATUS_OK;
1613 NTSTATUS dcerpc_wbint_AllocateUid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_AllocateUid *r)
1617 status = dcerpc_binding_handle_call(h,
1618 NULL, &ndr_table_wbint,
1619 NDR_WBINT_ALLOCATEUID, mem_ctx, r);
1624 struct dcerpc_wbint_AllocateUid_state {
1625 struct wbint_AllocateUid orig;
1626 struct wbint_AllocateUid tmp;
1627 TALLOC_CTX *out_mem_ctx;
1630 static void dcerpc_wbint_AllocateUid_done(struct tevent_req *subreq);
1632 struct tevent_req *dcerpc_wbint_AllocateUid_send(TALLOC_CTX *mem_ctx,
1633 struct tevent_context *ev,
1634 struct dcerpc_binding_handle *h,
1635 uint64_t *_uid /* [out] [ref] */)
1637 struct tevent_req *req;
1638 struct dcerpc_wbint_AllocateUid_state *state;
1639 struct tevent_req *subreq;
1641 req = tevent_req_create(mem_ctx, &state,
1642 struct dcerpc_wbint_AllocateUid_state);
1646 state->out_mem_ctx = NULL;
1650 /* Out parameters */
1651 state->orig.out.uid = _uid;
1654 ZERO_STRUCT(state->orig.out.result);
1656 state->out_mem_ctx = talloc_named_const(state, 0,
1657 "dcerpc_wbint_AllocateUid_out_memory");
1658 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1659 return tevent_req_post(req, ev);
1662 /* make a temporary copy, that we pass to the dispatch function */
1663 state->tmp = state->orig;
1665 subreq = dcerpc_wbint_AllocateUid_r_send(state, ev, h, &state->tmp);
1666 if (tevent_req_nomem(subreq, req)) {
1667 return tevent_req_post(req, ev);
1669 tevent_req_set_callback(subreq, dcerpc_wbint_AllocateUid_done, req);
1673 static void dcerpc_wbint_AllocateUid_done(struct tevent_req *subreq)
1675 struct tevent_req *req = tevent_req_callback_data(
1676 subreq, struct tevent_req);
1677 struct dcerpc_wbint_AllocateUid_state *state = tevent_req_data(
1678 req, struct dcerpc_wbint_AllocateUid_state);
1680 TALLOC_CTX *mem_ctx;
1682 if (state->out_mem_ctx) {
1683 mem_ctx = state->out_mem_ctx;
1688 status = dcerpc_wbint_AllocateUid_r_recv(subreq, mem_ctx);
1689 TALLOC_FREE(subreq);
1690 if (tevent_req_nterror(req, status)) {
1694 /* Copy out parameters */
1695 *state->orig.out.uid = *state->tmp.out.uid;
1698 state->orig.out.result = state->tmp.out.result;
1700 /* Reset temporary structure */
1701 ZERO_STRUCT(state->tmp);
1703 tevent_req_done(req);
1706 NTSTATUS dcerpc_wbint_AllocateUid_recv(struct tevent_req *req,
1707 TALLOC_CTX *mem_ctx,
1710 struct dcerpc_wbint_AllocateUid_state *state = tevent_req_data(
1711 req, struct dcerpc_wbint_AllocateUid_state);
1714 if (tevent_req_is_nterror(req, &status)) {
1715 tevent_req_received(req);
1719 /* Steal possible out parameters to the callers context */
1720 talloc_steal(mem_ctx, state->out_mem_ctx);
1723 *result = state->orig.out.result;
1725 tevent_req_received(req);
1726 return NT_STATUS_OK;
1729 NTSTATUS dcerpc_wbint_AllocateUid(struct dcerpc_binding_handle *h,
1730 TALLOC_CTX *mem_ctx,
1731 uint64_t *_uid /* [out] [ref] */,
1734 struct wbint_AllocateUid r;
1739 status = dcerpc_wbint_AllocateUid_r(h, mem_ctx, &r);
1740 if (!NT_STATUS_IS_OK(status)) {
1744 /* Return variables */
1748 *result = r.out.result;
1750 return NT_STATUS_OK;
1753 struct dcerpc_wbint_AllocateGid_r_state {
1754 TALLOC_CTX *out_mem_ctx;
1757 static void dcerpc_wbint_AllocateGid_r_done(struct tevent_req *subreq);
1759 struct tevent_req *dcerpc_wbint_AllocateGid_r_send(TALLOC_CTX *mem_ctx,
1760 struct tevent_context *ev,
1761 struct dcerpc_binding_handle *h,
1762 struct wbint_AllocateGid *r)
1764 struct tevent_req *req;
1765 struct dcerpc_wbint_AllocateGid_r_state *state;
1766 struct tevent_req *subreq;
1768 req = tevent_req_create(mem_ctx, &state,
1769 struct dcerpc_wbint_AllocateGid_r_state);
1774 state->out_mem_ctx = talloc_new(state);
1775 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1776 return tevent_req_post(req, ev);
1779 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1780 NULL, &ndr_table_wbint,
1781 NDR_WBINT_ALLOCATEGID, state->out_mem_ctx, r);
1782 if (tevent_req_nomem(subreq, req)) {
1783 return tevent_req_post(req, ev);
1785 tevent_req_set_callback(subreq, dcerpc_wbint_AllocateGid_r_done, req);
1790 static void dcerpc_wbint_AllocateGid_r_done(struct tevent_req *subreq)
1792 struct tevent_req *req =
1793 tevent_req_callback_data(subreq,
1797 status = dcerpc_binding_handle_call_recv(subreq);
1798 TALLOC_FREE(subreq);
1799 if (tevent_req_nterror(req, status)) {
1803 tevent_req_done(req);
1806 NTSTATUS dcerpc_wbint_AllocateGid_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1808 struct dcerpc_wbint_AllocateGid_r_state *state =
1809 tevent_req_data(req,
1810 struct dcerpc_wbint_AllocateGid_r_state);
1813 if (tevent_req_is_nterror(req, &status)) {
1814 tevent_req_received(req);
1818 talloc_steal(mem_ctx, state->out_mem_ctx);
1820 tevent_req_received(req);
1821 return NT_STATUS_OK;
1824 NTSTATUS dcerpc_wbint_AllocateGid_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_AllocateGid *r)
1828 status = dcerpc_binding_handle_call(h,
1829 NULL, &ndr_table_wbint,
1830 NDR_WBINT_ALLOCATEGID, mem_ctx, r);
1835 struct dcerpc_wbint_AllocateGid_state {
1836 struct wbint_AllocateGid orig;
1837 struct wbint_AllocateGid tmp;
1838 TALLOC_CTX *out_mem_ctx;
1841 static void dcerpc_wbint_AllocateGid_done(struct tevent_req *subreq);
1843 struct tevent_req *dcerpc_wbint_AllocateGid_send(TALLOC_CTX *mem_ctx,
1844 struct tevent_context *ev,
1845 struct dcerpc_binding_handle *h,
1846 uint64_t *_gid /* [out] [ref] */)
1848 struct tevent_req *req;
1849 struct dcerpc_wbint_AllocateGid_state *state;
1850 struct tevent_req *subreq;
1852 req = tevent_req_create(mem_ctx, &state,
1853 struct dcerpc_wbint_AllocateGid_state);
1857 state->out_mem_ctx = NULL;
1861 /* Out parameters */
1862 state->orig.out.gid = _gid;
1865 ZERO_STRUCT(state->orig.out.result);
1867 state->out_mem_ctx = talloc_named_const(state, 0,
1868 "dcerpc_wbint_AllocateGid_out_memory");
1869 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1870 return tevent_req_post(req, ev);
1873 /* make a temporary copy, that we pass to the dispatch function */
1874 state->tmp = state->orig;
1876 subreq = dcerpc_wbint_AllocateGid_r_send(state, ev, h, &state->tmp);
1877 if (tevent_req_nomem(subreq, req)) {
1878 return tevent_req_post(req, ev);
1880 tevent_req_set_callback(subreq, dcerpc_wbint_AllocateGid_done, req);
1884 static void dcerpc_wbint_AllocateGid_done(struct tevent_req *subreq)
1886 struct tevent_req *req = tevent_req_callback_data(
1887 subreq, struct tevent_req);
1888 struct dcerpc_wbint_AllocateGid_state *state = tevent_req_data(
1889 req, struct dcerpc_wbint_AllocateGid_state);
1891 TALLOC_CTX *mem_ctx;
1893 if (state->out_mem_ctx) {
1894 mem_ctx = state->out_mem_ctx;
1899 status = dcerpc_wbint_AllocateGid_r_recv(subreq, mem_ctx);
1900 TALLOC_FREE(subreq);
1901 if (tevent_req_nterror(req, status)) {
1905 /* Copy out parameters */
1906 *state->orig.out.gid = *state->tmp.out.gid;
1909 state->orig.out.result = state->tmp.out.result;
1911 /* Reset temporary structure */
1912 ZERO_STRUCT(state->tmp);
1914 tevent_req_done(req);
1917 NTSTATUS dcerpc_wbint_AllocateGid_recv(struct tevent_req *req,
1918 TALLOC_CTX *mem_ctx,
1921 struct dcerpc_wbint_AllocateGid_state *state = tevent_req_data(
1922 req, struct dcerpc_wbint_AllocateGid_state);
1925 if (tevent_req_is_nterror(req, &status)) {
1926 tevent_req_received(req);
1930 /* Steal possible out parameters to the callers context */
1931 talloc_steal(mem_ctx, state->out_mem_ctx);
1934 *result = state->orig.out.result;
1936 tevent_req_received(req);
1937 return NT_STATUS_OK;
1940 NTSTATUS dcerpc_wbint_AllocateGid(struct dcerpc_binding_handle *h,
1941 TALLOC_CTX *mem_ctx,
1942 uint64_t *_gid /* [out] [ref] */,
1945 struct wbint_AllocateGid r;
1950 status = dcerpc_wbint_AllocateGid_r(h, mem_ctx, &r);
1951 if (!NT_STATUS_IS_OK(status)) {
1955 /* Return variables */
1959 *result = r.out.result;
1961 return NT_STATUS_OK;
1964 struct dcerpc_wbint_QueryUser_r_state {
1965 TALLOC_CTX *out_mem_ctx;
1968 static void dcerpc_wbint_QueryUser_r_done(struct tevent_req *subreq);
1970 struct tevent_req *dcerpc_wbint_QueryUser_r_send(TALLOC_CTX *mem_ctx,
1971 struct tevent_context *ev,
1972 struct dcerpc_binding_handle *h,
1973 struct wbint_QueryUser *r)
1975 struct tevent_req *req;
1976 struct dcerpc_wbint_QueryUser_r_state *state;
1977 struct tevent_req *subreq;
1979 req = tevent_req_create(mem_ctx, &state,
1980 struct dcerpc_wbint_QueryUser_r_state);
1985 state->out_mem_ctx = talloc_new(state);
1986 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1987 return tevent_req_post(req, ev);
1990 subreq = dcerpc_binding_handle_call_send(state, ev, h,
1991 NULL, &ndr_table_wbint,
1992 NDR_WBINT_QUERYUSER, state->out_mem_ctx, r);
1993 if (tevent_req_nomem(subreq, req)) {
1994 return tevent_req_post(req, ev);
1996 tevent_req_set_callback(subreq, dcerpc_wbint_QueryUser_r_done, req);
2001 static void dcerpc_wbint_QueryUser_r_done(struct tevent_req *subreq)
2003 struct tevent_req *req =
2004 tevent_req_callback_data(subreq,
2008 status = dcerpc_binding_handle_call_recv(subreq);
2009 TALLOC_FREE(subreq);
2010 if (tevent_req_nterror(req, status)) {
2014 tevent_req_done(req);
2017 NTSTATUS dcerpc_wbint_QueryUser_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2019 struct dcerpc_wbint_QueryUser_r_state *state =
2020 tevent_req_data(req,
2021 struct dcerpc_wbint_QueryUser_r_state);
2024 if (tevent_req_is_nterror(req, &status)) {
2025 tevent_req_received(req);
2029 talloc_steal(mem_ctx, state->out_mem_ctx);
2031 tevent_req_received(req);
2032 return NT_STATUS_OK;
2035 NTSTATUS dcerpc_wbint_QueryUser_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QueryUser *r)
2039 status = dcerpc_binding_handle_call(h,
2040 NULL, &ndr_table_wbint,
2041 NDR_WBINT_QUERYUSER, mem_ctx, r);
2046 struct dcerpc_wbint_QueryUser_state {
2047 struct wbint_QueryUser orig;
2048 struct wbint_QueryUser tmp;
2049 TALLOC_CTX *out_mem_ctx;
2052 static void dcerpc_wbint_QueryUser_done(struct tevent_req *subreq);
2054 struct tevent_req *dcerpc_wbint_QueryUser_send(TALLOC_CTX *mem_ctx,
2055 struct tevent_context *ev,
2056 struct dcerpc_binding_handle *h,
2057 struct dom_sid *_sid /* [in] [ref] */,
2058 struct wbint_userinfo *_info /* [out] [ref] */)
2060 struct tevent_req *req;
2061 struct dcerpc_wbint_QueryUser_state *state;
2062 struct tevent_req *subreq;
2064 req = tevent_req_create(mem_ctx, &state,
2065 struct dcerpc_wbint_QueryUser_state);
2069 state->out_mem_ctx = NULL;
2072 state->orig.in.sid = _sid;
2074 /* Out parameters */
2075 state->orig.out.info = _info;
2078 ZERO_STRUCT(state->orig.out.result);
2080 state->out_mem_ctx = talloc_named_const(state, 0,
2081 "dcerpc_wbint_QueryUser_out_memory");
2082 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2083 return tevent_req_post(req, ev);
2086 /* make a temporary copy, that we pass to the dispatch function */
2087 state->tmp = state->orig;
2089 subreq = dcerpc_wbint_QueryUser_r_send(state, ev, h, &state->tmp);
2090 if (tevent_req_nomem(subreq, req)) {
2091 return tevent_req_post(req, ev);
2093 tevent_req_set_callback(subreq, dcerpc_wbint_QueryUser_done, req);
2097 static void dcerpc_wbint_QueryUser_done(struct tevent_req *subreq)
2099 struct tevent_req *req = tevent_req_callback_data(
2100 subreq, struct tevent_req);
2101 struct dcerpc_wbint_QueryUser_state *state = tevent_req_data(
2102 req, struct dcerpc_wbint_QueryUser_state);
2104 TALLOC_CTX *mem_ctx;
2106 if (state->out_mem_ctx) {
2107 mem_ctx = state->out_mem_ctx;
2112 status = dcerpc_wbint_QueryUser_r_recv(subreq, mem_ctx);
2113 TALLOC_FREE(subreq);
2114 if (tevent_req_nterror(req, status)) {
2118 /* Copy out parameters */
2119 *state->orig.out.info = *state->tmp.out.info;
2122 state->orig.out.result = state->tmp.out.result;
2124 /* Reset temporary structure */
2125 ZERO_STRUCT(state->tmp);
2127 tevent_req_done(req);
2130 NTSTATUS dcerpc_wbint_QueryUser_recv(struct tevent_req *req,
2131 TALLOC_CTX *mem_ctx,
2134 struct dcerpc_wbint_QueryUser_state *state = tevent_req_data(
2135 req, struct dcerpc_wbint_QueryUser_state);
2138 if (tevent_req_is_nterror(req, &status)) {
2139 tevent_req_received(req);
2143 /* Steal possible out parameters to the callers context */
2144 talloc_steal(mem_ctx, state->out_mem_ctx);
2147 *result = state->orig.out.result;
2149 tevent_req_received(req);
2150 return NT_STATUS_OK;
2153 NTSTATUS dcerpc_wbint_QueryUser(struct dcerpc_binding_handle *h,
2154 TALLOC_CTX *mem_ctx,
2155 struct dom_sid *_sid /* [in] [ref] */,
2156 struct wbint_userinfo *_info /* [out] [ref] */,
2159 struct wbint_QueryUser r;
2165 status = dcerpc_wbint_QueryUser_r(h, mem_ctx, &r);
2166 if (!NT_STATUS_IS_OK(status)) {
2170 /* Return variables */
2171 *_info = *r.out.info;
2174 *result = r.out.result;
2176 return NT_STATUS_OK;
2179 struct dcerpc_wbint_LookupUserAliases_r_state {
2180 TALLOC_CTX *out_mem_ctx;
2183 static void dcerpc_wbint_LookupUserAliases_r_done(struct tevent_req *subreq);
2185 struct tevent_req *dcerpc_wbint_LookupUserAliases_r_send(TALLOC_CTX *mem_ctx,
2186 struct tevent_context *ev,
2187 struct dcerpc_binding_handle *h,
2188 struct wbint_LookupUserAliases *r)
2190 struct tevent_req *req;
2191 struct dcerpc_wbint_LookupUserAliases_r_state *state;
2192 struct tevent_req *subreq;
2194 req = tevent_req_create(mem_ctx, &state,
2195 struct dcerpc_wbint_LookupUserAliases_r_state);
2200 state->out_mem_ctx = talloc_new(state);
2201 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2202 return tevent_req_post(req, ev);
2205 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2206 NULL, &ndr_table_wbint,
2207 NDR_WBINT_LOOKUPUSERALIASES, state->out_mem_ctx, r);
2208 if (tevent_req_nomem(subreq, req)) {
2209 return tevent_req_post(req, ev);
2211 tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserAliases_r_done, req);
2216 static void dcerpc_wbint_LookupUserAliases_r_done(struct tevent_req *subreq)
2218 struct tevent_req *req =
2219 tevent_req_callback_data(subreq,
2223 status = dcerpc_binding_handle_call_recv(subreq);
2224 TALLOC_FREE(subreq);
2225 if (tevent_req_nterror(req, status)) {
2229 tevent_req_done(req);
2232 NTSTATUS dcerpc_wbint_LookupUserAliases_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2234 struct dcerpc_wbint_LookupUserAliases_r_state *state =
2235 tevent_req_data(req,
2236 struct dcerpc_wbint_LookupUserAliases_r_state);
2239 if (tevent_req_is_nterror(req, &status)) {
2240 tevent_req_received(req);
2244 talloc_steal(mem_ctx, state->out_mem_ctx);
2246 tevent_req_received(req);
2247 return NT_STATUS_OK;
2250 NTSTATUS dcerpc_wbint_LookupUserAliases_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupUserAliases *r)
2254 status = dcerpc_binding_handle_call(h,
2255 NULL, &ndr_table_wbint,
2256 NDR_WBINT_LOOKUPUSERALIASES, mem_ctx, r);
2261 struct dcerpc_wbint_LookupUserAliases_state {
2262 struct wbint_LookupUserAliases orig;
2263 struct wbint_LookupUserAliases tmp;
2264 TALLOC_CTX *out_mem_ctx;
2267 static void dcerpc_wbint_LookupUserAliases_done(struct tevent_req *subreq);
2269 struct tevent_req *dcerpc_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx,
2270 struct tevent_context *ev,
2271 struct dcerpc_binding_handle *h,
2272 struct wbint_SidArray *_sids /* [in] [ref] */,
2273 struct wbint_RidArray *_rids /* [out] [ref] */)
2275 struct tevent_req *req;
2276 struct dcerpc_wbint_LookupUserAliases_state *state;
2277 struct tevent_req *subreq;
2279 req = tevent_req_create(mem_ctx, &state,
2280 struct dcerpc_wbint_LookupUserAliases_state);
2284 state->out_mem_ctx = NULL;
2287 state->orig.in.sids = _sids;
2289 /* Out parameters */
2290 state->orig.out.rids = _rids;
2293 ZERO_STRUCT(state->orig.out.result);
2295 state->out_mem_ctx = talloc_named_const(state, 0,
2296 "dcerpc_wbint_LookupUserAliases_out_memory");
2297 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2298 return tevent_req_post(req, ev);
2301 /* make a temporary copy, that we pass to the dispatch function */
2302 state->tmp = state->orig;
2304 subreq = dcerpc_wbint_LookupUserAliases_r_send(state, ev, h, &state->tmp);
2305 if (tevent_req_nomem(subreq, req)) {
2306 return tevent_req_post(req, ev);
2308 tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserAliases_done, req);
2312 static void dcerpc_wbint_LookupUserAliases_done(struct tevent_req *subreq)
2314 struct tevent_req *req = tevent_req_callback_data(
2315 subreq, struct tevent_req);
2316 struct dcerpc_wbint_LookupUserAliases_state *state = tevent_req_data(
2317 req, struct dcerpc_wbint_LookupUserAliases_state);
2319 TALLOC_CTX *mem_ctx;
2321 if (state->out_mem_ctx) {
2322 mem_ctx = state->out_mem_ctx;
2327 status = dcerpc_wbint_LookupUserAliases_r_recv(subreq, mem_ctx);
2328 TALLOC_FREE(subreq);
2329 if (tevent_req_nterror(req, status)) {
2333 /* Copy out parameters */
2334 *state->orig.out.rids = *state->tmp.out.rids;
2337 state->orig.out.result = state->tmp.out.result;
2339 /* Reset temporary structure */
2340 ZERO_STRUCT(state->tmp);
2342 tevent_req_done(req);
2345 NTSTATUS dcerpc_wbint_LookupUserAliases_recv(struct tevent_req *req,
2346 TALLOC_CTX *mem_ctx,
2349 struct dcerpc_wbint_LookupUserAliases_state *state = tevent_req_data(
2350 req, struct dcerpc_wbint_LookupUserAliases_state);
2353 if (tevent_req_is_nterror(req, &status)) {
2354 tevent_req_received(req);
2358 /* Steal possible out parameters to the callers context */
2359 talloc_steal(mem_ctx, state->out_mem_ctx);
2362 *result = state->orig.out.result;
2364 tevent_req_received(req);
2365 return NT_STATUS_OK;
2368 NTSTATUS dcerpc_wbint_LookupUserAliases(struct dcerpc_binding_handle *h,
2369 TALLOC_CTX *mem_ctx,
2370 struct wbint_SidArray *_sids /* [in] [ref] */,
2371 struct wbint_RidArray *_rids /* [out] [ref] */,
2374 struct wbint_LookupUserAliases r;
2380 status = dcerpc_wbint_LookupUserAliases_r(h, mem_ctx, &r);
2381 if (!NT_STATUS_IS_OK(status)) {
2385 /* Return variables */
2386 *_rids = *r.out.rids;
2389 *result = r.out.result;
2391 return NT_STATUS_OK;
2394 struct dcerpc_wbint_LookupUserGroups_r_state {
2395 TALLOC_CTX *out_mem_ctx;
2398 static void dcerpc_wbint_LookupUserGroups_r_done(struct tevent_req *subreq);
2400 struct tevent_req *dcerpc_wbint_LookupUserGroups_r_send(TALLOC_CTX *mem_ctx,
2401 struct tevent_context *ev,
2402 struct dcerpc_binding_handle *h,
2403 struct wbint_LookupUserGroups *r)
2405 struct tevent_req *req;
2406 struct dcerpc_wbint_LookupUserGroups_r_state *state;
2407 struct tevent_req *subreq;
2409 req = tevent_req_create(mem_ctx, &state,
2410 struct dcerpc_wbint_LookupUserGroups_r_state);
2415 state->out_mem_ctx = talloc_new(state);
2416 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2417 return tevent_req_post(req, ev);
2420 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2421 NULL, &ndr_table_wbint,
2422 NDR_WBINT_LOOKUPUSERGROUPS, state->out_mem_ctx, r);
2423 if (tevent_req_nomem(subreq, req)) {
2424 return tevent_req_post(req, ev);
2426 tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserGroups_r_done, req);
2431 static void dcerpc_wbint_LookupUserGroups_r_done(struct tevent_req *subreq)
2433 struct tevent_req *req =
2434 tevent_req_callback_data(subreq,
2438 status = dcerpc_binding_handle_call_recv(subreq);
2439 TALLOC_FREE(subreq);
2440 if (tevent_req_nterror(req, status)) {
2444 tevent_req_done(req);
2447 NTSTATUS dcerpc_wbint_LookupUserGroups_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2449 struct dcerpc_wbint_LookupUserGroups_r_state *state =
2450 tevent_req_data(req,
2451 struct dcerpc_wbint_LookupUserGroups_r_state);
2454 if (tevent_req_is_nterror(req, &status)) {
2455 tevent_req_received(req);
2459 talloc_steal(mem_ctx, state->out_mem_ctx);
2461 tevent_req_received(req);
2462 return NT_STATUS_OK;
2465 NTSTATUS dcerpc_wbint_LookupUserGroups_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupUserGroups *r)
2469 status = dcerpc_binding_handle_call(h,
2470 NULL, &ndr_table_wbint,
2471 NDR_WBINT_LOOKUPUSERGROUPS, mem_ctx, r);
2476 struct dcerpc_wbint_LookupUserGroups_state {
2477 struct wbint_LookupUserGroups orig;
2478 struct wbint_LookupUserGroups tmp;
2479 TALLOC_CTX *out_mem_ctx;
2482 static void dcerpc_wbint_LookupUserGroups_done(struct tevent_req *subreq);
2484 struct tevent_req *dcerpc_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx,
2485 struct tevent_context *ev,
2486 struct dcerpc_binding_handle *h,
2487 struct dom_sid *_sid /* [in] [ref] */,
2488 struct wbint_SidArray *_sids /* [out] [ref] */)
2490 struct tevent_req *req;
2491 struct dcerpc_wbint_LookupUserGroups_state *state;
2492 struct tevent_req *subreq;
2494 req = tevent_req_create(mem_ctx, &state,
2495 struct dcerpc_wbint_LookupUserGroups_state);
2499 state->out_mem_ctx = NULL;
2502 state->orig.in.sid = _sid;
2504 /* Out parameters */
2505 state->orig.out.sids = _sids;
2508 ZERO_STRUCT(state->orig.out.result);
2510 state->out_mem_ctx = talloc_named_const(state, 0,
2511 "dcerpc_wbint_LookupUserGroups_out_memory");
2512 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2513 return tevent_req_post(req, ev);
2516 /* make a temporary copy, that we pass to the dispatch function */
2517 state->tmp = state->orig;
2519 subreq = dcerpc_wbint_LookupUserGroups_r_send(state, ev, h, &state->tmp);
2520 if (tevent_req_nomem(subreq, req)) {
2521 return tevent_req_post(req, ev);
2523 tevent_req_set_callback(subreq, dcerpc_wbint_LookupUserGroups_done, req);
2527 static void dcerpc_wbint_LookupUserGroups_done(struct tevent_req *subreq)
2529 struct tevent_req *req = tevent_req_callback_data(
2530 subreq, struct tevent_req);
2531 struct dcerpc_wbint_LookupUserGroups_state *state = tevent_req_data(
2532 req, struct dcerpc_wbint_LookupUserGroups_state);
2534 TALLOC_CTX *mem_ctx;
2536 if (state->out_mem_ctx) {
2537 mem_ctx = state->out_mem_ctx;
2542 status = dcerpc_wbint_LookupUserGroups_r_recv(subreq, mem_ctx);
2543 TALLOC_FREE(subreq);
2544 if (tevent_req_nterror(req, status)) {
2548 /* Copy out parameters */
2549 *state->orig.out.sids = *state->tmp.out.sids;
2552 state->orig.out.result = state->tmp.out.result;
2554 /* Reset temporary structure */
2555 ZERO_STRUCT(state->tmp);
2557 tevent_req_done(req);
2560 NTSTATUS dcerpc_wbint_LookupUserGroups_recv(struct tevent_req *req,
2561 TALLOC_CTX *mem_ctx,
2564 struct dcerpc_wbint_LookupUserGroups_state *state = tevent_req_data(
2565 req, struct dcerpc_wbint_LookupUserGroups_state);
2568 if (tevent_req_is_nterror(req, &status)) {
2569 tevent_req_received(req);
2573 /* Steal possible out parameters to the callers context */
2574 talloc_steal(mem_ctx, state->out_mem_ctx);
2577 *result = state->orig.out.result;
2579 tevent_req_received(req);
2580 return NT_STATUS_OK;
2583 NTSTATUS dcerpc_wbint_LookupUserGroups(struct dcerpc_binding_handle *h,
2584 TALLOC_CTX *mem_ctx,
2585 struct dom_sid *_sid /* [in] [ref] */,
2586 struct wbint_SidArray *_sids /* [out] [ref] */,
2589 struct wbint_LookupUserGroups r;
2595 status = dcerpc_wbint_LookupUserGroups_r(h, mem_ctx, &r);
2596 if (!NT_STATUS_IS_OK(status)) {
2600 /* Return variables */
2601 *_sids = *r.out.sids;
2604 *result = r.out.result;
2606 return NT_STATUS_OK;
2609 struct dcerpc_wbint_QuerySequenceNumber_r_state {
2610 TALLOC_CTX *out_mem_ctx;
2613 static void dcerpc_wbint_QuerySequenceNumber_r_done(struct tevent_req *subreq);
2615 struct tevent_req *dcerpc_wbint_QuerySequenceNumber_r_send(TALLOC_CTX *mem_ctx,
2616 struct tevent_context *ev,
2617 struct dcerpc_binding_handle *h,
2618 struct wbint_QuerySequenceNumber *r)
2620 struct tevent_req *req;
2621 struct dcerpc_wbint_QuerySequenceNumber_r_state *state;
2622 struct tevent_req *subreq;
2624 req = tevent_req_create(mem_ctx, &state,
2625 struct dcerpc_wbint_QuerySequenceNumber_r_state);
2630 state->out_mem_ctx = talloc_new(state);
2631 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2632 return tevent_req_post(req, ev);
2635 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2636 NULL, &ndr_table_wbint,
2637 NDR_WBINT_QUERYSEQUENCENUMBER, state->out_mem_ctx, r);
2638 if (tevent_req_nomem(subreq, req)) {
2639 return tevent_req_post(req, ev);
2641 tevent_req_set_callback(subreq, dcerpc_wbint_QuerySequenceNumber_r_done, req);
2646 static void dcerpc_wbint_QuerySequenceNumber_r_done(struct tevent_req *subreq)
2648 struct tevent_req *req =
2649 tevent_req_callback_data(subreq,
2653 status = dcerpc_binding_handle_call_recv(subreq);
2654 TALLOC_FREE(subreq);
2655 if (tevent_req_nterror(req, status)) {
2659 tevent_req_done(req);
2662 NTSTATUS dcerpc_wbint_QuerySequenceNumber_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2664 struct dcerpc_wbint_QuerySequenceNumber_r_state *state =
2665 tevent_req_data(req,
2666 struct dcerpc_wbint_QuerySequenceNumber_r_state);
2669 if (tevent_req_is_nterror(req, &status)) {
2670 tevent_req_received(req);
2674 talloc_steal(mem_ctx, state->out_mem_ctx);
2676 tevent_req_received(req);
2677 return NT_STATUS_OK;
2680 NTSTATUS dcerpc_wbint_QuerySequenceNumber_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QuerySequenceNumber *r)
2684 status = dcerpc_binding_handle_call(h,
2685 NULL, &ndr_table_wbint,
2686 NDR_WBINT_QUERYSEQUENCENUMBER, mem_ctx, r);
2691 struct dcerpc_wbint_QuerySequenceNumber_state {
2692 struct wbint_QuerySequenceNumber orig;
2693 struct wbint_QuerySequenceNumber tmp;
2694 TALLOC_CTX *out_mem_ctx;
2697 static void dcerpc_wbint_QuerySequenceNumber_done(struct tevent_req *subreq);
2699 struct tevent_req *dcerpc_wbint_QuerySequenceNumber_send(TALLOC_CTX *mem_ctx,
2700 struct tevent_context *ev,
2701 struct dcerpc_binding_handle *h,
2702 uint32_t *_sequence /* [out] [ref] */)
2704 struct tevent_req *req;
2705 struct dcerpc_wbint_QuerySequenceNumber_state *state;
2706 struct tevent_req *subreq;
2708 req = tevent_req_create(mem_ctx, &state,
2709 struct dcerpc_wbint_QuerySequenceNumber_state);
2713 state->out_mem_ctx = NULL;
2717 /* Out parameters */
2718 state->orig.out.sequence = _sequence;
2721 ZERO_STRUCT(state->orig.out.result);
2723 state->out_mem_ctx = talloc_named_const(state, 0,
2724 "dcerpc_wbint_QuerySequenceNumber_out_memory");
2725 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2726 return tevent_req_post(req, ev);
2729 /* make a temporary copy, that we pass to the dispatch function */
2730 state->tmp = state->orig;
2732 subreq = dcerpc_wbint_QuerySequenceNumber_r_send(state, ev, h, &state->tmp);
2733 if (tevent_req_nomem(subreq, req)) {
2734 return tevent_req_post(req, ev);
2736 tevent_req_set_callback(subreq, dcerpc_wbint_QuerySequenceNumber_done, req);
2740 static void dcerpc_wbint_QuerySequenceNumber_done(struct tevent_req *subreq)
2742 struct tevent_req *req = tevent_req_callback_data(
2743 subreq, struct tevent_req);
2744 struct dcerpc_wbint_QuerySequenceNumber_state *state = tevent_req_data(
2745 req, struct dcerpc_wbint_QuerySequenceNumber_state);
2747 TALLOC_CTX *mem_ctx;
2749 if (state->out_mem_ctx) {
2750 mem_ctx = state->out_mem_ctx;
2755 status = dcerpc_wbint_QuerySequenceNumber_r_recv(subreq, mem_ctx);
2756 TALLOC_FREE(subreq);
2757 if (tevent_req_nterror(req, status)) {
2761 /* Copy out parameters */
2762 *state->orig.out.sequence = *state->tmp.out.sequence;
2765 state->orig.out.result = state->tmp.out.result;
2767 /* Reset temporary structure */
2768 ZERO_STRUCT(state->tmp);
2770 tevent_req_done(req);
2773 NTSTATUS dcerpc_wbint_QuerySequenceNumber_recv(struct tevent_req *req,
2774 TALLOC_CTX *mem_ctx,
2777 struct dcerpc_wbint_QuerySequenceNumber_state *state = tevent_req_data(
2778 req, struct dcerpc_wbint_QuerySequenceNumber_state);
2781 if (tevent_req_is_nterror(req, &status)) {
2782 tevent_req_received(req);
2786 /* Steal possible out parameters to the callers context */
2787 talloc_steal(mem_ctx, state->out_mem_ctx);
2790 *result = state->orig.out.result;
2792 tevent_req_received(req);
2793 return NT_STATUS_OK;
2796 NTSTATUS dcerpc_wbint_QuerySequenceNumber(struct dcerpc_binding_handle *h,
2797 TALLOC_CTX *mem_ctx,
2798 uint32_t *_sequence /* [out] [ref] */,
2801 struct wbint_QuerySequenceNumber r;
2806 status = dcerpc_wbint_QuerySequenceNumber_r(h, mem_ctx, &r);
2807 if (!NT_STATUS_IS_OK(status)) {
2811 /* Return variables */
2812 *_sequence = *r.out.sequence;
2815 *result = r.out.result;
2817 return NT_STATUS_OK;
2820 struct dcerpc_wbint_LookupGroupMembers_r_state {
2821 TALLOC_CTX *out_mem_ctx;
2824 static void dcerpc_wbint_LookupGroupMembers_r_done(struct tevent_req *subreq);
2826 struct tevent_req *dcerpc_wbint_LookupGroupMembers_r_send(TALLOC_CTX *mem_ctx,
2827 struct tevent_context *ev,
2828 struct dcerpc_binding_handle *h,
2829 struct wbint_LookupGroupMembers *r)
2831 struct tevent_req *req;
2832 struct dcerpc_wbint_LookupGroupMembers_r_state *state;
2833 struct tevent_req *subreq;
2835 req = tevent_req_create(mem_ctx, &state,
2836 struct dcerpc_wbint_LookupGroupMembers_r_state);
2841 state->out_mem_ctx = talloc_new(state);
2842 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2843 return tevent_req_post(req, ev);
2846 subreq = dcerpc_binding_handle_call_send(state, ev, h,
2847 NULL, &ndr_table_wbint,
2848 NDR_WBINT_LOOKUPGROUPMEMBERS, state->out_mem_ctx, r);
2849 if (tevent_req_nomem(subreq, req)) {
2850 return tevent_req_post(req, ev);
2852 tevent_req_set_callback(subreq, dcerpc_wbint_LookupGroupMembers_r_done, req);
2857 static void dcerpc_wbint_LookupGroupMembers_r_done(struct tevent_req *subreq)
2859 struct tevent_req *req =
2860 tevent_req_callback_data(subreq,
2864 status = dcerpc_binding_handle_call_recv(subreq);
2865 TALLOC_FREE(subreq);
2866 if (tevent_req_nterror(req, status)) {
2870 tevent_req_done(req);
2873 NTSTATUS dcerpc_wbint_LookupGroupMembers_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2875 struct dcerpc_wbint_LookupGroupMembers_r_state *state =
2876 tevent_req_data(req,
2877 struct dcerpc_wbint_LookupGroupMembers_r_state);
2880 if (tevent_req_is_nterror(req, &status)) {
2881 tevent_req_received(req);
2885 talloc_steal(mem_ctx, state->out_mem_ctx);
2887 tevent_req_received(req);
2888 return NT_STATUS_OK;
2891 NTSTATUS dcerpc_wbint_LookupGroupMembers_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupGroupMembers *r)
2895 status = dcerpc_binding_handle_call(h,
2896 NULL, &ndr_table_wbint,
2897 NDR_WBINT_LOOKUPGROUPMEMBERS, mem_ctx, r);
2902 struct dcerpc_wbint_LookupGroupMembers_state {
2903 struct wbint_LookupGroupMembers orig;
2904 struct wbint_LookupGroupMembers tmp;
2905 TALLOC_CTX *out_mem_ctx;
2908 static void dcerpc_wbint_LookupGroupMembers_done(struct tevent_req *subreq);
2910 struct tevent_req *dcerpc_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
2911 struct tevent_context *ev,
2912 struct dcerpc_binding_handle *h,
2913 struct dom_sid *_sid /* [in] [ref] */,
2914 enum lsa_SidType _type /* [in] */,
2915 struct wbint_Principals *_members /* [out] [ref] */)
2917 struct tevent_req *req;
2918 struct dcerpc_wbint_LookupGroupMembers_state *state;
2919 struct tevent_req *subreq;
2921 req = tevent_req_create(mem_ctx, &state,
2922 struct dcerpc_wbint_LookupGroupMembers_state);
2926 state->out_mem_ctx = NULL;
2929 state->orig.in.sid = _sid;
2930 state->orig.in.type = _type;
2932 /* Out parameters */
2933 state->orig.out.members = _members;
2936 ZERO_STRUCT(state->orig.out.result);
2938 state->out_mem_ctx = talloc_named_const(state, 0,
2939 "dcerpc_wbint_LookupGroupMembers_out_memory");
2940 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2941 return tevent_req_post(req, ev);
2944 /* make a temporary copy, that we pass to the dispatch function */
2945 state->tmp = state->orig;
2947 subreq = dcerpc_wbint_LookupGroupMembers_r_send(state, ev, h, &state->tmp);
2948 if (tevent_req_nomem(subreq, req)) {
2949 return tevent_req_post(req, ev);
2951 tevent_req_set_callback(subreq, dcerpc_wbint_LookupGroupMembers_done, req);
2955 static void dcerpc_wbint_LookupGroupMembers_done(struct tevent_req *subreq)
2957 struct tevent_req *req = tevent_req_callback_data(
2958 subreq, struct tevent_req);
2959 struct dcerpc_wbint_LookupGroupMembers_state *state = tevent_req_data(
2960 req, struct dcerpc_wbint_LookupGroupMembers_state);
2962 TALLOC_CTX *mem_ctx;
2964 if (state->out_mem_ctx) {
2965 mem_ctx = state->out_mem_ctx;
2970 status = dcerpc_wbint_LookupGroupMembers_r_recv(subreq, mem_ctx);
2971 TALLOC_FREE(subreq);
2972 if (tevent_req_nterror(req, status)) {
2976 /* Copy out parameters */
2977 *state->orig.out.members = *state->tmp.out.members;
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 dcerpc_wbint_LookupGroupMembers_recv(struct tevent_req *req,
2989 TALLOC_CTX *mem_ctx,
2992 struct dcerpc_wbint_LookupGroupMembers_state *state = tevent_req_data(
2993 req, struct dcerpc_wbint_LookupGroupMembers_state);
2996 if (tevent_req_is_nterror(req, &status)) {
2997 tevent_req_received(req);
3001 /* Steal possible 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 dcerpc_wbint_LookupGroupMembers(struct dcerpc_binding_handle *h,
3012 TALLOC_CTX *mem_ctx,
3013 struct dom_sid *_sid /* [in] [ref] */,
3014 enum lsa_SidType _type /* [in] */,
3015 struct wbint_Principals *_members /* [out] [ref] */,
3018 struct wbint_LookupGroupMembers r;
3025 status = dcerpc_wbint_LookupGroupMembers_r(h, mem_ctx, &r);
3026 if (!NT_STATUS_IS_OK(status)) {
3030 /* Return variables */
3031 *_members = *r.out.members;
3034 *result = r.out.result;
3036 return NT_STATUS_OK;
3039 struct dcerpc_wbint_QueryUserList_r_state {
3040 TALLOC_CTX *out_mem_ctx;
3043 static void dcerpc_wbint_QueryUserList_r_done(struct tevent_req *subreq);
3045 struct tevent_req *dcerpc_wbint_QueryUserList_r_send(TALLOC_CTX *mem_ctx,
3046 struct tevent_context *ev,
3047 struct dcerpc_binding_handle *h,
3048 struct wbint_QueryUserList *r)
3050 struct tevent_req *req;
3051 struct dcerpc_wbint_QueryUserList_r_state *state;
3052 struct tevent_req *subreq;
3054 req = tevent_req_create(mem_ctx, &state,
3055 struct dcerpc_wbint_QueryUserList_r_state);
3060 state->out_mem_ctx = talloc_new(state);
3061 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3062 return tevent_req_post(req, ev);
3065 subreq = dcerpc_binding_handle_call_send(state, ev, h,
3066 NULL, &ndr_table_wbint,
3067 NDR_WBINT_QUERYUSERLIST, state->out_mem_ctx, r);
3068 if (tevent_req_nomem(subreq, req)) {
3069 return tevent_req_post(req, ev);
3071 tevent_req_set_callback(subreq, dcerpc_wbint_QueryUserList_r_done, req);
3076 static void dcerpc_wbint_QueryUserList_r_done(struct tevent_req *subreq)
3078 struct tevent_req *req =
3079 tevent_req_callback_data(subreq,
3083 status = dcerpc_binding_handle_call_recv(subreq);
3084 TALLOC_FREE(subreq);
3085 if (tevent_req_nterror(req, status)) {
3089 tevent_req_done(req);
3092 NTSTATUS dcerpc_wbint_QueryUserList_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3094 struct dcerpc_wbint_QueryUserList_r_state *state =
3095 tevent_req_data(req,
3096 struct dcerpc_wbint_QueryUserList_r_state);
3099 if (tevent_req_is_nterror(req, &status)) {
3100 tevent_req_received(req);
3104 talloc_steal(mem_ctx, state->out_mem_ctx);
3106 tevent_req_received(req);
3107 return NT_STATUS_OK;
3110 NTSTATUS dcerpc_wbint_QueryUserList_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QueryUserList *r)
3114 status = dcerpc_binding_handle_call(h,
3115 NULL, &ndr_table_wbint,
3116 NDR_WBINT_QUERYUSERLIST, mem_ctx, r);
3121 struct dcerpc_wbint_QueryUserList_state {
3122 struct wbint_QueryUserList orig;
3123 struct wbint_QueryUserList tmp;
3124 TALLOC_CTX *out_mem_ctx;
3127 static void dcerpc_wbint_QueryUserList_done(struct tevent_req *subreq);
3129 struct tevent_req *dcerpc_wbint_QueryUserList_send(TALLOC_CTX *mem_ctx,
3130 struct tevent_context *ev,
3131 struct dcerpc_binding_handle *h,
3132 struct wbint_userinfos *_users /* [out] [ref] */)
3134 struct tevent_req *req;
3135 struct dcerpc_wbint_QueryUserList_state *state;
3136 struct tevent_req *subreq;
3138 req = tevent_req_create(mem_ctx, &state,
3139 struct dcerpc_wbint_QueryUserList_state);
3143 state->out_mem_ctx = NULL;
3147 /* Out parameters */
3148 state->orig.out.users = _users;
3151 ZERO_STRUCT(state->orig.out.result);
3153 state->out_mem_ctx = talloc_named_const(state, 0,
3154 "dcerpc_wbint_QueryUserList_out_memory");
3155 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3156 return tevent_req_post(req, ev);
3159 /* make a temporary copy, that we pass to the dispatch function */
3160 state->tmp = state->orig;
3162 subreq = dcerpc_wbint_QueryUserList_r_send(state, ev, h, &state->tmp);
3163 if (tevent_req_nomem(subreq, req)) {
3164 return tevent_req_post(req, ev);
3166 tevent_req_set_callback(subreq, dcerpc_wbint_QueryUserList_done, req);
3170 static void dcerpc_wbint_QueryUserList_done(struct tevent_req *subreq)
3172 struct tevent_req *req = tevent_req_callback_data(
3173 subreq, struct tevent_req);
3174 struct dcerpc_wbint_QueryUserList_state *state = tevent_req_data(
3175 req, struct dcerpc_wbint_QueryUserList_state);
3177 TALLOC_CTX *mem_ctx;
3179 if (state->out_mem_ctx) {
3180 mem_ctx = state->out_mem_ctx;
3185 status = dcerpc_wbint_QueryUserList_r_recv(subreq, mem_ctx);
3186 TALLOC_FREE(subreq);
3187 if (tevent_req_nterror(req, status)) {
3191 /* Copy out parameters */
3192 *state->orig.out.users = *state->tmp.out.users;
3195 state->orig.out.result = state->tmp.out.result;
3197 /* Reset temporary structure */
3198 ZERO_STRUCT(state->tmp);
3200 tevent_req_done(req);
3203 NTSTATUS dcerpc_wbint_QueryUserList_recv(struct tevent_req *req,
3204 TALLOC_CTX *mem_ctx,
3207 struct dcerpc_wbint_QueryUserList_state *state = tevent_req_data(
3208 req, struct dcerpc_wbint_QueryUserList_state);
3211 if (tevent_req_is_nterror(req, &status)) {
3212 tevent_req_received(req);
3216 /* Steal possible out parameters to the callers context */
3217 talloc_steal(mem_ctx, state->out_mem_ctx);
3220 *result = state->orig.out.result;
3222 tevent_req_received(req);
3223 return NT_STATUS_OK;
3226 NTSTATUS dcerpc_wbint_QueryUserList(struct dcerpc_binding_handle *h,
3227 TALLOC_CTX *mem_ctx,
3228 struct wbint_userinfos *_users /* [out] [ref] */,
3231 struct wbint_QueryUserList r;
3236 status = dcerpc_wbint_QueryUserList_r(h, mem_ctx, &r);
3237 if (!NT_STATUS_IS_OK(status)) {
3241 /* Return variables */
3242 *_users = *r.out.users;
3245 *result = r.out.result;
3247 return NT_STATUS_OK;
3250 struct dcerpc_wbint_QueryGroupList_r_state {
3251 TALLOC_CTX *out_mem_ctx;
3254 static void dcerpc_wbint_QueryGroupList_r_done(struct tevent_req *subreq);
3256 struct tevent_req *dcerpc_wbint_QueryGroupList_r_send(TALLOC_CTX *mem_ctx,
3257 struct tevent_context *ev,
3258 struct dcerpc_binding_handle *h,
3259 struct wbint_QueryGroupList *r)
3261 struct tevent_req *req;
3262 struct dcerpc_wbint_QueryGroupList_r_state *state;
3263 struct tevent_req *subreq;
3265 req = tevent_req_create(mem_ctx, &state,
3266 struct dcerpc_wbint_QueryGroupList_r_state);
3271 state->out_mem_ctx = talloc_new(state);
3272 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3273 return tevent_req_post(req, ev);
3276 subreq = dcerpc_binding_handle_call_send(state, ev, h,
3277 NULL, &ndr_table_wbint,
3278 NDR_WBINT_QUERYGROUPLIST, state->out_mem_ctx, r);
3279 if (tevent_req_nomem(subreq, req)) {
3280 return tevent_req_post(req, ev);
3282 tevent_req_set_callback(subreq, dcerpc_wbint_QueryGroupList_r_done, req);
3287 static void dcerpc_wbint_QueryGroupList_r_done(struct tevent_req *subreq)
3289 struct tevent_req *req =
3290 tevent_req_callback_data(subreq,
3294 status = dcerpc_binding_handle_call_recv(subreq);
3295 TALLOC_FREE(subreq);
3296 if (tevent_req_nterror(req, status)) {
3300 tevent_req_done(req);
3303 NTSTATUS dcerpc_wbint_QueryGroupList_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3305 struct dcerpc_wbint_QueryGroupList_r_state *state =
3306 tevent_req_data(req,
3307 struct dcerpc_wbint_QueryGroupList_r_state);
3310 if (tevent_req_is_nterror(req, &status)) {
3311 tevent_req_received(req);
3315 talloc_steal(mem_ctx, state->out_mem_ctx);
3317 tevent_req_received(req);
3318 return NT_STATUS_OK;
3321 NTSTATUS dcerpc_wbint_QueryGroupList_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_QueryGroupList *r)
3325 status = dcerpc_binding_handle_call(h,
3326 NULL, &ndr_table_wbint,
3327 NDR_WBINT_QUERYGROUPLIST, mem_ctx, r);
3332 struct dcerpc_wbint_QueryGroupList_state {
3333 struct wbint_QueryGroupList orig;
3334 struct wbint_QueryGroupList tmp;
3335 TALLOC_CTX *out_mem_ctx;
3338 static void dcerpc_wbint_QueryGroupList_done(struct tevent_req *subreq);
3340 struct tevent_req *dcerpc_wbint_QueryGroupList_send(TALLOC_CTX *mem_ctx,
3341 struct tevent_context *ev,
3342 struct dcerpc_binding_handle *h,
3343 struct wbint_Principals *_groups /* [out] [ref] */)
3345 struct tevent_req *req;
3346 struct dcerpc_wbint_QueryGroupList_state *state;
3347 struct tevent_req *subreq;
3349 req = tevent_req_create(mem_ctx, &state,
3350 struct dcerpc_wbint_QueryGroupList_state);
3354 state->out_mem_ctx = NULL;
3358 /* Out parameters */
3359 state->orig.out.groups = _groups;
3362 ZERO_STRUCT(state->orig.out.result);
3364 state->out_mem_ctx = talloc_named_const(state, 0,
3365 "dcerpc_wbint_QueryGroupList_out_memory");
3366 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3367 return tevent_req_post(req, ev);
3370 /* make a temporary copy, that we pass to the dispatch function */
3371 state->tmp = state->orig;
3373 subreq = dcerpc_wbint_QueryGroupList_r_send(state, ev, h, &state->tmp);
3374 if (tevent_req_nomem(subreq, req)) {
3375 return tevent_req_post(req, ev);
3377 tevent_req_set_callback(subreq, dcerpc_wbint_QueryGroupList_done, req);
3381 static void dcerpc_wbint_QueryGroupList_done(struct tevent_req *subreq)
3383 struct tevent_req *req = tevent_req_callback_data(
3384 subreq, struct tevent_req);
3385 struct dcerpc_wbint_QueryGroupList_state *state = tevent_req_data(
3386 req, struct dcerpc_wbint_QueryGroupList_state);
3388 TALLOC_CTX *mem_ctx;
3390 if (state->out_mem_ctx) {
3391 mem_ctx = state->out_mem_ctx;
3396 status = dcerpc_wbint_QueryGroupList_r_recv(subreq, mem_ctx);
3397 TALLOC_FREE(subreq);
3398 if (tevent_req_nterror(req, status)) {
3402 /* Copy out parameters */
3403 *state->orig.out.groups = *state->tmp.out.groups;
3406 state->orig.out.result = state->tmp.out.result;
3408 /* Reset temporary structure */
3409 ZERO_STRUCT(state->tmp);
3411 tevent_req_done(req);
3414 NTSTATUS dcerpc_wbint_QueryGroupList_recv(struct tevent_req *req,
3415 TALLOC_CTX *mem_ctx,
3418 struct dcerpc_wbint_QueryGroupList_state *state = tevent_req_data(
3419 req, struct dcerpc_wbint_QueryGroupList_state);
3422 if (tevent_req_is_nterror(req, &status)) {
3423 tevent_req_received(req);
3427 /* Steal possible out parameters to the callers context */
3428 talloc_steal(mem_ctx, state->out_mem_ctx);
3431 *result = state->orig.out.result;
3433 tevent_req_received(req);
3434 return NT_STATUS_OK;
3437 NTSTATUS dcerpc_wbint_QueryGroupList(struct dcerpc_binding_handle *h,
3438 TALLOC_CTX *mem_ctx,
3439 struct wbint_Principals *_groups /* [out] [ref] */,
3442 struct wbint_QueryGroupList r;
3447 status = dcerpc_wbint_QueryGroupList_r(h, mem_ctx, &r);
3448 if (!NT_STATUS_IS_OK(status)) {
3452 /* Return variables */
3453 *_groups = *r.out.groups;
3456 *result = r.out.result;
3458 return NT_STATUS_OK;
3461 struct dcerpc_wbint_DsGetDcName_r_state {
3462 TALLOC_CTX *out_mem_ctx;
3465 static void dcerpc_wbint_DsGetDcName_r_done(struct tevent_req *subreq);
3467 struct tevent_req *dcerpc_wbint_DsGetDcName_r_send(TALLOC_CTX *mem_ctx,
3468 struct tevent_context *ev,
3469 struct dcerpc_binding_handle *h,
3470 struct wbint_DsGetDcName *r)
3472 struct tevent_req *req;
3473 struct dcerpc_wbint_DsGetDcName_r_state *state;
3474 struct tevent_req *subreq;
3476 req = tevent_req_create(mem_ctx, &state,
3477 struct dcerpc_wbint_DsGetDcName_r_state);
3482 state->out_mem_ctx = talloc_new(state);
3483 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3484 return tevent_req_post(req, ev);
3487 subreq = dcerpc_binding_handle_call_send(state, ev, h,
3488 NULL, &ndr_table_wbint,
3489 NDR_WBINT_DSGETDCNAME, state->out_mem_ctx, r);
3490 if (tevent_req_nomem(subreq, req)) {
3491 return tevent_req_post(req, ev);
3493 tevent_req_set_callback(subreq, dcerpc_wbint_DsGetDcName_r_done, req);
3498 static void dcerpc_wbint_DsGetDcName_r_done(struct tevent_req *subreq)
3500 struct tevent_req *req =
3501 tevent_req_callback_data(subreq,
3505 status = dcerpc_binding_handle_call_recv(subreq);
3506 TALLOC_FREE(subreq);
3507 if (tevent_req_nterror(req, status)) {
3511 tevent_req_done(req);
3514 NTSTATUS dcerpc_wbint_DsGetDcName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3516 struct dcerpc_wbint_DsGetDcName_r_state *state =
3517 tevent_req_data(req,
3518 struct dcerpc_wbint_DsGetDcName_r_state);
3521 if (tevent_req_is_nterror(req, &status)) {
3522 tevent_req_received(req);
3526 talloc_steal(mem_ctx, state->out_mem_ctx);
3528 tevent_req_received(req);
3529 return NT_STATUS_OK;
3532 NTSTATUS dcerpc_wbint_DsGetDcName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_DsGetDcName *r)
3536 status = dcerpc_binding_handle_call(h,
3537 NULL, &ndr_table_wbint,
3538 NDR_WBINT_DSGETDCNAME, mem_ctx, r);
3543 struct dcerpc_wbint_DsGetDcName_state {
3544 struct wbint_DsGetDcName orig;
3545 struct wbint_DsGetDcName tmp;
3546 TALLOC_CTX *out_mem_ctx;
3549 static void dcerpc_wbint_DsGetDcName_done(struct tevent_req *subreq);
3551 struct tevent_req *dcerpc_wbint_DsGetDcName_send(TALLOC_CTX *mem_ctx,
3552 struct tevent_context *ev,
3553 struct dcerpc_binding_handle *h,
3554 const char *_domain_name /* [in] [ref,charset(UTF8)] */,
3555 struct GUID *_domain_guid /* [in] [unique] */,
3556 const char *_site_name /* [in] [unique,charset(UTF8)] */,
3557 uint32_t _flags /* [in] */,
3558 struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */)
3560 struct tevent_req *req;
3561 struct dcerpc_wbint_DsGetDcName_state *state;
3562 struct tevent_req *subreq;
3564 req = tevent_req_create(mem_ctx, &state,
3565 struct dcerpc_wbint_DsGetDcName_state);
3569 state->out_mem_ctx = NULL;
3572 state->orig.in.domain_name = _domain_name;
3573 state->orig.in.domain_guid = _domain_guid;
3574 state->orig.in.site_name = _site_name;
3575 state->orig.in.flags = _flags;
3577 /* Out parameters */
3578 state->orig.out.dc_info = _dc_info;
3581 ZERO_STRUCT(state->orig.out.result);
3583 state->out_mem_ctx = talloc_named_const(state, 0,
3584 "dcerpc_wbint_DsGetDcName_out_memory");
3585 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3586 return tevent_req_post(req, ev);
3589 /* make a temporary copy, that we pass to the dispatch function */
3590 state->tmp = state->orig;
3592 subreq = dcerpc_wbint_DsGetDcName_r_send(state, ev, h, &state->tmp);
3593 if (tevent_req_nomem(subreq, req)) {
3594 return tevent_req_post(req, ev);
3596 tevent_req_set_callback(subreq, dcerpc_wbint_DsGetDcName_done, req);
3600 static void dcerpc_wbint_DsGetDcName_done(struct tevent_req *subreq)
3602 struct tevent_req *req = tevent_req_callback_data(
3603 subreq, struct tevent_req);
3604 struct dcerpc_wbint_DsGetDcName_state *state = tevent_req_data(
3605 req, struct dcerpc_wbint_DsGetDcName_state);
3607 TALLOC_CTX *mem_ctx;
3609 if (state->out_mem_ctx) {
3610 mem_ctx = state->out_mem_ctx;
3615 status = dcerpc_wbint_DsGetDcName_r_recv(subreq, mem_ctx);
3616 TALLOC_FREE(subreq);
3617 if (tevent_req_nterror(req, status)) {
3621 /* Copy out parameters */
3622 *state->orig.out.dc_info = *state->tmp.out.dc_info;
3625 state->orig.out.result = state->tmp.out.result;
3627 /* Reset temporary structure */
3628 ZERO_STRUCT(state->tmp);
3630 tevent_req_done(req);
3633 NTSTATUS dcerpc_wbint_DsGetDcName_recv(struct tevent_req *req,
3634 TALLOC_CTX *mem_ctx,
3637 struct dcerpc_wbint_DsGetDcName_state *state = tevent_req_data(
3638 req, struct dcerpc_wbint_DsGetDcName_state);
3641 if (tevent_req_is_nterror(req, &status)) {
3642 tevent_req_received(req);
3646 /* Steal possible out parameters to the callers context */
3647 talloc_steal(mem_ctx, state->out_mem_ctx);
3650 *result = state->orig.out.result;
3652 tevent_req_received(req);
3653 return NT_STATUS_OK;
3656 NTSTATUS dcerpc_wbint_DsGetDcName(struct dcerpc_binding_handle *h,
3657 TALLOC_CTX *mem_ctx,
3658 const char *_domain_name /* [in] [ref,charset(UTF8)] */,
3659 struct GUID *_domain_guid /* [in] [unique] */,
3660 const char *_site_name /* [in] [unique,charset(UTF8)] */,
3661 uint32_t _flags /* [in] */,
3662 struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */,
3665 struct wbint_DsGetDcName r;
3669 r.in.domain_name = _domain_name;
3670 r.in.domain_guid = _domain_guid;
3671 r.in.site_name = _site_name;
3672 r.in.flags = _flags;
3674 status = dcerpc_wbint_DsGetDcName_r(h, mem_ctx, &r);
3675 if (!NT_STATUS_IS_OK(status)) {
3679 /* Return variables */
3680 *_dc_info = *r.out.dc_info;
3683 *result = r.out.result;
3685 return NT_STATUS_OK;
3688 struct dcerpc_wbint_LookupRids_r_state {
3689 TALLOC_CTX *out_mem_ctx;
3692 static void dcerpc_wbint_LookupRids_r_done(struct tevent_req *subreq);
3694 struct tevent_req *dcerpc_wbint_LookupRids_r_send(TALLOC_CTX *mem_ctx,
3695 struct tevent_context *ev,
3696 struct dcerpc_binding_handle *h,
3697 struct wbint_LookupRids *r)
3699 struct tevent_req *req;
3700 struct dcerpc_wbint_LookupRids_r_state *state;
3701 struct tevent_req *subreq;
3703 req = tevent_req_create(mem_ctx, &state,
3704 struct dcerpc_wbint_LookupRids_r_state);
3709 state->out_mem_ctx = talloc_new(state);
3710 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3711 return tevent_req_post(req, ev);
3714 subreq = dcerpc_binding_handle_call_send(state, ev, h,
3715 NULL, &ndr_table_wbint,
3716 NDR_WBINT_LOOKUPRIDS, state->out_mem_ctx, r);
3717 if (tevent_req_nomem(subreq, req)) {
3718 return tevent_req_post(req, ev);
3720 tevent_req_set_callback(subreq, dcerpc_wbint_LookupRids_r_done, req);
3725 static void dcerpc_wbint_LookupRids_r_done(struct tevent_req *subreq)
3727 struct tevent_req *req =
3728 tevent_req_callback_data(subreq,
3732 status = dcerpc_binding_handle_call_recv(subreq);
3733 TALLOC_FREE(subreq);
3734 if (tevent_req_nterror(req, status)) {
3738 tevent_req_done(req);
3741 NTSTATUS dcerpc_wbint_LookupRids_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3743 struct dcerpc_wbint_LookupRids_r_state *state =
3744 tevent_req_data(req,
3745 struct dcerpc_wbint_LookupRids_r_state);
3748 if (tevent_req_is_nterror(req, &status)) {
3749 tevent_req_received(req);
3753 talloc_steal(mem_ctx, state->out_mem_ctx);
3755 tevent_req_received(req);
3756 return NT_STATUS_OK;
3759 NTSTATUS dcerpc_wbint_LookupRids_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_LookupRids *r)
3763 status = dcerpc_binding_handle_call(h,
3764 NULL, &ndr_table_wbint,
3765 NDR_WBINT_LOOKUPRIDS, mem_ctx, r);
3770 struct dcerpc_wbint_LookupRids_state {
3771 struct wbint_LookupRids orig;
3772 struct wbint_LookupRids tmp;
3773 TALLOC_CTX *out_mem_ctx;
3776 static void dcerpc_wbint_LookupRids_done(struct tevent_req *subreq);
3778 struct tevent_req *dcerpc_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
3779 struct tevent_context *ev,
3780 struct dcerpc_binding_handle *h,
3781 struct dom_sid *_domain_sid /* [in] [ref] */,
3782 struct wbint_RidArray *_rids /* [in] [ref] */,
3783 const char **_domain_name /* [out] [ref,charset(UTF8)] */,
3784 struct wbint_Principals *_names /* [out] [ref] */)
3786 struct tevent_req *req;
3787 struct dcerpc_wbint_LookupRids_state *state;
3788 struct tevent_req *subreq;
3790 req = tevent_req_create(mem_ctx, &state,
3791 struct dcerpc_wbint_LookupRids_state);
3795 state->out_mem_ctx = NULL;
3798 state->orig.in.domain_sid = _domain_sid;
3799 state->orig.in.rids = _rids;
3801 /* Out parameters */
3802 state->orig.out.domain_name = _domain_name;
3803 state->orig.out.names = _names;
3806 ZERO_STRUCT(state->orig.out.result);
3808 state->out_mem_ctx = talloc_named_const(state, 0,
3809 "dcerpc_wbint_LookupRids_out_memory");
3810 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3811 return tevent_req_post(req, ev);
3814 /* make a temporary copy, that we pass to the dispatch function */
3815 state->tmp = state->orig;
3817 subreq = dcerpc_wbint_LookupRids_r_send(state, ev, h, &state->tmp);
3818 if (tevent_req_nomem(subreq, req)) {
3819 return tevent_req_post(req, ev);
3821 tevent_req_set_callback(subreq, dcerpc_wbint_LookupRids_done, req);
3825 static void dcerpc_wbint_LookupRids_done(struct tevent_req *subreq)
3827 struct tevent_req *req = tevent_req_callback_data(
3828 subreq, struct tevent_req);
3829 struct dcerpc_wbint_LookupRids_state *state = tevent_req_data(
3830 req, struct dcerpc_wbint_LookupRids_state);
3832 TALLOC_CTX *mem_ctx;
3834 if (state->out_mem_ctx) {
3835 mem_ctx = state->out_mem_ctx;
3840 status = dcerpc_wbint_LookupRids_r_recv(subreq, mem_ctx);
3841 TALLOC_FREE(subreq);
3842 if (tevent_req_nterror(req, status)) {
3846 /* Copy out parameters */
3847 *state->orig.out.domain_name = *state->tmp.out.domain_name;
3848 *state->orig.out.names = *state->tmp.out.names;
3851 state->orig.out.result = state->tmp.out.result;
3853 /* Reset temporary structure */
3854 ZERO_STRUCT(state->tmp);
3856 tevent_req_done(req);
3859 NTSTATUS dcerpc_wbint_LookupRids_recv(struct tevent_req *req,
3860 TALLOC_CTX *mem_ctx,
3863 struct dcerpc_wbint_LookupRids_state *state = tevent_req_data(
3864 req, struct dcerpc_wbint_LookupRids_state);
3867 if (tevent_req_is_nterror(req, &status)) {
3868 tevent_req_received(req);
3872 /* Steal possible out parameters to the callers context */
3873 talloc_steal(mem_ctx, state->out_mem_ctx);
3876 *result = state->orig.out.result;
3878 tevent_req_received(req);
3879 return NT_STATUS_OK;
3882 NTSTATUS dcerpc_wbint_LookupRids(struct dcerpc_binding_handle *h,
3883 TALLOC_CTX *mem_ctx,
3884 struct dom_sid *_domain_sid /* [in] [ref] */,
3885 struct wbint_RidArray *_rids /* [in] [ref] */,
3886 const char **_domain_name /* [out] [ref,charset(UTF8)] */,
3887 struct wbint_Principals *_names /* [out] [ref] */,
3890 struct wbint_LookupRids r;
3894 r.in.domain_sid = _domain_sid;
3897 status = dcerpc_wbint_LookupRids_r(h, mem_ctx, &r);
3898 if (!NT_STATUS_IS_OK(status)) {
3902 /* Return variables */
3903 *_domain_name = *r.out.domain_name;
3904 *_names = *r.out.names;
3907 *result = r.out.result;
3909 return NT_STATUS_OK;
3912 struct dcerpc_wbint_CheckMachineAccount_r_state {
3913 TALLOC_CTX *out_mem_ctx;
3916 static void dcerpc_wbint_CheckMachineAccount_r_done(struct tevent_req *subreq);
3918 struct tevent_req *dcerpc_wbint_CheckMachineAccount_r_send(TALLOC_CTX *mem_ctx,
3919 struct tevent_context *ev,
3920 struct dcerpc_binding_handle *h,
3921 struct wbint_CheckMachineAccount *r)
3923 struct tevent_req *req;
3924 struct dcerpc_wbint_CheckMachineAccount_r_state *state;
3925 struct tevent_req *subreq;
3927 req = tevent_req_create(mem_ctx, &state,
3928 struct dcerpc_wbint_CheckMachineAccount_r_state);
3933 state->out_mem_ctx = NULL;
3935 subreq = dcerpc_binding_handle_call_send(state, ev, h,
3936 NULL, &ndr_table_wbint,
3937 NDR_WBINT_CHECKMACHINEACCOUNT, state, r);
3938 if (tevent_req_nomem(subreq, req)) {
3939 return tevent_req_post(req, ev);
3941 tevent_req_set_callback(subreq, dcerpc_wbint_CheckMachineAccount_r_done, req);
3946 static void dcerpc_wbint_CheckMachineAccount_r_done(struct tevent_req *subreq)
3948 struct tevent_req *req =
3949 tevent_req_callback_data(subreq,
3953 status = dcerpc_binding_handle_call_recv(subreq);
3954 TALLOC_FREE(subreq);
3955 if (tevent_req_nterror(req, status)) {
3959 tevent_req_done(req);
3962 NTSTATUS dcerpc_wbint_CheckMachineAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3964 struct dcerpc_wbint_CheckMachineAccount_r_state *state =
3965 tevent_req_data(req,
3966 struct dcerpc_wbint_CheckMachineAccount_r_state);
3969 if (tevent_req_is_nterror(req, &status)) {
3970 tevent_req_received(req);
3974 talloc_steal(mem_ctx, state->out_mem_ctx);
3976 tevent_req_received(req);
3977 return NT_STATUS_OK;
3980 NTSTATUS dcerpc_wbint_CheckMachineAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_CheckMachineAccount *r)
3984 status = dcerpc_binding_handle_call(h,
3985 NULL, &ndr_table_wbint,
3986 NDR_WBINT_CHECKMACHINEACCOUNT, mem_ctx, r);
3991 struct dcerpc_wbint_CheckMachineAccount_state {
3992 struct wbint_CheckMachineAccount orig;
3993 struct wbint_CheckMachineAccount tmp;
3994 TALLOC_CTX *out_mem_ctx;
3997 static void dcerpc_wbint_CheckMachineAccount_done(struct tevent_req *subreq);
3999 struct tevent_req *dcerpc_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
4000 struct tevent_context *ev,
4001 struct dcerpc_binding_handle *h)
4003 struct tevent_req *req;
4004 struct dcerpc_wbint_CheckMachineAccount_state *state;
4005 struct tevent_req *subreq;
4007 req = tevent_req_create(mem_ctx, &state,
4008 struct dcerpc_wbint_CheckMachineAccount_state);
4012 state->out_mem_ctx = NULL;
4016 /* Out parameters */
4019 ZERO_STRUCT(state->orig.out.result);
4021 /* make a temporary copy, that we pass to the dispatch function */
4022 state->tmp = state->orig;
4024 subreq = dcerpc_wbint_CheckMachineAccount_r_send(state, ev, h, &state->tmp);
4025 if (tevent_req_nomem(subreq, req)) {
4026 return tevent_req_post(req, ev);
4028 tevent_req_set_callback(subreq, dcerpc_wbint_CheckMachineAccount_done, req);
4032 static void dcerpc_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
4034 struct tevent_req *req = tevent_req_callback_data(
4035 subreq, struct tevent_req);
4036 struct dcerpc_wbint_CheckMachineAccount_state *state = tevent_req_data(
4037 req, struct dcerpc_wbint_CheckMachineAccount_state);
4039 TALLOC_CTX *mem_ctx;
4041 if (state->out_mem_ctx) {
4042 mem_ctx = state->out_mem_ctx;
4047 status = dcerpc_wbint_CheckMachineAccount_r_recv(subreq, mem_ctx);
4048 TALLOC_FREE(subreq);
4049 if (tevent_req_nterror(req, status)) {
4053 /* Copy out parameters */
4056 state->orig.out.result = state->tmp.out.result;
4058 /* Reset temporary structure */
4059 ZERO_STRUCT(state->tmp);
4061 tevent_req_done(req);
4064 NTSTATUS dcerpc_wbint_CheckMachineAccount_recv(struct tevent_req *req,
4065 TALLOC_CTX *mem_ctx,
4068 struct dcerpc_wbint_CheckMachineAccount_state *state = tevent_req_data(
4069 req, struct dcerpc_wbint_CheckMachineAccount_state);
4072 if (tevent_req_is_nterror(req, &status)) {
4073 tevent_req_received(req);
4077 /* Steal possible out parameters to the callers context */
4078 talloc_steal(mem_ctx, state->out_mem_ctx);
4081 *result = state->orig.out.result;
4083 tevent_req_received(req);
4084 return NT_STATUS_OK;
4087 NTSTATUS dcerpc_wbint_CheckMachineAccount(struct dcerpc_binding_handle *h,
4088 TALLOC_CTX *mem_ctx,
4091 struct wbint_CheckMachineAccount r;
4096 status = dcerpc_wbint_CheckMachineAccount_r(h, mem_ctx, &r);
4097 if (!NT_STATUS_IS_OK(status)) {
4101 /* Return variables */
4104 *result = r.out.result;
4106 return NT_STATUS_OK;
4109 struct dcerpc_wbint_ChangeMachineAccount_r_state {
4110 TALLOC_CTX *out_mem_ctx;
4113 static void dcerpc_wbint_ChangeMachineAccount_r_done(struct tevent_req *subreq);
4115 struct tevent_req *dcerpc_wbint_ChangeMachineAccount_r_send(TALLOC_CTX *mem_ctx,
4116 struct tevent_context *ev,
4117 struct dcerpc_binding_handle *h,
4118 struct wbint_ChangeMachineAccount *r)
4120 struct tevent_req *req;
4121 struct dcerpc_wbint_ChangeMachineAccount_r_state *state;
4122 struct tevent_req *subreq;
4124 req = tevent_req_create(mem_ctx, &state,
4125 struct dcerpc_wbint_ChangeMachineAccount_r_state);
4130 state->out_mem_ctx = NULL;
4132 subreq = dcerpc_binding_handle_call_send(state, ev, h,
4133 NULL, &ndr_table_wbint,
4134 NDR_WBINT_CHANGEMACHINEACCOUNT, state, r);
4135 if (tevent_req_nomem(subreq, req)) {
4136 return tevent_req_post(req, ev);
4138 tevent_req_set_callback(subreq, dcerpc_wbint_ChangeMachineAccount_r_done, req);
4143 static void dcerpc_wbint_ChangeMachineAccount_r_done(struct tevent_req *subreq)
4145 struct tevent_req *req =
4146 tevent_req_callback_data(subreq,
4150 status = dcerpc_binding_handle_call_recv(subreq);
4151 TALLOC_FREE(subreq);
4152 if (tevent_req_nterror(req, status)) {
4156 tevent_req_done(req);
4159 NTSTATUS dcerpc_wbint_ChangeMachineAccount_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4161 struct dcerpc_wbint_ChangeMachineAccount_r_state *state =
4162 tevent_req_data(req,
4163 struct dcerpc_wbint_ChangeMachineAccount_r_state);
4166 if (tevent_req_is_nterror(req, &status)) {
4167 tevent_req_received(req);
4171 talloc_steal(mem_ctx, state->out_mem_ctx);
4173 tevent_req_received(req);
4174 return NT_STATUS_OK;
4177 NTSTATUS dcerpc_wbint_ChangeMachineAccount_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_ChangeMachineAccount *r)
4181 status = dcerpc_binding_handle_call(h,
4182 NULL, &ndr_table_wbint,
4183 NDR_WBINT_CHANGEMACHINEACCOUNT, mem_ctx, r);
4188 struct dcerpc_wbint_ChangeMachineAccount_state {
4189 struct wbint_ChangeMachineAccount orig;
4190 struct wbint_ChangeMachineAccount tmp;
4191 TALLOC_CTX *out_mem_ctx;
4194 static void dcerpc_wbint_ChangeMachineAccount_done(struct tevent_req *subreq);
4196 struct tevent_req *dcerpc_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx,
4197 struct tevent_context *ev,
4198 struct dcerpc_binding_handle *h)
4200 struct tevent_req *req;
4201 struct dcerpc_wbint_ChangeMachineAccount_state *state;
4202 struct tevent_req *subreq;
4204 req = tevent_req_create(mem_ctx, &state,
4205 struct dcerpc_wbint_ChangeMachineAccount_state);
4209 state->out_mem_ctx = NULL;
4213 /* Out parameters */
4216 ZERO_STRUCT(state->orig.out.result);
4218 /* make a temporary copy, that we pass to the dispatch function */
4219 state->tmp = state->orig;
4221 subreq = dcerpc_wbint_ChangeMachineAccount_r_send(state, ev, h, &state->tmp);
4222 if (tevent_req_nomem(subreq, req)) {
4223 return tevent_req_post(req, ev);
4225 tevent_req_set_callback(subreq, dcerpc_wbint_ChangeMachineAccount_done, req);
4229 static void dcerpc_wbint_ChangeMachineAccount_done(struct tevent_req *subreq)
4231 struct tevent_req *req = tevent_req_callback_data(
4232 subreq, struct tevent_req);
4233 struct dcerpc_wbint_ChangeMachineAccount_state *state = tevent_req_data(
4234 req, struct dcerpc_wbint_ChangeMachineAccount_state);
4236 TALLOC_CTX *mem_ctx;
4238 if (state->out_mem_ctx) {
4239 mem_ctx = state->out_mem_ctx;
4244 status = dcerpc_wbint_ChangeMachineAccount_r_recv(subreq, mem_ctx);
4245 TALLOC_FREE(subreq);
4246 if (tevent_req_nterror(req, status)) {
4250 /* Copy out parameters */
4253 state->orig.out.result = state->tmp.out.result;
4255 /* Reset temporary structure */
4256 ZERO_STRUCT(state->tmp);
4258 tevent_req_done(req);
4261 NTSTATUS dcerpc_wbint_ChangeMachineAccount_recv(struct tevent_req *req,
4262 TALLOC_CTX *mem_ctx,
4265 struct dcerpc_wbint_ChangeMachineAccount_state *state = tevent_req_data(
4266 req, struct dcerpc_wbint_ChangeMachineAccount_state);
4269 if (tevent_req_is_nterror(req, &status)) {
4270 tevent_req_received(req);
4274 /* Steal possible out parameters to the callers context */
4275 talloc_steal(mem_ctx, state->out_mem_ctx);
4278 *result = state->orig.out.result;
4280 tevent_req_received(req);
4281 return NT_STATUS_OK;
4284 NTSTATUS dcerpc_wbint_ChangeMachineAccount(struct dcerpc_binding_handle *h,
4285 TALLOC_CTX *mem_ctx,
4288 struct wbint_ChangeMachineAccount r;
4293 status = dcerpc_wbint_ChangeMachineAccount_r(h, mem_ctx, &r);
4294 if (!NT_STATUS_IS_OK(status)) {
4298 /* Return variables */
4301 *result = r.out.result;
4303 return NT_STATUS_OK;
4306 struct dcerpc_wbint_PingDc_r_state {
4307 TALLOC_CTX *out_mem_ctx;
4310 static void dcerpc_wbint_PingDc_r_done(struct tevent_req *subreq);
4312 struct tevent_req *dcerpc_wbint_PingDc_r_send(TALLOC_CTX *mem_ctx,
4313 struct tevent_context *ev,
4314 struct dcerpc_binding_handle *h,
4315 struct wbint_PingDc *r)
4317 struct tevent_req *req;
4318 struct dcerpc_wbint_PingDc_r_state *state;
4319 struct tevent_req *subreq;
4321 req = tevent_req_create(mem_ctx, &state,
4322 struct dcerpc_wbint_PingDc_r_state);
4327 state->out_mem_ctx = talloc_new(state);
4328 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4329 return tevent_req_post(req, ev);
4332 subreq = dcerpc_binding_handle_call_send(state, ev, h,
4333 NULL, &ndr_table_wbint,
4334 NDR_WBINT_PINGDC, state->out_mem_ctx, r);
4335 if (tevent_req_nomem(subreq, req)) {
4336 return tevent_req_post(req, ev);
4338 tevent_req_set_callback(subreq, dcerpc_wbint_PingDc_r_done, req);
4343 static void dcerpc_wbint_PingDc_r_done(struct tevent_req *subreq)
4345 struct tevent_req *req =
4346 tevent_req_callback_data(subreq,
4350 status = dcerpc_binding_handle_call_recv(subreq);
4351 TALLOC_FREE(subreq);
4352 if (tevent_req_nterror(req, status)) {
4356 tevent_req_done(req);
4359 NTSTATUS dcerpc_wbint_PingDc_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4361 struct dcerpc_wbint_PingDc_r_state *state =
4362 tevent_req_data(req,
4363 struct dcerpc_wbint_PingDc_r_state);
4366 if (tevent_req_is_nterror(req, &status)) {
4367 tevent_req_received(req);
4371 talloc_steal(mem_ctx, state->out_mem_ctx);
4373 tevent_req_received(req);
4374 return NT_STATUS_OK;
4377 NTSTATUS dcerpc_wbint_PingDc_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wbint_PingDc *r)
4381 status = dcerpc_binding_handle_call(h,
4382 NULL, &ndr_table_wbint,
4383 NDR_WBINT_PINGDC, mem_ctx, r);
4388 struct dcerpc_wbint_PingDc_state {
4389 struct wbint_PingDc orig;
4390 struct wbint_PingDc tmp;
4391 TALLOC_CTX *out_mem_ctx;
4394 static void dcerpc_wbint_PingDc_done(struct tevent_req *subreq);
4396 struct tevent_req *dcerpc_wbint_PingDc_send(TALLOC_CTX *mem_ctx,
4397 struct tevent_context *ev,
4398 struct dcerpc_binding_handle *h,
4399 const char **_dcname /* [out] [ref,charset(UTF8)] */)
4401 struct tevent_req *req;
4402 struct dcerpc_wbint_PingDc_state *state;
4403 struct tevent_req *subreq;
4405 req = tevent_req_create(mem_ctx, &state,
4406 struct dcerpc_wbint_PingDc_state);
4410 state->out_mem_ctx = NULL;
4414 /* Out parameters */
4415 state->orig.out.dcname = _dcname;
4418 ZERO_STRUCT(state->orig.out.result);
4420 state->out_mem_ctx = talloc_named_const(state, 0,
4421 "dcerpc_wbint_PingDc_out_memory");
4422 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4423 return tevent_req_post(req, ev);
4426 /* make a temporary copy, that we pass to the dispatch function */
4427 state->tmp = state->orig;
4429 subreq = dcerpc_wbint_PingDc_r_send(state, ev, h, &state->tmp);
4430 if (tevent_req_nomem(subreq, req)) {
4431 return tevent_req_post(req, ev);
4433 tevent_req_set_callback(subreq, dcerpc_wbint_PingDc_done, req);
4437 static void dcerpc_wbint_PingDc_done(struct tevent_req *subreq)
4439 struct tevent_req *req = tevent_req_callback_data(
4440 subreq, struct tevent_req);
4441 struct dcerpc_wbint_PingDc_state *state = tevent_req_data(
4442 req, struct dcerpc_wbint_PingDc_state);
4444 TALLOC_CTX *mem_ctx;
4446 if (state->out_mem_ctx) {
4447 mem_ctx = state->out_mem_ctx;
4452 status = dcerpc_wbint_PingDc_r_recv(subreq, mem_ctx);
4453 TALLOC_FREE(subreq);
4454 if (tevent_req_nterror(req, status)) {
4458 /* Copy out parameters */
4459 *state->orig.out.dcname = *state->tmp.out.dcname;
4462 state->orig.out.result = state->tmp.out.result;
4464 /* Reset temporary structure */
4465 ZERO_STRUCT(state->tmp);
4467 tevent_req_done(req);
4470 NTSTATUS dcerpc_wbint_PingDc_recv(struct tevent_req *req,
4471 TALLOC_CTX *mem_ctx,
4474 struct dcerpc_wbint_PingDc_state *state = tevent_req_data(
4475 req, struct dcerpc_wbint_PingDc_state);
4478 if (tevent_req_is_nterror(req, &status)) {
4479 tevent_req_received(req);
4483 /* Steal possible out parameters to the callers context */
4484 talloc_steal(mem_ctx, state->out_mem_ctx);
4487 *result = state->orig.out.result;
4489 tevent_req_received(req);
4490 return NT_STATUS_OK;
4493 NTSTATUS dcerpc_wbint_PingDc(struct dcerpc_binding_handle *h,
4494 TALLOC_CTX *mem_ctx,
4495 const char **_dcname /* [out] [ref,charset(UTF8)] */,
4498 struct wbint_PingDc r;
4503 status = dcerpc_wbint_PingDc_r(h, mem_ctx, &r);
4504 if (!NT_STATUS_IS_OK(status)) {
4508 /* Return variables */
4509 *_dcname = *r.out.dcname;
4512 *result = r.out.result;
4514 return NT_STATUS_OK;