s3: Do not reference ndr_table_<pipe> in the cli_ routines directly
[Samba.git] / librpc / gen_ndr / cli_lsa.c
blob827e44ef3f96c606b8cde59c5b79fcd5095602c3
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_lsa.h"
9 struct rpccli_lsa_Close_state {
10 struct lsa_Close orig;
11 struct lsa_Close tmp;
12 TALLOC_CTX *out_mem_ctx;
13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
16 static void rpccli_lsa_Close_done(struct tevent_req *subreq);
18 struct tevent_req *rpccli_lsa_Close_send(TALLOC_CTX *mem_ctx,
19 struct tevent_context *ev,
20 struct rpc_pipe_client *cli,
21 struct policy_handle *_handle /* [in,out] [ref] */)
23 struct tevent_req *req;
24 struct rpccli_lsa_Close_state *state;
25 struct tevent_req *subreq;
27 req = tevent_req_create(mem_ctx, &state,
28 struct rpccli_lsa_Close_state);
29 if (req == NULL) {
30 return NULL;
32 state->out_mem_ctx = NULL;
33 state->dispatch_recv = cli->dispatch_recv;
35 /* In parameters */
36 state->orig.in.handle = _handle;
38 /* Out parameters */
39 state->orig.out.handle = _handle;
41 /* Result */
42 ZERO_STRUCT(state->orig.out.result);
44 state->out_mem_ctx = talloc_named_const(state, 0,
45 "rpccli_lsa_Close_out_memory");
46 if (tevent_req_nomem(state->out_mem_ctx, req)) {
47 return tevent_req_post(req, ev);
50 /* make a temporary copy, that we pass to the dispatch function */
51 state->tmp = state->orig;
53 subreq = cli->dispatch_send(state, ev, cli,
54 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
55 NDR_LSA_CLOSE,
56 &state->tmp);
57 if (tevent_req_nomem(subreq, req)) {
58 return tevent_req_post(req, ev);
60 tevent_req_set_callback(subreq, rpccli_lsa_Close_done, req);
61 return req;
64 static void rpccli_lsa_Close_done(struct tevent_req *subreq)
66 struct tevent_req *req = tevent_req_callback_data(
67 subreq, struct tevent_req);
68 struct rpccli_lsa_Close_state *state = tevent_req_data(
69 req, struct rpccli_lsa_Close_state);
70 NTSTATUS status;
71 TALLOC_CTX *mem_ctx;
73 if (state->out_mem_ctx) {
74 mem_ctx = state->out_mem_ctx;
75 } else {
76 mem_ctx = state;
79 status = state->dispatch_recv(subreq, mem_ctx);
80 TALLOC_FREE(subreq);
81 if (!NT_STATUS_IS_OK(status)) {
82 tevent_req_nterror(req, status);
83 return;
86 /* Copy out parameters */
87 *state->orig.out.handle = *state->tmp.out.handle;
89 /* Copy result */
90 state->orig.out.result = state->tmp.out.result;
92 /* Reset temporary structure */
93 ZERO_STRUCT(state->tmp);
95 tevent_req_done(req);
98 NTSTATUS rpccli_lsa_Close_recv(struct tevent_req *req,
99 TALLOC_CTX *mem_ctx,
100 NTSTATUS *result)
102 struct rpccli_lsa_Close_state *state = tevent_req_data(
103 req, struct rpccli_lsa_Close_state);
104 NTSTATUS status;
106 if (tevent_req_is_nterror(req, &status)) {
107 tevent_req_received(req);
108 return status;
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx, state->out_mem_ctx);
114 /* Return result */
115 *result = state->orig.out.result;
117 tevent_req_received(req);
118 return NT_STATUS_OK;
121 NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli,
122 TALLOC_CTX *mem_ctx,
123 struct policy_handle *handle /* [in,out] [ref] */)
125 struct lsa_Close r;
126 NTSTATUS status;
128 /* In parameters */
129 r.in.handle = handle;
131 status = cli->dispatch(cli,
132 mem_ctx,
133 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
134 NDR_LSA_CLOSE,
135 &r);
137 if (!NT_STATUS_IS_OK(status)) {
138 return status;
141 if (NT_STATUS_IS_ERR(status)) {
142 return status;
145 /* Return variables */
146 *handle = *r.out.handle;
148 /* Return result */
149 return r.out.result;
152 struct rpccli_lsa_Delete_state {
153 struct lsa_Delete orig;
154 struct lsa_Delete tmp;
155 TALLOC_CTX *out_mem_ctx;
156 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
159 static void rpccli_lsa_Delete_done(struct tevent_req *subreq);
161 struct tevent_req *rpccli_lsa_Delete_send(TALLOC_CTX *mem_ctx,
162 struct tevent_context *ev,
163 struct rpc_pipe_client *cli,
164 struct policy_handle *_handle /* [in] [ref] */)
166 struct tevent_req *req;
167 struct rpccli_lsa_Delete_state *state;
168 struct tevent_req *subreq;
170 req = tevent_req_create(mem_ctx, &state,
171 struct rpccli_lsa_Delete_state);
172 if (req == NULL) {
173 return NULL;
175 state->out_mem_ctx = NULL;
176 state->dispatch_recv = cli->dispatch_recv;
178 /* In parameters */
179 state->orig.in.handle = _handle;
181 /* Out parameters */
183 /* Result */
184 ZERO_STRUCT(state->orig.out.result);
186 /* make a temporary copy, that we pass to the dispatch function */
187 state->tmp = state->orig;
189 subreq = cli->dispatch_send(state, ev, cli,
190 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
191 NDR_LSA_DELETE,
192 &state->tmp);
193 if (tevent_req_nomem(subreq, req)) {
194 return tevent_req_post(req, ev);
196 tevent_req_set_callback(subreq, rpccli_lsa_Delete_done, req);
197 return req;
200 static void rpccli_lsa_Delete_done(struct tevent_req *subreq)
202 struct tevent_req *req = tevent_req_callback_data(
203 subreq, struct tevent_req);
204 struct rpccli_lsa_Delete_state *state = tevent_req_data(
205 req, struct rpccli_lsa_Delete_state);
206 NTSTATUS status;
207 TALLOC_CTX *mem_ctx;
209 if (state->out_mem_ctx) {
210 mem_ctx = state->out_mem_ctx;
211 } else {
212 mem_ctx = state;
215 status = state->dispatch_recv(subreq, mem_ctx);
216 TALLOC_FREE(subreq);
217 if (!NT_STATUS_IS_OK(status)) {
218 tevent_req_nterror(req, status);
219 return;
222 /* Copy out parameters */
224 /* Copy result */
225 state->orig.out.result = state->tmp.out.result;
227 /* Reset temporary structure */
228 ZERO_STRUCT(state->tmp);
230 tevent_req_done(req);
233 NTSTATUS rpccli_lsa_Delete_recv(struct tevent_req *req,
234 TALLOC_CTX *mem_ctx,
235 NTSTATUS *result)
237 struct rpccli_lsa_Delete_state *state = tevent_req_data(
238 req, struct rpccli_lsa_Delete_state);
239 NTSTATUS status;
241 if (tevent_req_is_nterror(req, &status)) {
242 tevent_req_received(req);
243 return status;
246 /* Steal possbile out parameters to the callers context */
247 talloc_steal(mem_ctx, state->out_mem_ctx);
249 /* Return result */
250 *result = state->orig.out.result;
252 tevent_req_received(req);
253 return NT_STATUS_OK;
256 NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli,
257 TALLOC_CTX *mem_ctx,
258 struct policy_handle *handle /* [in] [ref] */)
260 struct lsa_Delete r;
261 NTSTATUS status;
263 /* In parameters */
264 r.in.handle = handle;
266 status = cli->dispatch(cli,
267 mem_ctx,
268 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
269 NDR_LSA_DELETE,
270 &r);
272 if (!NT_STATUS_IS_OK(status)) {
273 return status;
276 if (NT_STATUS_IS_ERR(status)) {
277 return status;
280 /* Return variables */
282 /* Return result */
283 return r.out.result;
286 struct rpccli_lsa_EnumPrivs_state {
287 struct lsa_EnumPrivs orig;
288 struct lsa_EnumPrivs tmp;
289 TALLOC_CTX *out_mem_ctx;
290 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
293 static void rpccli_lsa_EnumPrivs_done(struct tevent_req *subreq);
295 struct tevent_req *rpccli_lsa_EnumPrivs_send(TALLOC_CTX *mem_ctx,
296 struct tevent_context *ev,
297 struct rpc_pipe_client *cli,
298 struct policy_handle *_handle /* [in] [ref] */,
299 uint32_t *_resume_handle /* [in,out] [ref] */,
300 struct lsa_PrivArray *_privs /* [out] [ref] */,
301 uint32_t _max_count /* [in] */)
303 struct tevent_req *req;
304 struct rpccli_lsa_EnumPrivs_state *state;
305 struct tevent_req *subreq;
307 req = tevent_req_create(mem_ctx, &state,
308 struct rpccli_lsa_EnumPrivs_state);
309 if (req == NULL) {
310 return NULL;
312 state->out_mem_ctx = NULL;
313 state->dispatch_recv = cli->dispatch_recv;
315 /* In parameters */
316 state->orig.in.handle = _handle;
317 state->orig.in.resume_handle = _resume_handle;
318 state->orig.in.max_count = _max_count;
320 /* Out parameters */
321 state->orig.out.resume_handle = _resume_handle;
322 state->orig.out.privs = _privs;
324 /* Result */
325 ZERO_STRUCT(state->orig.out.result);
327 state->out_mem_ctx = talloc_named_const(state, 0,
328 "rpccli_lsa_EnumPrivs_out_memory");
329 if (tevent_req_nomem(state->out_mem_ctx, req)) {
330 return tevent_req_post(req, ev);
333 /* make a temporary copy, that we pass to the dispatch function */
334 state->tmp = state->orig;
336 subreq = cli->dispatch_send(state, ev, cli,
337 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
338 NDR_LSA_ENUMPRIVS,
339 &state->tmp);
340 if (tevent_req_nomem(subreq, req)) {
341 return tevent_req_post(req, ev);
343 tevent_req_set_callback(subreq, rpccli_lsa_EnumPrivs_done, req);
344 return req;
347 static void rpccli_lsa_EnumPrivs_done(struct tevent_req *subreq)
349 struct tevent_req *req = tevent_req_callback_data(
350 subreq, struct tevent_req);
351 struct rpccli_lsa_EnumPrivs_state *state = tevent_req_data(
352 req, struct rpccli_lsa_EnumPrivs_state);
353 NTSTATUS status;
354 TALLOC_CTX *mem_ctx;
356 if (state->out_mem_ctx) {
357 mem_ctx = state->out_mem_ctx;
358 } else {
359 mem_ctx = state;
362 status = state->dispatch_recv(subreq, mem_ctx);
363 TALLOC_FREE(subreq);
364 if (!NT_STATUS_IS_OK(status)) {
365 tevent_req_nterror(req, status);
366 return;
369 /* Copy out parameters */
370 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
371 *state->orig.out.privs = *state->tmp.out.privs;
373 /* Copy result */
374 state->orig.out.result = state->tmp.out.result;
376 /* Reset temporary structure */
377 ZERO_STRUCT(state->tmp);
379 tevent_req_done(req);
382 NTSTATUS rpccli_lsa_EnumPrivs_recv(struct tevent_req *req,
383 TALLOC_CTX *mem_ctx,
384 NTSTATUS *result)
386 struct rpccli_lsa_EnumPrivs_state *state = tevent_req_data(
387 req, struct rpccli_lsa_EnumPrivs_state);
388 NTSTATUS status;
390 if (tevent_req_is_nterror(req, &status)) {
391 tevent_req_received(req);
392 return status;
395 /* Steal possbile out parameters to the callers context */
396 talloc_steal(mem_ctx, state->out_mem_ctx);
398 /* Return result */
399 *result = state->orig.out.result;
401 tevent_req_received(req);
402 return NT_STATUS_OK;
405 NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli,
406 TALLOC_CTX *mem_ctx,
407 struct policy_handle *handle /* [in] [ref] */,
408 uint32_t *resume_handle /* [in,out] [ref] */,
409 struct lsa_PrivArray *privs /* [out] [ref] */,
410 uint32_t max_count /* [in] */)
412 struct lsa_EnumPrivs r;
413 NTSTATUS status;
415 /* In parameters */
416 r.in.handle = handle;
417 r.in.resume_handle = resume_handle;
418 r.in.max_count = max_count;
420 status = cli->dispatch(cli,
421 mem_ctx,
422 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
423 NDR_LSA_ENUMPRIVS,
424 &r);
426 if (!NT_STATUS_IS_OK(status)) {
427 return status;
430 if (NT_STATUS_IS_ERR(status)) {
431 return status;
434 /* Return variables */
435 *resume_handle = *r.out.resume_handle;
436 *privs = *r.out.privs;
438 /* Return result */
439 return r.out.result;
442 struct rpccli_lsa_QuerySecurity_state {
443 struct lsa_QuerySecurity orig;
444 struct lsa_QuerySecurity tmp;
445 TALLOC_CTX *out_mem_ctx;
446 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
449 static void rpccli_lsa_QuerySecurity_done(struct tevent_req *subreq);
451 struct tevent_req *rpccli_lsa_QuerySecurity_send(TALLOC_CTX *mem_ctx,
452 struct tevent_context *ev,
453 struct rpc_pipe_client *cli,
454 struct policy_handle *_handle /* [in] [ref] */,
455 uint32_t _sec_info /* [in] */,
456 struct sec_desc_buf **_sdbuf /* [out] [ref] */)
458 struct tevent_req *req;
459 struct rpccli_lsa_QuerySecurity_state *state;
460 struct tevent_req *subreq;
462 req = tevent_req_create(mem_ctx, &state,
463 struct rpccli_lsa_QuerySecurity_state);
464 if (req == NULL) {
465 return NULL;
467 state->out_mem_ctx = NULL;
468 state->dispatch_recv = cli->dispatch_recv;
470 /* In parameters */
471 state->orig.in.handle = _handle;
472 state->orig.in.sec_info = _sec_info;
474 /* Out parameters */
475 state->orig.out.sdbuf = _sdbuf;
477 /* Result */
478 ZERO_STRUCT(state->orig.out.result);
480 state->out_mem_ctx = talloc_named_const(state, 0,
481 "rpccli_lsa_QuerySecurity_out_memory");
482 if (tevent_req_nomem(state->out_mem_ctx, req)) {
483 return tevent_req_post(req, ev);
486 /* make a temporary copy, that we pass to the dispatch function */
487 state->tmp = state->orig;
489 subreq = cli->dispatch_send(state, ev, cli,
490 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
491 NDR_LSA_QUERYSECURITY,
492 &state->tmp);
493 if (tevent_req_nomem(subreq, req)) {
494 return tevent_req_post(req, ev);
496 tevent_req_set_callback(subreq, rpccli_lsa_QuerySecurity_done, req);
497 return req;
500 static void rpccli_lsa_QuerySecurity_done(struct tevent_req *subreq)
502 struct tevent_req *req = tevent_req_callback_data(
503 subreq, struct tevent_req);
504 struct rpccli_lsa_QuerySecurity_state *state = tevent_req_data(
505 req, struct rpccli_lsa_QuerySecurity_state);
506 NTSTATUS status;
507 TALLOC_CTX *mem_ctx;
509 if (state->out_mem_ctx) {
510 mem_ctx = state->out_mem_ctx;
511 } else {
512 mem_ctx = state;
515 status = state->dispatch_recv(subreq, mem_ctx);
516 TALLOC_FREE(subreq);
517 if (!NT_STATUS_IS_OK(status)) {
518 tevent_req_nterror(req, status);
519 return;
522 /* Copy out parameters */
523 *state->orig.out.sdbuf = *state->tmp.out.sdbuf;
525 /* Copy result */
526 state->orig.out.result = state->tmp.out.result;
528 /* Reset temporary structure */
529 ZERO_STRUCT(state->tmp);
531 tevent_req_done(req);
534 NTSTATUS rpccli_lsa_QuerySecurity_recv(struct tevent_req *req,
535 TALLOC_CTX *mem_ctx,
536 NTSTATUS *result)
538 struct rpccli_lsa_QuerySecurity_state *state = tevent_req_data(
539 req, struct rpccli_lsa_QuerySecurity_state);
540 NTSTATUS status;
542 if (tevent_req_is_nterror(req, &status)) {
543 tevent_req_received(req);
544 return status;
547 /* Steal possbile out parameters to the callers context */
548 talloc_steal(mem_ctx, state->out_mem_ctx);
550 /* Return result */
551 *result = state->orig.out.result;
553 tevent_req_received(req);
554 return NT_STATUS_OK;
557 NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli,
558 TALLOC_CTX *mem_ctx,
559 struct policy_handle *handle /* [in] [ref] */,
560 uint32_t sec_info /* [in] */,
561 struct sec_desc_buf **sdbuf /* [out] [ref] */)
563 struct lsa_QuerySecurity r;
564 NTSTATUS status;
566 /* In parameters */
567 r.in.handle = handle;
568 r.in.sec_info = sec_info;
570 status = cli->dispatch(cli,
571 mem_ctx,
572 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
573 NDR_LSA_QUERYSECURITY,
574 &r);
576 if (!NT_STATUS_IS_OK(status)) {
577 return status;
580 if (NT_STATUS_IS_ERR(status)) {
581 return status;
584 /* Return variables */
585 *sdbuf = *r.out.sdbuf;
587 /* Return result */
588 return r.out.result;
591 struct rpccli_lsa_SetSecObj_state {
592 struct lsa_SetSecObj orig;
593 struct lsa_SetSecObj tmp;
594 TALLOC_CTX *out_mem_ctx;
595 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
598 static void rpccli_lsa_SetSecObj_done(struct tevent_req *subreq);
600 struct tevent_req *rpccli_lsa_SetSecObj_send(TALLOC_CTX *mem_ctx,
601 struct tevent_context *ev,
602 struct rpc_pipe_client *cli,
603 struct policy_handle *_handle /* [in] [ref] */,
604 uint32_t _sec_info /* [in] */,
605 struct sec_desc_buf *_sdbuf /* [in] [ref] */)
607 struct tevent_req *req;
608 struct rpccli_lsa_SetSecObj_state *state;
609 struct tevent_req *subreq;
611 req = tevent_req_create(mem_ctx, &state,
612 struct rpccli_lsa_SetSecObj_state);
613 if (req == NULL) {
614 return NULL;
616 state->out_mem_ctx = NULL;
617 state->dispatch_recv = cli->dispatch_recv;
619 /* In parameters */
620 state->orig.in.handle = _handle;
621 state->orig.in.sec_info = _sec_info;
622 state->orig.in.sdbuf = _sdbuf;
624 /* Out parameters */
626 /* Result */
627 ZERO_STRUCT(state->orig.out.result);
629 /* make a temporary copy, that we pass to the dispatch function */
630 state->tmp = state->orig;
632 subreq = cli->dispatch_send(state, ev, cli,
633 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
634 NDR_LSA_SETSECOBJ,
635 &state->tmp);
636 if (tevent_req_nomem(subreq, req)) {
637 return tevent_req_post(req, ev);
639 tevent_req_set_callback(subreq, rpccli_lsa_SetSecObj_done, req);
640 return req;
643 static void rpccli_lsa_SetSecObj_done(struct tevent_req *subreq)
645 struct tevent_req *req = tevent_req_callback_data(
646 subreq, struct tevent_req);
647 struct rpccli_lsa_SetSecObj_state *state = tevent_req_data(
648 req, struct rpccli_lsa_SetSecObj_state);
649 NTSTATUS status;
650 TALLOC_CTX *mem_ctx;
652 if (state->out_mem_ctx) {
653 mem_ctx = state->out_mem_ctx;
654 } else {
655 mem_ctx = state;
658 status = state->dispatch_recv(subreq, mem_ctx);
659 TALLOC_FREE(subreq);
660 if (!NT_STATUS_IS_OK(status)) {
661 tevent_req_nterror(req, status);
662 return;
665 /* Copy out parameters */
667 /* Copy result */
668 state->orig.out.result = state->tmp.out.result;
670 /* Reset temporary structure */
671 ZERO_STRUCT(state->tmp);
673 tevent_req_done(req);
676 NTSTATUS rpccli_lsa_SetSecObj_recv(struct tevent_req *req,
677 TALLOC_CTX *mem_ctx,
678 NTSTATUS *result)
680 struct rpccli_lsa_SetSecObj_state *state = tevent_req_data(
681 req, struct rpccli_lsa_SetSecObj_state);
682 NTSTATUS status;
684 if (tevent_req_is_nterror(req, &status)) {
685 tevent_req_received(req);
686 return status;
689 /* Steal possbile out parameters to the callers context */
690 talloc_steal(mem_ctx, state->out_mem_ctx);
692 /* Return result */
693 *result = state->orig.out.result;
695 tevent_req_received(req);
696 return NT_STATUS_OK;
699 NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli,
700 TALLOC_CTX *mem_ctx,
701 struct policy_handle *handle /* [in] [ref] */,
702 uint32_t sec_info /* [in] */,
703 struct sec_desc_buf *sdbuf /* [in] [ref] */)
705 struct lsa_SetSecObj r;
706 NTSTATUS status;
708 /* In parameters */
709 r.in.handle = handle;
710 r.in.sec_info = sec_info;
711 r.in.sdbuf = sdbuf;
713 status = cli->dispatch(cli,
714 mem_ctx,
715 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
716 NDR_LSA_SETSECOBJ,
717 &r);
719 if (!NT_STATUS_IS_OK(status)) {
720 return status;
723 if (NT_STATUS_IS_ERR(status)) {
724 return status;
727 /* Return variables */
729 /* Return result */
730 return r.out.result;
733 struct rpccli_lsa_ChangePassword_state {
734 struct lsa_ChangePassword orig;
735 struct lsa_ChangePassword tmp;
736 TALLOC_CTX *out_mem_ctx;
737 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
740 static void rpccli_lsa_ChangePassword_done(struct tevent_req *subreq);
742 struct tevent_req *rpccli_lsa_ChangePassword_send(TALLOC_CTX *mem_ctx,
743 struct tevent_context *ev,
744 struct rpc_pipe_client *cli)
746 struct tevent_req *req;
747 struct rpccli_lsa_ChangePassword_state *state;
748 struct tevent_req *subreq;
750 req = tevent_req_create(mem_ctx, &state,
751 struct rpccli_lsa_ChangePassword_state);
752 if (req == NULL) {
753 return NULL;
755 state->out_mem_ctx = NULL;
756 state->dispatch_recv = cli->dispatch_recv;
758 /* In parameters */
760 /* Out parameters */
762 /* Result */
763 ZERO_STRUCT(state->orig.out.result);
765 /* make a temporary copy, that we pass to the dispatch function */
766 state->tmp = state->orig;
768 subreq = cli->dispatch_send(state, ev, cli,
769 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
770 NDR_LSA_CHANGEPASSWORD,
771 &state->tmp);
772 if (tevent_req_nomem(subreq, req)) {
773 return tevent_req_post(req, ev);
775 tevent_req_set_callback(subreq, rpccli_lsa_ChangePassword_done, req);
776 return req;
779 static void rpccli_lsa_ChangePassword_done(struct tevent_req *subreq)
781 struct tevent_req *req = tevent_req_callback_data(
782 subreq, struct tevent_req);
783 struct rpccli_lsa_ChangePassword_state *state = tevent_req_data(
784 req, struct rpccli_lsa_ChangePassword_state);
785 NTSTATUS status;
786 TALLOC_CTX *mem_ctx;
788 if (state->out_mem_ctx) {
789 mem_ctx = state->out_mem_ctx;
790 } else {
791 mem_ctx = state;
794 status = state->dispatch_recv(subreq, mem_ctx);
795 TALLOC_FREE(subreq);
796 if (!NT_STATUS_IS_OK(status)) {
797 tevent_req_nterror(req, status);
798 return;
801 /* Copy out parameters */
803 /* Copy result */
804 state->orig.out.result = state->tmp.out.result;
806 /* Reset temporary structure */
807 ZERO_STRUCT(state->tmp);
809 tevent_req_done(req);
812 NTSTATUS rpccli_lsa_ChangePassword_recv(struct tevent_req *req,
813 TALLOC_CTX *mem_ctx,
814 NTSTATUS *result)
816 struct rpccli_lsa_ChangePassword_state *state = tevent_req_data(
817 req, struct rpccli_lsa_ChangePassword_state);
818 NTSTATUS status;
820 if (tevent_req_is_nterror(req, &status)) {
821 tevent_req_received(req);
822 return status;
825 /* Steal possbile out parameters to the callers context */
826 talloc_steal(mem_ctx, state->out_mem_ctx);
828 /* Return result */
829 *result = state->orig.out.result;
831 tevent_req_received(req);
832 return NT_STATUS_OK;
835 NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli,
836 TALLOC_CTX *mem_ctx)
838 struct lsa_ChangePassword r;
839 NTSTATUS status;
841 /* In parameters */
843 status = cli->dispatch(cli,
844 mem_ctx,
845 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
846 NDR_LSA_CHANGEPASSWORD,
847 &r);
849 if (!NT_STATUS_IS_OK(status)) {
850 return status;
853 if (NT_STATUS_IS_ERR(status)) {
854 return status;
857 /* Return variables */
859 /* Return result */
860 return r.out.result;
863 struct rpccli_lsa_OpenPolicy_state {
864 struct lsa_OpenPolicy orig;
865 struct lsa_OpenPolicy tmp;
866 TALLOC_CTX *out_mem_ctx;
867 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
870 static void rpccli_lsa_OpenPolicy_done(struct tevent_req *subreq);
872 struct tevent_req *rpccli_lsa_OpenPolicy_send(TALLOC_CTX *mem_ctx,
873 struct tevent_context *ev,
874 struct rpc_pipe_client *cli,
875 uint16_t *_system_name /* [in] [unique] */,
876 struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
877 uint32_t _access_mask /* [in] */,
878 struct policy_handle *_handle /* [out] [ref] */)
880 struct tevent_req *req;
881 struct rpccli_lsa_OpenPolicy_state *state;
882 struct tevent_req *subreq;
884 req = tevent_req_create(mem_ctx, &state,
885 struct rpccli_lsa_OpenPolicy_state);
886 if (req == NULL) {
887 return NULL;
889 state->out_mem_ctx = NULL;
890 state->dispatch_recv = cli->dispatch_recv;
892 /* In parameters */
893 state->orig.in.system_name = _system_name;
894 state->orig.in.attr = _attr;
895 state->orig.in.access_mask = _access_mask;
897 /* Out parameters */
898 state->orig.out.handle = _handle;
900 /* Result */
901 ZERO_STRUCT(state->orig.out.result);
903 state->out_mem_ctx = talloc_named_const(state, 0,
904 "rpccli_lsa_OpenPolicy_out_memory");
905 if (tevent_req_nomem(state->out_mem_ctx, req)) {
906 return tevent_req_post(req, ev);
909 /* make a temporary copy, that we pass to the dispatch function */
910 state->tmp = state->orig;
912 subreq = cli->dispatch_send(state, ev, cli,
913 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
914 NDR_LSA_OPENPOLICY,
915 &state->tmp);
916 if (tevent_req_nomem(subreq, req)) {
917 return tevent_req_post(req, ev);
919 tevent_req_set_callback(subreq, rpccli_lsa_OpenPolicy_done, req);
920 return req;
923 static void rpccli_lsa_OpenPolicy_done(struct tevent_req *subreq)
925 struct tevent_req *req = tevent_req_callback_data(
926 subreq, struct tevent_req);
927 struct rpccli_lsa_OpenPolicy_state *state = tevent_req_data(
928 req, struct rpccli_lsa_OpenPolicy_state);
929 NTSTATUS status;
930 TALLOC_CTX *mem_ctx;
932 if (state->out_mem_ctx) {
933 mem_ctx = state->out_mem_ctx;
934 } else {
935 mem_ctx = state;
938 status = state->dispatch_recv(subreq, mem_ctx);
939 TALLOC_FREE(subreq);
940 if (!NT_STATUS_IS_OK(status)) {
941 tevent_req_nterror(req, status);
942 return;
945 /* Copy out parameters */
946 *state->orig.out.handle = *state->tmp.out.handle;
948 /* Copy result */
949 state->orig.out.result = state->tmp.out.result;
951 /* Reset temporary structure */
952 ZERO_STRUCT(state->tmp);
954 tevent_req_done(req);
957 NTSTATUS rpccli_lsa_OpenPolicy_recv(struct tevent_req *req,
958 TALLOC_CTX *mem_ctx,
959 NTSTATUS *result)
961 struct rpccli_lsa_OpenPolicy_state *state = tevent_req_data(
962 req, struct rpccli_lsa_OpenPolicy_state);
963 NTSTATUS status;
965 if (tevent_req_is_nterror(req, &status)) {
966 tevent_req_received(req);
967 return status;
970 /* Steal possbile out parameters to the callers context */
971 talloc_steal(mem_ctx, state->out_mem_ctx);
973 /* Return result */
974 *result = state->orig.out.result;
976 tevent_req_received(req);
977 return NT_STATUS_OK;
980 NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli,
981 TALLOC_CTX *mem_ctx,
982 uint16_t *system_name /* [in] [unique] */,
983 struct lsa_ObjectAttribute *attr /* [in] [ref] */,
984 uint32_t access_mask /* [in] */,
985 struct policy_handle *handle /* [out] [ref] */)
987 struct lsa_OpenPolicy r;
988 NTSTATUS status;
990 /* In parameters */
991 r.in.system_name = system_name;
992 r.in.attr = attr;
993 r.in.access_mask = access_mask;
995 status = cli->dispatch(cli,
996 mem_ctx,
997 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
998 NDR_LSA_OPENPOLICY,
999 &r);
1001 if (!NT_STATUS_IS_OK(status)) {
1002 return status;
1005 if (NT_STATUS_IS_ERR(status)) {
1006 return status;
1009 /* Return variables */
1010 *handle = *r.out.handle;
1012 /* Return result */
1013 return r.out.result;
1016 struct rpccli_lsa_QueryInfoPolicy_state {
1017 struct lsa_QueryInfoPolicy orig;
1018 struct lsa_QueryInfoPolicy tmp;
1019 TALLOC_CTX *out_mem_ctx;
1020 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1023 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req *subreq);
1025 struct tevent_req *rpccli_lsa_QueryInfoPolicy_send(TALLOC_CTX *mem_ctx,
1026 struct tevent_context *ev,
1027 struct rpc_pipe_client *cli,
1028 struct policy_handle *_handle /* [in] [ref] */,
1029 enum lsa_PolicyInfo _level /* [in] */,
1030 union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */)
1032 struct tevent_req *req;
1033 struct rpccli_lsa_QueryInfoPolicy_state *state;
1034 struct tevent_req *subreq;
1036 req = tevent_req_create(mem_ctx, &state,
1037 struct rpccli_lsa_QueryInfoPolicy_state);
1038 if (req == NULL) {
1039 return NULL;
1041 state->out_mem_ctx = NULL;
1042 state->dispatch_recv = cli->dispatch_recv;
1044 /* In parameters */
1045 state->orig.in.handle = _handle;
1046 state->orig.in.level = _level;
1048 /* Out parameters */
1049 state->orig.out.info = _info;
1051 /* Result */
1052 ZERO_STRUCT(state->orig.out.result);
1054 state->out_mem_ctx = talloc_named_const(state, 0,
1055 "rpccli_lsa_QueryInfoPolicy_out_memory");
1056 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1057 return tevent_req_post(req, ev);
1060 /* make a temporary copy, that we pass to the dispatch function */
1061 state->tmp = state->orig;
1063 subreq = cli->dispatch_send(state, ev, cli,
1064 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1065 NDR_LSA_QUERYINFOPOLICY,
1066 &state->tmp);
1067 if (tevent_req_nomem(subreq, req)) {
1068 return tevent_req_post(req, ev);
1070 tevent_req_set_callback(subreq, rpccli_lsa_QueryInfoPolicy_done, req);
1071 return req;
1074 static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req *subreq)
1076 struct tevent_req *req = tevent_req_callback_data(
1077 subreq, struct tevent_req);
1078 struct rpccli_lsa_QueryInfoPolicy_state *state = tevent_req_data(
1079 req, struct rpccli_lsa_QueryInfoPolicy_state);
1080 NTSTATUS status;
1081 TALLOC_CTX *mem_ctx;
1083 if (state->out_mem_ctx) {
1084 mem_ctx = state->out_mem_ctx;
1085 } else {
1086 mem_ctx = state;
1089 status = state->dispatch_recv(subreq, mem_ctx);
1090 TALLOC_FREE(subreq);
1091 if (!NT_STATUS_IS_OK(status)) {
1092 tevent_req_nterror(req, status);
1093 return;
1096 /* Copy out parameters */
1097 *state->orig.out.info = *state->tmp.out.info;
1099 /* Copy result */
1100 state->orig.out.result = state->tmp.out.result;
1102 /* Reset temporary structure */
1103 ZERO_STRUCT(state->tmp);
1105 tevent_req_done(req);
1108 NTSTATUS rpccli_lsa_QueryInfoPolicy_recv(struct tevent_req *req,
1109 TALLOC_CTX *mem_ctx,
1110 NTSTATUS *result)
1112 struct rpccli_lsa_QueryInfoPolicy_state *state = tevent_req_data(
1113 req, struct rpccli_lsa_QueryInfoPolicy_state);
1114 NTSTATUS status;
1116 if (tevent_req_is_nterror(req, &status)) {
1117 tevent_req_received(req);
1118 return status;
1121 /* Steal possbile out parameters to the callers context */
1122 talloc_steal(mem_ctx, state->out_mem_ctx);
1124 /* Return result */
1125 *result = state->orig.out.result;
1127 tevent_req_received(req);
1128 return NT_STATUS_OK;
1131 NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli,
1132 TALLOC_CTX *mem_ctx,
1133 struct policy_handle *handle /* [in] [ref] */,
1134 enum lsa_PolicyInfo level /* [in] */,
1135 union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */)
1137 struct lsa_QueryInfoPolicy r;
1138 NTSTATUS status;
1140 /* In parameters */
1141 r.in.handle = handle;
1142 r.in.level = level;
1144 status = cli->dispatch(cli,
1145 mem_ctx,
1146 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1147 NDR_LSA_QUERYINFOPOLICY,
1148 &r);
1150 if (!NT_STATUS_IS_OK(status)) {
1151 return status;
1154 if (NT_STATUS_IS_ERR(status)) {
1155 return status;
1158 /* Return variables */
1159 *info = *r.out.info;
1161 /* Return result */
1162 return r.out.result;
1165 struct rpccli_lsa_SetInfoPolicy_state {
1166 struct lsa_SetInfoPolicy orig;
1167 struct lsa_SetInfoPolicy tmp;
1168 TALLOC_CTX *out_mem_ctx;
1169 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1172 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req *subreq);
1174 struct tevent_req *rpccli_lsa_SetInfoPolicy_send(TALLOC_CTX *mem_ctx,
1175 struct tevent_context *ev,
1176 struct rpc_pipe_client *cli,
1177 struct policy_handle *_handle /* [in] [ref] */,
1178 enum lsa_PolicyInfo _level /* [in] */,
1179 union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */)
1181 struct tevent_req *req;
1182 struct rpccli_lsa_SetInfoPolicy_state *state;
1183 struct tevent_req *subreq;
1185 req = tevent_req_create(mem_ctx, &state,
1186 struct rpccli_lsa_SetInfoPolicy_state);
1187 if (req == NULL) {
1188 return NULL;
1190 state->out_mem_ctx = NULL;
1191 state->dispatch_recv = cli->dispatch_recv;
1193 /* In parameters */
1194 state->orig.in.handle = _handle;
1195 state->orig.in.level = _level;
1196 state->orig.in.info = _info;
1198 /* Out parameters */
1200 /* Result */
1201 ZERO_STRUCT(state->orig.out.result);
1203 /* make a temporary copy, that we pass to the dispatch function */
1204 state->tmp = state->orig;
1206 subreq = cli->dispatch_send(state, ev, cli,
1207 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1208 NDR_LSA_SETINFOPOLICY,
1209 &state->tmp);
1210 if (tevent_req_nomem(subreq, req)) {
1211 return tevent_req_post(req, ev);
1213 tevent_req_set_callback(subreq, rpccli_lsa_SetInfoPolicy_done, req);
1214 return req;
1217 static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req *subreq)
1219 struct tevent_req *req = tevent_req_callback_data(
1220 subreq, struct tevent_req);
1221 struct rpccli_lsa_SetInfoPolicy_state *state = tevent_req_data(
1222 req, struct rpccli_lsa_SetInfoPolicy_state);
1223 NTSTATUS status;
1224 TALLOC_CTX *mem_ctx;
1226 if (state->out_mem_ctx) {
1227 mem_ctx = state->out_mem_ctx;
1228 } else {
1229 mem_ctx = state;
1232 status = state->dispatch_recv(subreq, mem_ctx);
1233 TALLOC_FREE(subreq);
1234 if (!NT_STATUS_IS_OK(status)) {
1235 tevent_req_nterror(req, status);
1236 return;
1239 /* Copy out parameters */
1241 /* Copy result */
1242 state->orig.out.result = state->tmp.out.result;
1244 /* Reset temporary structure */
1245 ZERO_STRUCT(state->tmp);
1247 tevent_req_done(req);
1250 NTSTATUS rpccli_lsa_SetInfoPolicy_recv(struct tevent_req *req,
1251 TALLOC_CTX *mem_ctx,
1252 NTSTATUS *result)
1254 struct rpccli_lsa_SetInfoPolicy_state *state = tevent_req_data(
1255 req, struct rpccli_lsa_SetInfoPolicy_state);
1256 NTSTATUS status;
1258 if (tevent_req_is_nterror(req, &status)) {
1259 tevent_req_received(req);
1260 return status;
1263 /* Steal possbile out parameters to the callers context */
1264 talloc_steal(mem_ctx, state->out_mem_ctx);
1266 /* Return result */
1267 *result = state->orig.out.result;
1269 tevent_req_received(req);
1270 return NT_STATUS_OK;
1273 NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli,
1274 TALLOC_CTX *mem_ctx,
1275 struct policy_handle *handle /* [in] [ref] */,
1276 enum lsa_PolicyInfo level /* [in] */,
1277 union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */)
1279 struct lsa_SetInfoPolicy r;
1280 NTSTATUS status;
1282 /* In parameters */
1283 r.in.handle = handle;
1284 r.in.level = level;
1285 r.in.info = info;
1287 status = cli->dispatch(cli,
1288 mem_ctx,
1289 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1290 NDR_LSA_SETINFOPOLICY,
1291 &r);
1293 if (!NT_STATUS_IS_OK(status)) {
1294 return status;
1297 if (NT_STATUS_IS_ERR(status)) {
1298 return status;
1301 /* Return variables */
1303 /* Return result */
1304 return r.out.result;
1307 struct rpccli_lsa_ClearAuditLog_state {
1308 struct lsa_ClearAuditLog orig;
1309 struct lsa_ClearAuditLog tmp;
1310 TALLOC_CTX *out_mem_ctx;
1311 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1314 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req *subreq);
1316 struct tevent_req *rpccli_lsa_ClearAuditLog_send(TALLOC_CTX *mem_ctx,
1317 struct tevent_context *ev,
1318 struct rpc_pipe_client *cli)
1320 struct tevent_req *req;
1321 struct rpccli_lsa_ClearAuditLog_state *state;
1322 struct tevent_req *subreq;
1324 req = tevent_req_create(mem_ctx, &state,
1325 struct rpccli_lsa_ClearAuditLog_state);
1326 if (req == NULL) {
1327 return NULL;
1329 state->out_mem_ctx = NULL;
1330 state->dispatch_recv = cli->dispatch_recv;
1332 /* In parameters */
1334 /* Out parameters */
1336 /* Result */
1337 ZERO_STRUCT(state->orig.out.result);
1339 /* make a temporary copy, that we pass to the dispatch function */
1340 state->tmp = state->orig;
1342 subreq = cli->dispatch_send(state, ev, cli,
1343 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1344 NDR_LSA_CLEARAUDITLOG,
1345 &state->tmp);
1346 if (tevent_req_nomem(subreq, req)) {
1347 return tevent_req_post(req, ev);
1349 tevent_req_set_callback(subreq, rpccli_lsa_ClearAuditLog_done, req);
1350 return req;
1353 static void rpccli_lsa_ClearAuditLog_done(struct tevent_req *subreq)
1355 struct tevent_req *req = tevent_req_callback_data(
1356 subreq, struct tevent_req);
1357 struct rpccli_lsa_ClearAuditLog_state *state = tevent_req_data(
1358 req, struct rpccli_lsa_ClearAuditLog_state);
1359 NTSTATUS status;
1360 TALLOC_CTX *mem_ctx;
1362 if (state->out_mem_ctx) {
1363 mem_ctx = state->out_mem_ctx;
1364 } else {
1365 mem_ctx = state;
1368 status = state->dispatch_recv(subreq, mem_ctx);
1369 TALLOC_FREE(subreq);
1370 if (!NT_STATUS_IS_OK(status)) {
1371 tevent_req_nterror(req, status);
1372 return;
1375 /* Copy out parameters */
1377 /* Copy result */
1378 state->orig.out.result = state->tmp.out.result;
1380 /* Reset temporary structure */
1381 ZERO_STRUCT(state->tmp);
1383 tevent_req_done(req);
1386 NTSTATUS rpccli_lsa_ClearAuditLog_recv(struct tevent_req *req,
1387 TALLOC_CTX *mem_ctx,
1388 NTSTATUS *result)
1390 struct rpccli_lsa_ClearAuditLog_state *state = tevent_req_data(
1391 req, struct rpccli_lsa_ClearAuditLog_state);
1392 NTSTATUS status;
1394 if (tevent_req_is_nterror(req, &status)) {
1395 tevent_req_received(req);
1396 return status;
1399 /* Steal possbile out parameters to the callers context */
1400 talloc_steal(mem_ctx, state->out_mem_ctx);
1402 /* Return result */
1403 *result = state->orig.out.result;
1405 tevent_req_received(req);
1406 return NT_STATUS_OK;
1409 NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli,
1410 TALLOC_CTX *mem_ctx)
1412 struct lsa_ClearAuditLog r;
1413 NTSTATUS status;
1415 /* In parameters */
1417 status = cli->dispatch(cli,
1418 mem_ctx,
1419 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1420 NDR_LSA_CLEARAUDITLOG,
1421 &r);
1423 if (!NT_STATUS_IS_OK(status)) {
1424 return status;
1427 if (NT_STATUS_IS_ERR(status)) {
1428 return status;
1431 /* Return variables */
1433 /* Return result */
1434 return r.out.result;
1437 struct rpccli_lsa_CreateAccount_state {
1438 struct lsa_CreateAccount orig;
1439 struct lsa_CreateAccount tmp;
1440 TALLOC_CTX *out_mem_ctx;
1441 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1444 static void rpccli_lsa_CreateAccount_done(struct tevent_req *subreq);
1446 struct tevent_req *rpccli_lsa_CreateAccount_send(TALLOC_CTX *mem_ctx,
1447 struct tevent_context *ev,
1448 struct rpc_pipe_client *cli,
1449 struct policy_handle *_handle /* [in] [ref] */,
1450 struct dom_sid2 *_sid /* [in] [ref] */,
1451 uint32_t _access_mask /* [in] */,
1452 struct policy_handle *_acct_handle /* [out] [ref] */)
1454 struct tevent_req *req;
1455 struct rpccli_lsa_CreateAccount_state *state;
1456 struct tevent_req *subreq;
1458 req = tevent_req_create(mem_ctx, &state,
1459 struct rpccli_lsa_CreateAccount_state);
1460 if (req == NULL) {
1461 return NULL;
1463 state->out_mem_ctx = NULL;
1464 state->dispatch_recv = cli->dispatch_recv;
1466 /* In parameters */
1467 state->orig.in.handle = _handle;
1468 state->orig.in.sid = _sid;
1469 state->orig.in.access_mask = _access_mask;
1471 /* Out parameters */
1472 state->orig.out.acct_handle = _acct_handle;
1474 /* Result */
1475 ZERO_STRUCT(state->orig.out.result);
1477 state->out_mem_ctx = talloc_named_const(state, 0,
1478 "rpccli_lsa_CreateAccount_out_memory");
1479 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1480 return tevent_req_post(req, ev);
1483 /* make a temporary copy, that we pass to the dispatch function */
1484 state->tmp = state->orig;
1486 subreq = cli->dispatch_send(state, ev, cli,
1487 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1488 NDR_LSA_CREATEACCOUNT,
1489 &state->tmp);
1490 if (tevent_req_nomem(subreq, req)) {
1491 return tevent_req_post(req, ev);
1493 tevent_req_set_callback(subreq, rpccli_lsa_CreateAccount_done, req);
1494 return req;
1497 static void rpccli_lsa_CreateAccount_done(struct tevent_req *subreq)
1499 struct tevent_req *req = tevent_req_callback_data(
1500 subreq, struct tevent_req);
1501 struct rpccli_lsa_CreateAccount_state *state = tevent_req_data(
1502 req, struct rpccli_lsa_CreateAccount_state);
1503 NTSTATUS status;
1504 TALLOC_CTX *mem_ctx;
1506 if (state->out_mem_ctx) {
1507 mem_ctx = state->out_mem_ctx;
1508 } else {
1509 mem_ctx = state;
1512 status = state->dispatch_recv(subreq, mem_ctx);
1513 TALLOC_FREE(subreq);
1514 if (!NT_STATUS_IS_OK(status)) {
1515 tevent_req_nterror(req, status);
1516 return;
1519 /* Copy out parameters */
1520 *state->orig.out.acct_handle = *state->tmp.out.acct_handle;
1522 /* Copy result */
1523 state->orig.out.result = state->tmp.out.result;
1525 /* Reset temporary structure */
1526 ZERO_STRUCT(state->tmp);
1528 tevent_req_done(req);
1531 NTSTATUS rpccli_lsa_CreateAccount_recv(struct tevent_req *req,
1532 TALLOC_CTX *mem_ctx,
1533 NTSTATUS *result)
1535 struct rpccli_lsa_CreateAccount_state *state = tevent_req_data(
1536 req, struct rpccli_lsa_CreateAccount_state);
1537 NTSTATUS status;
1539 if (tevent_req_is_nterror(req, &status)) {
1540 tevent_req_received(req);
1541 return status;
1544 /* Steal possbile out parameters to the callers context */
1545 talloc_steal(mem_ctx, state->out_mem_ctx);
1547 /* Return result */
1548 *result = state->orig.out.result;
1550 tevent_req_received(req);
1551 return NT_STATUS_OK;
1554 NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli,
1555 TALLOC_CTX *mem_ctx,
1556 struct policy_handle *handle /* [in] [ref] */,
1557 struct dom_sid2 *sid /* [in] [ref] */,
1558 uint32_t access_mask /* [in] */,
1559 struct policy_handle *acct_handle /* [out] [ref] */)
1561 struct lsa_CreateAccount r;
1562 NTSTATUS status;
1564 /* In parameters */
1565 r.in.handle = handle;
1566 r.in.sid = sid;
1567 r.in.access_mask = access_mask;
1569 status = cli->dispatch(cli,
1570 mem_ctx,
1571 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1572 NDR_LSA_CREATEACCOUNT,
1573 &r);
1575 if (!NT_STATUS_IS_OK(status)) {
1576 return status;
1579 if (NT_STATUS_IS_ERR(status)) {
1580 return status;
1583 /* Return variables */
1584 *acct_handle = *r.out.acct_handle;
1586 /* Return result */
1587 return r.out.result;
1590 struct rpccli_lsa_EnumAccounts_state {
1591 struct lsa_EnumAccounts orig;
1592 struct lsa_EnumAccounts tmp;
1593 TALLOC_CTX *out_mem_ctx;
1594 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1597 static void rpccli_lsa_EnumAccounts_done(struct tevent_req *subreq);
1599 struct tevent_req *rpccli_lsa_EnumAccounts_send(TALLOC_CTX *mem_ctx,
1600 struct tevent_context *ev,
1601 struct rpc_pipe_client *cli,
1602 struct policy_handle *_handle /* [in] [ref] */,
1603 uint32_t *_resume_handle /* [in,out] [ref] */,
1604 struct lsa_SidArray *_sids /* [out] [ref] */,
1605 uint32_t _num_entries /* [in] [range(0,8192)] */)
1607 struct tevent_req *req;
1608 struct rpccli_lsa_EnumAccounts_state *state;
1609 struct tevent_req *subreq;
1611 req = tevent_req_create(mem_ctx, &state,
1612 struct rpccli_lsa_EnumAccounts_state);
1613 if (req == NULL) {
1614 return NULL;
1616 state->out_mem_ctx = NULL;
1617 state->dispatch_recv = cli->dispatch_recv;
1619 /* In parameters */
1620 state->orig.in.handle = _handle;
1621 state->orig.in.resume_handle = _resume_handle;
1622 state->orig.in.num_entries = _num_entries;
1624 /* Out parameters */
1625 state->orig.out.resume_handle = _resume_handle;
1626 state->orig.out.sids = _sids;
1628 /* Result */
1629 ZERO_STRUCT(state->orig.out.result);
1631 state->out_mem_ctx = talloc_named_const(state, 0,
1632 "rpccli_lsa_EnumAccounts_out_memory");
1633 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1634 return tevent_req_post(req, ev);
1637 /* make a temporary copy, that we pass to the dispatch function */
1638 state->tmp = state->orig;
1640 subreq = cli->dispatch_send(state, ev, cli,
1641 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1642 NDR_LSA_ENUMACCOUNTS,
1643 &state->tmp);
1644 if (tevent_req_nomem(subreq, req)) {
1645 return tevent_req_post(req, ev);
1647 tevent_req_set_callback(subreq, rpccli_lsa_EnumAccounts_done, req);
1648 return req;
1651 static void rpccli_lsa_EnumAccounts_done(struct tevent_req *subreq)
1653 struct tevent_req *req = tevent_req_callback_data(
1654 subreq, struct tevent_req);
1655 struct rpccli_lsa_EnumAccounts_state *state = tevent_req_data(
1656 req, struct rpccli_lsa_EnumAccounts_state);
1657 NTSTATUS status;
1658 TALLOC_CTX *mem_ctx;
1660 if (state->out_mem_ctx) {
1661 mem_ctx = state->out_mem_ctx;
1662 } else {
1663 mem_ctx = state;
1666 status = state->dispatch_recv(subreq, mem_ctx);
1667 TALLOC_FREE(subreq);
1668 if (!NT_STATUS_IS_OK(status)) {
1669 tevent_req_nterror(req, status);
1670 return;
1673 /* Copy out parameters */
1674 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
1675 *state->orig.out.sids = *state->tmp.out.sids;
1677 /* Copy result */
1678 state->orig.out.result = state->tmp.out.result;
1680 /* Reset temporary structure */
1681 ZERO_STRUCT(state->tmp);
1683 tevent_req_done(req);
1686 NTSTATUS rpccli_lsa_EnumAccounts_recv(struct tevent_req *req,
1687 TALLOC_CTX *mem_ctx,
1688 NTSTATUS *result)
1690 struct rpccli_lsa_EnumAccounts_state *state = tevent_req_data(
1691 req, struct rpccli_lsa_EnumAccounts_state);
1692 NTSTATUS status;
1694 if (tevent_req_is_nterror(req, &status)) {
1695 tevent_req_received(req);
1696 return status;
1699 /* Steal possbile out parameters to the callers context */
1700 talloc_steal(mem_ctx, state->out_mem_ctx);
1702 /* Return result */
1703 *result = state->orig.out.result;
1705 tevent_req_received(req);
1706 return NT_STATUS_OK;
1709 NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
1710 TALLOC_CTX *mem_ctx,
1711 struct policy_handle *handle /* [in] [ref] */,
1712 uint32_t *resume_handle /* [in,out] [ref] */,
1713 struct lsa_SidArray *sids /* [out] [ref] */,
1714 uint32_t num_entries /* [in] [range(0,8192)] */)
1716 struct lsa_EnumAccounts r;
1717 NTSTATUS status;
1719 /* In parameters */
1720 r.in.handle = handle;
1721 r.in.resume_handle = resume_handle;
1722 r.in.num_entries = num_entries;
1724 status = cli->dispatch(cli,
1725 mem_ctx,
1726 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1727 NDR_LSA_ENUMACCOUNTS,
1728 &r);
1730 if (!NT_STATUS_IS_OK(status)) {
1731 return status;
1734 if (NT_STATUS_IS_ERR(status)) {
1735 return status;
1738 /* Return variables */
1739 *resume_handle = *r.out.resume_handle;
1740 *sids = *r.out.sids;
1742 /* Return result */
1743 return r.out.result;
1746 struct rpccli_lsa_CreateTrustedDomain_state {
1747 struct lsa_CreateTrustedDomain orig;
1748 struct lsa_CreateTrustedDomain tmp;
1749 TALLOC_CTX *out_mem_ctx;
1750 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1753 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req *subreq);
1755 struct tevent_req *rpccli_lsa_CreateTrustedDomain_send(TALLOC_CTX *mem_ctx,
1756 struct tevent_context *ev,
1757 struct rpc_pipe_client *cli,
1758 struct policy_handle *_policy_handle /* [in] [ref] */,
1759 struct lsa_DomainInfo *_info /* [in] [ref] */,
1760 uint32_t _access_mask /* [in] */,
1761 struct policy_handle *_trustdom_handle /* [out] [ref] */)
1763 struct tevent_req *req;
1764 struct rpccli_lsa_CreateTrustedDomain_state *state;
1765 struct tevent_req *subreq;
1767 req = tevent_req_create(mem_ctx, &state,
1768 struct rpccli_lsa_CreateTrustedDomain_state);
1769 if (req == NULL) {
1770 return NULL;
1772 state->out_mem_ctx = NULL;
1773 state->dispatch_recv = cli->dispatch_recv;
1775 /* In parameters */
1776 state->orig.in.policy_handle = _policy_handle;
1777 state->orig.in.info = _info;
1778 state->orig.in.access_mask = _access_mask;
1780 /* Out parameters */
1781 state->orig.out.trustdom_handle = _trustdom_handle;
1783 /* Result */
1784 ZERO_STRUCT(state->orig.out.result);
1786 state->out_mem_ctx = talloc_named_const(state, 0,
1787 "rpccli_lsa_CreateTrustedDomain_out_memory");
1788 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1789 return tevent_req_post(req, ev);
1792 /* make a temporary copy, that we pass to the dispatch function */
1793 state->tmp = state->orig;
1795 subreq = cli->dispatch_send(state, ev, cli,
1796 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1797 NDR_LSA_CREATETRUSTEDDOMAIN,
1798 &state->tmp);
1799 if (tevent_req_nomem(subreq, req)) {
1800 return tevent_req_post(req, ev);
1802 tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomain_done, req);
1803 return req;
1806 static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req *subreq)
1808 struct tevent_req *req = tevent_req_callback_data(
1809 subreq, struct tevent_req);
1810 struct rpccli_lsa_CreateTrustedDomain_state *state = tevent_req_data(
1811 req, struct rpccli_lsa_CreateTrustedDomain_state);
1812 NTSTATUS status;
1813 TALLOC_CTX *mem_ctx;
1815 if (state->out_mem_ctx) {
1816 mem_ctx = state->out_mem_ctx;
1817 } else {
1818 mem_ctx = state;
1821 status = state->dispatch_recv(subreq, mem_ctx);
1822 TALLOC_FREE(subreq);
1823 if (!NT_STATUS_IS_OK(status)) {
1824 tevent_req_nterror(req, status);
1825 return;
1828 /* Copy out parameters */
1829 *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
1831 /* Copy result */
1832 state->orig.out.result = state->tmp.out.result;
1834 /* Reset temporary structure */
1835 ZERO_STRUCT(state->tmp);
1837 tevent_req_done(req);
1840 NTSTATUS rpccli_lsa_CreateTrustedDomain_recv(struct tevent_req *req,
1841 TALLOC_CTX *mem_ctx,
1842 NTSTATUS *result)
1844 struct rpccli_lsa_CreateTrustedDomain_state *state = tevent_req_data(
1845 req, struct rpccli_lsa_CreateTrustedDomain_state);
1846 NTSTATUS status;
1848 if (tevent_req_is_nterror(req, &status)) {
1849 tevent_req_received(req);
1850 return status;
1853 /* Steal possbile out parameters to the callers context */
1854 talloc_steal(mem_ctx, state->out_mem_ctx);
1856 /* Return result */
1857 *result = state->orig.out.result;
1859 tevent_req_received(req);
1860 return NT_STATUS_OK;
1863 NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
1864 TALLOC_CTX *mem_ctx,
1865 struct policy_handle *policy_handle /* [in] [ref] */,
1866 struct lsa_DomainInfo *info /* [in] [ref] */,
1867 uint32_t access_mask /* [in] */,
1868 struct policy_handle *trustdom_handle /* [out] [ref] */)
1870 struct lsa_CreateTrustedDomain r;
1871 NTSTATUS status;
1873 /* In parameters */
1874 r.in.policy_handle = policy_handle;
1875 r.in.info = info;
1876 r.in.access_mask = access_mask;
1878 status = cli->dispatch(cli,
1879 mem_ctx,
1880 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1881 NDR_LSA_CREATETRUSTEDDOMAIN,
1882 &r);
1884 if (!NT_STATUS_IS_OK(status)) {
1885 return status;
1888 if (NT_STATUS_IS_ERR(status)) {
1889 return status;
1892 /* Return variables */
1893 *trustdom_handle = *r.out.trustdom_handle;
1895 /* Return result */
1896 return r.out.result;
1899 struct rpccli_lsa_EnumTrustDom_state {
1900 struct lsa_EnumTrustDom orig;
1901 struct lsa_EnumTrustDom tmp;
1902 TALLOC_CTX *out_mem_ctx;
1903 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
1906 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req *subreq);
1908 struct tevent_req *rpccli_lsa_EnumTrustDom_send(TALLOC_CTX *mem_ctx,
1909 struct tevent_context *ev,
1910 struct rpc_pipe_client *cli,
1911 struct policy_handle *_handle /* [in] [ref] */,
1912 uint32_t *_resume_handle /* [in,out] [ref] */,
1913 struct lsa_DomainList *_domains /* [out] [ref] */,
1914 uint32_t _max_size /* [in] */)
1916 struct tevent_req *req;
1917 struct rpccli_lsa_EnumTrustDom_state *state;
1918 struct tevent_req *subreq;
1920 req = tevent_req_create(mem_ctx, &state,
1921 struct rpccli_lsa_EnumTrustDom_state);
1922 if (req == NULL) {
1923 return NULL;
1925 state->out_mem_ctx = NULL;
1926 state->dispatch_recv = cli->dispatch_recv;
1928 /* In parameters */
1929 state->orig.in.handle = _handle;
1930 state->orig.in.resume_handle = _resume_handle;
1931 state->orig.in.max_size = _max_size;
1933 /* Out parameters */
1934 state->orig.out.resume_handle = _resume_handle;
1935 state->orig.out.domains = _domains;
1937 /* Result */
1938 ZERO_STRUCT(state->orig.out.result);
1940 state->out_mem_ctx = talloc_named_const(state, 0,
1941 "rpccli_lsa_EnumTrustDom_out_memory");
1942 if (tevent_req_nomem(state->out_mem_ctx, req)) {
1943 return tevent_req_post(req, ev);
1946 /* make a temporary copy, that we pass to the dispatch function */
1947 state->tmp = state->orig;
1949 subreq = cli->dispatch_send(state, ev, cli,
1950 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
1951 NDR_LSA_ENUMTRUSTDOM,
1952 &state->tmp);
1953 if (tevent_req_nomem(subreq, req)) {
1954 return tevent_req_post(req, ev);
1956 tevent_req_set_callback(subreq, rpccli_lsa_EnumTrustDom_done, req);
1957 return req;
1960 static void rpccli_lsa_EnumTrustDom_done(struct tevent_req *subreq)
1962 struct tevent_req *req = tevent_req_callback_data(
1963 subreq, struct tevent_req);
1964 struct rpccli_lsa_EnumTrustDom_state *state = tevent_req_data(
1965 req, struct rpccli_lsa_EnumTrustDom_state);
1966 NTSTATUS status;
1967 TALLOC_CTX *mem_ctx;
1969 if (state->out_mem_ctx) {
1970 mem_ctx = state->out_mem_ctx;
1971 } else {
1972 mem_ctx = state;
1975 status = state->dispatch_recv(subreq, mem_ctx);
1976 TALLOC_FREE(subreq);
1977 if (!NT_STATUS_IS_OK(status)) {
1978 tevent_req_nterror(req, status);
1979 return;
1982 /* Copy out parameters */
1983 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
1984 *state->orig.out.domains = *state->tmp.out.domains;
1986 /* Copy result */
1987 state->orig.out.result = state->tmp.out.result;
1989 /* Reset temporary structure */
1990 ZERO_STRUCT(state->tmp);
1992 tevent_req_done(req);
1995 NTSTATUS rpccli_lsa_EnumTrustDom_recv(struct tevent_req *req,
1996 TALLOC_CTX *mem_ctx,
1997 NTSTATUS *result)
1999 struct rpccli_lsa_EnumTrustDom_state *state = tevent_req_data(
2000 req, struct rpccli_lsa_EnumTrustDom_state);
2001 NTSTATUS status;
2003 if (tevent_req_is_nterror(req, &status)) {
2004 tevent_req_received(req);
2005 return status;
2008 /* Steal possbile out parameters to the callers context */
2009 talloc_steal(mem_ctx, state->out_mem_ctx);
2011 /* Return result */
2012 *result = state->orig.out.result;
2014 tevent_req_received(req);
2015 return NT_STATUS_OK;
2018 NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli,
2019 TALLOC_CTX *mem_ctx,
2020 struct policy_handle *handle /* [in] [ref] */,
2021 uint32_t *resume_handle /* [in,out] [ref] */,
2022 struct lsa_DomainList *domains /* [out] [ref] */,
2023 uint32_t max_size /* [in] */)
2025 struct lsa_EnumTrustDom r;
2026 NTSTATUS status;
2028 /* In parameters */
2029 r.in.handle = handle;
2030 r.in.resume_handle = resume_handle;
2031 r.in.max_size = max_size;
2033 status = cli->dispatch(cli,
2034 mem_ctx,
2035 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2036 NDR_LSA_ENUMTRUSTDOM,
2037 &r);
2039 if (!NT_STATUS_IS_OK(status)) {
2040 return status;
2043 if (NT_STATUS_IS_ERR(status)) {
2044 return status;
2047 /* Return variables */
2048 *resume_handle = *r.out.resume_handle;
2049 *domains = *r.out.domains;
2051 /* Return result */
2052 return r.out.result;
2055 struct rpccli_lsa_LookupNames_state {
2056 struct lsa_LookupNames orig;
2057 struct lsa_LookupNames tmp;
2058 TALLOC_CTX *out_mem_ctx;
2059 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2062 static void rpccli_lsa_LookupNames_done(struct tevent_req *subreq);
2064 struct tevent_req *rpccli_lsa_LookupNames_send(TALLOC_CTX *mem_ctx,
2065 struct tevent_context *ev,
2066 struct rpc_pipe_client *cli,
2067 struct policy_handle *_handle /* [in] [ref] */,
2068 uint32_t _num_names /* [in] [range(0,1000)] */,
2069 struct lsa_String *_names /* [in] [size_is(num_names)] */,
2070 struct lsa_RefDomainList **_domains /* [out] [ref] */,
2071 struct lsa_TransSidArray *_sids /* [in,out] [ref] */,
2072 enum lsa_LookupNamesLevel _level /* [in] */,
2073 uint32_t *_count /* [in,out] [ref] */)
2075 struct tevent_req *req;
2076 struct rpccli_lsa_LookupNames_state *state;
2077 struct tevent_req *subreq;
2079 req = tevent_req_create(mem_ctx, &state,
2080 struct rpccli_lsa_LookupNames_state);
2081 if (req == NULL) {
2082 return NULL;
2084 state->out_mem_ctx = NULL;
2085 state->dispatch_recv = cli->dispatch_recv;
2087 /* In parameters */
2088 state->orig.in.handle = _handle;
2089 state->orig.in.num_names = _num_names;
2090 state->orig.in.names = _names;
2091 state->orig.in.sids = _sids;
2092 state->orig.in.level = _level;
2093 state->orig.in.count = _count;
2095 /* Out parameters */
2096 state->orig.out.domains = _domains;
2097 state->orig.out.sids = _sids;
2098 state->orig.out.count = _count;
2100 /* Result */
2101 ZERO_STRUCT(state->orig.out.result);
2103 state->out_mem_ctx = talloc_named_const(state, 0,
2104 "rpccli_lsa_LookupNames_out_memory");
2105 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2106 return tevent_req_post(req, ev);
2109 /* make a temporary copy, that we pass to the dispatch function */
2110 state->tmp = state->orig;
2112 subreq = cli->dispatch_send(state, ev, cli,
2113 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2114 NDR_LSA_LOOKUPNAMES,
2115 &state->tmp);
2116 if (tevent_req_nomem(subreq, req)) {
2117 return tevent_req_post(req, ev);
2119 tevent_req_set_callback(subreq, rpccli_lsa_LookupNames_done, req);
2120 return req;
2123 static void rpccli_lsa_LookupNames_done(struct tevent_req *subreq)
2125 struct tevent_req *req = tevent_req_callback_data(
2126 subreq, struct tevent_req);
2127 struct rpccli_lsa_LookupNames_state *state = tevent_req_data(
2128 req, struct rpccli_lsa_LookupNames_state);
2129 NTSTATUS status;
2130 TALLOC_CTX *mem_ctx;
2132 if (state->out_mem_ctx) {
2133 mem_ctx = state->out_mem_ctx;
2134 } else {
2135 mem_ctx = state;
2138 status = state->dispatch_recv(subreq, mem_ctx);
2139 TALLOC_FREE(subreq);
2140 if (!NT_STATUS_IS_OK(status)) {
2141 tevent_req_nterror(req, status);
2142 return;
2145 /* Copy out parameters */
2146 *state->orig.out.domains = *state->tmp.out.domains;
2147 *state->orig.out.sids = *state->tmp.out.sids;
2148 *state->orig.out.count = *state->tmp.out.count;
2150 /* Copy result */
2151 state->orig.out.result = state->tmp.out.result;
2153 /* Reset temporary structure */
2154 ZERO_STRUCT(state->tmp);
2156 tevent_req_done(req);
2159 NTSTATUS rpccli_lsa_LookupNames_recv(struct tevent_req *req,
2160 TALLOC_CTX *mem_ctx,
2161 NTSTATUS *result)
2163 struct rpccli_lsa_LookupNames_state *state = tevent_req_data(
2164 req, struct rpccli_lsa_LookupNames_state);
2165 NTSTATUS status;
2167 if (tevent_req_is_nterror(req, &status)) {
2168 tevent_req_received(req);
2169 return status;
2172 /* Steal possbile out parameters to the callers context */
2173 talloc_steal(mem_ctx, state->out_mem_ctx);
2175 /* Return result */
2176 *result = state->orig.out.result;
2178 tevent_req_received(req);
2179 return NT_STATUS_OK;
2182 NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
2183 TALLOC_CTX *mem_ctx,
2184 struct policy_handle *handle /* [in] [ref] */,
2185 uint32_t num_names /* [in] [range(0,1000)] */,
2186 struct lsa_String *names /* [in] [size_is(num_names)] */,
2187 struct lsa_RefDomainList **domains /* [out] [ref] */,
2188 struct lsa_TransSidArray *sids /* [in,out] [ref] */,
2189 enum lsa_LookupNamesLevel level /* [in] */,
2190 uint32_t *count /* [in,out] [ref] */)
2192 struct lsa_LookupNames r;
2193 NTSTATUS status;
2195 /* In parameters */
2196 r.in.handle = handle;
2197 r.in.num_names = num_names;
2198 r.in.names = names;
2199 r.in.sids = sids;
2200 r.in.level = level;
2201 r.in.count = count;
2203 status = cli->dispatch(cli,
2204 mem_ctx,
2205 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2206 NDR_LSA_LOOKUPNAMES,
2207 &r);
2209 if (!NT_STATUS_IS_OK(status)) {
2210 return status;
2213 if (NT_STATUS_IS_ERR(status)) {
2214 return status;
2217 /* Return variables */
2218 *domains = *r.out.domains;
2219 *sids = *r.out.sids;
2220 *count = *r.out.count;
2222 /* Return result */
2223 return r.out.result;
2226 struct rpccli_lsa_LookupSids_state {
2227 struct lsa_LookupSids orig;
2228 struct lsa_LookupSids tmp;
2229 TALLOC_CTX *out_mem_ctx;
2230 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2233 static void rpccli_lsa_LookupSids_done(struct tevent_req *subreq);
2235 struct tevent_req *rpccli_lsa_LookupSids_send(TALLOC_CTX *mem_ctx,
2236 struct tevent_context *ev,
2237 struct rpc_pipe_client *cli,
2238 struct policy_handle *_handle /* [in] [ref] */,
2239 struct lsa_SidArray *_sids /* [in] [ref] */,
2240 struct lsa_RefDomainList **_domains /* [out] [ref] */,
2241 struct lsa_TransNameArray *_names /* [in,out] [ref] */,
2242 enum lsa_LookupNamesLevel _level /* [in] */,
2243 uint32_t *_count /* [in,out] [ref] */)
2245 struct tevent_req *req;
2246 struct rpccli_lsa_LookupSids_state *state;
2247 struct tevent_req *subreq;
2249 req = tevent_req_create(mem_ctx, &state,
2250 struct rpccli_lsa_LookupSids_state);
2251 if (req == NULL) {
2252 return NULL;
2254 state->out_mem_ctx = NULL;
2255 state->dispatch_recv = cli->dispatch_recv;
2257 /* In parameters */
2258 state->orig.in.handle = _handle;
2259 state->orig.in.sids = _sids;
2260 state->orig.in.names = _names;
2261 state->orig.in.level = _level;
2262 state->orig.in.count = _count;
2264 /* Out parameters */
2265 state->orig.out.domains = _domains;
2266 state->orig.out.names = _names;
2267 state->orig.out.count = _count;
2269 /* Result */
2270 ZERO_STRUCT(state->orig.out.result);
2272 state->out_mem_ctx = talloc_named_const(state, 0,
2273 "rpccli_lsa_LookupSids_out_memory");
2274 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2275 return tevent_req_post(req, ev);
2278 /* make a temporary copy, that we pass to the dispatch function */
2279 state->tmp = state->orig;
2281 subreq = cli->dispatch_send(state, ev, cli,
2282 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2283 NDR_LSA_LOOKUPSIDS,
2284 &state->tmp);
2285 if (tevent_req_nomem(subreq, req)) {
2286 return tevent_req_post(req, ev);
2288 tevent_req_set_callback(subreq, rpccli_lsa_LookupSids_done, req);
2289 return req;
2292 static void rpccli_lsa_LookupSids_done(struct tevent_req *subreq)
2294 struct tevent_req *req = tevent_req_callback_data(
2295 subreq, struct tevent_req);
2296 struct rpccli_lsa_LookupSids_state *state = tevent_req_data(
2297 req, struct rpccli_lsa_LookupSids_state);
2298 NTSTATUS status;
2299 TALLOC_CTX *mem_ctx;
2301 if (state->out_mem_ctx) {
2302 mem_ctx = state->out_mem_ctx;
2303 } else {
2304 mem_ctx = state;
2307 status = state->dispatch_recv(subreq, mem_ctx);
2308 TALLOC_FREE(subreq);
2309 if (!NT_STATUS_IS_OK(status)) {
2310 tevent_req_nterror(req, status);
2311 return;
2314 /* Copy out parameters */
2315 *state->orig.out.domains = *state->tmp.out.domains;
2316 *state->orig.out.names = *state->tmp.out.names;
2317 *state->orig.out.count = *state->tmp.out.count;
2319 /* Copy result */
2320 state->orig.out.result = state->tmp.out.result;
2322 /* Reset temporary structure */
2323 ZERO_STRUCT(state->tmp);
2325 tevent_req_done(req);
2328 NTSTATUS rpccli_lsa_LookupSids_recv(struct tevent_req *req,
2329 TALLOC_CTX *mem_ctx,
2330 NTSTATUS *result)
2332 struct rpccli_lsa_LookupSids_state *state = tevent_req_data(
2333 req, struct rpccli_lsa_LookupSids_state);
2334 NTSTATUS status;
2336 if (tevent_req_is_nterror(req, &status)) {
2337 tevent_req_received(req);
2338 return status;
2341 /* Steal possbile out parameters to the callers context */
2342 talloc_steal(mem_ctx, state->out_mem_ctx);
2344 /* Return result */
2345 *result = state->orig.out.result;
2347 tevent_req_received(req);
2348 return NT_STATUS_OK;
2351 NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
2352 TALLOC_CTX *mem_ctx,
2353 struct policy_handle *handle /* [in] [ref] */,
2354 struct lsa_SidArray *sids /* [in] [ref] */,
2355 struct lsa_RefDomainList **domains /* [out] [ref] */,
2356 struct lsa_TransNameArray *names /* [in,out] [ref] */,
2357 enum lsa_LookupNamesLevel level /* [in] */,
2358 uint32_t *count /* [in,out] [ref] */)
2360 struct lsa_LookupSids r;
2361 NTSTATUS status;
2363 /* In parameters */
2364 r.in.handle = handle;
2365 r.in.sids = sids;
2366 r.in.names = names;
2367 r.in.level = level;
2368 r.in.count = count;
2370 status = cli->dispatch(cli,
2371 mem_ctx,
2372 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2373 NDR_LSA_LOOKUPSIDS,
2374 &r);
2376 if (!NT_STATUS_IS_OK(status)) {
2377 return status;
2380 if (NT_STATUS_IS_ERR(status)) {
2381 return status;
2384 /* Return variables */
2385 *domains = *r.out.domains;
2386 *names = *r.out.names;
2387 *count = *r.out.count;
2389 /* Return result */
2390 return r.out.result;
2393 struct rpccli_lsa_CreateSecret_state {
2394 struct lsa_CreateSecret orig;
2395 struct lsa_CreateSecret tmp;
2396 TALLOC_CTX *out_mem_ctx;
2397 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2400 static void rpccli_lsa_CreateSecret_done(struct tevent_req *subreq);
2402 struct tevent_req *rpccli_lsa_CreateSecret_send(TALLOC_CTX *mem_ctx,
2403 struct tevent_context *ev,
2404 struct rpc_pipe_client *cli,
2405 struct policy_handle *_handle /* [in] [ref] */,
2406 struct lsa_String _name /* [in] */,
2407 uint32_t _access_mask /* [in] */,
2408 struct policy_handle *_sec_handle /* [out] [ref] */)
2410 struct tevent_req *req;
2411 struct rpccli_lsa_CreateSecret_state *state;
2412 struct tevent_req *subreq;
2414 req = tevent_req_create(mem_ctx, &state,
2415 struct rpccli_lsa_CreateSecret_state);
2416 if (req == NULL) {
2417 return NULL;
2419 state->out_mem_ctx = NULL;
2420 state->dispatch_recv = cli->dispatch_recv;
2422 /* In parameters */
2423 state->orig.in.handle = _handle;
2424 state->orig.in.name = _name;
2425 state->orig.in.access_mask = _access_mask;
2427 /* Out parameters */
2428 state->orig.out.sec_handle = _sec_handle;
2430 /* Result */
2431 ZERO_STRUCT(state->orig.out.result);
2433 state->out_mem_ctx = talloc_named_const(state, 0,
2434 "rpccli_lsa_CreateSecret_out_memory");
2435 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2436 return tevent_req_post(req, ev);
2439 /* make a temporary copy, that we pass to the dispatch function */
2440 state->tmp = state->orig;
2442 subreq = cli->dispatch_send(state, ev, cli,
2443 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2444 NDR_LSA_CREATESECRET,
2445 &state->tmp);
2446 if (tevent_req_nomem(subreq, req)) {
2447 return tevent_req_post(req, ev);
2449 tevent_req_set_callback(subreq, rpccli_lsa_CreateSecret_done, req);
2450 return req;
2453 static void rpccli_lsa_CreateSecret_done(struct tevent_req *subreq)
2455 struct tevent_req *req = tevent_req_callback_data(
2456 subreq, struct tevent_req);
2457 struct rpccli_lsa_CreateSecret_state *state = tevent_req_data(
2458 req, struct rpccli_lsa_CreateSecret_state);
2459 NTSTATUS status;
2460 TALLOC_CTX *mem_ctx;
2462 if (state->out_mem_ctx) {
2463 mem_ctx = state->out_mem_ctx;
2464 } else {
2465 mem_ctx = state;
2468 status = state->dispatch_recv(subreq, mem_ctx);
2469 TALLOC_FREE(subreq);
2470 if (!NT_STATUS_IS_OK(status)) {
2471 tevent_req_nterror(req, status);
2472 return;
2475 /* Copy out parameters */
2476 *state->orig.out.sec_handle = *state->tmp.out.sec_handle;
2478 /* Copy result */
2479 state->orig.out.result = state->tmp.out.result;
2481 /* Reset temporary structure */
2482 ZERO_STRUCT(state->tmp);
2484 tevent_req_done(req);
2487 NTSTATUS rpccli_lsa_CreateSecret_recv(struct tevent_req *req,
2488 TALLOC_CTX *mem_ctx,
2489 NTSTATUS *result)
2491 struct rpccli_lsa_CreateSecret_state *state = tevent_req_data(
2492 req, struct rpccli_lsa_CreateSecret_state);
2493 NTSTATUS status;
2495 if (tevent_req_is_nterror(req, &status)) {
2496 tevent_req_received(req);
2497 return status;
2500 /* Steal possbile out parameters to the callers context */
2501 talloc_steal(mem_ctx, state->out_mem_ctx);
2503 /* Return result */
2504 *result = state->orig.out.result;
2506 tevent_req_received(req);
2507 return NT_STATUS_OK;
2510 NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli,
2511 TALLOC_CTX *mem_ctx,
2512 struct policy_handle *handle /* [in] [ref] */,
2513 struct lsa_String name /* [in] */,
2514 uint32_t access_mask /* [in] */,
2515 struct policy_handle *sec_handle /* [out] [ref] */)
2517 struct lsa_CreateSecret r;
2518 NTSTATUS status;
2520 /* In parameters */
2521 r.in.handle = handle;
2522 r.in.name = name;
2523 r.in.access_mask = access_mask;
2525 status = cli->dispatch(cli,
2526 mem_ctx,
2527 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2528 NDR_LSA_CREATESECRET,
2529 &r);
2531 if (!NT_STATUS_IS_OK(status)) {
2532 return status;
2535 if (NT_STATUS_IS_ERR(status)) {
2536 return status;
2539 /* Return variables */
2540 *sec_handle = *r.out.sec_handle;
2542 /* Return result */
2543 return r.out.result;
2546 struct rpccli_lsa_OpenAccount_state {
2547 struct lsa_OpenAccount orig;
2548 struct lsa_OpenAccount tmp;
2549 TALLOC_CTX *out_mem_ctx;
2550 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2553 static void rpccli_lsa_OpenAccount_done(struct tevent_req *subreq);
2555 struct tevent_req *rpccli_lsa_OpenAccount_send(TALLOC_CTX *mem_ctx,
2556 struct tevent_context *ev,
2557 struct rpc_pipe_client *cli,
2558 struct policy_handle *_handle /* [in] [ref] */,
2559 struct dom_sid2 *_sid /* [in] [ref] */,
2560 uint32_t _access_mask /* [in] */,
2561 struct policy_handle *_acct_handle /* [out] [ref] */)
2563 struct tevent_req *req;
2564 struct rpccli_lsa_OpenAccount_state *state;
2565 struct tevent_req *subreq;
2567 req = tevent_req_create(mem_ctx, &state,
2568 struct rpccli_lsa_OpenAccount_state);
2569 if (req == NULL) {
2570 return NULL;
2572 state->out_mem_ctx = NULL;
2573 state->dispatch_recv = cli->dispatch_recv;
2575 /* In parameters */
2576 state->orig.in.handle = _handle;
2577 state->orig.in.sid = _sid;
2578 state->orig.in.access_mask = _access_mask;
2580 /* Out parameters */
2581 state->orig.out.acct_handle = _acct_handle;
2583 /* Result */
2584 ZERO_STRUCT(state->orig.out.result);
2586 state->out_mem_ctx = talloc_named_const(state, 0,
2587 "rpccli_lsa_OpenAccount_out_memory");
2588 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2589 return tevent_req_post(req, ev);
2592 /* make a temporary copy, that we pass to the dispatch function */
2593 state->tmp = state->orig;
2595 subreq = cli->dispatch_send(state, ev, cli,
2596 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2597 NDR_LSA_OPENACCOUNT,
2598 &state->tmp);
2599 if (tevent_req_nomem(subreq, req)) {
2600 return tevent_req_post(req, ev);
2602 tevent_req_set_callback(subreq, rpccli_lsa_OpenAccount_done, req);
2603 return req;
2606 static void rpccli_lsa_OpenAccount_done(struct tevent_req *subreq)
2608 struct tevent_req *req = tevent_req_callback_data(
2609 subreq, struct tevent_req);
2610 struct rpccli_lsa_OpenAccount_state *state = tevent_req_data(
2611 req, struct rpccli_lsa_OpenAccount_state);
2612 NTSTATUS status;
2613 TALLOC_CTX *mem_ctx;
2615 if (state->out_mem_ctx) {
2616 mem_ctx = state->out_mem_ctx;
2617 } else {
2618 mem_ctx = state;
2621 status = state->dispatch_recv(subreq, mem_ctx);
2622 TALLOC_FREE(subreq);
2623 if (!NT_STATUS_IS_OK(status)) {
2624 tevent_req_nterror(req, status);
2625 return;
2628 /* Copy out parameters */
2629 *state->orig.out.acct_handle = *state->tmp.out.acct_handle;
2631 /* Copy result */
2632 state->orig.out.result = state->tmp.out.result;
2634 /* Reset temporary structure */
2635 ZERO_STRUCT(state->tmp);
2637 tevent_req_done(req);
2640 NTSTATUS rpccli_lsa_OpenAccount_recv(struct tevent_req *req,
2641 TALLOC_CTX *mem_ctx,
2642 NTSTATUS *result)
2644 struct rpccli_lsa_OpenAccount_state *state = tevent_req_data(
2645 req, struct rpccli_lsa_OpenAccount_state);
2646 NTSTATUS status;
2648 if (tevent_req_is_nterror(req, &status)) {
2649 tevent_req_received(req);
2650 return status;
2653 /* Steal possbile out parameters to the callers context */
2654 talloc_steal(mem_ctx, state->out_mem_ctx);
2656 /* Return result */
2657 *result = state->orig.out.result;
2659 tevent_req_received(req);
2660 return NT_STATUS_OK;
2663 NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
2664 TALLOC_CTX *mem_ctx,
2665 struct policy_handle *handle /* [in] [ref] */,
2666 struct dom_sid2 *sid /* [in] [ref] */,
2667 uint32_t access_mask /* [in] */,
2668 struct policy_handle *acct_handle /* [out] [ref] */)
2670 struct lsa_OpenAccount r;
2671 NTSTATUS status;
2673 /* In parameters */
2674 r.in.handle = handle;
2675 r.in.sid = sid;
2676 r.in.access_mask = access_mask;
2678 status = cli->dispatch(cli,
2679 mem_ctx,
2680 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2681 NDR_LSA_OPENACCOUNT,
2682 &r);
2684 if (!NT_STATUS_IS_OK(status)) {
2685 return status;
2688 if (NT_STATUS_IS_ERR(status)) {
2689 return status;
2692 /* Return variables */
2693 *acct_handle = *r.out.acct_handle;
2695 /* Return result */
2696 return r.out.result;
2699 struct rpccli_lsa_EnumPrivsAccount_state {
2700 struct lsa_EnumPrivsAccount orig;
2701 struct lsa_EnumPrivsAccount tmp;
2702 TALLOC_CTX *out_mem_ctx;
2703 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2706 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req *subreq);
2708 struct tevent_req *rpccli_lsa_EnumPrivsAccount_send(TALLOC_CTX *mem_ctx,
2709 struct tevent_context *ev,
2710 struct rpc_pipe_client *cli,
2711 struct policy_handle *_handle /* [in] [ref] */,
2712 struct lsa_PrivilegeSet **_privs /* [out] [ref] */)
2714 struct tevent_req *req;
2715 struct rpccli_lsa_EnumPrivsAccount_state *state;
2716 struct tevent_req *subreq;
2718 req = tevent_req_create(mem_ctx, &state,
2719 struct rpccli_lsa_EnumPrivsAccount_state);
2720 if (req == NULL) {
2721 return NULL;
2723 state->out_mem_ctx = NULL;
2724 state->dispatch_recv = cli->dispatch_recv;
2726 /* In parameters */
2727 state->orig.in.handle = _handle;
2729 /* Out parameters */
2730 state->orig.out.privs = _privs;
2732 /* Result */
2733 ZERO_STRUCT(state->orig.out.result);
2735 state->out_mem_ctx = talloc_named_const(state, 0,
2736 "rpccli_lsa_EnumPrivsAccount_out_memory");
2737 if (tevent_req_nomem(state->out_mem_ctx, req)) {
2738 return tevent_req_post(req, ev);
2741 /* make a temporary copy, that we pass to the dispatch function */
2742 state->tmp = state->orig;
2744 subreq = cli->dispatch_send(state, ev, cli,
2745 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2746 NDR_LSA_ENUMPRIVSACCOUNT,
2747 &state->tmp);
2748 if (tevent_req_nomem(subreq, req)) {
2749 return tevent_req_post(req, ev);
2751 tevent_req_set_callback(subreq, rpccli_lsa_EnumPrivsAccount_done, req);
2752 return req;
2755 static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req *subreq)
2757 struct tevent_req *req = tevent_req_callback_data(
2758 subreq, struct tevent_req);
2759 struct rpccli_lsa_EnumPrivsAccount_state *state = tevent_req_data(
2760 req, struct rpccli_lsa_EnumPrivsAccount_state);
2761 NTSTATUS status;
2762 TALLOC_CTX *mem_ctx;
2764 if (state->out_mem_ctx) {
2765 mem_ctx = state->out_mem_ctx;
2766 } else {
2767 mem_ctx = state;
2770 status = state->dispatch_recv(subreq, mem_ctx);
2771 TALLOC_FREE(subreq);
2772 if (!NT_STATUS_IS_OK(status)) {
2773 tevent_req_nterror(req, status);
2774 return;
2777 /* Copy out parameters */
2778 *state->orig.out.privs = *state->tmp.out.privs;
2780 /* Copy result */
2781 state->orig.out.result = state->tmp.out.result;
2783 /* Reset temporary structure */
2784 ZERO_STRUCT(state->tmp);
2786 tevent_req_done(req);
2789 NTSTATUS rpccli_lsa_EnumPrivsAccount_recv(struct tevent_req *req,
2790 TALLOC_CTX *mem_ctx,
2791 NTSTATUS *result)
2793 struct rpccli_lsa_EnumPrivsAccount_state *state = tevent_req_data(
2794 req, struct rpccli_lsa_EnumPrivsAccount_state);
2795 NTSTATUS status;
2797 if (tevent_req_is_nterror(req, &status)) {
2798 tevent_req_received(req);
2799 return status;
2802 /* Steal possbile out parameters to the callers context */
2803 talloc_steal(mem_ctx, state->out_mem_ctx);
2805 /* Return result */
2806 *result = state->orig.out.result;
2808 tevent_req_received(req);
2809 return NT_STATUS_OK;
2812 NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
2813 TALLOC_CTX *mem_ctx,
2814 struct policy_handle *handle /* [in] [ref] */,
2815 struct lsa_PrivilegeSet **privs /* [out] [ref] */)
2817 struct lsa_EnumPrivsAccount r;
2818 NTSTATUS status;
2820 /* In parameters */
2821 r.in.handle = handle;
2823 status = cli->dispatch(cli,
2824 mem_ctx,
2825 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2826 NDR_LSA_ENUMPRIVSACCOUNT,
2827 &r);
2829 if (!NT_STATUS_IS_OK(status)) {
2830 return status;
2833 if (NT_STATUS_IS_ERR(status)) {
2834 return status;
2837 /* Return variables */
2838 *privs = *r.out.privs;
2840 /* Return result */
2841 return r.out.result;
2844 struct rpccli_lsa_AddPrivilegesToAccount_state {
2845 struct lsa_AddPrivilegesToAccount orig;
2846 struct lsa_AddPrivilegesToAccount tmp;
2847 TALLOC_CTX *out_mem_ctx;
2848 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2851 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq);
2853 struct tevent_req *rpccli_lsa_AddPrivilegesToAccount_send(TALLOC_CTX *mem_ctx,
2854 struct tevent_context *ev,
2855 struct rpc_pipe_client *cli,
2856 struct policy_handle *_handle /* [in] [ref] */,
2857 struct lsa_PrivilegeSet *_privs /* [in] [ref] */)
2859 struct tevent_req *req;
2860 struct rpccli_lsa_AddPrivilegesToAccount_state *state;
2861 struct tevent_req *subreq;
2863 req = tevent_req_create(mem_ctx, &state,
2864 struct rpccli_lsa_AddPrivilegesToAccount_state);
2865 if (req == NULL) {
2866 return NULL;
2868 state->out_mem_ctx = NULL;
2869 state->dispatch_recv = cli->dispatch_recv;
2871 /* In parameters */
2872 state->orig.in.handle = _handle;
2873 state->orig.in.privs = _privs;
2875 /* Out parameters */
2877 /* Result */
2878 ZERO_STRUCT(state->orig.out.result);
2880 /* make a temporary copy, that we pass to the dispatch function */
2881 state->tmp = state->orig;
2883 subreq = cli->dispatch_send(state, ev, cli,
2884 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2885 NDR_LSA_ADDPRIVILEGESTOACCOUNT,
2886 &state->tmp);
2887 if (tevent_req_nomem(subreq, req)) {
2888 return tevent_req_post(req, ev);
2890 tevent_req_set_callback(subreq, rpccli_lsa_AddPrivilegesToAccount_done, req);
2891 return req;
2894 static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq)
2896 struct tevent_req *req = tevent_req_callback_data(
2897 subreq, struct tevent_req);
2898 struct rpccli_lsa_AddPrivilegesToAccount_state *state = tevent_req_data(
2899 req, struct rpccli_lsa_AddPrivilegesToAccount_state);
2900 NTSTATUS status;
2901 TALLOC_CTX *mem_ctx;
2903 if (state->out_mem_ctx) {
2904 mem_ctx = state->out_mem_ctx;
2905 } else {
2906 mem_ctx = state;
2909 status = state->dispatch_recv(subreq, mem_ctx);
2910 TALLOC_FREE(subreq);
2911 if (!NT_STATUS_IS_OK(status)) {
2912 tevent_req_nterror(req, status);
2913 return;
2916 /* Copy out parameters */
2918 /* Copy result */
2919 state->orig.out.result = state->tmp.out.result;
2921 /* Reset temporary structure */
2922 ZERO_STRUCT(state->tmp);
2924 tevent_req_done(req);
2927 NTSTATUS rpccli_lsa_AddPrivilegesToAccount_recv(struct tevent_req *req,
2928 TALLOC_CTX *mem_ctx,
2929 NTSTATUS *result)
2931 struct rpccli_lsa_AddPrivilegesToAccount_state *state = tevent_req_data(
2932 req, struct rpccli_lsa_AddPrivilegesToAccount_state);
2933 NTSTATUS status;
2935 if (tevent_req_is_nterror(req, &status)) {
2936 tevent_req_received(req);
2937 return status;
2940 /* Steal possbile out parameters to the callers context */
2941 talloc_steal(mem_ctx, state->out_mem_ctx);
2943 /* Return result */
2944 *result = state->orig.out.result;
2946 tevent_req_received(req);
2947 return NT_STATUS_OK;
2950 NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli,
2951 TALLOC_CTX *mem_ctx,
2952 struct policy_handle *handle /* [in] [ref] */,
2953 struct lsa_PrivilegeSet *privs /* [in] [ref] */)
2955 struct lsa_AddPrivilegesToAccount r;
2956 NTSTATUS status;
2958 /* In parameters */
2959 r.in.handle = handle;
2960 r.in.privs = privs;
2962 status = cli->dispatch(cli,
2963 mem_ctx,
2964 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
2965 NDR_LSA_ADDPRIVILEGESTOACCOUNT,
2966 &r);
2968 if (!NT_STATUS_IS_OK(status)) {
2969 return status;
2972 if (NT_STATUS_IS_ERR(status)) {
2973 return status;
2976 /* Return variables */
2978 /* Return result */
2979 return r.out.result;
2982 struct rpccli_lsa_RemovePrivilegesFromAccount_state {
2983 struct lsa_RemovePrivilegesFromAccount orig;
2984 struct lsa_RemovePrivilegesFromAccount tmp;
2985 TALLOC_CTX *out_mem_ctx;
2986 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
2989 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq);
2991 struct tevent_req *rpccli_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX *mem_ctx,
2992 struct tevent_context *ev,
2993 struct rpc_pipe_client *cli,
2994 struct policy_handle *_handle /* [in] [ref] */,
2995 uint8_t _remove_all /* [in] */,
2996 struct lsa_PrivilegeSet *_privs /* [in] [unique] */)
2998 struct tevent_req *req;
2999 struct rpccli_lsa_RemovePrivilegesFromAccount_state *state;
3000 struct tevent_req *subreq;
3002 req = tevent_req_create(mem_ctx, &state,
3003 struct rpccli_lsa_RemovePrivilegesFromAccount_state);
3004 if (req == NULL) {
3005 return NULL;
3007 state->out_mem_ctx = NULL;
3008 state->dispatch_recv = cli->dispatch_recv;
3010 /* In parameters */
3011 state->orig.in.handle = _handle;
3012 state->orig.in.remove_all = _remove_all;
3013 state->orig.in.privs = _privs;
3015 /* Out parameters */
3017 /* Result */
3018 ZERO_STRUCT(state->orig.out.result);
3020 /* make a temporary copy, that we pass to the dispatch function */
3021 state->tmp = state->orig;
3023 subreq = cli->dispatch_send(state, ev, cli,
3024 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3025 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT,
3026 &state->tmp);
3027 if (tevent_req_nomem(subreq, req)) {
3028 return tevent_req_post(req, ev);
3030 tevent_req_set_callback(subreq, rpccli_lsa_RemovePrivilegesFromAccount_done, req);
3031 return req;
3034 static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq)
3036 struct tevent_req *req = tevent_req_callback_data(
3037 subreq, struct tevent_req);
3038 struct rpccli_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data(
3039 req, struct rpccli_lsa_RemovePrivilegesFromAccount_state);
3040 NTSTATUS status;
3041 TALLOC_CTX *mem_ctx;
3043 if (state->out_mem_ctx) {
3044 mem_ctx = state->out_mem_ctx;
3045 } else {
3046 mem_ctx = state;
3049 status = state->dispatch_recv(subreq, mem_ctx);
3050 TALLOC_FREE(subreq);
3051 if (!NT_STATUS_IS_OK(status)) {
3052 tevent_req_nterror(req, status);
3053 return;
3056 /* Copy out parameters */
3058 /* Copy result */
3059 state->orig.out.result = state->tmp.out.result;
3061 /* Reset temporary structure */
3062 ZERO_STRUCT(state->tmp);
3064 tevent_req_done(req);
3067 NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req *req,
3068 TALLOC_CTX *mem_ctx,
3069 NTSTATUS *result)
3071 struct rpccli_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data(
3072 req, struct rpccli_lsa_RemovePrivilegesFromAccount_state);
3073 NTSTATUS status;
3075 if (tevent_req_is_nterror(req, &status)) {
3076 tevent_req_received(req);
3077 return status;
3080 /* Steal possbile out parameters to the callers context */
3081 talloc_steal(mem_ctx, state->out_mem_ctx);
3083 /* Return result */
3084 *result = state->orig.out.result;
3086 tevent_req_received(req);
3087 return NT_STATUS_OK;
3090 NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli,
3091 TALLOC_CTX *mem_ctx,
3092 struct policy_handle *handle /* [in] [ref] */,
3093 uint8_t remove_all /* [in] */,
3094 struct lsa_PrivilegeSet *privs /* [in] [unique] */)
3096 struct lsa_RemovePrivilegesFromAccount r;
3097 NTSTATUS status;
3099 /* In parameters */
3100 r.in.handle = handle;
3101 r.in.remove_all = remove_all;
3102 r.in.privs = privs;
3104 status = cli->dispatch(cli,
3105 mem_ctx,
3106 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3107 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT,
3108 &r);
3110 if (!NT_STATUS_IS_OK(status)) {
3111 return status;
3114 if (NT_STATUS_IS_ERR(status)) {
3115 return status;
3118 /* Return variables */
3120 /* Return result */
3121 return r.out.result;
3124 struct rpccli_lsa_GetQuotasForAccount_state {
3125 struct lsa_GetQuotasForAccount orig;
3126 struct lsa_GetQuotasForAccount tmp;
3127 TALLOC_CTX *out_mem_ctx;
3128 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3131 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req *subreq);
3133 struct tevent_req *rpccli_lsa_GetQuotasForAccount_send(TALLOC_CTX *mem_ctx,
3134 struct tevent_context *ev,
3135 struct rpc_pipe_client *cli)
3137 struct tevent_req *req;
3138 struct rpccli_lsa_GetQuotasForAccount_state *state;
3139 struct tevent_req *subreq;
3141 req = tevent_req_create(mem_ctx, &state,
3142 struct rpccli_lsa_GetQuotasForAccount_state);
3143 if (req == NULL) {
3144 return NULL;
3146 state->out_mem_ctx = NULL;
3147 state->dispatch_recv = cli->dispatch_recv;
3149 /* In parameters */
3151 /* Out parameters */
3153 /* Result */
3154 ZERO_STRUCT(state->orig.out.result);
3156 /* make a temporary copy, that we pass to the dispatch function */
3157 state->tmp = state->orig;
3159 subreq = cli->dispatch_send(state, ev, cli,
3160 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3161 NDR_LSA_GETQUOTASFORACCOUNT,
3162 &state->tmp);
3163 if (tevent_req_nomem(subreq, req)) {
3164 return tevent_req_post(req, ev);
3166 tevent_req_set_callback(subreq, rpccli_lsa_GetQuotasForAccount_done, req);
3167 return req;
3170 static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req *subreq)
3172 struct tevent_req *req = tevent_req_callback_data(
3173 subreq, struct tevent_req);
3174 struct rpccli_lsa_GetQuotasForAccount_state *state = tevent_req_data(
3175 req, struct rpccli_lsa_GetQuotasForAccount_state);
3176 NTSTATUS status;
3177 TALLOC_CTX *mem_ctx;
3179 if (state->out_mem_ctx) {
3180 mem_ctx = state->out_mem_ctx;
3181 } else {
3182 mem_ctx = state;
3185 status = state->dispatch_recv(subreq, mem_ctx);
3186 TALLOC_FREE(subreq);
3187 if (!NT_STATUS_IS_OK(status)) {
3188 tevent_req_nterror(req, status);
3189 return;
3192 /* Copy out parameters */
3194 /* Copy result */
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 rpccli_lsa_GetQuotasForAccount_recv(struct tevent_req *req,
3204 TALLOC_CTX *mem_ctx,
3205 NTSTATUS *result)
3207 struct rpccli_lsa_GetQuotasForAccount_state *state = tevent_req_data(
3208 req, struct rpccli_lsa_GetQuotasForAccount_state);
3209 NTSTATUS status;
3211 if (tevent_req_is_nterror(req, &status)) {
3212 tevent_req_received(req);
3213 return status;
3216 /* Steal possbile out parameters to the callers context */
3217 talloc_steal(mem_ctx, state->out_mem_ctx);
3219 /* Return result */
3220 *result = state->orig.out.result;
3222 tevent_req_received(req);
3223 return NT_STATUS_OK;
3226 NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli,
3227 TALLOC_CTX *mem_ctx)
3229 struct lsa_GetQuotasForAccount r;
3230 NTSTATUS status;
3232 /* In parameters */
3234 status = cli->dispatch(cli,
3235 mem_ctx,
3236 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3237 NDR_LSA_GETQUOTASFORACCOUNT,
3238 &r);
3240 if (!NT_STATUS_IS_OK(status)) {
3241 return status;
3244 if (NT_STATUS_IS_ERR(status)) {
3245 return status;
3248 /* Return variables */
3250 /* Return result */
3251 return r.out.result;
3254 struct rpccli_lsa_SetQuotasForAccount_state {
3255 struct lsa_SetQuotasForAccount orig;
3256 struct lsa_SetQuotasForAccount tmp;
3257 TALLOC_CTX *out_mem_ctx;
3258 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3261 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req *subreq);
3263 struct tevent_req *rpccli_lsa_SetQuotasForAccount_send(TALLOC_CTX *mem_ctx,
3264 struct tevent_context *ev,
3265 struct rpc_pipe_client *cli)
3267 struct tevent_req *req;
3268 struct rpccli_lsa_SetQuotasForAccount_state *state;
3269 struct tevent_req *subreq;
3271 req = tevent_req_create(mem_ctx, &state,
3272 struct rpccli_lsa_SetQuotasForAccount_state);
3273 if (req == NULL) {
3274 return NULL;
3276 state->out_mem_ctx = NULL;
3277 state->dispatch_recv = cli->dispatch_recv;
3279 /* In parameters */
3281 /* Out parameters */
3283 /* Result */
3284 ZERO_STRUCT(state->orig.out.result);
3286 /* make a temporary copy, that we pass to the dispatch function */
3287 state->tmp = state->orig;
3289 subreq = cli->dispatch_send(state, ev, cli,
3290 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3291 NDR_LSA_SETQUOTASFORACCOUNT,
3292 &state->tmp);
3293 if (tevent_req_nomem(subreq, req)) {
3294 return tevent_req_post(req, ev);
3296 tevent_req_set_callback(subreq, rpccli_lsa_SetQuotasForAccount_done, req);
3297 return req;
3300 static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req *subreq)
3302 struct tevent_req *req = tevent_req_callback_data(
3303 subreq, struct tevent_req);
3304 struct rpccli_lsa_SetQuotasForAccount_state *state = tevent_req_data(
3305 req, struct rpccli_lsa_SetQuotasForAccount_state);
3306 NTSTATUS status;
3307 TALLOC_CTX *mem_ctx;
3309 if (state->out_mem_ctx) {
3310 mem_ctx = state->out_mem_ctx;
3311 } else {
3312 mem_ctx = state;
3315 status = state->dispatch_recv(subreq, mem_ctx);
3316 TALLOC_FREE(subreq);
3317 if (!NT_STATUS_IS_OK(status)) {
3318 tevent_req_nterror(req, status);
3319 return;
3322 /* Copy out parameters */
3324 /* Copy result */
3325 state->orig.out.result = state->tmp.out.result;
3327 /* Reset temporary structure */
3328 ZERO_STRUCT(state->tmp);
3330 tevent_req_done(req);
3333 NTSTATUS rpccli_lsa_SetQuotasForAccount_recv(struct tevent_req *req,
3334 TALLOC_CTX *mem_ctx,
3335 NTSTATUS *result)
3337 struct rpccli_lsa_SetQuotasForAccount_state *state = tevent_req_data(
3338 req, struct rpccli_lsa_SetQuotasForAccount_state);
3339 NTSTATUS status;
3341 if (tevent_req_is_nterror(req, &status)) {
3342 tevent_req_received(req);
3343 return status;
3346 /* Steal possbile out parameters to the callers context */
3347 talloc_steal(mem_ctx, state->out_mem_ctx);
3349 /* Return result */
3350 *result = state->orig.out.result;
3352 tevent_req_received(req);
3353 return NT_STATUS_OK;
3356 NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli,
3357 TALLOC_CTX *mem_ctx)
3359 struct lsa_SetQuotasForAccount r;
3360 NTSTATUS status;
3362 /* In parameters */
3364 status = cli->dispatch(cli,
3365 mem_ctx,
3366 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3367 NDR_LSA_SETQUOTASFORACCOUNT,
3368 &r);
3370 if (!NT_STATUS_IS_OK(status)) {
3371 return status;
3374 if (NT_STATUS_IS_ERR(status)) {
3375 return status;
3378 /* Return variables */
3380 /* Return result */
3381 return r.out.result;
3384 struct rpccli_lsa_GetSystemAccessAccount_state {
3385 struct lsa_GetSystemAccessAccount orig;
3386 struct lsa_GetSystemAccessAccount tmp;
3387 TALLOC_CTX *out_mem_ctx;
3388 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3391 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq);
3393 struct tevent_req *rpccli_lsa_GetSystemAccessAccount_send(TALLOC_CTX *mem_ctx,
3394 struct tevent_context *ev,
3395 struct rpc_pipe_client *cli,
3396 struct policy_handle *_handle /* [in] [ref] */,
3397 uint32_t *_access_mask /* [out] [ref] */)
3399 struct tevent_req *req;
3400 struct rpccli_lsa_GetSystemAccessAccount_state *state;
3401 struct tevent_req *subreq;
3403 req = tevent_req_create(mem_ctx, &state,
3404 struct rpccli_lsa_GetSystemAccessAccount_state);
3405 if (req == NULL) {
3406 return NULL;
3408 state->out_mem_ctx = NULL;
3409 state->dispatch_recv = cli->dispatch_recv;
3411 /* In parameters */
3412 state->orig.in.handle = _handle;
3414 /* Out parameters */
3415 state->orig.out.access_mask = _access_mask;
3417 /* Result */
3418 ZERO_STRUCT(state->orig.out.result);
3420 state->out_mem_ctx = talloc_named_const(state, 0,
3421 "rpccli_lsa_GetSystemAccessAccount_out_memory");
3422 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3423 return tevent_req_post(req, ev);
3426 /* make a temporary copy, that we pass to the dispatch function */
3427 state->tmp = state->orig;
3429 subreq = cli->dispatch_send(state, ev, cli,
3430 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3431 NDR_LSA_GETSYSTEMACCESSACCOUNT,
3432 &state->tmp);
3433 if (tevent_req_nomem(subreq, req)) {
3434 return tevent_req_post(req, ev);
3436 tevent_req_set_callback(subreq, rpccli_lsa_GetSystemAccessAccount_done, req);
3437 return req;
3440 static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq)
3442 struct tevent_req *req = tevent_req_callback_data(
3443 subreq, struct tevent_req);
3444 struct rpccli_lsa_GetSystemAccessAccount_state *state = tevent_req_data(
3445 req, struct rpccli_lsa_GetSystemAccessAccount_state);
3446 NTSTATUS status;
3447 TALLOC_CTX *mem_ctx;
3449 if (state->out_mem_ctx) {
3450 mem_ctx = state->out_mem_ctx;
3451 } else {
3452 mem_ctx = state;
3455 status = state->dispatch_recv(subreq, mem_ctx);
3456 TALLOC_FREE(subreq);
3457 if (!NT_STATUS_IS_OK(status)) {
3458 tevent_req_nterror(req, status);
3459 return;
3462 /* Copy out parameters */
3463 *state->orig.out.access_mask = *state->tmp.out.access_mask;
3465 /* Copy result */
3466 state->orig.out.result = state->tmp.out.result;
3468 /* Reset temporary structure */
3469 ZERO_STRUCT(state->tmp);
3471 tevent_req_done(req);
3474 NTSTATUS rpccli_lsa_GetSystemAccessAccount_recv(struct tevent_req *req,
3475 TALLOC_CTX *mem_ctx,
3476 NTSTATUS *result)
3478 struct rpccli_lsa_GetSystemAccessAccount_state *state = tevent_req_data(
3479 req, struct rpccli_lsa_GetSystemAccessAccount_state);
3480 NTSTATUS status;
3482 if (tevent_req_is_nterror(req, &status)) {
3483 tevent_req_received(req);
3484 return status;
3487 /* Steal possbile out parameters to the callers context */
3488 talloc_steal(mem_ctx, state->out_mem_ctx);
3490 /* Return result */
3491 *result = state->orig.out.result;
3493 tevent_req_received(req);
3494 return NT_STATUS_OK;
3497 NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli,
3498 TALLOC_CTX *mem_ctx,
3499 struct policy_handle *handle /* [in] [ref] */,
3500 uint32_t *access_mask /* [out] [ref] */)
3502 struct lsa_GetSystemAccessAccount r;
3503 NTSTATUS status;
3505 /* In parameters */
3506 r.in.handle = handle;
3508 status = cli->dispatch(cli,
3509 mem_ctx,
3510 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3511 NDR_LSA_GETSYSTEMACCESSACCOUNT,
3512 &r);
3514 if (!NT_STATUS_IS_OK(status)) {
3515 return status;
3518 if (NT_STATUS_IS_ERR(status)) {
3519 return status;
3522 /* Return variables */
3523 *access_mask = *r.out.access_mask;
3525 /* Return result */
3526 return r.out.result;
3529 struct rpccli_lsa_SetSystemAccessAccount_state {
3530 struct lsa_SetSystemAccessAccount orig;
3531 struct lsa_SetSystemAccessAccount tmp;
3532 TALLOC_CTX *out_mem_ctx;
3533 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3536 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq);
3538 struct tevent_req *rpccli_lsa_SetSystemAccessAccount_send(TALLOC_CTX *mem_ctx,
3539 struct tevent_context *ev,
3540 struct rpc_pipe_client *cli,
3541 struct policy_handle *_handle /* [in] [ref] */,
3542 uint32_t _access_mask /* [in] */)
3544 struct tevent_req *req;
3545 struct rpccli_lsa_SetSystemAccessAccount_state *state;
3546 struct tevent_req *subreq;
3548 req = tevent_req_create(mem_ctx, &state,
3549 struct rpccli_lsa_SetSystemAccessAccount_state);
3550 if (req == NULL) {
3551 return NULL;
3553 state->out_mem_ctx = NULL;
3554 state->dispatch_recv = cli->dispatch_recv;
3556 /* In parameters */
3557 state->orig.in.handle = _handle;
3558 state->orig.in.access_mask = _access_mask;
3560 /* Out parameters */
3562 /* Result */
3563 ZERO_STRUCT(state->orig.out.result);
3565 /* make a temporary copy, that we pass to the dispatch function */
3566 state->tmp = state->orig;
3568 subreq = cli->dispatch_send(state, ev, cli,
3569 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3570 NDR_LSA_SETSYSTEMACCESSACCOUNT,
3571 &state->tmp);
3572 if (tevent_req_nomem(subreq, req)) {
3573 return tevent_req_post(req, ev);
3575 tevent_req_set_callback(subreq, rpccli_lsa_SetSystemAccessAccount_done, req);
3576 return req;
3579 static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq)
3581 struct tevent_req *req = tevent_req_callback_data(
3582 subreq, struct tevent_req);
3583 struct rpccli_lsa_SetSystemAccessAccount_state *state = tevent_req_data(
3584 req, struct rpccli_lsa_SetSystemAccessAccount_state);
3585 NTSTATUS status;
3586 TALLOC_CTX *mem_ctx;
3588 if (state->out_mem_ctx) {
3589 mem_ctx = state->out_mem_ctx;
3590 } else {
3591 mem_ctx = state;
3594 status = state->dispatch_recv(subreq, mem_ctx);
3595 TALLOC_FREE(subreq);
3596 if (!NT_STATUS_IS_OK(status)) {
3597 tevent_req_nterror(req, status);
3598 return;
3601 /* Copy out parameters */
3603 /* Copy result */
3604 state->orig.out.result = state->tmp.out.result;
3606 /* Reset temporary structure */
3607 ZERO_STRUCT(state->tmp);
3609 tevent_req_done(req);
3612 NTSTATUS rpccli_lsa_SetSystemAccessAccount_recv(struct tevent_req *req,
3613 TALLOC_CTX *mem_ctx,
3614 NTSTATUS *result)
3616 struct rpccli_lsa_SetSystemAccessAccount_state *state = tevent_req_data(
3617 req, struct rpccli_lsa_SetSystemAccessAccount_state);
3618 NTSTATUS status;
3620 if (tevent_req_is_nterror(req, &status)) {
3621 tevent_req_received(req);
3622 return status;
3625 /* Steal possbile out parameters to the callers context */
3626 talloc_steal(mem_ctx, state->out_mem_ctx);
3628 /* Return result */
3629 *result = state->orig.out.result;
3631 tevent_req_received(req);
3632 return NT_STATUS_OK;
3635 NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli,
3636 TALLOC_CTX *mem_ctx,
3637 struct policy_handle *handle /* [in] [ref] */,
3638 uint32_t access_mask /* [in] */)
3640 struct lsa_SetSystemAccessAccount r;
3641 NTSTATUS status;
3643 /* In parameters */
3644 r.in.handle = handle;
3645 r.in.access_mask = access_mask;
3647 status = cli->dispatch(cli,
3648 mem_ctx,
3649 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3650 NDR_LSA_SETSYSTEMACCESSACCOUNT,
3651 &r);
3653 if (!NT_STATUS_IS_OK(status)) {
3654 return status;
3657 if (NT_STATUS_IS_ERR(status)) {
3658 return status;
3661 /* Return variables */
3663 /* Return result */
3664 return r.out.result;
3667 struct rpccli_lsa_OpenTrustedDomain_state {
3668 struct lsa_OpenTrustedDomain orig;
3669 struct lsa_OpenTrustedDomain tmp;
3670 TALLOC_CTX *out_mem_ctx;
3671 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3674 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req *subreq);
3676 struct tevent_req *rpccli_lsa_OpenTrustedDomain_send(TALLOC_CTX *mem_ctx,
3677 struct tevent_context *ev,
3678 struct rpc_pipe_client *cli,
3679 struct policy_handle *_handle /* [in] [ref] */,
3680 struct dom_sid2 *_sid /* [in] [ref] */,
3681 uint32_t _access_mask /* [in] */,
3682 struct policy_handle *_trustdom_handle /* [out] [ref] */)
3684 struct tevent_req *req;
3685 struct rpccli_lsa_OpenTrustedDomain_state *state;
3686 struct tevent_req *subreq;
3688 req = tevent_req_create(mem_ctx, &state,
3689 struct rpccli_lsa_OpenTrustedDomain_state);
3690 if (req == NULL) {
3691 return NULL;
3693 state->out_mem_ctx = NULL;
3694 state->dispatch_recv = cli->dispatch_recv;
3696 /* In parameters */
3697 state->orig.in.handle = _handle;
3698 state->orig.in.sid = _sid;
3699 state->orig.in.access_mask = _access_mask;
3701 /* Out parameters */
3702 state->orig.out.trustdom_handle = _trustdom_handle;
3704 /* Result */
3705 ZERO_STRUCT(state->orig.out.result);
3707 state->out_mem_ctx = talloc_named_const(state, 0,
3708 "rpccli_lsa_OpenTrustedDomain_out_memory");
3709 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3710 return tevent_req_post(req, ev);
3713 /* make a temporary copy, that we pass to the dispatch function */
3714 state->tmp = state->orig;
3716 subreq = cli->dispatch_send(state, ev, cli,
3717 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3718 NDR_LSA_OPENTRUSTEDDOMAIN,
3719 &state->tmp);
3720 if (tevent_req_nomem(subreq, req)) {
3721 return tevent_req_post(req, ev);
3723 tevent_req_set_callback(subreq, rpccli_lsa_OpenTrustedDomain_done, req);
3724 return req;
3727 static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req *subreq)
3729 struct tevent_req *req = tevent_req_callback_data(
3730 subreq, struct tevent_req);
3731 struct rpccli_lsa_OpenTrustedDomain_state *state = tevent_req_data(
3732 req, struct rpccli_lsa_OpenTrustedDomain_state);
3733 NTSTATUS status;
3734 TALLOC_CTX *mem_ctx;
3736 if (state->out_mem_ctx) {
3737 mem_ctx = state->out_mem_ctx;
3738 } else {
3739 mem_ctx = state;
3742 status = state->dispatch_recv(subreq, mem_ctx);
3743 TALLOC_FREE(subreq);
3744 if (!NT_STATUS_IS_OK(status)) {
3745 tevent_req_nterror(req, status);
3746 return;
3749 /* Copy out parameters */
3750 *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
3752 /* Copy result */
3753 state->orig.out.result = state->tmp.out.result;
3755 /* Reset temporary structure */
3756 ZERO_STRUCT(state->tmp);
3758 tevent_req_done(req);
3761 NTSTATUS rpccli_lsa_OpenTrustedDomain_recv(struct tevent_req *req,
3762 TALLOC_CTX *mem_ctx,
3763 NTSTATUS *result)
3765 struct rpccli_lsa_OpenTrustedDomain_state *state = tevent_req_data(
3766 req, struct rpccli_lsa_OpenTrustedDomain_state);
3767 NTSTATUS status;
3769 if (tevent_req_is_nterror(req, &status)) {
3770 tevent_req_received(req);
3771 return status;
3774 /* Steal possbile out parameters to the callers context */
3775 talloc_steal(mem_ctx, state->out_mem_ctx);
3777 /* Return result */
3778 *result = state->orig.out.result;
3780 tevent_req_received(req);
3781 return NT_STATUS_OK;
3784 NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli,
3785 TALLOC_CTX *mem_ctx,
3786 struct policy_handle *handle /* [in] [ref] */,
3787 struct dom_sid2 *sid /* [in] [ref] */,
3788 uint32_t access_mask /* [in] */,
3789 struct policy_handle *trustdom_handle /* [out] [ref] */)
3791 struct lsa_OpenTrustedDomain r;
3792 NTSTATUS status;
3794 /* In parameters */
3795 r.in.handle = handle;
3796 r.in.sid = sid;
3797 r.in.access_mask = access_mask;
3799 status = cli->dispatch(cli,
3800 mem_ctx,
3801 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3802 NDR_LSA_OPENTRUSTEDDOMAIN,
3803 &r);
3805 if (!NT_STATUS_IS_OK(status)) {
3806 return status;
3809 if (NT_STATUS_IS_ERR(status)) {
3810 return status;
3813 /* Return variables */
3814 *trustdom_handle = *r.out.trustdom_handle;
3816 /* Return result */
3817 return r.out.result;
3820 struct rpccli_lsa_QueryTrustedDomainInfo_state {
3821 struct lsa_QueryTrustedDomainInfo orig;
3822 struct lsa_QueryTrustedDomainInfo tmp;
3823 TALLOC_CTX *out_mem_ctx;
3824 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3827 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq);
3829 struct tevent_req *rpccli_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX *mem_ctx,
3830 struct tevent_context *ev,
3831 struct rpc_pipe_client *cli,
3832 struct policy_handle *_trustdom_handle /* [in] [ref] */,
3833 enum lsa_TrustDomInfoEnum _level /* [in] */,
3834 union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
3836 struct tevent_req *req;
3837 struct rpccli_lsa_QueryTrustedDomainInfo_state *state;
3838 struct tevent_req *subreq;
3840 req = tevent_req_create(mem_ctx, &state,
3841 struct rpccli_lsa_QueryTrustedDomainInfo_state);
3842 if (req == NULL) {
3843 return NULL;
3845 state->out_mem_ctx = NULL;
3846 state->dispatch_recv = cli->dispatch_recv;
3848 /* In parameters */
3849 state->orig.in.trustdom_handle = _trustdom_handle;
3850 state->orig.in.level = _level;
3852 /* Out parameters */
3853 state->orig.out.info = _info;
3855 /* Result */
3856 ZERO_STRUCT(state->orig.out.result);
3858 state->out_mem_ctx = talloc_named_const(state, 0,
3859 "rpccli_lsa_QueryTrustedDomainInfo_out_memory");
3860 if (tevent_req_nomem(state->out_mem_ctx, req)) {
3861 return tevent_req_post(req, ev);
3864 /* make a temporary copy, that we pass to the dispatch function */
3865 state->tmp = state->orig;
3867 subreq = cli->dispatch_send(state, ev, cli,
3868 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3869 NDR_LSA_QUERYTRUSTEDDOMAININFO,
3870 &state->tmp);
3871 if (tevent_req_nomem(subreq, req)) {
3872 return tevent_req_post(req, ev);
3874 tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfo_done, req);
3875 return req;
3878 static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq)
3880 struct tevent_req *req = tevent_req_callback_data(
3881 subreq, struct tevent_req);
3882 struct rpccli_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data(
3883 req, struct rpccli_lsa_QueryTrustedDomainInfo_state);
3884 NTSTATUS status;
3885 TALLOC_CTX *mem_ctx;
3887 if (state->out_mem_ctx) {
3888 mem_ctx = state->out_mem_ctx;
3889 } else {
3890 mem_ctx = state;
3893 status = state->dispatch_recv(subreq, mem_ctx);
3894 TALLOC_FREE(subreq);
3895 if (!NT_STATUS_IS_OK(status)) {
3896 tevent_req_nterror(req, status);
3897 return;
3900 /* Copy out parameters */
3901 *state->orig.out.info = *state->tmp.out.info;
3903 /* Copy result */
3904 state->orig.out.result = state->tmp.out.result;
3906 /* Reset temporary structure */
3907 ZERO_STRUCT(state->tmp);
3909 tevent_req_done(req);
3912 NTSTATUS rpccli_lsa_QueryTrustedDomainInfo_recv(struct tevent_req *req,
3913 TALLOC_CTX *mem_ctx,
3914 NTSTATUS *result)
3916 struct rpccli_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data(
3917 req, struct rpccli_lsa_QueryTrustedDomainInfo_state);
3918 NTSTATUS status;
3920 if (tevent_req_is_nterror(req, &status)) {
3921 tevent_req_received(req);
3922 return status;
3925 /* Steal possbile out parameters to the callers context */
3926 talloc_steal(mem_ctx, state->out_mem_ctx);
3928 /* Return result */
3929 *result = state->orig.out.result;
3931 tevent_req_received(req);
3932 return NT_STATUS_OK;
3935 NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
3936 TALLOC_CTX *mem_ctx,
3937 struct policy_handle *trustdom_handle /* [in] [ref] */,
3938 enum lsa_TrustDomInfoEnum level /* [in] */,
3939 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
3941 struct lsa_QueryTrustedDomainInfo r;
3942 NTSTATUS status;
3944 /* In parameters */
3945 r.in.trustdom_handle = trustdom_handle;
3946 r.in.level = level;
3948 status = cli->dispatch(cli,
3949 mem_ctx,
3950 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
3951 NDR_LSA_QUERYTRUSTEDDOMAININFO,
3952 &r);
3954 if (!NT_STATUS_IS_OK(status)) {
3955 return status;
3958 if (NT_STATUS_IS_ERR(status)) {
3959 return status;
3962 /* Return variables */
3963 *info = *r.out.info;
3965 /* Return result */
3966 return r.out.result;
3969 struct rpccli_lsa_SetInformationTrustedDomain_state {
3970 struct lsa_SetInformationTrustedDomain orig;
3971 struct lsa_SetInformationTrustedDomain tmp;
3972 TALLOC_CTX *out_mem_ctx;
3973 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
3976 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq);
3978 struct tevent_req *rpccli_lsa_SetInformationTrustedDomain_send(TALLOC_CTX *mem_ctx,
3979 struct tevent_context *ev,
3980 struct rpc_pipe_client *cli,
3981 struct policy_handle *_trustdom_handle /* [in] [ref] */,
3982 enum lsa_TrustDomInfoEnum _level /* [in] */,
3983 union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */)
3985 struct tevent_req *req;
3986 struct rpccli_lsa_SetInformationTrustedDomain_state *state;
3987 struct tevent_req *subreq;
3989 req = tevent_req_create(mem_ctx, &state,
3990 struct rpccli_lsa_SetInformationTrustedDomain_state);
3991 if (req == NULL) {
3992 return NULL;
3994 state->out_mem_ctx = NULL;
3995 state->dispatch_recv = cli->dispatch_recv;
3997 /* In parameters */
3998 state->orig.in.trustdom_handle = _trustdom_handle;
3999 state->orig.in.level = _level;
4000 state->orig.in.info = _info;
4002 /* Out parameters */
4004 /* Result */
4005 ZERO_STRUCT(state->orig.out.result);
4007 /* make a temporary copy, that we pass to the dispatch function */
4008 state->tmp = state->orig;
4010 subreq = cli->dispatch_send(state, ev, cli,
4011 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4012 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN,
4013 &state->tmp);
4014 if (tevent_req_nomem(subreq, req)) {
4015 return tevent_req_post(req, ev);
4017 tevent_req_set_callback(subreq, rpccli_lsa_SetInformationTrustedDomain_done, req);
4018 return req;
4021 static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq)
4023 struct tevent_req *req = tevent_req_callback_data(
4024 subreq, struct tevent_req);
4025 struct rpccli_lsa_SetInformationTrustedDomain_state *state = tevent_req_data(
4026 req, struct rpccli_lsa_SetInformationTrustedDomain_state);
4027 NTSTATUS status;
4028 TALLOC_CTX *mem_ctx;
4030 if (state->out_mem_ctx) {
4031 mem_ctx = state->out_mem_ctx;
4032 } else {
4033 mem_ctx = state;
4036 status = state->dispatch_recv(subreq, mem_ctx);
4037 TALLOC_FREE(subreq);
4038 if (!NT_STATUS_IS_OK(status)) {
4039 tevent_req_nterror(req, status);
4040 return;
4043 /* Copy out parameters */
4045 /* Copy result */
4046 state->orig.out.result = state->tmp.out.result;
4048 /* Reset temporary structure */
4049 ZERO_STRUCT(state->tmp);
4051 tevent_req_done(req);
4054 NTSTATUS rpccli_lsa_SetInformationTrustedDomain_recv(struct tevent_req *req,
4055 TALLOC_CTX *mem_ctx,
4056 NTSTATUS *result)
4058 struct rpccli_lsa_SetInformationTrustedDomain_state *state = tevent_req_data(
4059 req, struct rpccli_lsa_SetInformationTrustedDomain_state);
4060 NTSTATUS status;
4062 if (tevent_req_is_nterror(req, &status)) {
4063 tevent_req_received(req);
4064 return status;
4067 /* Steal possbile out parameters to the callers context */
4068 talloc_steal(mem_ctx, state->out_mem_ctx);
4070 /* Return result */
4071 *result = state->orig.out.result;
4073 tevent_req_received(req);
4074 return NT_STATUS_OK;
4077 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli,
4078 TALLOC_CTX *mem_ctx,
4079 struct policy_handle *trustdom_handle /* [in] [ref] */,
4080 enum lsa_TrustDomInfoEnum level /* [in] */,
4081 union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */)
4083 struct lsa_SetInformationTrustedDomain r;
4084 NTSTATUS status;
4086 /* In parameters */
4087 r.in.trustdom_handle = trustdom_handle;
4088 r.in.level = level;
4089 r.in.info = info;
4091 status = cli->dispatch(cli,
4092 mem_ctx,
4093 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4094 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN,
4095 &r);
4097 if (!NT_STATUS_IS_OK(status)) {
4098 return status;
4101 if (NT_STATUS_IS_ERR(status)) {
4102 return status;
4105 /* Return variables */
4107 /* Return result */
4108 return r.out.result;
4111 struct rpccli_lsa_OpenSecret_state {
4112 struct lsa_OpenSecret orig;
4113 struct lsa_OpenSecret tmp;
4114 TALLOC_CTX *out_mem_ctx;
4115 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4118 static void rpccli_lsa_OpenSecret_done(struct tevent_req *subreq);
4120 struct tevent_req *rpccli_lsa_OpenSecret_send(TALLOC_CTX *mem_ctx,
4121 struct tevent_context *ev,
4122 struct rpc_pipe_client *cli,
4123 struct policy_handle *_handle /* [in] [ref] */,
4124 struct lsa_String _name /* [in] */,
4125 uint32_t _access_mask /* [in] */,
4126 struct policy_handle *_sec_handle /* [out] [ref] */)
4128 struct tevent_req *req;
4129 struct rpccli_lsa_OpenSecret_state *state;
4130 struct tevent_req *subreq;
4132 req = tevent_req_create(mem_ctx, &state,
4133 struct rpccli_lsa_OpenSecret_state);
4134 if (req == NULL) {
4135 return NULL;
4137 state->out_mem_ctx = NULL;
4138 state->dispatch_recv = cli->dispatch_recv;
4140 /* In parameters */
4141 state->orig.in.handle = _handle;
4142 state->orig.in.name = _name;
4143 state->orig.in.access_mask = _access_mask;
4145 /* Out parameters */
4146 state->orig.out.sec_handle = _sec_handle;
4148 /* Result */
4149 ZERO_STRUCT(state->orig.out.result);
4151 state->out_mem_ctx = talloc_named_const(state, 0,
4152 "rpccli_lsa_OpenSecret_out_memory");
4153 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4154 return tevent_req_post(req, ev);
4157 /* make a temporary copy, that we pass to the dispatch function */
4158 state->tmp = state->orig;
4160 subreq = cli->dispatch_send(state, ev, cli,
4161 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4162 NDR_LSA_OPENSECRET,
4163 &state->tmp);
4164 if (tevent_req_nomem(subreq, req)) {
4165 return tevent_req_post(req, ev);
4167 tevent_req_set_callback(subreq, rpccli_lsa_OpenSecret_done, req);
4168 return req;
4171 static void rpccli_lsa_OpenSecret_done(struct tevent_req *subreq)
4173 struct tevent_req *req = tevent_req_callback_data(
4174 subreq, struct tevent_req);
4175 struct rpccli_lsa_OpenSecret_state *state = tevent_req_data(
4176 req, struct rpccli_lsa_OpenSecret_state);
4177 NTSTATUS status;
4178 TALLOC_CTX *mem_ctx;
4180 if (state->out_mem_ctx) {
4181 mem_ctx = state->out_mem_ctx;
4182 } else {
4183 mem_ctx = state;
4186 status = state->dispatch_recv(subreq, mem_ctx);
4187 TALLOC_FREE(subreq);
4188 if (!NT_STATUS_IS_OK(status)) {
4189 tevent_req_nterror(req, status);
4190 return;
4193 /* Copy out parameters */
4194 *state->orig.out.sec_handle = *state->tmp.out.sec_handle;
4196 /* Copy result */
4197 state->orig.out.result = state->tmp.out.result;
4199 /* Reset temporary structure */
4200 ZERO_STRUCT(state->tmp);
4202 tevent_req_done(req);
4205 NTSTATUS rpccli_lsa_OpenSecret_recv(struct tevent_req *req,
4206 TALLOC_CTX *mem_ctx,
4207 NTSTATUS *result)
4209 struct rpccli_lsa_OpenSecret_state *state = tevent_req_data(
4210 req, struct rpccli_lsa_OpenSecret_state);
4211 NTSTATUS status;
4213 if (tevent_req_is_nterror(req, &status)) {
4214 tevent_req_received(req);
4215 return status;
4218 /* Steal possbile out parameters to the callers context */
4219 talloc_steal(mem_ctx, state->out_mem_ctx);
4221 /* Return result */
4222 *result = state->orig.out.result;
4224 tevent_req_received(req);
4225 return NT_STATUS_OK;
4228 NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli,
4229 TALLOC_CTX *mem_ctx,
4230 struct policy_handle *handle /* [in] [ref] */,
4231 struct lsa_String name /* [in] */,
4232 uint32_t access_mask /* [in] */,
4233 struct policy_handle *sec_handle /* [out] [ref] */)
4235 struct lsa_OpenSecret r;
4236 NTSTATUS status;
4238 /* In parameters */
4239 r.in.handle = handle;
4240 r.in.name = name;
4241 r.in.access_mask = access_mask;
4243 status = cli->dispatch(cli,
4244 mem_ctx,
4245 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4246 NDR_LSA_OPENSECRET,
4247 &r);
4249 if (!NT_STATUS_IS_OK(status)) {
4250 return status;
4253 if (NT_STATUS_IS_ERR(status)) {
4254 return status;
4257 /* Return variables */
4258 *sec_handle = *r.out.sec_handle;
4260 /* Return result */
4261 return r.out.result;
4264 struct rpccli_lsa_SetSecret_state {
4265 struct lsa_SetSecret orig;
4266 struct lsa_SetSecret tmp;
4267 TALLOC_CTX *out_mem_ctx;
4268 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4271 static void rpccli_lsa_SetSecret_done(struct tevent_req *subreq);
4273 struct tevent_req *rpccli_lsa_SetSecret_send(TALLOC_CTX *mem_ctx,
4274 struct tevent_context *ev,
4275 struct rpc_pipe_client *cli,
4276 struct policy_handle *_sec_handle /* [in] [ref] */,
4277 struct lsa_DATA_BUF *_new_val /* [in] [unique] */,
4278 struct lsa_DATA_BUF *_old_val /* [in] [unique] */)
4280 struct tevent_req *req;
4281 struct rpccli_lsa_SetSecret_state *state;
4282 struct tevent_req *subreq;
4284 req = tevent_req_create(mem_ctx, &state,
4285 struct rpccli_lsa_SetSecret_state);
4286 if (req == NULL) {
4287 return NULL;
4289 state->out_mem_ctx = NULL;
4290 state->dispatch_recv = cli->dispatch_recv;
4292 /* In parameters */
4293 state->orig.in.sec_handle = _sec_handle;
4294 state->orig.in.new_val = _new_val;
4295 state->orig.in.old_val = _old_val;
4297 /* Out parameters */
4299 /* Result */
4300 ZERO_STRUCT(state->orig.out.result);
4302 /* make a temporary copy, that we pass to the dispatch function */
4303 state->tmp = state->orig;
4305 subreq = cli->dispatch_send(state, ev, cli,
4306 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4307 NDR_LSA_SETSECRET,
4308 &state->tmp);
4309 if (tevent_req_nomem(subreq, req)) {
4310 return tevent_req_post(req, ev);
4312 tevent_req_set_callback(subreq, rpccli_lsa_SetSecret_done, req);
4313 return req;
4316 static void rpccli_lsa_SetSecret_done(struct tevent_req *subreq)
4318 struct tevent_req *req = tevent_req_callback_data(
4319 subreq, struct tevent_req);
4320 struct rpccli_lsa_SetSecret_state *state = tevent_req_data(
4321 req, struct rpccli_lsa_SetSecret_state);
4322 NTSTATUS status;
4323 TALLOC_CTX *mem_ctx;
4325 if (state->out_mem_ctx) {
4326 mem_ctx = state->out_mem_ctx;
4327 } else {
4328 mem_ctx = state;
4331 status = state->dispatch_recv(subreq, mem_ctx);
4332 TALLOC_FREE(subreq);
4333 if (!NT_STATUS_IS_OK(status)) {
4334 tevent_req_nterror(req, status);
4335 return;
4338 /* Copy out parameters */
4340 /* Copy result */
4341 state->orig.out.result = state->tmp.out.result;
4343 /* Reset temporary structure */
4344 ZERO_STRUCT(state->tmp);
4346 tevent_req_done(req);
4349 NTSTATUS rpccli_lsa_SetSecret_recv(struct tevent_req *req,
4350 TALLOC_CTX *mem_ctx,
4351 NTSTATUS *result)
4353 struct rpccli_lsa_SetSecret_state *state = tevent_req_data(
4354 req, struct rpccli_lsa_SetSecret_state);
4355 NTSTATUS status;
4357 if (tevent_req_is_nterror(req, &status)) {
4358 tevent_req_received(req);
4359 return status;
4362 /* Steal possbile out parameters to the callers context */
4363 talloc_steal(mem_ctx, state->out_mem_ctx);
4365 /* Return result */
4366 *result = state->orig.out.result;
4368 tevent_req_received(req);
4369 return NT_STATUS_OK;
4372 NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli,
4373 TALLOC_CTX *mem_ctx,
4374 struct policy_handle *sec_handle /* [in] [ref] */,
4375 struct lsa_DATA_BUF *new_val /* [in] [unique] */,
4376 struct lsa_DATA_BUF *old_val /* [in] [unique] */)
4378 struct lsa_SetSecret r;
4379 NTSTATUS status;
4381 /* In parameters */
4382 r.in.sec_handle = sec_handle;
4383 r.in.new_val = new_val;
4384 r.in.old_val = old_val;
4386 status = cli->dispatch(cli,
4387 mem_ctx,
4388 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4389 NDR_LSA_SETSECRET,
4390 &r);
4392 if (!NT_STATUS_IS_OK(status)) {
4393 return status;
4396 if (NT_STATUS_IS_ERR(status)) {
4397 return status;
4400 /* Return variables */
4402 /* Return result */
4403 return r.out.result;
4406 struct rpccli_lsa_QuerySecret_state {
4407 struct lsa_QuerySecret orig;
4408 struct lsa_QuerySecret tmp;
4409 TALLOC_CTX *out_mem_ctx;
4410 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4413 static void rpccli_lsa_QuerySecret_done(struct tevent_req *subreq);
4415 struct tevent_req *rpccli_lsa_QuerySecret_send(TALLOC_CTX *mem_ctx,
4416 struct tevent_context *ev,
4417 struct rpc_pipe_client *cli,
4418 struct policy_handle *_sec_handle /* [in] [ref] */,
4419 struct lsa_DATA_BUF_PTR *_new_val /* [in,out] [unique] */,
4420 NTTIME *_new_mtime /* [in,out] [unique] */,
4421 struct lsa_DATA_BUF_PTR *_old_val /* [in,out] [unique] */,
4422 NTTIME *_old_mtime /* [in,out] [unique] */)
4424 struct tevent_req *req;
4425 struct rpccli_lsa_QuerySecret_state *state;
4426 struct tevent_req *subreq;
4428 req = tevent_req_create(mem_ctx, &state,
4429 struct rpccli_lsa_QuerySecret_state);
4430 if (req == NULL) {
4431 return NULL;
4433 state->out_mem_ctx = NULL;
4434 state->dispatch_recv = cli->dispatch_recv;
4436 /* In parameters */
4437 state->orig.in.sec_handle = _sec_handle;
4438 state->orig.in.new_val = _new_val;
4439 state->orig.in.new_mtime = _new_mtime;
4440 state->orig.in.old_val = _old_val;
4441 state->orig.in.old_mtime = _old_mtime;
4443 /* Out parameters */
4444 state->orig.out.new_val = _new_val;
4445 state->orig.out.new_mtime = _new_mtime;
4446 state->orig.out.old_val = _old_val;
4447 state->orig.out.old_mtime = _old_mtime;
4449 /* Result */
4450 ZERO_STRUCT(state->orig.out.result);
4452 state->out_mem_ctx = talloc_named_const(state, 0,
4453 "rpccli_lsa_QuerySecret_out_memory");
4454 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4455 return tevent_req_post(req, ev);
4458 /* make a temporary copy, that we pass to the dispatch function */
4459 state->tmp = state->orig;
4461 subreq = cli->dispatch_send(state, ev, cli,
4462 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4463 NDR_LSA_QUERYSECRET,
4464 &state->tmp);
4465 if (tevent_req_nomem(subreq, req)) {
4466 return tevent_req_post(req, ev);
4468 tevent_req_set_callback(subreq, rpccli_lsa_QuerySecret_done, req);
4469 return req;
4472 static void rpccli_lsa_QuerySecret_done(struct tevent_req *subreq)
4474 struct tevent_req *req = tevent_req_callback_data(
4475 subreq, struct tevent_req);
4476 struct rpccli_lsa_QuerySecret_state *state = tevent_req_data(
4477 req, struct rpccli_lsa_QuerySecret_state);
4478 NTSTATUS status;
4479 TALLOC_CTX *mem_ctx;
4481 if (state->out_mem_ctx) {
4482 mem_ctx = state->out_mem_ctx;
4483 } else {
4484 mem_ctx = state;
4487 status = state->dispatch_recv(subreq, mem_ctx);
4488 TALLOC_FREE(subreq);
4489 if (!NT_STATUS_IS_OK(status)) {
4490 tevent_req_nterror(req, status);
4491 return;
4494 /* Copy out parameters */
4495 if (state->orig.out.new_val && state->tmp.out.new_val) {
4496 *state->orig.out.new_val = *state->tmp.out.new_val;
4498 if (state->orig.out.new_mtime && state->tmp.out.new_mtime) {
4499 *state->orig.out.new_mtime = *state->tmp.out.new_mtime;
4501 if (state->orig.out.old_val && state->tmp.out.old_val) {
4502 *state->orig.out.old_val = *state->tmp.out.old_val;
4504 if (state->orig.out.old_mtime && state->tmp.out.old_mtime) {
4505 *state->orig.out.old_mtime = *state->tmp.out.old_mtime;
4508 /* Copy result */
4509 state->orig.out.result = state->tmp.out.result;
4511 /* Reset temporary structure */
4512 ZERO_STRUCT(state->tmp);
4514 tevent_req_done(req);
4517 NTSTATUS rpccli_lsa_QuerySecret_recv(struct tevent_req *req,
4518 TALLOC_CTX *mem_ctx,
4519 NTSTATUS *result)
4521 struct rpccli_lsa_QuerySecret_state *state = tevent_req_data(
4522 req, struct rpccli_lsa_QuerySecret_state);
4523 NTSTATUS status;
4525 if (tevent_req_is_nterror(req, &status)) {
4526 tevent_req_received(req);
4527 return status;
4530 /* Steal possbile out parameters to the callers context */
4531 talloc_steal(mem_ctx, state->out_mem_ctx);
4533 /* Return result */
4534 *result = state->orig.out.result;
4536 tevent_req_received(req);
4537 return NT_STATUS_OK;
4540 NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli,
4541 TALLOC_CTX *mem_ctx,
4542 struct policy_handle *sec_handle /* [in] [ref] */,
4543 struct lsa_DATA_BUF_PTR *new_val /* [in,out] [unique] */,
4544 NTTIME *new_mtime /* [in,out] [unique] */,
4545 struct lsa_DATA_BUF_PTR *old_val /* [in,out] [unique] */,
4546 NTTIME *old_mtime /* [in,out] [unique] */)
4548 struct lsa_QuerySecret r;
4549 NTSTATUS status;
4551 /* In parameters */
4552 r.in.sec_handle = sec_handle;
4553 r.in.new_val = new_val;
4554 r.in.new_mtime = new_mtime;
4555 r.in.old_val = old_val;
4556 r.in.old_mtime = old_mtime;
4558 status = cli->dispatch(cli,
4559 mem_ctx,
4560 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4561 NDR_LSA_QUERYSECRET,
4562 &r);
4564 if (!NT_STATUS_IS_OK(status)) {
4565 return status;
4568 if (NT_STATUS_IS_ERR(status)) {
4569 return status;
4572 /* Return variables */
4573 if (new_val && r.out.new_val) {
4574 *new_val = *r.out.new_val;
4576 if (new_mtime && r.out.new_mtime) {
4577 *new_mtime = *r.out.new_mtime;
4579 if (old_val && r.out.old_val) {
4580 *old_val = *r.out.old_val;
4582 if (old_mtime && r.out.old_mtime) {
4583 *old_mtime = *r.out.old_mtime;
4586 /* Return result */
4587 return r.out.result;
4590 struct rpccli_lsa_LookupPrivValue_state {
4591 struct lsa_LookupPrivValue orig;
4592 struct lsa_LookupPrivValue tmp;
4593 TALLOC_CTX *out_mem_ctx;
4594 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4597 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req *subreq);
4599 struct tevent_req *rpccli_lsa_LookupPrivValue_send(TALLOC_CTX *mem_ctx,
4600 struct tevent_context *ev,
4601 struct rpc_pipe_client *cli,
4602 struct policy_handle *_handle /* [in] [ref] */,
4603 struct lsa_String *_name /* [in] [ref] */,
4604 struct lsa_LUID *_luid /* [out] [ref] */)
4606 struct tevent_req *req;
4607 struct rpccli_lsa_LookupPrivValue_state *state;
4608 struct tevent_req *subreq;
4610 req = tevent_req_create(mem_ctx, &state,
4611 struct rpccli_lsa_LookupPrivValue_state);
4612 if (req == NULL) {
4613 return NULL;
4615 state->out_mem_ctx = NULL;
4616 state->dispatch_recv = cli->dispatch_recv;
4618 /* In parameters */
4619 state->orig.in.handle = _handle;
4620 state->orig.in.name = _name;
4622 /* Out parameters */
4623 state->orig.out.luid = _luid;
4625 /* Result */
4626 ZERO_STRUCT(state->orig.out.result);
4628 state->out_mem_ctx = talloc_named_const(state, 0,
4629 "rpccli_lsa_LookupPrivValue_out_memory");
4630 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4631 return tevent_req_post(req, ev);
4634 /* make a temporary copy, that we pass to the dispatch function */
4635 state->tmp = state->orig;
4637 subreq = cli->dispatch_send(state, ev, cli,
4638 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4639 NDR_LSA_LOOKUPPRIVVALUE,
4640 &state->tmp);
4641 if (tevent_req_nomem(subreq, req)) {
4642 return tevent_req_post(req, ev);
4644 tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivValue_done, req);
4645 return req;
4648 static void rpccli_lsa_LookupPrivValue_done(struct tevent_req *subreq)
4650 struct tevent_req *req = tevent_req_callback_data(
4651 subreq, struct tevent_req);
4652 struct rpccli_lsa_LookupPrivValue_state *state = tevent_req_data(
4653 req, struct rpccli_lsa_LookupPrivValue_state);
4654 NTSTATUS status;
4655 TALLOC_CTX *mem_ctx;
4657 if (state->out_mem_ctx) {
4658 mem_ctx = state->out_mem_ctx;
4659 } else {
4660 mem_ctx = state;
4663 status = state->dispatch_recv(subreq, mem_ctx);
4664 TALLOC_FREE(subreq);
4665 if (!NT_STATUS_IS_OK(status)) {
4666 tevent_req_nterror(req, status);
4667 return;
4670 /* Copy out parameters */
4671 *state->orig.out.luid = *state->tmp.out.luid;
4673 /* Copy result */
4674 state->orig.out.result = state->tmp.out.result;
4676 /* Reset temporary structure */
4677 ZERO_STRUCT(state->tmp);
4679 tevent_req_done(req);
4682 NTSTATUS rpccli_lsa_LookupPrivValue_recv(struct tevent_req *req,
4683 TALLOC_CTX *mem_ctx,
4684 NTSTATUS *result)
4686 struct rpccli_lsa_LookupPrivValue_state *state = tevent_req_data(
4687 req, struct rpccli_lsa_LookupPrivValue_state);
4688 NTSTATUS status;
4690 if (tevent_req_is_nterror(req, &status)) {
4691 tevent_req_received(req);
4692 return status;
4695 /* Steal possbile out parameters to the callers context */
4696 talloc_steal(mem_ctx, state->out_mem_ctx);
4698 /* Return result */
4699 *result = state->orig.out.result;
4701 tevent_req_received(req);
4702 return NT_STATUS_OK;
4705 NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli,
4706 TALLOC_CTX *mem_ctx,
4707 struct policy_handle *handle /* [in] [ref] */,
4708 struct lsa_String *name /* [in] [ref] */,
4709 struct lsa_LUID *luid /* [out] [ref] */)
4711 struct lsa_LookupPrivValue r;
4712 NTSTATUS status;
4714 /* In parameters */
4715 r.in.handle = handle;
4716 r.in.name = name;
4718 status = cli->dispatch(cli,
4719 mem_ctx,
4720 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4721 NDR_LSA_LOOKUPPRIVVALUE,
4722 &r);
4724 if (!NT_STATUS_IS_OK(status)) {
4725 return status;
4728 if (NT_STATUS_IS_ERR(status)) {
4729 return status;
4732 /* Return variables */
4733 *luid = *r.out.luid;
4735 /* Return result */
4736 return r.out.result;
4739 struct rpccli_lsa_LookupPrivName_state {
4740 struct lsa_LookupPrivName orig;
4741 struct lsa_LookupPrivName tmp;
4742 TALLOC_CTX *out_mem_ctx;
4743 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4746 static void rpccli_lsa_LookupPrivName_done(struct tevent_req *subreq);
4748 struct tevent_req *rpccli_lsa_LookupPrivName_send(TALLOC_CTX *mem_ctx,
4749 struct tevent_context *ev,
4750 struct rpc_pipe_client *cli,
4751 struct policy_handle *_handle /* [in] [ref] */,
4752 struct lsa_LUID *_luid /* [in] [ref] */,
4753 struct lsa_StringLarge **_name /* [out] [ref] */)
4755 struct tevent_req *req;
4756 struct rpccli_lsa_LookupPrivName_state *state;
4757 struct tevent_req *subreq;
4759 req = tevent_req_create(mem_ctx, &state,
4760 struct rpccli_lsa_LookupPrivName_state);
4761 if (req == NULL) {
4762 return NULL;
4764 state->out_mem_ctx = NULL;
4765 state->dispatch_recv = cli->dispatch_recv;
4767 /* In parameters */
4768 state->orig.in.handle = _handle;
4769 state->orig.in.luid = _luid;
4771 /* Out parameters */
4772 state->orig.out.name = _name;
4774 /* Result */
4775 ZERO_STRUCT(state->orig.out.result);
4777 state->out_mem_ctx = talloc_named_const(state, 0,
4778 "rpccli_lsa_LookupPrivName_out_memory");
4779 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4780 return tevent_req_post(req, ev);
4783 /* make a temporary copy, that we pass to the dispatch function */
4784 state->tmp = state->orig;
4786 subreq = cli->dispatch_send(state, ev, cli,
4787 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4788 NDR_LSA_LOOKUPPRIVNAME,
4789 &state->tmp);
4790 if (tevent_req_nomem(subreq, req)) {
4791 return tevent_req_post(req, ev);
4793 tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivName_done, req);
4794 return req;
4797 static void rpccli_lsa_LookupPrivName_done(struct tevent_req *subreq)
4799 struct tevent_req *req = tevent_req_callback_data(
4800 subreq, struct tevent_req);
4801 struct rpccli_lsa_LookupPrivName_state *state = tevent_req_data(
4802 req, struct rpccli_lsa_LookupPrivName_state);
4803 NTSTATUS status;
4804 TALLOC_CTX *mem_ctx;
4806 if (state->out_mem_ctx) {
4807 mem_ctx = state->out_mem_ctx;
4808 } else {
4809 mem_ctx = state;
4812 status = state->dispatch_recv(subreq, mem_ctx);
4813 TALLOC_FREE(subreq);
4814 if (!NT_STATUS_IS_OK(status)) {
4815 tevent_req_nterror(req, status);
4816 return;
4819 /* Copy out parameters */
4820 *state->orig.out.name = *state->tmp.out.name;
4822 /* Copy result */
4823 state->orig.out.result = state->tmp.out.result;
4825 /* Reset temporary structure */
4826 ZERO_STRUCT(state->tmp);
4828 tevent_req_done(req);
4831 NTSTATUS rpccli_lsa_LookupPrivName_recv(struct tevent_req *req,
4832 TALLOC_CTX *mem_ctx,
4833 NTSTATUS *result)
4835 struct rpccli_lsa_LookupPrivName_state *state = tevent_req_data(
4836 req, struct rpccli_lsa_LookupPrivName_state);
4837 NTSTATUS status;
4839 if (tevent_req_is_nterror(req, &status)) {
4840 tevent_req_received(req);
4841 return status;
4844 /* Steal possbile out parameters to the callers context */
4845 talloc_steal(mem_ctx, state->out_mem_ctx);
4847 /* Return result */
4848 *result = state->orig.out.result;
4850 tevent_req_received(req);
4851 return NT_STATUS_OK;
4854 NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli,
4855 TALLOC_CTX *mem_ctx,
4856 struct policy_handle *handle /* [in] [ref] */,
4857 struct lsa_LUID *luid /* [in] [ref] */,
4858 struct lsa_StringLarge **name /* [out] [ref] */)
4860 struct lsa_LookupPrivName r;
4861 NTSTATUS status;
4863 /* In parameters */
4864 r.in.handle = handle;
4865 r.in.luid = luid;
4867 status = cli->dispatch(cli,
4868 mem_ctx,
4869 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4870 NDR_LSA_LOOKUPPRIVNAME,
4871 &r);
4873 if (!NT_STATUS_IS_OK(status)) {
4874 return status;
4877 if (NT_STATUS_IS_ERR(status)) {
4878 return status;
4881 /* Return variables */
4882 *name = *r.out.name;
4884 /* Return result */
4885 return r.out.result;
4888 struct rpccli_lsa_LookupPrivDisplayName_state {
4889 struct lsa_LookupPrivDisplayName orig;
4890 struct lsa_LookupPrivDisplayName tmp;
4891 TALLOC_CTX *out_mem_ctx;
4892 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
4895 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq);
4897 struct tevent_req *rpccli_lsa_LookupPrivDisplayName_send(TALLOC_CTX *mem_ctx,
4898 struct tevent_context *ev,
4899 struct rpc_pipe_client *cli,
4900 struct policy_handle *_handle /* [in] [ref] */,
4901 struct lsa_String *_name /* [in] [ref] */,
4902 uint16_t _language_id /* [in] */,
4903 uint16_t _language_id_sys /* [in] */,
4904 struct lsa_StringLarge **_disp_name /* [out] [ref] */,
4905 uint16_t *_returned_language_id /* [out] [ref] */)
4907 struct tevent_req *req;
4908 struct rpccli_lsa_LookupPrivDisplayName_state *state;
4909 struct tevent_req *subreq;
4911 req = tevent_req_create(mem_ctx, &state,
4912 struct rpccli_lsa_LookupPrivDisplayName_state);
4913 if (req == NULL) {
4914 return NULL;
4916 state->out_mem_ctx = NULL;
4917 state->dispatch_recv = cli->dispatch_recv;
4919 /* In parameters */
4920 state->orig.in.handle = _handle;
4921 state->orig.in.name = _name;
4922 state->orig.in.language_id = _language_id;
4923 state->orig.in.language_id_sys = _language_id_sys;
4925 /* Out parameters */
4926 state->orig.out.disp_name = _disp_name;
4927 state->orig.out.returned_language_id = _returned_language_id;
4929 /* Result */
4930 ZERO_STRUCT(state->orig.out.result);
4932 state->out_mem_ctx = talloc_named_const(state, 0,
4933 "rpccli_lsa_LookupPrivDisplayName_out_memory");
4934 if (tevent_req_nomem(state->out_mem_ctx, req)) {
4935 return tevent_req_post(req, ev);
4938 /* make a temporary copy, that we pass to the dispatch function */
4939 state->tmp = state->orig;
4941 subreq = cli->dispatch_send(state, ev, cli,
4942 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
4943 NDR_LSA_LOOKUPPRIVDISPLAYNAME,
4944 &state->tmp);
4945 if (tevent_req_nomem(subreq, req)) {
4946 return tevent_req_post(req, ev);
4948 tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivDisplayName_done, req);
4949 return req;
4952 static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq)
4954 struct tevent_req *req = tevent_req_callback_data(
4955 subreq, struct tevent_req);
4956 struct rpccli_lsa_LookupPrivDisplayName_state *state = tevent_req_data(
4957 req, struct rpccli_lsa_LookupPrivDisplayName_state);
4958 NTSTATUS status;
4959 TALLOC_CTX *mem_ctx;
4961 if (state->out_mem_ctx) {
4962 mem_ctx = state->out_mem_ctx;
4963 } else {
4964 mem_ctx = state;
4967 status = state->dispatch_recv(subreq, mem_ctx);
4968 TALLOC_FREE(subreq);
4969 if (!NT_STATUS_IS_OK(status)) {
4970 tevent_req_nterror(req, status);
4971 return;
4974 /* Copy out parameters */
4975 *state->orig.out.disp_name = *state->tmp.out.disp_name;
4976 *state->orig.out.returned_language_id = *state->tmp.out.returned_language_id;
4978 /* Copy result */
4979 state->orig.out.result = state->tmp.out.result;
4981 /* Reset temporary structure */
4982 ZERO_STRUCT(state->tmp);
4984 tevent_req_done(req);
4987 NTSTATUS rpccli_lsa_LookupPrivDisplayName_recv(struct tevent_req *req,
4988 TALLOC_CTX *mem_ctx,
4989 NTSTATUS *result)
4991 struct rpccli_lsa_LookupPrivDisplayName_state *state = tevent_req_data(
4992 req, struct rpccli_lsa_LookupPrivDisplayName_state);
4993 NTSTATUS status;
4995 if (tevent_req_is_nterror(req, &status)) {
4996 tevent_req_received(req);
4997 return status;
5000 /* Steal possbile out parameters to the callers context */
5001 talloc_steal(mem_ctx, state->out_mem_ctx);
5003 /* Return result */
5004 *result = state->orig.out.result;
5006 tevent_req_received(req);
5007 return NT_STATUS_OK;
5010 NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli,
5011 TALLOC_CTX *mem_ctx,
5012 struct policy_handle *handle /* [in] [ref] */,
5013 struct lsa_String *name /* [in] [ref] */,
5014 uint16_t language_id /* [in] */,
5015 uint16_t language_id_sys /* [in] */,
5016 struct lsa_StringLarge **disp_name /* [out] [ref] */,
5017 uint16_t *returned_language_id /* [out] [ref] */)
5019 struct lsa_LookupPrivDisplayName r;
5020 NTSTATUS status;
5022 /* In parameters */
5023 r.in.handle = handle;
5024 r.in.name = name;
5025 r.in.language_id = language_id;
5026 r.in.language_id_sys = language_id_sys;
5028 status = cli->dispatch(cli,
5029 mem_ctx,
5030 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5031 NDR_LSA_LOOKUPPRIVDISPLAYNAME,
5032 &r);
5034 if (!NT_STATUS_IS_OK(status)) {
5035 return status;
5038 if (NT_STATUS_IS_ERR(status)) {
5039 return status;
5042 /* Return variables */
5043 *disp_name = *r.out.disp_name;
5044 *returned_language_id = *r.out.returned_language_id;
5046 /* Return result */
5047 return r.out.result;
5050 struct rpccli_lsa_DeleteObject_state {
5051 struct lsa_DeleteObject orig;
5052 struct lsa_DeleteObject tmp;
5053 TALLOC_CTX *out_mem_ctx;
5054 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5057 static void rpccli_lsa_DeleteObject_done(struct tevent_req *subreq);
5059 struct tevent_req *rpccli_lsa_DeleteObject_send(TALLOC_CTX *mem_ctx,
5060 struct tevent_context *ev,
5061 struct rpc_pipe_client *cli,
5062 struct policy_handle *_handle /* [in,out] [ref] */)
5064 struct tevent_req *req;
5065 struct rpccli_lsa_DeleteObject_state *state;
5066 struct tevent_req *subreq;
5068 req = tevent_req_create(mem_ctx, &state,
5069 struct rpccli_lsa_DeleteObject_state);
5070 if (req == NULL) {
5071 return NULL;
5073 state->out_mem_ctx = NULL;
5074 state->dispatch_recv = cli->dispatch_recv;
5076 /* In parameters */
5077 state->orig.in.handle = _handle;
5079 /* Out parameters */
5080 state->orig.out.handle = _handle;
5082 /* Result */
5083 ZERO_STRUCT(state->orig.out.result);
5085 state->out_mem_ctx = talloc_named_const(state, 0,
5086 "rpccli_lsa_DeleteObject_out_memory");
5087 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5088 return tevent_req_post(req, ev);
5091 /* make a temporary copy, that we pass to the dispatch function */
5092 state->tmp = state->orig;
5094 subreq = cli->dispatch_send(state, ev, cli,
5095 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5096 NDR_LSA_DELETEOBJECT,
5097 &state->tmp);
5098 if (tevent_req_nomem(subreq, req)) {
5099 return tevent_req_post(req, ev);
5101 tevent_req_set_callback(subreq, rpccli_lsa_DeleteObject_done, req);
5102 return req;
5105 static void rpccli_lsa_DeleteObject_done(struct tevent_req *subreq)
5107 struct tevent_req *req = tevent_req_callback_data(
5108 subreq, struct tevent_req);
5109 struct rpccli_lsa_DeleteObject_state *state = tevent_req_data(
5110 req, struct rpccli_lsa_DeleteObject_state);
5111 NTSTATUS status;
5112 TALLOC_CTX *mem_ctx;
5114 if (state->out_mem_ctx) {
5115 mem_ctx = state->out_mem_ctx;
5116 } else {
5117 mem_ctx = state;
5120 status = state->dispatch_recv(subreq, mem_ctx);
5121 TALLOC_FREE(subreq);
5122 if (!NT_STATUS_IS_OK(status)) {
5123 tevent_req_nterror(req, status);
5124 return;
5127 /* Copy out parameters */
5128 *state->orig.out.handle = *state->tmp.out.handle;
5130 /* Copy result */
5131 state->orig.out.result = state->tmp.out.result;
5133 /* Reset temporary structure */
5134 ZERO_STRUCT(state->tmp);
5136 tevent_req_done(req);
5139 NTSTATUS rpccli_lsa_DeleteObject_recv(struct tevent_req *req,
5140 TALLOC_CTX *mem_ctx,
5141 NTSTATUS *result)
5143 struct rpccli_lsa_DeleteObject_state *state = tevent_req_data(
5144 req, struct rpccli_lsa_DeleteObject_state);
5145 NTSTATUS status;
5147 if (tevent_req_is_nterror(req, &status)) {
5148 tevent_req_received(req);
5149 return status;
5152 /* Steal possbile out parameters to the callers context */
5153 talloc_steal(mem_ctx, state->out_mem_ctx);
5155 /* Return result */
5156 *result = state->orig.out.result;
5158 tevent_req_received(req);
5159 return NT_STATUS_OK;
5162 NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli,
5163 TALLOC_CTX *mem_ctx,
5164 struct policy_handle *handle /* [in,out] [ref] */)
5166 struct lsa_DeleteObject r;
5167 NTSTATUS status;
5169 /* In parameters */
5170 r.in.handle = handle;
5172 status = cli->dispatch(cli,
5173 mem_ctx,
5174 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5175 NDR_LSA_DELETEOBJECT,
5176 &r);
5178 if (!NT_STATUS_IS_OK(status)) {
5179 return status;
5182 if (NT_STATUS_IS_ERR(status)) {
5183 return status;
5186 /* Return variables */
5187 *handle = *r.out.handle;
5189 /* Return result */
5190 return r.out.result;
5193 struct rpccli_lsa_EnumAccountsWithUserRight_state {
5194 struct lsa_EnumAccountsWithUserRight orig;
5195 struct lsa_EnumAccountsWithUserRight tmp;
5196 TALLOC_CTX *out_mem_ctx;
5197 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5200 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq);
5202 struct tevent_req *rpccli_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX *mem_ctx,
5203 struct tevent_context *ev,
5204 struct rpc_pipe_client *cli,
5205 struct policy_handle *_handle /* [in] [ref] */,
5206 struct lsa_String *_name /* [in] [unique] */,
5207 struct lsa_SidArray *_sids /* [out] [ref] */)
5209 struct tevent_req *req;
5210 struct rpccli_lsa_EnumAccountsWithUserRight_state *state;
5211 struct tevent_req *subreq;
5213 req = tevent_req_create(mem_ctx, &state,
5214 struct rpccli_lsa_EnumAccountsWithUserRight_state);
5215 if (req == NULL) {
5216 return NULL;
5218 state->out_mem_ctx = NULL;
5219 state->dispatch_recv = cli->dispatch_recv;
5221 /* In parameters */
5222 state->orig.in.handle = _handle;
5223 state->orig.in.name = _name;
5225 /* Out parameters */
5226 state->orig.out.sids = _sids;
5228 /* Result */
5229 ZERO_STRUCT(state->orig.out.result);
5231 state->out_mem_ctx = talloc_named_const(state, 0,
5232 "rpccli_lsa_EnumAccountsWithUserRight_out_memory");
5233 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5234 return tevent_req_post(req, ev);
5237 /* make a temporary copy, that we pass to the dispatch function */
5238 state->tmp = state->orig;
5240 subreq = cli->dispatch_send(state, ev, cli,
5241 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5242 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT,
5243 &state->tmp);
5244 if (tevent_req_nomem(subreq, req)) {
5245 return tevent_req_post(req, ev);
5247 tevent_req_set_callback(subreq, rpccli_lsa_EnumAccountsWithUserRight_done, req);
5248 return req;
5251 static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq)
5253 struct tevent_req *req = tevent_req_callback_data(
5254 subreq, struct tevent_req);
5255 struct rpccli_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data(
5256 req, struct rpccli_lsa_EnumAccountsWithUserRight_state);
5257 NTSTATUS status;
5258 TALLOC_CTX *mem_ctx;
5260 if (state->out_mem_ctx) {
5261 mem_ctx = state->out_mem_ctx;
5262 } else {
5263 mem_ctx = state;
5266 status = state->dispatch_recv(subreq, mem_ctx);
5267 TALLOC_FREE(subreq);
5268 if (!NT_STATUS_IS_OK(status)) {
5269 tevent_req_nterror(req, status);
5270 return;
5273 /* Copy out parameters */
5274 *state->orig.out.sids = *state->tmp.out.sids;
5276 /* Copy result */
5277 state->orig.out.result = state->tmp.out.result;
5279 /* Reset temporary structure */
5280 ZERO_STRUCT(state->tmp);
5282 tevent_req_done(req);
5285 NTSTATUS rpccli_lsa_EnumAccountsWithUserRight_recv(struct tevent_req *req,
5286 TALLOC_CTX *mem_ctx,
5287 NTSTATUS *result)
5289 struct rpccli_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data(
5290 req, struct rpccli_lsa_EnumAccountsWithUserRight_state);
5291 NTSTATUS status;
5293 if (tevent_req_is_nterror(req, &status)) {
5294 tevent_req_received(req);
5295 return status;
5298 /* Steal possbile out parameters to the callers context */
5299 talloc_steal(mem_ctx, state->out_mem_ctx);
5301 /* Return result */
5302 *result = state->orig.out.result;
5304 tevent_req_received(req);
5305 return NT_STATUS_OK;
5308 NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli,
5309 TALLOC_CTX *mem_ctx,
5310 struct policy_handle *handle /* [in] [ref] */,
5311 struct lsa_String *name /* [in] [unique] */,
5312 struct lsa_SidArray *sids /* [out] [ref] */)
5314 struct lsa_EnumAccountsWithUserRight r;
5315 NTSTATUS status;
5317 /* In parameters */
5318 r.in.handle = handle;
5319 r.in.name = name;
5321 status = cli->dispatch(cli,
5322 mem_ctx,
5323 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5324 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT,
5325 &r);
5327 if (!NT_STATUS_IS_OK(status)) {
5328 return status;
5331 if (NT_STATUS_IS_ERR(status)) {
5332 return status;
5335 /* Return variables */
5336 *sids = *r.out.sids;
5338 /* Return result */
5339 return r.out.result;
5342 struct rpccli_lsa_EnumAccountRights_state {
5343 struct lsa_EnumAccountRights orig;
5344 struct lsa_EnumAccountRights tmp;
5345 TALLOC_CTX *out_mem_ctx;
5346 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5349 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req *subreq);
5351 struct tevent_req *rpccli_lsa_EnumAccountRights_send(TALLOC_CTX *mem_ctx,
5352 struct tevent_context *ev,
5353 struct rpc_pipe_client *cli,
5354 struct policy_handle *_handle /* [in] [ref] */,
5355 struct dom_sid2 *_sid /* [in] [ref] */,
5356 struct lsa_RightSet *_rights /* [out] [ref] */)
5358 struct tevent_req *req;
5359 struct rpccli_lsa_EnumAccountRights_state *state;
5360 struct tevent_req *subreq;
5362 req = tevent_req_create(mem_ctx, &state,
5363 struct rpccli_lsa_EnumAccountRights_state);
5364 if (req == NULL) {
5365 return NULL;
5367 state->out_mem_ctx = NULL;
5368 state->dispatch_recv = cli->dispatch_recv;
5370 /* In parameters */
5371 state->orig.in.handle = _handle;
5372 state->orig.in.sid = _sid;
5374 /* Out parameters */
5375 state->orig.out.rights = _rights;
5377 /* Result */
5378 ZERO_STRUCT(state->orig.out.result);
5380 state->out_mem_ctx = talloc_named_const(state, 0,
5381 "rpccli_lsa_EnumAccountRights_out_memory");
5382 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5383 return tevent_req_post(req, ev);
5386 /* make a temporary copy, that we pass to the dispatch function */
5387 state->tmp = state->orig;
5389 subreq = cli->dispatch_send(state, ev, cli,
5390 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5391 NDR_LSA_ENUMACCOUNTRIGHTS,
5392 &state->tmp);
5393 if (tevent_req_nomem(subreq, req)) {
5394 return tevent_req_post(req, ev);
5396 tevent_req_set_callback(subreq, rpccli_lsa_EnumAccountRights_done, req);
5397 return req;
5400 static void rpccli_lsa_EnumAccountRights_done(struct tevent_req *subreq)
5402 struct tevent_req *req = tevent_req_callback_data(
5403 subreq, struct tevent_req);
5404 struct rpccli_lsa_EnumAccountRights_state *state = tevent_req_data(
5405 req, struct rpccli_lsa_EnumAccountRights_state);
5406 NTSTATUS status;
5407 TALLOC_CTX *mem_ctx;
5409 if (state->out_mem_ctx) {
5410 mem_ctx = state->out_mem_ctx;
5411 } else {
5412 mem_ctx = state;
5415 status = state->dispatch_recv(subreq, mem_ctx);
5416 TALLOC_FREE(subreq);
5417 if (!NT_STATUS_IS_OK(status)) {
5418 tevent_req_nterror(req, status);
5419 return;
5422 /* Copy out parameters */
5423 *state->orig.out.rights = *state->tmp.out.rights;
5425 /* Copy result */
5426 state->orig.out.result = state->tmp.out.result;
5428 /* Reset temporary structure */
5429 ZERO_STRUCT(state->tmp);
5431 tevent_req_done(req);
5434 NTSTATUS rpccli_lsa_EnumAccountRights_recv(struct tevent_req *req,
5435 TALLOC_CTX *mem_ctx,
5436 NTSTATUS *result)
5438 struct rpccli_lsa_EnumAccountRights_state *state = tevent_req_data(
5439 req, struct rpccli_lsa_EnumAccountRights_state);
5440 NTSTATUS status;
5442 if (tevent_req_is_nterror(req, &status)) {
5443 tevent_req_received(req);
5444 return status;
5447 /* Steal possbile out parameters to the callers context */
5448 talloc_steal(mem_ctx, state->out_mem_ctx);
5450 /* Return result */
5451 *result = state->orig.out.result;
5453 tevent_req_received(req);
5454 return NT_STATUS_OK;
5457 NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli,
5458 TALLOC_CTX *mem_ctx,
5459 struct policy_handle *handle /* [in] [ref] */,
5460 struct dom_sid2 *sid /* [in] [ref] */,
5461 struct lsa_RightSet *rights /* [out] [ref] */)
5463 struct lsa_EnumAccountRights r;
5464 NTSTATUS status;
5466 /* In parameters */
5467 r.in.handle = handle;
5468 r.in.sid = sid;
5470 status = cli->dispatch(cli,
5471 mem_ctx,
5472 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5473 NDR_LSA_ENUMACCOUNTRIGHTS,
5474 &r);
5476 if (!NT_STATUS_IS_OK(status)) {
5477 return status;
5480 if (NT_STATUS_IS_ERR(status)) {
5481 return status;
5484 /* Return variables */
5485 *rights = *r.out.rights;
5487 /* Return result */
5488 return r.out.result;
5491 struct rpccli_lsa_AddAccountRights_state {
5492 struct lsa_AddAccountRights orig;
5493 struct lsa_AddAccountRights tmp;
5494 TALLOC_CTX *out_mem_ctx;
5495 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5498 static void rpccli_lsa_AddAccountRights_done(struct tevent_req *subreq);
5500 struct tevent_req *rpccli_lsa_AddAccountRights_send(TALLOC_CTX *mem_ctx,
5501 struct tevent_context *ev,
5502 struct rpc_pipe_client *cli,
5503 struct policy_handle *_handle /* [in] [ref] */,
5504 struct dom_sid2 *_sid /* [in] [ref] */,
5505 struct lsa_RightSet *_rights /* [in] [ref] */)
5507 struct tevent_req *req;
5508 struct rpccli_lsa_AddAccountRights_state *state;
5509 struct tevent_req *subreq;
5511 req = tevent_req_create(mem_ctx, &state,
5512 struct rpccli_lsa_AddAccountRights_state);
5513 if (req == NULL) {
5514 return NULL;
5516 state->out_mem_ctx = NULL;
5517 state->dispatch_recv = cli->dispatch_recv;
5519 /* In parameters */
5520 state->orig.in.handle = _handle;
5521 state->orig.in.sid = _sid;
5522 state->orig.in.rights = _rights;
5524 /* Out parameters */
5526 /* Result */
5527 ZERO_STRUCT(state->orig.out.result);
5529 /* make a temporary copy, that we pass to the dispatch function */
5530 state->tmp = state->orig;
5532 subreq = cli->dispatch_send(state, ev, cli,
5533 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5534 NDR_LSA_ADDACCOUNTRIGHTS,
5535 &state->tmp);
5536 if (tevent_req_nomem(subreq, req)) {
5537 return tevent_req_post(req, ev);
5539 tevent_req_set_callback(subreq, rpccli_lsa_AddAccountRights_done, req);
5540 return req;
5543 static void rpccli_lsa_AddAccountRights_done(struct tevent_req *subreq)
5545 struct tevent_req *req = tevent_req_callback_data(
5546 subreq, struct tevent_req);
5547 struct rpccli_lsa_AddAccountRights_state *state = tevent_req_data(
5548 req, struct rpccli_lsa_AddAccountRights_state);
5549 NTSTATUS status;
5550 TALLOC_CTX *mem_ctx;
5552 if (state->out_mem_ctx) {
5553 mem_ctx = state->out_mem_ctx;
5554 } else {
5555 mem_ctx = state;
5558 status = state->dispatch_recv(subreq, mem_ctx);
5559 TALLOC_FREE(subreq);
5560 if (!NT_STATUS_IS_OK(status)) {
5561 tevent_req_nterror(req, status);
5562 return;
5565 /* Copy out parameters */
5567 /* Copy result */
5568 state->orig.out.result = state->tmp.out.result;
5570 /* Reset temporary structure */
5571 ZERO_STRUCT(state->tmp);
5573 tevent_req_done(req);
5576 NTSTATUS rpccli_lsa_AddAccountRights_recv(struct tevent_req *req,
5577 TALLOC_CTX *mem_ctx,
5578 NTSTATUS *result)
5580 struct rpccli_lsa_AddAccountRights_state *state = tevent_req_data(
5581 req, struct rpccli_lsa_AddAccountRights_state);
5582 NTSTATUS status;
5584 if (tevent_req_is_nterror(req, &status)) {
5585 tevent_req_received(req);
5586 return status;
5589 /* Steal possbile out parameters to the callers context */
5590 talloc_steal(mem_ctx, state->out_mem_ctx);
5592 /* Return result */
5593 *result = state->orig.out.result;
5595 tevent_req_received(req);
5596 return NT_STATUS_OK;
5599 NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli,
5600 TALLOC_CTX *mem_ctx,
5601 struct policy_handle *handle /* [in] [ref] */,
5602 struct dom_sid2 *sid /* [in] [ref] */,
5603 struct lsa_RightSet *rights /* [in] [ref] */)
5605 struct lsa_AddAccountRights r;
5606 NTSTATUS status;
5608 /* In parameters */
5609 r.in.handle = handle;
5610 r.in.sid = sid;
5611 r.in.rights = rights;
5613 status = cli->dispatch(cli,
5614 mem_ctx,
5615 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5616 NDR_LSA_ADDACCOUNTRIGHTS,
5617 &r);
5619 if (!NT_STATUS_IS_OK(status)) {
5620 return status;
5623 if (NT_STATUS_IS_ERR(status)) {
5624 return status;
5627 /* Return variables */
5629 /* Return result */
5630 return r.out.result;
5633 struct rpccli_lsa_RemoveAccountRights_state {
5634 struct lsa_RemoveAccountRights orig;
5635 struct lsa_RemoveAccountRights tmp;
5636 TALLOC_CTX *out_mem_ctx;
5637 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5640 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req *subreq);
5642 struct tevent_req *rpccli_lsa_RemoveAccountRights_send(TALLOC_CTX *mem_ctx,
5643 struct tevent_context *ev,
5644 struct rpc_pipe_client *cli,
5645 struct policy_handle *_handle /* [in] [ref] */,
5646 struct dom_sid2 *_sid /* [in] [ref] */,
5647 uint8_t _remove_all /* [in] */,
5648 struct lsa_RightSet *_rights /* [in] [ref] */)
5650 struct tevent_req *req;
5651 struct rpccli_lsa_RemoveAccountRights_state *state;
5652 struct tevent_req *subreq;
5654 req = tevent_req_create(mem_ctx, &state,
5655 struct rpccli_lsa_RemoveAccountRights_state);
5656 if (req == NULL) {
5657 return NULL;
5659 state->out_mem_ctx = NULL;
5660 state->dispatch_recv = cli->dispatch_recv;
5662 /* In parameters */
5663 state->orig.in.handle = _handle;
5664 state->orig.in.sid = _sid;
5665 state->orig.in.remove_all = _remove_all;
5666 state->orig.in.rights = _rights;
5668 /* Out parameters */
5670 /* Result */
5671 ZERO_STRUCT(state->orig.out.result);
5673 /* make a temporary copy, that we pass to the dispatch function */
5674 state->tmp = state->orig;
5676 subreq = cli->dispatch_send(state, ev, cli,
5677 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5678 NDR_LSA_REMOVEACCOUNTRIGHTS,
5679 &state->tmp);
5680 if (tevent_req_nomem(subreq, req)) {
5681 return tevent_req_post(req, ev);
5683 tevent_req_set_callback(subreq, rpccli_lsa_RemoveAccountRights_done, req);
5684 return req;
5687 static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req *subreq)
5689 struct tevent_req *req = tevent_req_callback_data(
5690 subreq, struct tevent_req);
5691 struct rpccli_lsa_RemoveAccountRights_state *state = tevent_req_data(
5692 req, struct rpccli_lsa_RemoveAccountRights_state);
5693 NTSTATUS status;
5694 TALLOC_CTX *mem_ctx;
5696 if (state->out_mem_ctx) {
5697 mem_ctx = state->out_mem_ctx;
5698 } else {
5699 mem_ctx = state;
5702 status = state->dispatch_recv(subreq, mem_ctx);
5703 TALLOC_FREE(subreq);
5704 if (!NT_STATUS_IS_OK(status)) {
5705 tevent_req_nterror(req, status);
5706 return;
5709 /* Copy out parameters */
5711 /* Copy result */
5712 state->orig.out.result = state->tmp.out.result;
5714 /* Reset temporary structure */
5715 ZERO_STRUCT(state->tmp);
5717 tevent_req_done(req);
5720 NTSTATUS rpccli_lsa_RemoveAccountRights_recv(struct tevent_req *req,
5721 TALLOC_CTX *mem_ctx,
5722 NTSTATUS *result)
5724 struct rpccli_lsa_RemoveAccountRights_state *state = tevent_req_data(
5725 req, struct rpccli_lsa_RemoveAccountRights_state);
5726 NTSTATUS status;
5728 if (tevent_req_is_nterror(req, &status)) {
5729 tevent_req_received(req);
5730 return status;
5733 /* Steal possbile out parameters to the callers context */
5734 talloc_steal(mem_ctx, state->out_mem_ctx);
5736 /* Return result */
5737 *result = state->orig.out.result;
5739 tevent_req_received(req);
5740 return NT_STATUS_OK;
5743 NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli,
5744 TALLOC_CTX *mem_ctx,
5745 struct policy_handle *handle /* [in] [ref] */,
5746 struct dom_sid2 *sid /* [in] [ref] */,
5747 uint8_t remove_all /* [in] */,
5748 struct lsa_RightSet *rights /* [in] [ref] */)
5750 struct lsa_RemoveAccountRights r;
5751 NTSTATUS status;
5753 /* In parameters */
5754 r.in.handle = handle;
5755 r.in.sid = sid;
5756 r.in.remove_all = remove_all;
5757 r.in.rights = rights;
5759 status = cli->dispatch(cli,
5760 mem_ctx,
5761 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5762 NDR_LSA_REMOVEACCOUNTRIGHTS,
5763 &r);
5765 if (!NT_STATUS_IS_OK(status)) {
5766 return status;
5769 if (NT_STATUS_IS_ERR(status)) {
5770 return status;
5773 /* Return variables */
5775 /* Return result */
5776 return r.out.result;
5779 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state {
5780 struct lsa_QueryTrustedDomainInfoBySid orig;
5781 struct lsa_QueryTrustedDomainInfoBySid tmp;
5782 TALLOC_CTX *out_mem_ctx;
5783 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5786 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq);
5788 struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX *mem_ctx,
5789 struct tevent_context *ev,
5790 struct rpc_pipe_client *cli,
5791 struct policy_handle *_handle /* [in] [ref] */,
5792 struct dom_sid2 *_dom_sid /* [in] [ref] */,
5793 enum lsa_TrustDomInfoEnum _level /* [in] */,
5794 union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
5796 struct tevent_req *req;
5797 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state;
5798 struct tevent_req *subreq;
5800 req = tevent_req_create(mem_ctx, &state,
5801 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state);
5802 if (req == NULL) {
5803 return NULL;
5805 state->out_mem_ctx = NULL;
5806 state->dispatch_recv = cli->dispatch_recv;
5808 /* In parameters */
5809 state->orig.in.handle = _handle;
5810 state->orig.in.dom_sid = _dom_sid;
5811 state->orig.in.level = _level;
5813 /* Out parameters */
5814 state->orig.out.info = _info;
5816 /* Result */
5817 ZERO_STRUCT(state->orig.out.result);
5819 state->out_mem_ctx = talloc_named_const(state, 0,
5820 "rpccli_lsa_QueryTrustedDomainInfoBySid_out_memory");
5821 if (tevent_req_nomem(state->out_mem_ctx, req)) {
5822 return tevent_req_post(req, ev);
5825 /* make a temporary copy, that we pass to the dispatch function */
5826 state->tmp = state->orig;
5828 subreq = cli->dispatch_send(state, ev, cli,
5829 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5830 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID,
5831 &state->tmp);
5832 if (tevent_req_nomem(subreq, req)) {
5833 return tevent_req_post(req, ev);
5835 tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfoBySid_done, req);
5836 return req;
5839 static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq)
5841 struct tevent_req *req = tevent_req_callback_data(
5842 subreq, struct tevent_req);
5843 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data(
5844 req, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state);
5845 NTSTATUS status;
5846 TALLOC_CTX *mem_ctx;
5848 if (state->out_mem_ctx) {
5849 mem_ctx = state->out_mem_ctx;
5850 } else {
5851 mem_ctx = state;
5854 status = state->dispatch_recv(subreq, mem_ctx);
5855 TALLOC_FREE(subreq);
5856 if (!NT_STATUS_IS_OK(status)) {
5857 tevent_req_nterror(req, status);
5858 return;
5861 /* Copy out parameters */
5862 *state->orig.out.info = *state->tmp.out.info;
5864 /* Copy result */
5865 state->orig.out.result = state->tmp.out.result;
5867 /* Reset temporary structure */
5868 ZERO_STRUCT(state->tmp);
5870 tevent_req_done(req);
5873 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req *req,
5874 TALLOC_CTX *mem_ctx,
5875 NTSTATUS *result)
5877 struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data(
5878 req, struct rpccli_lsa_QueryTrustedDomainInfoBySid_state);
5879 NTSTATUS status;
5881 if (tevent_req_is_nterror(req, &status)) {
5882 tevent_req_received(req);
5883 return status;
5886 /* Steal possbile out parameters to the callers context */
5887 talloc_steal(mem_ctx, state->out_mem_ctx);
5889 /* Return result */
5890 *result = state->orig.out.result;
5892 tevent_req_received(req);
5893 return NT_STATUS_OK;
5896 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli,
5897 TALLOC_CTX *mem_ctx,
5898 struct policy_handle *handle /* [in] [ref] */,
5899 struct dom_sid2 *dom_sid /* [in] [ref] */,
5900 enum lsa_TrustDomInfoEnum level /* [in] */,
5901 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
5903 struct lsa_QueryTrustedDomainInfoBySid r;
5904 NTSTATUS status;
5906 /* In parameters */
5907 r.in.handle = handle;
5908 r.in.dom_sid = dom_sid;
5909 r.in.level = level;
5911 status = cli->dispatch(cli,
5912 mem_ctx,
5913 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5914 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID,
5915 &r);
5917 if (!NT_STATUS_IS_OK(status)) {
5918 return status;
5921 if (NT_STATUS_IS_ERR(status)) {
5922 return status;
5925 /* Return variables */
5926 *info = *r.out.info;
5928 /* Return result */
5929 return r.out.result;
5932 struct rpccli_lsa_SetTrustedDomainInfo_state {
5933 struct lsa_SetTrustedDomainInfo orig;
5934 struct lsa_SetTrustedDomainInfo tmp;
5935 TALLOC_CTX *out_mem_ctx;
5936 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
5939 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq);
5941 struct tevent_req *rpccli_lsa_SetTrustedDomainInfo_send(TALLOC_CTX *mem_ctx,
5942 struct tevent_context *ev,
5943 struct rpc_pipe_client *cli,
5944 struct policy_handle *_handle /* [in] [ref] */,
5945 struct dom_sid2 *_dom_sid /* [in] [ref] */,
5946 enum lsa_TrustDomInfoEnum _level /* [in] */,
5947 union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */)
5949 struct tevent_req *req;
5950 struct rpccli_lsa_SetTrustedDomainInfo_state *state;
5951 struct tevent_req *subreq;
5953 req = tevent_req_create(mem_ctx, &state,
5954 struct rpccli_lsa_SetTrustedDomainInfo_state);
5955 if (req == NULL) {
5956 return NULL;
5958 state->out_mem_ctx = NULL;
5959 state->dispatch_recv = cli->dispatch_recv;
5961 /* In parameters */
5962 state->orig.in.handle = _handle;
5963 state->orig.in.dom_sid = _dom_sid;
5964 state->orig.in.level = _level;
5965 state->orig.in.info = _info;
5967 /* Out parameters */
5969 /* Result */
5970 ZERO_STRUCT(state->orig.out.result);
5972 /* make a temporary copy, that we pass to the dispatch function */
5973 state->tmp = state->orig;
5975 subreq = cli->dispatch_send(state, ev, cli,
5976 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
5977 NDR_LSA_SETTRUSTEDDOMAININFO,
5978 &state->tmp);
5979 if (tevent_req_nomem(subreq, req)) {
5980 return tevent_req_post(req, ev);
5982 tevent_req_set_callback(subreq, rpccli_lsa_SetTrustedDomainInfo_done, req);
5983 return req;
5986 static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq)
5988 struct tevent_req *req = tevent_req_callback_data(
5989 subreq, struct tevent_req);
5990 struct rpccli_lsa_SetTrustedDomainInfo_state *state = tevent_req_data(
5991 req, struct rpccli_lsa_SetTrustedDomainInfo_state);
5992 NTSTATUS status;
5993 TALLOC_CTX *mem_ctx;
5995 if (state->out_mem_ctx) {
5996 mem_ctx = state->out_mem_ctx;
5997 } else {
5998 mem_ctx = state;
6001 status = state->dispatch_recv(subreq, mem_ctx);
6002 TALLOC_FREE(subreq);
6003 if (!NT_STATUS_IS_OK(status)) {
6004 tevent_req_nterror(req, status);
6005 return;
6008 /* Copy out parameters */
6010 /* Copy result */
6011 state->orig.out.result = state->tmp.out.result;
6013 /* Reset temporary structure */
6014 ZERO_STRUCT(state->tmp);
6016 tevent_req_done(req);
6019 NTSTATUS rpccli_lsa_SetTrustedDomainInfo_recv(struct tevent_req *req,
6020 TALLOC_CTX *mem_ctx,
6021 NTSTATUS *result)
6023 struct rpccli_lsa_SetTrustedDomainInfo_state *state = tevent_req_data(
6024 req, struct rpccli_lsa_SetTrustedDomainInfo_state);
6025 NTSTATUS status;
6027 if (tevent_req_is_nterror(req, &status)) {
6028 tevent_req_received(req);
6029 return status;
6032 /* Steal possbile out parameters to the callers context */
6033 talloc_steal(mem_ctx, state->out_mem_ctx);
6035 /* Return result */
6036 *result = state->orig.out.result;
6038 tevent_req_received(req);
6039 return NT_STATUS_OK;
6042 NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli,
6043 TALLOC_CTX *mem_ctx,
6044 struct policy_handle *handle /* [in] [ref] */,
6045 struct dom_sid2 *dom_sid /* [in] [ref] */,
6046 enum lsa_TrustDomInfoEnum level /* [in] */,
6047 union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */)
6049 struct lsa_SetTrustedDomainInfo r;
6050 NTSTATUS status;
6052 /* In parameters */
6053 r.in.handle = handle;
6054 r.in.dom_sid = dom_sid;
6055 r.in.level = level;
6056 r.in.info = info;
6058 status = cli->dispatch(cli,
6059 mem_ctx,
6060 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6061 NDR_LSA_SETTRUSTEDDOMAININFO,
6062 &r);
6064 if (!NT_STATUS_IS_OK(status)) {
6065 return status;
6068 if (NT_STATUS_IS_ERR(status)) {
6069 return status;
6072 /* Return variables */
6074 /* Return result */
6075 return r.out.result;
6078 struct rpccli_lsa_DeleteTrustedDomain_state {
6079 struct lsa_DeleteTrustedDomain orig;
6080 struct lsa_DeleteTrustedDomain tmp;
6081 TALLOC_CTX *out_mem_ctx;
6082 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6085 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq);
6087 struct tevent_req *rpccli_lsa_DeleteTrustedDomain_send(TALLOC_CTX *mem_ctx,
6088 struct tevent_context *ev,
6089 struct rpc_pipe_client *cli,
6090 struct policy_handle *_handle /* [in] [ref] */,
6091 struct dom_sid2 *_dom_sid /* [in] [ref] */)
6093 struct tevent_req *req;
6094 struct rpccli_lsa_DeleteTrustedDomain_state *state;
6095 struct tevent_req *subreq;
6097 req = tevent_req_create(mem_ctx, &state,
6098 struct rpccli_lsa_DeleteTrustedDomain_state);
6099 if (req == NULL) {
6100 return NULL;
6102 state->out_mem_ctx = NULL;
6103 state->dispatch_recv = cli->dispatch_recv;
6105 /* In parameters */
6106 state->orig.in.handle = _handle;
6107 state->orig.in.dom_sid = _dom_sid;
6109 /* Out parameters */
6111 /* Result */
6112 ZERO_STRUCT(state->orig.out.result);
6114 /* make a temporary copy, that we pass to the dispatch function */
6115 state->tmp = state->orig;
6117 subreq = cli->dispatch_send(state, ev, cli,
6118 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6119 NDR_LSA_DELETETRUSTEDDOMAIN,
6120 &state->tmp);
6121 if (tevent_req_nomem(subreq, req)) {
6122 return tevent_req_post(req, ev);
6124 tevent_req_set_callback(subreq, rpccli_lsa_DeleteTrustedDomain_done, req);
6125 return req;
6128 static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq)
6130 struct tevent_req *req = tevent_req_callback_data(
6131 subreq, struct tevent_req);
6132 struct rpccli_lsa_DeleteTrustedDomain_state *state = tevent_req_data(
6133 req, struct rpccli_lsa_DeleteTrustedDomain_state);
6134 NTSTATUS status;
6135 TALLOC_CTX *mem_ctx;
6137 if (state->out_mem_ctx) {
6138 mem_ctx = state->out_mem_ctx;
6139 } else {
6140 mem_ctx = state;
6143 status = state->dispatch_recv(subreq, mem_ctx);
6144 TALLOC_FREE(subreq);
6145 if (!NT_STATUS_IS_OK(status)) {
6146 tevent_req_nterror(req, status);
6147 return;
6150 /* Copy out parameters */
6152 /* Copy result */
6153 state->orig.out.result = state->tmp.out.result;
6155 /* Reset temporary structure */
6156 ZERO_STRUCT(state->tmp);
6158 tevent_req_done(req);
6161 NTSTATUS rpccli_lsa_DeleteTrustedDomain_recv(struct tevent_req *req,
6162 TALLOC_CTX *mem_ctx,
6163 NTSTATUS *result)
6165 struct rpccli_lsa_DeleteTrustedDomain_state *state = tevent_req_data(
6166 req, struct rpccli_lsa_DeleteTrustedDomain_state);
6167 NTSTATUS status;
6169 if (tevent_req_is_nterror(req, &status)) {
6170 tevent_req_received(req);
6171 return status;
6174 /* Steal possbile out parameters to the callers context */
6175 talloc_steal(mem_ctx, state->out_mem_ctx);
6177 /* Return result */
6178 *result = state->orig.out.result;
6180 tevent_req_received(req);
6181 return NT_STATUS_OK;
6184 NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli,
6185 TALLOC_CTX *mem_ctx,
6186 struct policy_handle *handle /* [in] [ref] */,
6187 struct dom_sid2 *dom_sid /* [in] [ref] */)
6189 struct lsa_DeleteTrustedDomain r;
6190 NTSTATUS status;
6192 /* In parameters */
6193 r.in.handle = handle;
6194 r.in.dom_sid = dom_sid;
6196 status = cli->dispatch(cli,
6197 mem_ctx,
6198 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6199 NDR_LSA_DELETETRUSTEDDOMAIN,
6200 &r);
6202 if (!NT_STATUS_IS_OK(status)) {
6203 return status;
6206 if (NT_STATUS_IS_ERR(status)) {
6207 return status;
6210 /* Return variables */
6212 /* Return result */
6213 return r.out.result;
6216 struct rpccli_lsa_StorePrivateData_state {
6217 struct lsa_StorePrivateData orig;
6218 struct lsa_StorePrivateData tmp;
6219 TALLOC_CTX *out_mem_ctx;
6220 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6223 static void rpccli_lsa_StorePrivateData_done(struct tevent_req *subreq);
6225 struct tevent_req *rpccli_lsa_StorePrivateData_send(TALLOC_CTX *mem_ctx,
6226 struct tevent_context *ev,
6227 struct rpc_pipe_client *cli,
6228 struct policy_handle *_handle /* [in] [ref] */,
6229 struct lsa_String *_name /* [in] [ref] */,
6230 struct lsa_DATA_BUF *_val /* [in] [unique] */)
6232 struct tevent_req *req;
6233 struct rpccli_lsa_StorePrivateData_state *state;
6234 struct tevent_req *subreq;
6236 req = tevent_req_create(mem_ctx, &state,
6237 struct rpccli_lsa_StorePrivateData_state);
6238 if (req == NULL) {
6239 return NULL;
6241 state->out_mem_ctx = NULL;
6242 state->dispatch_recv = cli->dispatch_recv;
6244 /* In parameters */
6245 state->orig.in.handle = _handle;
6246 state->orig.in.name = _name;
6247 state->orig.in.val = _val;
6249 /* Out parameters */
6251 /* Result */
6252 ZERO_STRUCT(state->orig.out.result);
6254 /* make a temporary copy, that we pass to the dispatch function */
6255 state->tmp = state->orig;
6257 subreq = cli->dispatch_send(state, ev, cli,
6258 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6259 NDR_LSA_STOREPRIVATEDATA,
6260 &state->tmp);
6261 if (tevent_req_nomem(subreq, req)) {
6262 return tevent_req_post(req, ev);
6264 tevent_req_set_callback(subreq, rpccli_lsa_StorePrivateData_done, req);
6265 return req;
6268 static void rpccli_lsa_StorePrivateData_done(struct tevent_req *subreq)
6270 struct tevent_req *req = tevent_req_callback_data(
6271 subreq, struct tevent_req);
6272 struct rpccli_lsa_StorePrivateData_state *state = tevent_req_data(
6273 req, struct rpccli_lsa_StorePrivateData_state);
6274 NTSTATUS status;
6275 TALLOC_CTX *mem_ctx;
6277 if (state->out_mem_ctx) {
6278 mem_ctx = state->out_mem_ctx;
6279 } else {
6280 mem_ctx = state;
6283 status = state->dispatch_recv(subreq, mem_ctx);
6284 TALLOC_FREE(subreq);
6285 if (!NT_STATUS_IS_OK(status)) {
6286 tevent_req_nterror(req, status);
6287 return;
6290 /* Copy out parameters */
6292 /* Copy result */
6293 state->orig.out.result = state->tmp.out.result;
6295 /* Reset temporary structure */
6296 ZERO_STRUCT(state->tmp);
6298 tevent_req_done(req);
6301 NTSTATUS rpccli_lsa_StorePrivateData_recv(struct tevent_req *req,
6302 TALLOC_CTX *mem_ctx,
6303 NTSTATUS *result)
6305 struct rpccli_lsa_StorePrivateData_state *state = tevent_req_data(
6306 req, struct rpccli_lsa_StorePrivateData_state);
6307 NTSTATUS status;
6309 if (tevent_req_is_nterror(req, &status)) {
6310 tevent_req_received(req);
6311 return status;
6314 /* Steal possbile out parameters to the callers context */
6315 talloc_steal(mem_ctx, state->out_mem_ctx);
6317 /* Return result */
6318 *result = state->orig.out.result;
6320 tevent_req_received(req);
6321 return NT_STATUS_OK;
6324 NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli,
6325 TALLOC_CTX *mem_ctx,
6326 struct policy_handle *handle /* [in] [ref] */,
6327 struct lsa_String *name /* [in] [ref] */,
6328 struct lsa_DATA_BUF *val /* [in] [unique] */)
6330 struct lsa_StorePrivateData r;
6331 NTSTATUS status;
6333 /* In parameters */
6334 r.in.handle = handle;
6335 r.in.name = name;
6336 r.in.val = val;
6338 status = cli->dispatch(cli,
6339 mem_ctx,
6340 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6341 NDR_LSA_STOREPRIVATEDATA,
6342 &r);
6344 if (!NT_STATUS_IS_OK(status)) {
6345 return status;
6348 if (NT_STATUS_IS_ERR(status)) {
6349 return status;
6352 /* Return variables */
6354 /* Return result */
6355 return r.out.result;
6358 struct rpccli_lsa_RetrievePrivateData_state {
6359 struct lsa_RetrievePrivateData orig;
6360 struct lsa_RetrievePrivateData tmp;
6361 TALLOC_CTX *out_mem_ctx;
6362 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6365 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req *subreq);
6367 struct tevent_req *rpccli_lsa_RetrievePrivateData_send(TALLOC_CTX *mem_ctx,
6368 struct tevent_context *ev,
6369 struct rpc_pipe_client *cli,
6370 struct policy_handle *_handle /* [in] [ref] */,
6371 struct lsa_String *_name /* [in] [ref] */,
6372 struct lsa_DATA_BUF **_val /* [in,out] [ref] */)
6374 struct tevent_req *req;
6375 struct rpccli_lsa_RetrievePrivateData_state *state;
6376 struct tevent_req *subreq;
6378 req = tevent_req_create(mem_ctx, &state,
6379 struct rpccli_lsa_RetrievePrivateData_state);
6380 if (req == NULL) {
6381 return NULL;
6383 state->out_mem_ctx = NULL;
6384 state->dispatch_recv = cli->dispatch_recv;
6386 /* In parameters */
6387 state->orig.in.handle = _handle;
6388 state->orig.in.name = _name;
6389 state->orig.in.val = _val;
6391 /* Out parameters */
6392 state->orig.out.val = _val;
6394 /* Result */
6395 ZERO_STRUCT(state->orig.out.result);
6397 state->out_mem_ctx = talloc_named_const(state, 0,
6398 "rpccli_lsa_RetrievePrivateData_out_memory");
6399 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6400 return tevent_req_post(req, ev);
6403 /* make a temporary copy, that we pass to the dispatch function */
6404 state->tmp = state->orig;
6406 subreq = cli->dispatch_send(state, ev, cli,
6407 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6408 NDR_LSA_RETRIEVEPRIVATEDATA,
6409 &state->tmp);
6410 if (tevent_req_nomem(subreq, req)) {
6411 return tevent_req_post(req, ev);
6413 tevent_req_set_callback(subreq, rpccli_lsa_RetrievePrivateData_done, req);
6414 return req;
6417 static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req *subreq)
6419 struct tevent_req *req = tevent_req_callback_data(
6420 subreq, struct tevent_req);
6421 struct rpccli_lsa_RetrievePrivateData_state *state = tevent_req_data(
6422 req, struct rpccli_lsa_RetrievePrivateData_state);
6423 NTSTATUS status;
6424 TALLOC_CTX *mem_ctx;
6426 if (state->out_mem_ctx) {
6427 mem_ctx = state->out_mem_ctx;
6428 } else {
6429 mem_ctx = state;
6432 status = state->dispatch_recv(subreq, mem_ctx);
6433 TALLOC_FREE(subreq);
6434 if (!NT_STATUS_IS_OK(status)) {
6435 tevent_req_nterror(req, status);
6436 return;
6439 /* Copy out parameters */
6440 *state->orig.out.val = *state->tmp.out.val;
6442 /* Copy result */
6443 state->orig.out.result = state->tmp.out.result;
6445 /* Reset temporary structure */
6446 ZERO_STRUCT(state->tmp);
6448 tevent_req_done(req);
6451 NTSTATUS rpccli_lsa_RetrievePrivateData_recv(struct tevent_req *req,
6452 TALLOC_CTX *mem_ctx,
6453 NTSTATUS *result)
6455 struct rpccli_lsa_RetrievePrivateData_state *state = tevent_req_data(
6456 req, struct rpccli_lsa_RetrievePrivateData_state);
6457 NTSTATUS status;
6459 if (tevent_req_is_nterror(req, &status)) {
6460 tevent_req_received(req);
6461 return status;
6464 /* Steal possbile out parameters to the callers context */
6465 talloc_steal(mem_ctx, state->out_mem_ctx);
6467 /* Return result */
6468 *result = state->orig.out.result;
6470 tevent_req_received(req);
6471 return NT_STATUS_OK;
6474 NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli,
6475 TALLOC_CTX *mem_ctx,
6476 struct policy_handle *handle /* [in] [ref] */,
6477 struct lsa_String *name /* [in] [ref] */,
6478 struct lsa_DATA_BUF **val /* [in,out] [ref] */)
6480 struct lsa_RetrievePrivateData r;
6481 NTSTATUS status;
6483 /* In parameters */
6484 r.in.handle = handle;
6485 r.in.name = name;
6486 r.in.val = val;
6488 status = cli->dispatch(cli,
6489 mem_ctx,
6490 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6491 NDR_LSA_RETRIEVEPRIVATEDATA,
6492 &r);
6494 if (!NT_STATUS_IS_OK(status)) {
6495 return status;
6498 if (NT_STATUS_IS_ERR(status)) {
6499 return status;
6502 /* Return variables */
6503 *val = *r.out.val;
6505 /* Return result */
6506 return r.out.result;
6509 struct rpccli_lsa_OpenPolicy2_state {
6510 struct lsa_OpenPolicy2 orig;
6511 struct lsa_OpenPolicy2 tmp;
6512 TALLOC_CTX *out_mem_ctx;
6513 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6516 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req *subreq);
6518 struct tevent_req *rpccli_lsa_OpenPolicy2_send(TALLOC_CTX *mem_ctx,
6519 struct tevent_context *ev,
6520 struct rpc_pipe_client *cli,
6521 const char *_system_name /* [in] [unique,charset(UTF16)] */,
6522 struct lsa_ObjectAttribute *_attr /* [in] [ref] */,
6523 uint32_t _access_mask /* [in] */,
6524 struct policy_handle *_handle /* [out] [ref] */)
6526 struct tevent_req *req;
6527 struct rpccli_lsa_OpenPolicy2_state *state;
6528 struct tevent_req *subreq;
6530 req = tevent_req_create(mem_ctx, &state,
6531 struct rpccli_lsa_OpenPolicy2_state);
6532 if (req == NULL) {
6533 return NULL;
6535 state->out_mem_ctx = NULL;
6536 state->dispatch_recv = cli->dispatch_recv;
6538 /* In parameters */
6539 state->orig.in.system_name = _system_name;
6540 state->orig.in.attr = _attr;
6541 state->orig.in.access_mask = _access_mask;
6543 /* Out parameters */
6544 state->orig.out.handle = _handle;
6546 /* Result */
6547 ZERO_STRUCT(state->orig.out.result);
6549 state->out_mem_ctx = talloc_named_const(state, 0,
6550 "rpccli_lsa_OpenPolicy2_out_memory");
6551 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6552 return tevent_req_post(req, ev);
6555 /* make a temporary copy, that we pass to the dispatch function */
6556 state->tmp = state->orig;
6558 subreq = cli->dispatch_send(state, ev, cli,
6559 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6560 NDR_LSA_OPENPOLICY2,
6561 &state->tmp);
6562 if (tevent_req_nomem(subreq, req)) {
6563 return tevent_req_post(req, ev);
6565 tevent_req_set_callback(subreq, rpccli_lsa_OpenPolicy2_done, req);
6566 return req;
6569 static void rpccli_lsa_OpenPolicy2_done(struct tevent_req *subreq)
6571 struct tevent_req *req = tevent_req_callback_data(
6572 subreq, struct tevent_req);
6573 struct rpccli_lsa_OpenPolicy2_state *state = tevent_req_data(
6574 req, struct rpccli_lsa_OpenPolicy2_state);
6575 NTSTATUS status;
6576 TALLOC_CTX *mem_ctx;
6578 if (state->out_mem_ctx) {
6579 mem_ctx = state->out_mem_ctx;
6580 } else {
6581 mem_ctx = state;
6584 status = state->dispatch_recv(subreq, mem_ctx);
6585 TALLOC_FREE(subreq);
6586 if (!NT_STATUS_IS_OK(status)) {
6587 tevent_req_nterror(req, status);
6588 return;
6591 /* Copy out parameters */
6592 *state->orig.out.handle = *state->tmp.out.handle;
6594 /* Copy result */
6595 state->orig.out.result = state->tmp.out.result;
6597 /* Reset temporary structure */
6598 ZERO_STRUCT(state->tmp);
6600 tevent_req_done(req);
6603 NTSTATUS rpccli_lsa_OpenPolicy2_recv(struct tevent_req *req,
6604 TALLOC_CTX *mem_ctx,
6605 NTSTATUS *result)
6607 struct rpccli_lsa_OpenPolicy2_state *state = tevent_req_data(
6608 req, struct rpccli_lsa_OpenPolicy2_state);
6609 NTSTATUS status;
6611 if (tevent_req_is_nterror(req, &status)) {
6612 tevent_req_received(req);
6613 return status;
6616 /* Steal possbile out parameters to the callers context */
6617 talloc_steal(mem_ctx, state->out_mem_ctx);
6619 /* Return result */
6620 *result = state->orig.out.result;
6622 tevent_req_received(req);
6623 return NT_STATUS_OK;
6626 NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli,
6627 TALLOC_CTX *mem_ctx,
6628 const char *system_name /* [in] [unique,charset(UTF16)] */,
6629 struct lsa_ObjectAttribute *attr /* [in] [ref] */,
6630 uint32_t access_mask /* [in] */,
6631 struct policy_handle *handle /* [out] [ref] */)
6633 struct lsa_OpenPolicy2 r;
6634 NTSTATUS status;
6636 /* In parameters */
6637 r.in.system_name = system_name;
6638 r.in.attr = attr;
6639 r.in.access_mask = access_mask;
6641 status = cli->dispatch(cli,
6642 mem_ctx,
6643 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6644 NDR_LSA_OPENPOLICY2,
6645 &r);
6647 if (!NT_STATUS_IS_OK(status)) {
6648 return status;
6651 if (NT_STATUS_IS_ERR(status)) {
6652 return status;
6655 /* Return variables */
6656 *handle = *r.out.handle;
6658 /* Return result */
6659 return r.out.result;
6662 struct rpccli_lsa_GetUserName_state {
6663 struct lsa_GetUserName orig;
6664 struct lsa_GetUserName tmp;
6665 TALLOC_CTX *out_mem_ctx;
6666 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6669 static void rpccli_lsa_GetUserName_done(struct tevent_req *subreq);
6671 struct tevent_req *rpccli_lsa_GetUserName_send(TALLOC_CTX *mem_ctx,
6672 struct tevent_context *ev,
6673 struct rpc_pipe_client *cli,
6674 const char *_system_name /* [in] [unique,charset(UTF16)] */,
6675 struct lsa_String **_account_name /* [in,out] [ref] */,
6676 struct lsa_String **_authority_name /* [in,out] [unique] */)
6678 struct tevent_req *req;
6679 struct rpccli_lsa_GetUserName_state *state;
6680 struct tevent_req *subreq;
6682 req = tevent_req_create(mem_ctx, &state,
6683 struct rpccli_lsa_GetUserName_state);
6684 if (req == NULL) {
6685 return NULL;
6687 state->out_mem_ctx = NULL;
6688 state->dispatch_recv = cli->dispatch_recv;
6690 /* In parameters */
6691 state->orig.in.system_name = _system_name;
6692 state->orig.in.account_name = _account_name;
6693 state->orig.in.authority_name = _authority_name;
6695 /* Out parameters */
6696 state->orig.out.account_name = _account_name;
6697 state->orig.out.authority_name = _authority_name;
6699 /* Result */
6700 ZERO_STRUCT(state->orig.out.result);
6702 state->out_mem_ctx = talloc_named_const(state, 0,
6703 "rpccli_lsa_GetUserName_out_memory");
6704 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6705 return tevent_req_post(req, ev);
6708 /* make a temporary copy, that we pass to the dispatch function */
6709 state->tmp = state->orig;
6711 subreq = cli->dispatch_send(state, ev, cli,
6712 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6713 NDR_LSA_GETUSERNAME,
6714 &state->tmp);
6715 if (tevent_req_nomem(subreq, req)) {
6716 return tevent_req_post(req, ev);
6718 tevent_req_set_callback(subreq, rpccli_lsa_GetUserName_done, req);
6719 return req;
6722 static void rpccli_lsa_GetUserName_done(struct tevent_req *subreq)
6724 struct tevent_req *req = tevent_req_callback_data(
6725 subreq, struct tevent_req);
6726 struct rpccli_lsa_GetUserName_state *state = tevent_req_data(
6727 req, struct rpccli_lsa_GetUserName_state);
6728 NTSTATUS status;
6729 TALLOC_CTX *mem_ctx;
6731 if (state->out_mem_ctx) {
6732 mem_ctx = state->out_mem_ctx;
6733 } else {
6734 mem_ctx = state;
6737 status = state->dispatch_recv(subreq, mem_ctx);
6738 TALLOC_FREE(subreq);
6739 if (!NT_STATUS_IS_OK(status)) {
6740 tevent_req_nterror(req, status);
6741 return;
6744 /* Copy out parameters */
6745 *state->orig.out.account_name = *state->tmp.out.account_name;
6746 if (state->orig.out.authority_name && state->tmp.out.authority_name) {
6747 *state->orig.out.authority_name = *state->tmp.out.authority_name;
6750 /* Copy result */
6751 state->orig.out.result = state->tmp.out.result;
6753 /* Reset temporary structure */
6754 ZERO_STRUCT(state->tmp);
6756 tevent_req_done(req);
6759 NTSTATUS rpccli_lsa_GetUserName_recv(struct tevent_req *req,
6760 TALLOC_CTX *mem_ctx,
6761 NTSTATUS *result)
6763 struct rpccli_lsa_GetUserName_state *state = tevent_req_data(
6764 req, struct rpccli_lsa_GetUserName_state);
6765 NTSTATUS status;
6767 if (tevent_req_is_nterror(req, &status)) {
6768 tevent_req_received(req);
6769 return status;
6772 /* Steal possbile out parameters to the callers context */
6773 talloc_steal(mem_ctx, state->out_mem_ctx);
6775 /* Return result */
6776 *result = state->orig.out.result;
6778 tevent_req_received(req);
6779 return NT_STATUS_OK;
6782 NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli,
6783 TALLOC_CTX *mem_ctx,
6784 const char *system_name /* [in] [unique,charset(UTF16)] */,
6785 struct lsa_String **account_name /* [in,out] [ref] */,
6786 struct lsa_String **authority_name /* [in,out] [unique] */)
6788 struct lsa_GetUserName r;
6789 NTSTATUS status;
6791 /* In parameters */
6792 r.in.system_name = system_name;
6793 r.in.account_name = account_name;
6794 r.in.authority_name = authority_name;
6796 status = cli->dispatch(cli,
6797 mem_ctx,
6798 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6799 NDR_LSA_GETUSERNAME,
6800 &r);
6802 if (!NT_STATUS_IS_OK(status)) {
6803 return status;
6806 if (NT_STATUS_IS_ERR(status)) {
6807 return status;
6810 /* Return variables */
6811 *account_name = *r.out.account_name;
6812 if (authority_name && r.out.authority_name) {
6813 *authority_name = *r.out.authority_name;
6816 /* Return result */
6817 return r.out.result;
6820 struct rpccli_lsa_QueryInfoPolicy2_state {
6821 struct lsa_QueryInfoPolicy2 orig;
6822 struct lsa_QueryInfoPolicy2 tmp;
6823 TALLOC_CTX *out_mem_ctx;
6824 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6827 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq);
6829 struct tevent_req *rpccli_lsa_QueryInfoPolicy2_send(TALLOC_CTX *mem_ctx,
6830 struct tevent_context *ev,
6831 struct rpc_pipe_client *cli,
6832 struct policy_handle *_handle /* [in] [ref] */,
6833 enum lsa_PolicyInfo _level /* [in] */,
6834 union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */)
6836 struct tevent_req *req;
6837 struct rpccli_lsa_QueryInfoPolicy2_state *state;
6838 struct tevent_req *subreq;
6840 req = tevent_req_create(mem_ctx, &state,
6841 struct rpccli_lsa_QueryInfoPolicy2_state);
6842 if (req == NULL) {
6843 return NULL;
6845 state->out_mem_ctx = NULL;
6846 state->dispatch_recv = cli->dispatch_recv;
6848 /* In parameters */
6849 state->orig.in.handle = _handle;
6850 state->orig.in.level = _level;
6852 /* Out parameters */
6853 state->orig.out.info = _info;
6855 /* Result */
6856 ZERO_STRUCT(state->orig.out.result);
6858 state->out_mem_ctx = talloc_named_const(state, 0,
6859 "rpccli_lsa_QueryInfoPolicy2_out_memory");
6860 if (tevent_req_nomem(state->out_mem_ctx, req)) {
6861 return tevent_req_post(req, ev);
6864 /* make a temporary copy, that we pass to the dispatch function */
6865 state->tmp = state->orig;
6867 subreq = cli->dispatch_send(state, ev, cli,
6868 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6869 NDR_LSA_QUERYINFOPOLICY2,
6870 &state->tmp);
6871 if (tevent_req_nomem(subreq, req)) {
6872 return tevent_req_post(req, ev);
6874 tevent_req_set_callback(subreq, rpccli_lsa_QueryInfoPolicy2_done, req);
6875 return req;
6878 static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq)
6880 struct tevent_req *req = tevent_req_callback_data(
6881 subreq, struct tevent_req);
6882 struct rpccli_lsa_QueryInfoPolicy2_state *state = tevent_req_data(
6883 req, struct rpccli_lsa_QueryInfoPolicy2_state);
6884 NTSTATUS status;
6885 TALLOC_CTX *mem_ctx;
6887 if (state->out_mem_ctx) {
6888 mem_ctx = state->out_mem_ctx;
6889 } else {
6890 mem_ctx = state;
6893 status = state->dispatch_recv(subreq, mem_ctx);
6894 TALLOC_FREE(subreq);
6895 if (!NT_STATUS_IS_OK(status)) {
6896 tevent_req_nterror(req, status);
6897 return;
6900 /* Copy out parameters */
6901 *state->orig.out.info = *state->tmp.out.info;
6903 /* Copy result */
6904 state->orig.out.result = state->tmp.out.result;
6906 /* Reset temporary structure */
6907 ZERO_STRUCT(state->tmp);
6909 tevent_req_done(req);
6912 NTSTATUS rpccli_lsa_QueryInfoPolicy2_recv(struct tevent_req *req,
6913 TALLOC_CTX *mem_ctx,
6914 NTSTATUS *result)
6916 struct rpccli_lsa_QueryInfoPolicy2_state *state = tevent_req_data(
6917 req, struct rpccli_lsa_QueryInfoPolicy2_state);
6918 NTSTATUS status;
6920 if (tevent_req_is_nterror(req, &status)) {
6921 tevent_req_received(req);
6922 return status;
6925 /* Steal possbile out parameters to the callers context */
6926 talloc_steal(mem_ctx, state->out_mem_ctx);
6928 /* Return result */
6929 *result = state->orig.out.result;
6931 tevent_req_received(req);
6932 return NT_STATUS_OK;
6935 NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli,
6936 TALLOC_CTX *mem_ctx,
6937 struct policy_handle *handle /* [in] [ref] */,
6938 enum lsa_PolicyInfo level /* [in] */,
6939 union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */)
6941 struct lsa_QueryInfoPolicy2 r;
6942 NTSTATUS status;
6944 /* In parameters */
6945 r.in.handle = handle;
6946 r.in.level = level;
6948 status = cli->dispatch(cli,
6949 mem_ctx,
6950 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
6951 NDR_LSA_QUERYINFOPOLICY2,
6952 &r);
6954 if (!NT_STATUS_IS_OK(status)) {
6955 return status;
6958 if (NT_STATUS_IS_ERR(status)) {
6959 return status;
6962 /* Return variables */
6963 *info = *r.out.info;
6965 /* Return result */
6966 return r.out.result;
6969 struct rpccli_lsa_SetInfoPolicy2_state {
6970 struct lsa_SetInfoPolicy2 orig;
6971 struct lsa_SetInfoPolicy2 tmp;
6972 TALLOC_CTX *out_mem_ctx;
6973 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
6976 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req *subreq);
6978 struct tevent_req *rpccli_lsa_SetInfoPolicy2_send(TALLOC_CTX *mem_ctx,
6979 struct tevent_context *ev,
6980 struct rpc_pipe_client *cli,
6981 struct policy_handle *_handle /* [in] [ref] */,
6982 enum lsa_PolicyInfo _level /* [in] */,
6983 union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */)
6985 struct tevent_req *req;
6986 struct rpccli_lsa_SetInfoPolicy2_state *state;
6987 struct tevent_req *subreq;
6989 req = tevent_req_create(mem_ctx, &state,
6990 struct rpccli_lsa_SetInfoPolicy2_state);
6991 if (req == NULL) {
6992 return NULL;
6994 state->out_mem_ctx = NULL;
6995 state->dispatch_recv = cli->dispatch_recv;
6997 /* In parameters */
6998 state->orig.in.handle = _handle;
6999 state->orig.in.level = _level;
7000 state->orig.in.info = _info;
7002 /* Out parameters */
7004 /* Result */
7005 ZERO_STRUCT(state->orig.out.result);
7007 /* make a temporary copy, that we pass to the dispatch function */
7008 state->tmp = state->orig;
7010 subreq = cli->dispatch_send(state, ev, cli,
7011 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7012 NDR_LSA_SETINFOPOLICY2,
7013 &state->tmp);
7014 if (tevent_req_nomem(subreq, req)) {
7015 return tevent_req_post(req, ev);
7017 tevent_req_set_callback(subreq, rpccli_lsa_SetInfoPolicy2_done, req);
7018 return req;
7021 static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req *subreq)
7023 struct tevent_req *req = tevent_req_callback_data(
7024 subreq, struct tevent_req);
7025 struct rpccli_lsa_SetInfoPolicy2_state *state = tevent_req_data(
7026 req, struct rpccli_lsa_SetInfoPolicy2_state);
7027 NTSTATUS status;
7028 TALLOC_CTX *mem_ctx;
7030 if (state->out_mem_ctx) {
7031 mem_ctx = state->out_mem_ctx;
7032 } else {
7033 mem_ctx = state;
7036 status = state->dispatch_recv(subreq, mem_ctx);
7037 TALLOC_FREE(subreq);
7038 if (!NT_STATUS_IS_OK(status)) {
7039 tevent_req_nterror(req, status);
7040 return;
7043 /* Copy out parameters */
7045 /* Copy result */
7046 state->orig.out.result = state->tmp.out.result;
7048 /* Reset temporary structure */
7049 ZERO_STRUCT(state->tmp);
7051 tevent_req_done(req);
7054 NTSTATUS rpccli_lsa_SetInfoPolicy2_recv(struct tevent_req *req,
7055 TALLOC_CTX *mem_ctx,
7056 NTSTATUS *result)
7058 struct rpccli_lsa_SetInfoPolicy2_state *state = tevent_req_data(
7059 req, struct rpccli_lsa_SetInfoPolicy2_state);
7060 NTSTATUS status;
7062 if (tevent_req_is_nterror(req, &status)) {
7063 tevent_req_received(req);
7064 return status;
7067 /* Steal possbile out parameters to the callers context */
7068 talloc_steal(mem_ctx, state->out_mem_ctx);
7070 /* Return result */
7071 *result = state->orig.out.result;
7073 tevent_req_received(req);
7074 return NT_STATUS_OK;
7077 NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
7078 TALLOC_CTX *mem_ctx,
7079 struct policy_handle *handle /* [in] [ref] */,
7080 enum lsa_PolicyInfo level /* [in] */,
7081 union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */)
7083 struct lsa_SetInfoPolicy2 r;
7084 NTSTATUS status;
7086 /* In parameters */
7087 r.in.handle = handle;
7088 r.in.level = level;
7089 r.in.info = info;
7091 status = cli->dispatch(cli,
7092 mem_ctx,
7093 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7094 NDR_LSA_SETINFOPOLICY2,
7095 &r);
7097 if (!NT_STATUS_IS_OK(status)) {
7098 return status;
7101 if (NT_STATUS_IS_ERR(status)) {
7102 return status;
7105 /* Return variables */
7107 /* Return result */
7108 return r.out.result;
7111 struct rpccli_lsa_QueryTrustedDomainInfoByName_state {
7112 struct lsa_QueryTrustedDomainInfoByName orig;
7113 struct lsa_QueryTrustedDomainInfoByName tmp;
7114 TALLOC_CTX *out_mem_ctx;
7115 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7118 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq);
7120 struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx,
7121 struct tevent_context *ev,
7122 struct rpc_pipe_client *cli,
7123 struct policy_handle *_handle /* [in] [ref] */,
7124 struct lsa_String *_trusted_domain /* [in] [ref] */,
7125 enum lsa_TrustDomInfoEnum _level /* [in] */,
7126 union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */)
7128 struct tevent_req *req;
7129 struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state;
7130 struct tevent_req *subreq;
7132 req = tevent_req_create(mem_ctx, &state,
7133 struct rpccli_lsa_QueryTrustedDomainInfoByName_state);
7134 if (req == NULL) {
7135 return NULL;
7137 state->out_mem_ctx = NULL;
7138 state->dispatch_recv = cli->dispatch_recv;
7140 /* In parameters */
7141 state->orig.in.handle = _handle;
7142 state->orig.in.trusted_domain = _trusted_domain;
7143 state->orig.in.level = _level;
7145 /* Out parameters */
7146 state->orig.out.info = _info;
7148 /* Result */
7149 ZERO_STRUCT(state->orig.out.result);
7151 state->out_mem_ctx = talloc_named_const(state, 0,
7152 "rpccli_lsa_QueryTrustedDomainInfoByName_out_memory");
7153 if (tevent_req_nomem(state->out_mem_ctx, req)) {
7154 return tevent_req_post(req, ev);
7157 /* make a temporary copy, that we pass to the dispatch function */
7158 state->tmp = state->orig;
7160 subreq = cli->dispatch_send(state, ev, cli,
7161 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7162 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME,
7163 &state->tmp);
7164 if (tevent_req_nomem(subreq, req)) {
7165 return tevent_req_post(req, ev);
7167 tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfoByName_done, req);
7168 return req;
7171 static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq)
7173 struct tevent_req *req = tevent_req_callback_data(
7174 subreq, struct tevent_req);
7175 struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data(
7176 req, struct rpccli_lsa_QueryTrustedDomainInfoByName_state);
7177 NTSTATUS status;
7178 TALLOC_CTX *mem_ctx;
7180 if (state->out_mem_ctx) {
7181 mem_ctx = state->out_mem_ctx;
7182 } else {
7183 mem_ctx = state;
7186 status = state->dispatch_recv(subreq, mem_ctx);
7187 TALLOC_FREE(subreq);
7188 if (!NT_STATUS_IS_OK(status)) {
7189 tevent_req_nterror(req, status);
7190 return;
7193 /* Copy out parameters */
7194 *state->orig.out.info = *state->tmp.out.info;
7196 /* Copy result */
7197 state->orig.out.result = state->tmp.out.result;
7199 /* Reset temporary structure */
7200 ZERO_STRUCT(state->tmp);
7202 tevent_req_done(req);
7205 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req *req,
7206 TALLOC_CTX *mem_ctx,
7207 NTSTATUS *result)
7209 struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data(
7210 req, struct rpccli_lsa_QueryTrustedDomainInfoByName_state);
7211 NTSTATUS status;
7213 if (tevent_req_is_nterror(req, &status)) {
7214 tevent_req_received(req);
7215 return status;
7218 /* Steal possbile out parameters to the callers context */
7219 talloc_steal(mem_ctx, state->out_mem_ctx);
7221 /* Return result */
7222 *result = state->orig.out.result;
7224 tevent_req_received(req);
7225 return NT_STATUS_OK;
7228 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
7229 TALLOC_CTX *mem_ctx,
7230 struct policy_handle *handle /* [in] [ref] */,
7231 struct lsa_String *trusted_domain /* [in] [ref] */,
7232 enum lsa_TrustDomInfoEnum level /* [in] */,
7233 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
7235 struct lsa_QueryTrustedDomainInfoByName r;
7236 NTSTATUS status;
7238 /* In parameters */
7239 r.in.handle = handle;
7240 r.in.trusted_domain = trusted_domain;
7241 r.in.level = level;
7243 status = cli->dispatch(cli,
7244 mem_ctx,
7245 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7246 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME,
7247 &r);
7249 if (!NT_STATUS_IS_OK(status)) {
7250 return status;
7253 if (NT_STATUS_IS_ERR(status)) {
7254 return status;
7257 /* Return variables */
7258 *info = *r.out.info;
7260 /* Return result */
7261 return r.out.result;
7264 struct rpccli_lsa_SetTrustedDomainInfoByName_state {
7265 struct lsa_SetTrustedDomainInfoByName orig;
7266 struct lsa_SetTrustedDomainInfoByName tmp;
7267 TALLOC_CTX *out_mem_ctx;
7268 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7271 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq);
7273 struct tevent_req *rpccli_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx,
7274 struct tevent_context *ev,
7275 struct rpc_pipe_client *cli,
7276 struct policy_handle *_handle /* [in] [ref] */,
7277 struct lsa_String _trusted_domain /* [in] */,
7278 enum lsa_TrustDomInfoEnum _level /* [in] */,
7279 union lsa_TrustedDomainInfo *_info /* [in] [unique,switch_is(level)] */)
7281 struct tevent_req *req;
7282 struct rpccli_lsa_SetTrustedDomainInfoByName_state *state;
7283 struct tevent_req *subreq;
7285 req = tevent_req_create(mem_ctx, &state,
7286 struct rpccli_lsa_SetTrustedDomainInfoByName_state);
7287 if (req == NULL) {
7288 return NULL;
7290 state->out_mem_ctx = NULL;
7291 state->dispatch_recv = cli->dispatch_recv;
7293 /* In parameters */
7294 state->orig.in.handle = _handle;
7295 state->orig.in.trusted_domain = _trusted_domain;
7296 state->orig.in.level = _level;
7297 state->orig.in.info = _info;
7299 /* Out parameters */
7301 /* Result */
7302 ZERO_STRUCT(state->orig.out.result);
7304 /* make a temporary copy, that we pass to the dispatch function */
7305 state->tmp = state->orig;
7307 subreq = cli->dispatch_send(state, ev, cli,
7308 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7309 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME,
7310 &state->tmp);
7311 if (tevent_req_nomem(subreq, req)) {
7312 return tevent_req_post(req, ev);
7314 tevent_req_set_callback(subreq, rpccli_lsa_SetTrustedDomainInfoByName_done, req);
7315 return req;
7318 static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq)
7320 struct tevent_req *req = tevent_req_callback_data(
7321 subreq, struct tevent_req);
7322 struct rpccli_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data(
7323 req, struct rpccli_lsa_SetTrustedDomainInfoByName_state);
7324 NTSTATUS status;
7325 TALLOC_CTX *mem_ctx;
7327 if (state->out_mem_ctx) {
7328 mem_ctx = state->out_mem_ctx;
7329 } else {
7330 mem_ctx = state;
7333 status = state->dispatch_recv(subreq, mem_ctx);
7334 TALLOC_FREE(subreq);
7335 if (!NT_STATUS_IS_OK(status)) {
7336 tevent_req_nterror(req, status);
7337 return;
7340 /* Copy out parameters */
7342 /* Copy result */
7343 state->orig.out.result = state->tmp.out.result;
7345 /* Reset temporary structure */
7346 ZERO_STRUCT(state->tmp);
7348 tevent_req_done(req);
7351 NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req *req,
7352 TALLOC_CTX *mem_ctx,
7353 NTSTATUS *result)
7355 struct rpccli_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data(
7356 req, struct rpccli_lsa_SetTrustedDomainInfoByName_state);
7357 NTSTATUS status;
7359 if (tevent_req_is_nterror(req, &status)) {
7360 tevent_req_received(req);
7361 return status;
7364 /* Steal possbile out parameters to the callers context */
7365 talloc_steal(mem_ctx, state->out_mem_ctx);
7367 /* Return result */
7368 *result = state->orig.out.result;
7370 tevent_req_received(req);
7371 return NT_STATUS_OK;
7374 NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli,
7375 TALLOC_CTX *mem_ctx,
7376 struct policy_handle *handle /* [in] [ref] */,
7377 struct lsa_String trusted_domain /* [in] */,
7378 enum lsa_TrustDomInfoEnum level /* [in] */,
7379 union lsa_TrustedDomainInfo *info /* [in] [unique,switch_is(level)] */)
7381 struct lsa_SetTrustedDomainInfoByName r;
7382 NTSTATUS status;
7384 /* In parameters */
7385 r.in.handle = handle;
7386 r.in.trusted_domain = trusted_domain;
7387 r.in.level = level;
7388 r.in.info = info;
7390 status = cli->dispatch(cli,
7391 mem_ctx,
7392 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7393 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME,
7394 &r);
7396 if (!NT_STATUS_IS_OK(status)) {
7397 return status;
7400 if (NT_STATUS_IS_ERR(status)) {
7401 return status;
7404 /* Return variables */
7406 /* Return result */
7407 return r.out.result;
7410 struct rpccli_lsa_EnumTrustedDomainsEx_state {
7411 struct lsa_EnumTrustedDomainsEx orig;
7412 struct lsa_EnumTrustedDomainsEx tmp;
7413 TALLOC_CTX *out_mem_ctx;
7414 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7417 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq);
7419 struct tevent_req *rpccli_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX *mem_ctx,
7420 struct tevent_context *ev,
7421 struct rpc_pipe_client *cli,
7422 struct policy_handle *_handle /* [in] [ref] */,
7423 uint32_t *_resume_handle /* [in,out] [ref] */,
7424 struct lsa_DomainListEx *_domains /* [out] [ref] */,
7425 uint32_t _max_size /* [in] */)
7427 struct tevent_req *req;
7428 struct rpccli_lsa_EnumTrustedDomainsEx_state *state;
7429 struct tevent_req *subreq;
7431 req = tevent_req_create(mem_ctx, &state,
7432 struct rpccli_lsa_EnumTrustedDomainsEx_state);
7433 if (req == NULL) {
7434 return NULL;
7436 state->out_mem_ctx = NULL;
7437 state->dispatch_recv = cli->dispatch_recv;
7439 /* In parameters */
7440 state->orig.in.handle = _handle;
7441 state->orig.in.resume_handle = _resume_handle;
7442 state->orig.in.max_size = _max_size;
7444 /* Out parameters */
7445 state->orig.out.resume_handle = _resume_handle;
7446 state->orig.out.domains = _domains;
7448 /* Result */
7449 ZERO_STRUCT(state->orig.out.result);
7451 state->out_mem_ctx = talloc_named_const(state, 0,
7452 "rpccli_lsa_EnumTrustedDomainsEx_out_memory");
7453 if (tevent_req_nomem(state->out_mem_ctx, req)) {
7454 return tevent_req_post(req, ev);
7457 /* make a temporary copy, that we pass to the dispatch function */
7458 state->tmp = state->orig;
7460 subreq = cli->dispatch_send(state, ev, cli,
7461 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7462 NDR_LSA_ENUMTRUSTEDDOMAINSEX,
7463 &state->tmp);
7464 if (tevent_req_nomem(subreq, req)) {
7465 return tevent_req_post(req, ev);
7467 tevent_req_set_callback(subreq, rpccli_lsa_EnumTrustedDomainsEx_done, req);
7468 return req;
7471 static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq)
7473 struct tevent_req *req = tevent_req_callback_data(
7474 subreq, struct tevent_req);
7475 struct rpccli_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data(
7476 req, struct rpccli_lsa_EnumTrustedDomainsEx_state);
7477 NTSTATUS status;
7478 TALLOC_CTX *mem_ctx;
7480 if (state->out_mem_ctx) {
7481 mem_ctx = state->out_mem_ctx;
7482 } else {
7483 mem_ctx = state;
7486 status = state->dispatch_recv(subreq, mem_ctx);
7487 TALLOC_FREE(subreq);
7488 if (!NT_STATUS_IS_OK(status)) {
7489 tevent_req_nterror(req, status);
7490 return;
7493 /* Copy out parameters */
7494 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
7495 *state->orig.out.domains = *state->tmp.out.domains;
7497 /* Copy result */
7498 state->orig.out.result = state->tmp.out.result;
7500 /* Reset temporary structure */
7501 ZERO_STRUCT(state->tmp);
7503 tevent_req_done(req);
7506 NTSTATUS rpccli_lsa_EnumTrustedDomainsEx_recv(struct tevent_req *req,
7507 TALLOC_CTX *mem_ctx,
7508 NTSTATUS *result)
7510 struct rpccli_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data(
7511 req, struct rpccli_lsa_EnumTrustedDomainsEx_state);
7512 NTSTATUS status;
7514 if (tevent_req_is_nterror(req, &status)) {
7515 tevent_req_received(req);
7516 return status;
7519 /* Steal possbile out parameters to the callers context */
7520 talloc_steal(mem_ctx, state->out_mem_ctx);
7522 /* Return result */
7523 *result = state->orig.out.result;
7525 tevent_req_received(req);
7526 return NT_STATUS_OK;
7529 NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli,
7530 TALLOC_CTX *mem_ctx,
7531 struct policy_handle *handle /* [in] [ref] */,
7532 uint32_t *resume_handle /* [in,out] [ref] */,
7533 struct lsa_DomainListEx *domains /* [out] [ref] */,
7534 uint32_t max_size /* [in] */)
7536 struct lsa_EnumTrustedDomainsEx r;
7537 NTSTATUS status;
7539 /* In parameters */
7540 r.in.handle = handle;
7541 r.in.resume_handle = resume_handle;
7542 r.in.max_size = max_size;
7544 status = cli->dispatch(cli,
7545 mem_ctx,
7546 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7547 NDR_LSA_ENUMTRUSTEDDOMAINSEX,
7548 &r);
7550 if (!NT_STATUS_IS_OK(status)) {
7551 return status;
7554 if (NT_STATUS_IS_ERR(status)) {
7555 return status;
7558 /* Return variables */
7559 *resume_handle = *r.out.resume_handle;
7560 *domains = *r.out.domains;
7562 /* Return result */
7563 return r.out.result;
7566 struct rpccli_lsa_CreateTrustedDomainEx_state {
7567 struct lsa_CreateTrustedDomainEx orig;
7568 struct lsa_CreateTrustedDomainEx tmp;
7569 TALLOC_CTX *out_mem_ctx;
7570 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7573 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq);
7575 struct tevent_req *rpccli_lsa_CreateTrustedDomainEx_send(TALLOC_CTX *mem_ctx,
7576 struct tevent_context *ev,
7577 struct rpc_pipe_client *cli,
7578 struct policy_handle *_policy_handle /* [in] [ref] */,
7579 struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
7580 struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */,
7581 uint32_t _access_mask /* [in] */,
7582 struct policy_handle *_trustdom_handle /* [out] [ref] */)
7584 struct tevent_req *req;
7585 struct rpccli_lsa_CreateTrustedDomainEx_state *state;
7586 struct tevent_req *subreq;
7588 req = tevent_req_create(mem_ctx, &state,
7589 struct rpccli_lsa_CreateTrustedDomainEx_state);
7590 if (req == NULL) {
7591 return NULL;
7593 state->out_mem_ctx = NULL;
7594 state->dispatch_recv = cli->dispatch_recv;
7596 /* In parameters */
7597 state->orig.in.policy_handle = _policy_handle;
7598 state->orig.in.info = _info;
7599 state->orig.in.auth_info = _auth_info;
7600 state->orig.in.access_mask = _access_mask;
7602 /* Out parameters */
7603 state->orig.out.trustdom_handle = _trustdom_handle;
7605 /* Result */
7606 ZERO_STRUCT(state->orig.out.result);
7608 state->out_mem_ctx = talloc_named_const(state, 0,
7609 "rpccli_lsa_CreateTrustedDomainEx_out_memory");
7610 if (tevent_req_nomem(state->out_mem_ctx, req)) {
7611 return tevent_req_post(req, ev);
7614 /* make a temporary copy, that we pass to the dispatch function */
7615 state->tmp = state->orig;
7617 subreq = cli->dispatch_send(state, ev, cli,
7618 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7619 NDR_LSA_CREATETRUSTEDDOMAINEX,
7620 &state->tmp);
7621 if (tevent_req_nomem(subreq, req)) {
7622 return tevent_req_post(req, ev);
7624 tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomainEx_done, req);
7625 return req;
7628 static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq)
7630 struct tevent_req *req = tevent_req_callback_data(
7631 subreq, struct tevent_req);
7632 struct rpccli_lsa_CreateTrustedDomainEx_state *state = tevent_req_data(
7633 req, struct rpccli_lsa_CreateTrustedDomainEx_state);
7634 NTSTATUS status;
7635 TALLOC_CTX *mem_ctx;
7637 if (state->out_mem_ctx) {
7638 mem_ctx = state->out_mem_ctx;
7639 } else {
7640 mem_ctx = state;
7643 status = state->dispatch_recv(subreq, mem_ctx);
7644 TALLOC_FREE(subreq);
7645 if (!NT_STATUS_IS_OK(status)) {
7646 tevent_req_nterror(req, status);
7647 return;
7650 /* Copy out parameters */
7651 *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
7653 /* Copy result */
7654 state->orig.out.result = state->tmp.out.result;
7656 /* Reset temporary structure */
7657 ZERO_STRUCT(state->tmp);
7659 tevent_req_done(req);
7662 NTSTATUS rpccli_lsa_CreateTrustedDomainEx_recv(struct tevent_req *req,
7663 TALLOC_CTX *mem_ctx,
7664 NTSTATUS *result)
7666 struct rpccli_lsa_CreateTrustedDomainEx_state *state = tevent_req_data(
7667 req, struct rpccli_lsa_CreateTrustedDomainEx_state);
7668 NTSTATUS status;
7670 if (tevent_req_is_nterror(req, &status)) {
7671 tevent_req_received(req);
7672 return status;
7675 /* Steal possbile out parameters to the callers context */
7676 talloc_steal(mem_ctx, state->out_mem_ctx);
7678 /* Return result */
7679 *result = state->orig.out.result;
7681 tevent_req_received(req);
7682 return NT_STATUS_OK;
7685 NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli,
7686 TALLOC_CTX *mem_ctx,
7687 struct policy_handle *policy_handle /* [in] [ref] */,
7688 struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
7689 struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
7690 uint32_t access_mask /* [in] */,
7691 struct policy_handle *trustdom_handle /* [out] [ref] */)
7693 struct lsa_CreateTrustedDomainEx r;
7694 NTSTATUS status;
7696 /* In parameters */
7697 r.in.policy_handle = policy_handle;
7698 r.in.info = info;
7699 r.in.auth_info = auth_info;
7700 r.in.access_mask = access_mask;
7702 status = cli->dispatch(cli,
7703 mem_ctx,
7704 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7705 NDR_LSA_CREATETRUSTEDDOMAINEX,
7706 &r);
7708 if (!NT_STATUS_IS_OK(status)) {
7709 return status;
7712 if (NT_STATUS_IS_ERR(status)) {
7713 return status;
7716 /* Return variables */
7717 *trustdom_handle = *r.out.trustdom_handle;
7719 /* Return result */
7720 return r.out.result;
7723 struct rpccli_lsa_CloseTrustedDomainEx_state {
7724 struct lsa_CloseTrustedDomainEx orig;
7725 struct lsa_CloseTrustedDomainEx tmp;
7726 TALLOC_CTX *out_mem_ctx;
7727 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7730 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq);
7732 struct tevent_req *rpccli_lsa_CloseTrustedDomainEx_send(TALLOC_CTX *mem_ctx,
7733 struct tevent_context *ev,
7734 struct rpc_pipe_client *cli,
7735 struct policy_handle *_handle /* [in,out] [ref] */)
7737 struct tevent_req *req;
7738 struct rpccli_lsa_CloseTrustedDomainEx_state *state;
7739 struct tevent_req *subreq;
7741 req = tevent_req_create(mem_ctx, &state,
7742 struct rpccli_lsa_CloseTrustedDomainEx_state);
7743 if (req == NULL) {
7744 return NULL;
7746 state->out_mem_ctx = NULL;
7747 state->dispatch_recv = cli->dispatch_recv;
7749 /* In parameters */
7750 state->orig.in.handle = _handle;
7752 /* Out parameters */
7753 state->orig.out.handle = _handle;
7755 /* Result */
7756 ZERO_STRUCT(state->orig.out.result);
7758 state->out_mem_ctx = talloc_named_const(state, 0,
7759 "rpccli_lsa_CloseTrustedDomainEx_out_memory");
7760 if (tevent_req_nomem(state->out_mem_ctx, req)) {
7761 return tevent_req_post(req, ev);
7764 /* make a temporary copy, that we pass to the dispatch function */
7765 state->tmp = state->orig;
7767 subreq = cli->dispatch_send(state, ev, cli,
7768 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7769 NDR_LSA_CLOSETRUSTEDDOMAINEX,
7770 &state->tmp);
7771 if (tevent_req_nomem(subreq, req)) {
7772 return tevent_req_post(req, ev);
7774 tevent_req_set_callback(subreq, rpccli_lsa_CloseTrustedDomainEx_done, req);
7775 return req;
7778 static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq)
7780 struct tevent_req *req = tevent_req_callback_data(
7781 subreq, struct tevent_req);
7782 struct rpccli_lsa_CloseTrustedDomainEx_state *state = tevent_req_data(
7783 req, struct rpccli_lsa_CloseTrustedDomainEx_state);
7784 NTSTATUS status;
7785 TALLOC_CTX *mem_ctx;
7787 if (state->out_mem_ctx) {
7788 mem_ctx = state->out_mem_ctx;
7789 } else {
7790 mem_ctx = state;
7793 status = state->dispatch_recv(subreq, mem_ctx);
7794 TALLOC_FREE(subreq);
7795 if (!NT_STATUS_IS_OK(status)) {
7796 tevent_req_nterror(req, status);
7797 return;
7800 /* Copy out parameters */
7801 *state->orig.out.handle = *state->tmp.out.handle;
7803 /* Copy result */
7804 state->orig.out.result = state->tmp.out.result;
7806 /* Reset temporary structure */
7807 ZERO_STRUCT(state->tmp);
7809 tevent_req_done(req);
7812 NTSTATUS rpccli_lsa_CloseTrustedDomainEx_recv(struct tevent_req *req,
7813 TALLOC_CTX *mem_ctx,
7814 NTSTATUS *result)
7816 struct rpccli_lsa_CloseTrustedDomainEx_state *state = tevent_req_data(
7817 req, struct rpccli_lsa_CloseTrustedDomainEx_state);
7818 NTSTATUS status;
7820 if (tevent_req_is_nterror(req, &status)) {
7821 tevent_req_received(req);
7822 return status;
7825 /* Steal possbile out parameters to the callers context */
7826 talloc_steal(mem_ctx, state->out_mem_ctx);
7828 /* Return result */
7829 *result = state->orig.out.result;
7831 tevent_req_received(req);
7832 return NT_STATUS_OK;
7835 NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli,
7836 TALLOC_CTX *mem_ctx,
7837 struct policy_handle *handle /* [in,out] [ref] */)
7839 struct lsa_CloseTrustedDomainEx r;
7840 NTSTATUS status;
7842 /* In parameters */
7843 r.in.handle = handle;
7845 status = cli->dispatch(cli,
7846 mem_ctx,
7847 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7848 NDR_LSA_CLOSETRUSTEDDOMAINEX,
7849 &r);
7851 if (!NT_STATUS_IS_OK(status)) {
7852 return status;
7855 if (NT_STATUS_IS_ERR(status)) {
7856 return status;
7859 /* Return variables */
7860 *handle = *r.out.handle;
7862 /* Return result */
7863 return r.out.result;
7866 struct rpccli_lsa_QueryDomainInformationPolicy_state {
7867 struct lsa_QueryDomainInformationPolicy orig;
7868 struct lsa_QueryDomainInformationPolicy tmp;
7869 TALLOC_CTX *out_mem_ctx;
7870 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
7873 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq);
7875 struct tevent_req *rpccli_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX *mem_ctx,
7876 struct tevent_context *ev,
7877 struct rpc_pipe_client *cli,
7878 struct policy_handle *_handle /* [in] [ref] */,
7879 uint16_t _level /* [in] */,
7880 union lsa_DomainInformationPolicy **_info /* [out] [ref,switch_is(level)] */)
7882 struct tevent_req *req;
7883 struct rpccli_lsa_QueryDomainInformationPolicy_state *state;
7884 struct tevent_req *subreq;
7886 req = tevent_req_create(mem_ctx, &state,
7887 struct rpccli_lsa_QueryDomainInformationPolicy_state);
7888 if (req == NULL) {
7889 return NULL;
7891 state->out_mem_ctx = NULL;
7892 state->dispatch_recv = cli->dispatch_recv;
7894 /* In parameters */
7895 state->orig.in.handle = _handle;
7896 state->orig.in.level = _level;
7898 /* Out parameters */
7899 state->orig.out.info = _info;
7901 /* Result */
7902 ZERO_STRUCT(state->orig.out.result);
7904 state->out_mem_ctx = talloc_named_const(state, 0,
7905 "rpccli_lsa_QueryDomainInformationPolicy_out_memory");
7906 if (tevent_req_nomem(state->out_mem_ctx, req)) {
7907 return tevent_req_post(req, ev);
7910 /* make a temporary copy, that we pass to the dispatch function */
7911 state->tmp = state->orig;
7913 subreq = cli->dispatch_send(state, ev, cli,
7914 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7915 NDR_LSA_QUERYDOMAININFORMATIONPOLICY,
7916 &state->tmp);
7917 if (tevent_req_nomem(subreq, req)) {
7918 return tevent_req_post(req, ev);
7920 tevent_req_set_callback(subreq, rpccli_lsa_QueryDomainInformationPolicy_done, req);
7921 return req;
7924 static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq)
7926 struct tevent_req *req = tevent_req_callback_data(
7927 subreq, struct tevent_req);
7928 struct rpccli_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data(
7929 req, struct rpccli_lsa_QueryDomainInformationPolicy_state);
7930 NTSTATUS status;
7931 TALLOC_CTX *mem_ctx;
7933 if (state->out_mem_ctx) {
7934 mem_ctx = state->out_mem_ctx;
7935 } else {
7936 mem_ctx = state;
7939 status = state->dispatch_recv(subreq, mem_ctx);
7940 TALLOC_FREE(subreq);
7941 if (!NT_STATUS_IS_OK(status)) {
7942 tevent_req_nterror(req, status);
7943 return;
7946 /* Copy out parameters */
7947 *state->orig.out.info = *state->tmp.out.info;
7949 /* Copy result */
7950 state->orig.out.result = state->tmp.out.result;
7952 /* Reset temporary structure */
7953 ZERO_STRUCT(state->tmp);
7955 tevent_req_done(req);
7958 NTSTATUS rpccli_lsa_QueryDomainInformationPolicy_recv(struct tevent_req *req,
7959 TALLOC_CTX *mem_ctx,
7960 NTSTATUS *result)
7962 struct rpccli_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data(
7963 req, struct rpccli_lsa_QueryDomainInformationPolicy_state);
7964 NTSTATUS status;
7966 if (tevent_req_is_nterror(req, &status)) {
7967 tevent_req_received(req);
7968 return status;
7971 /* Steal possbile out parameters to the callers context */
7972 talloc_steal(mem_ctx, state->out_mem_ctx);
7974 /* Return result */
7975 *result = state->orig.out.result;
7977 tevent_req_received(req);
7978 return NT_STATUS_OK;
7981 NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli,
7982 TALLOC_CTX *mem_ctx,
7983 struct policy_handle *handle /* [in] [ref] */,
7984 uint16_t level /* [in] */,
7985 union lsa_DomainInformationPolicy **info /* [out] [ref,switch_is(level)] */)
7987 struct lsa_QueryDomainInformationPolicy r;
7988 NTSTATUS status;
7990 /* In parameters */
7991 r.in.handle = handle;
7992 r.in.level = level;
7994 status = cli->dispatch(cli,
7995 mem_ctx,
7996 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
7997 NDR_LSA_QUERYDOMAININFORMATIONPOLICY,
7998 &r);
8000 if (!NT_STATUS_IS_OK(status)) {
8001 return status;
8004 if (NT_STATUS_IS_ERR(status)) {
8005 return status;
8008 /* Return variables */
8009 *info = *r.out.info;
8011 /* Return result */
8012 return r.out.result;
8015 struct rpccli_lsa_SetDomainInformationPolicy_state {
8016 struct lsa_SetDomainInformationPolicy orig;
8017 struct lsa_SetDomainInformationPolicy tmp;
8018 TALLOC_CTX *out_mem_ctx;
8019 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8022 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq);
8024 struct tevent_req *rpccli_lsa_SetDomainInformationPolicy_send(TALLOC_CTX *mem_ctx,
8025 struct tevent_context *ev,
8026 struct rpc_pipe_client *cli,
8027 struct policy_handle *_handle /* [in] [ref] */,
8028 uint16_t _level /* [in] */,
8029 union lsa_DomainInformationPolicy *_info /* [in] [unique,switch_is(level)] */)
8031 struct tevent_req *req;
8032 struct rpccli_lsa_SetDomainInformationPolicy_state *state;
8033 struct tevent_req *subreq;
8035 req = tevent_req_create(mem_ctx, &state,
8036 struct rpccli_lsa_SetDomainInformationPolicy_state);
8037 if (req == NULL) {
8038 return NULL;
8040 state->out_mem_ctx = NULL;
8041 state->dispatch_recv = cli->dispatch_recv;
8043 /* In parameters */
8044 state->orig.in.handle = _handle;
8045 state->orig.in.level = _level;
8046 state->orig.in.info = _info;
8048 /* Out parameters */
8050 /* Result */
8051 ZERO_STRUCT(state->orig.out.result);
8053 /* make a temporary copy, that we pass to the dispatch function */
8054 state->tmp = state->orig;
8056 subreq = cli->dispatch_send(state, ev, cli,
8057 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8058 NDR_LSA_SETDOMAININFORMATIONPOLICY,
8059 &state->tmp);
8060 if (tevent_req_nomem(subreq, req)) {
8061 return tevent_req_post(req, ev);
8063 tevent_req_set_callback(subreq, rpccli_lsa_SetDomainInformationPolicy_done, req);
8064 return req;
8067 static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq)
8069 struct tevent_req *req = tevent_req_callback_data(
8070 subreq, struct tevent_req);
8071 struct rpccli_lsa_SetDomainInformationPolicy_state *state = tevent_req_data(
8072 req, struct rpccli_lsa_SetDomainInformationPolicy_state);
8073 NTSTATUS status;
8074 TALLOC_CTX *mem_ctx;
8076 if (state->out_mem_ctx) {
8077 mem_ctx = state->out_mem_ctx;
8078 } else {
8079 mem_ctx = state;
8082 status = state->dispatch_recv(subreq, mem_ctx);
8083 TALLOC_FREE(subreq);
8084 if (!NT_STATUS_IS_OK(status)) {
8085 tevent_req_nterror(req, status);
8086 return;
8089 /* Copy out parameters */
8091 /* Copy result */
8092 state->orig.out.result = state->tmp.out.result;
8094 /* Reset temporary structure */
8095 ZERO_STRUCT(state->tmp);
8097 tevent_req_done(req);
8100 NTSTATUS rpccli_lsa_SetDomainInformationPolicy_recv(struct tevent_req *req,
8101 TALLOC_CTX *mem_ctx,
8102 NTSTATUS *result)
8104 struct rpccli_lsa_SetDomainInformationPolicy_state *state = tevent_req_data(
8105 req, struct rpccli_lsa_SetDomainInformationPolicy_state);
8106 NTSTATUS status;
8108 if (tevent_req_is_nterror(req, &status)) {
8109 tevent_req_received(req);
8110 return status;
8113 /* Steal possbile out parameters to the callers context */
8114 talloc_steal(mem_ctx, state->out_mem_ctx);
8116 /* Return result */
8117 *result = state->orig.out.result;
8119 tevent_req_received(req);
8120 return NT_STATUS_OK;
8123 NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli,
8124 TALLOC_CTX *mem_ctx,
8125 struct policy_handle *handle /* [in] [ref] */,
8126 uint16_t level /* [in] */,
8127 union lsa_DomainInformationPolicy *info /* [in] [unique,switch_is(level)] */)
8129 struct lsa_SetDomainInformationPolicy r;
8130 NTSTATUS status;
8132 /* In parameters */
8133 r.in.handle = handle;
8134 r.in.level = level;
8135 r.in.info = info;
8137 status = cli->dispatch(cli,
8138 mem_ctx,
8139 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8140 NDR_LSA_SETDOMAININFORMATIONPOLICY,
8141 &r);
8143 if (!NT_STATUS_IS_OK(status)) {
8144 return status;
8147 if (NT_STATUS_IS_ERR(status)) {
8148 return status;
8151 /* Return variables */
8153 /* Return result */
8154 return r.out.result;
8157 struct rpccli_lsa_OpenTrustedDomainByName_state {
8158 struct lsa_OpenTrustedDomainByName orig;
8159 struct lsa_OpenTrustedDomainByName tmp;
8160 TALLOC_CTX *out_mem_ctx;
8161 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8164 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq);
8166 struct tevent_req *rpccli_lsa_OpenTrustedDomainByName_send(TALLOC_CTX *mem_ctx,
8167 struct tevent_context *ev,
8168 struct rpc_pipe_client *cli,
8169 struct policy_handle *_handle /* [in] [ref] */,
8170 struct lsa_String _name /* [in] */,
8171 uint32_t _access_mask /* [in] */,
8172 struct policy_handle *_trustdom_handle /* [out] [ref] */)
8174 struct tevent_req *req;
8175 struct rpccli_lsa_OpenTrustedDomainByName_state *state;
8176 struct tevent_req *subreq;
8178 req = tevent_req_create(mem_ctx, &state,
8179 struct rpccli_lsa_OpenTrustedDomainByName_state);
8180 if (req == NULL) {
8181 return NULL;
8183 state->out_mem_ctx = NULL;
8184 state->dispatch_recv = cli->dispatch_recv;
8186 /* In parameters */
8187 state->orig.in.handle = _handle;
8188 state->orig.in.name = _name;
8189 state->orig.in.access_mask = _access_mask;
8191 /* Out parameters */
8192 state->orig.out.trustdom_handle = _trustdom_handle;
8194 /* Result */
8195 ZERO_STRUCT(state->orig.out.result);
8197 state->out_mem_ctx = talloc_named_const(state, 0,
8198 "rpccli_lsa_OpenTrustedDomainByName_out_memory");
8199 if (tevent_req_nomem(state->out_mem_ctx, req)) {
8200 return tevent_req_post(req, ev);
8203 /* make a temporary copy, that we pass to the dispatch function */
8204 state->tmp = state->orig;
8206 subreq = cli->dispatch_send(state, ev, cli,
8207 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8208 NDR_LSA_OPENTRUSTEDDOMAINBYNAME,
8209 &state->tmp);
8210 if (tevent_req_nomem(subreq, req)) {
8211 return tevent_req_post(req, ev);
8213 tevent_req_set_callback(subreq, rpccli_lsa_OpenTrustedDomainByName_done, req);
8214 return req;
8217 static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq)
8219 struct tevent_req *req = tevent_req_callback_data(
8220 subreq, struct tevent_req);
8221 struct rpccli_lsa_OpenTrustedDomainByName_state *state = tevent_req_data(
8222 req, struct rpccli_lsa_OpenTrustedDomainByName_state);
8223 NTSTATUS status;
8224 TALLOC_CTX *mem_ctx;
8226 if (state->out_mem_ctx) {
8227 mem_ctx = state->out_mem_ctx;
8228 } else {
8229 mem_ctx = state;
8232 status = state->dispatch_recv(subreq, mem_ctx);
8233 TALLOC_FREE(subreq);
8234 if (!NT_STATUS_IS_OK(status)) {
8235 tevent_req_nterror(req, status);
8236 return;
8239 /* Copy out parameters */
8240 *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
8242 /* Copy result */
8243 state->orig.out.result = state->tmp.out.result;
8245 /* Reset temporary structure */
8246 ZERO_STRUCT(state->tmp);
8248 tevent_req_done(req);
8251 NTSTATUS rpccli_lsa_OpenTrustedDomainByName_recv(struct tevent_req *req,
8252 TALLOC_CTX *mem_ctx,
8253 NTSTATUS *result)
8255 struct rpccli_lsa_OpenTrustedDomainByName_state *state = tevent_req_data(
8256 req, struct rpccli_lsa_OpenTrustedDomainByName_state);
8257 NTSTATUS status;
8259 if (tevent_req_is_nterror(req, &status)) {
8260 tevent_req_received(req);
8261 return status;
8264 /* Steal possbile out parameters to the callers context */
8265 talloc_steal(mem_ctx, state->out_mem_ctx);
8267 /* Return result */
8268 *result = state->orig.out.result;
8270 tevent_req_received(req);
8271 return NT_STATUS_OK;
8274 NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli,
8275 TALLOC_CTX *mem_ctx,
8276 struct policy_handle *handle /* [in] [ref] */,
8277 struct lsa_String name /* [in] */,
8278 uint32_t access_mask /* [in] */,
8279 struct policy_handle *trustdom_handle /* [out] [ref] */)
8281 struct lsa_OpenTrustedDomainByName r;
8282 NTSTATUS status;
8284 /* In parameters */
8285 r.in.handle = handle;
8286 r.in.name = name;
8287 r.in.access_mask = access_mask;
8289 status = cli->dispatch(cli,
8290 mem_ctx,
8291 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8292 NDR_LSA_OPENTRUSTEDDOMAINBYNAME,
8293 &r);
8295 if (!NT_STATUS_IS_OK(status)) {
8296 return status;
8299 if (NT_STATUS_IS_ERR(status)) {
8300 return status;
8303 /* Return variables */
8304 *trustdom_handle = *r.out.trustdom_handle;
8306 /* Return result */
8307 return r.out.result;
8310 struct rpccli_lsa_TestCall_state {
8311 struct lsa_TestCall orig;
8312 struct lsa_TestCall tmp;
8313 TALLOC_CTX *out_mem_ctx;
8314 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8317 static void rpccli_lsa_TestCall_done(struct tevent_req *subreq);
8319 struct tevent_req *rpccli_lsa_TestCall_send(TALLOC_CTX *mem_ctx,
8320 struct tevent_context *ev,
8321 struct rpc_pipe_client *cli)
8323 struct tevent_req *req;
8324 struct rpccli_lsa_TestCall_state *state;
8325 struct tevent_req *subreq;
8327 req = tevent_req_create(mem_ctx, &state,
8328 struct rpccli_lsa_TestCall_state);
8329 if (req == NULL) {
8330 return NULL;
8332 state->out_mem_ctx = NULL;
8333 state->dispatch_recv = cli->dispatch_recv;
8335 /* In parameters */
8337 /* Out parameters */
8339 /* Result */
8340 ZERO_STRUCT(state->orig.out.result);
8342 /* make a temporary copy, that we pass to the dispatch function */
8343 state->tmp = state->orig;
8345 subreq = cli->dispatch_send(state, ev, cli,
8346 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8347 NDR_LSA_TESTCALL,
8348 &state->tmp);
8349 if (tevent_req_nomem(subreq, req)) {
8350 return tevent_req_post(req, ev);
8352 tevent_req_set_callback(subreq, rpccli_lsa_TestCall_done, req);
8353 return req;
8356 static void rpccli_lsa_TestCall_done(struct tevent_req *subreq)
8358 struct tevent_req *req = tevent_req_callback_data(
8359 subreq, struct tevent_req);
8360 struct rpccli_lsa_TestCall_state *state = tevent_req_data(
8361 req, struct rpccli_lsa_TestCall_state);
8362 NTSTATUS status;
8363 TALLOC_CTX *mem_ctx;
8365 if (state->out_mem_ctx) {
8366 mem_ctx = state->out_mem_ctx;
8367 } else {
8368 mem_ctx = state;
8371 status = state->dispatch_recv(subreq, mem_ctx);
8372 TALLOC_FREE(subreq);
8373 if (!NT_STATUS_IS_OK(status)) {
8374 tevent_req_nterror(req, status);
8375 return;
8378 /* Copy out parameters */
8380 /* Copy result */
8381 state->orig.out.result = state->tmp.out.result;
8383 /* Reset temporary structure */
8384 ZERO_STRUCT(state->tmp);
8386 tevent_req_done(req);
8389 NTSTATUS rpccli_lsa_TestCall_recv(struct tevent_req *req,
8390 TALLOC_CTX *mem_ctx,
8391 NTSTATUS *result)
8393 struct rpccli_lsa_TestCall_state *state = tevent_req_data(
8394 req, struct rpccli_lsa_TestCall_state);
8395 NTSTATUS status;
8397 if (tevent_req_is_nterror(req, &status)) {
8398 tevent_req_received(req);
8399 return status;
8402 /* Steal possbile out parameters to the callers context */
8403 talloc_steal(mem_ctx, state->out_mem_ctx);
8405 /* Return result */
8406 *result = state->orig.out.result;
8408 tevent_req_received(req);
8409 return NT_STATUS_OK;
8412 NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli,
8413 TALLOC_CTX *mem_ctx)
8415 struct lsa_TestCall r;
8416 NTSTATUS status;
8418 /* In parameters */
8420 status = cli->dispatch(cli,
8421 mem_ctx,
8422 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8423 NDR_LSA_TESTCALL,
8424 &r);
8426 if (!NT_STATUS_IS_OK(status)) {
8427 return status;
8430 if (NT_STATUS_IS_ERR(status)) {
8431 return status;
8434 /* Return variables */
8436 /* Return result */
8437 return r.out.result;
8440 struct rpccli_lsa_LookupSids2_state {
8441 struct lsa_LookupSids2 orig;
8442 struct lsa_LookupSids2 tmp;
8443 TALLOC_CTX *out_mem_ctx;
8444 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8447 static void rpccli_lsa_LookupSids2_done(struct tevent_req *subreq);
8449 struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx,
8450 struct tevent_context *ev,
8451 struct rpc_pipe_client *cli,
8452 struct policy_handle *_handle /* [in] [ref] */,
8453 struct lsa_SidArray *_sids /* [in] [ref] */,
8454 struct lsa_RefDomainList **_domains /* [out] [ref] */,
8455 struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
8456 enum lsa_LookupNamesLevel _level /* [in] */,
8457 uint32_t *_count /* [in,out] [ref] */,
8458 enum lsa_LookupOptions _lookup_options /* [in] */,
8459 enum lsa_ClientRevision _client_revision /* [in] */)
8461 struct tevent_req *req;
8462 struct rpccli_lsa_LookupSids2_state *state;
8463 struct tevent_req *subreq;
8465 req = tevent_req_create(mem_ctx, &state,
8466 struct rpccli_lsa_LookupSids2_state);
8467 if (req == NULL) {
8468 return NULL;
8470 state->out_mem_ctx = NULL;
8471 state->dispatch_recv = cli->dispatch_recv;
8473 /* In parameters */
8474 state->orig.in.handle = _handle;
8475 state->orig.in.sids = _sids;
8476 state->orig.in.names = _names;
8477 state->orig.in.level = _level;
8478 state->orig.in.count = _count;
8479 state->orig.in.lookup_options = _lookup_options;
8480 state->orig.in.client_revision = _client_revision;
8482 /* Out parameters */
8483 state->orig.out.domains = _domains;
8484 state->orig.out.names = _names;
8485 state->orig.out.count = _count;
8487 /* Result */
8488 ZERO_STRUCT(state->orig.out.result);
8490 state->out_mem_ctx = talloc_named_const(state, 0,
8491 "rpccli_lsa_LookupSids2_out_memory");
8492 if (tevent_req_nomem(state->out_mem_ctx, req)) {
8493 return tevent_req_post(req, ev);
8496 /* make a temporary copy, that we pass to the dispatch function */
8497 state->tmp = state->orig;
8499 subreq = cli->dispatch_send(state, ev, cli,
8500 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8501 NDR_LSA_LOOKUPSIDS2,
8502 &state->tmp);
8503 if (tevent_req_nomem(subreq, req)) {
8504 return tevent_req_post(req, ev);
8506 tevent_req_set_callback(subreq, rpccli_lsa_LookupSids2_done, req);
8507 return req;
8510 static void rpccli_lsa_LookupSids2_done(struct tevent_req *subreq)
8512 struct tevent_req *req = tevent_req_callback_data(
8513 subreq, struct tevent_req);
8514 struct rpccli_lsa_LookupSids2_state *state = tevent_req_data(
8515 req, struct rpccli_lsa_LookupSids2_state);
8516 NTSTATUS status;
8517 TALLOC_CTX *mem_ctx;
8519 if (state->out_mem_ctx) {
8520 mem_ctx = state->out_mem_ctx;
8521 } else {
8522 mem_ctx = state;
8525 status = state->dispatch_recv(subreq, mem_ctx);
8526 TALLOC_FREE(subreq);
8527 if (!NT_STATUS_IS_OK(status)) {
8528 tevent_req_nterror(req, status);
8529 return;
8532 /* Copy out parameters */
8533 *state->orig.out.domains = *state->tmp.out.domains;
8534 *state->orig.out.names = *state->tmp.out.names;
8535 *state->orig.out.count = *state->tmp.out.count;
8537 /* Copy result */
8538 state->orig.out.result = state->tmp.out.result;
8540 /* Reset temporary structure */
8541 ZERO_STRUCT(state->tmp);
8543 tevent_req_done(req);
8546 NTSTATUS rpccli_lsa_LookupSids2_recv(struct tevent_req *req,
8547 TALLOC_CTX *mem_ctx,
8548 NTSTATUS *result)
8550 struct rpccli_lsa_LookupSids2_state *state = tevent_req_data(
8551 req, struct rpccli_lsa_LookupSids2_state);
8552 NTSTATUS status;
8554 if (tevent_req_is_nterror(req, &status)) {
8555 tevent_req_received(req);
8556 return status;
8559 /* Steal possbile out parameters to the callers context */
8560 talloc_steal(mem_ctx, state->out_mem_ctx);
8562 /* Return result */
8563 *result = state->orig.out.result;
8565 tevent_req_received(req);
8566 return NT_STATUS_OK;
8569 NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
8570 TALLOC_CTX *mem_ctx,
8571 struct policy_handle *handle /* [in] [ref] */,
8572 struct lsa_SidArray *sids /* [in] [ref] */,
8573 struct lsa_RefDomainList **domains /* [out] [ref] */,
8574 struct lsa_TransNameArray2 *names /* [in,out] [ref] */,
8575 enum lsa_LookupNamesLevel level /* [in] */,
8576 uint32_t *count /* [in,out] [ref] */,
8577 enum lsa_LookupOptions lookup_options /* [in] */,
8578 enum lsa_ClientRevision client_revision /* [in] */)
8580 struct lsa_LookupSids2 r;
8581 NTSTATUS status;
8583 /* In parameters */
8584 r.in.handle = handle;
8585 r.in.sids = sids;
8586 r.in.names = names;
8587 r.in.level = level;
8588 r.in.count = count;
8589 r.in.lookup_options = lookup_options;
8590 r.in.client_revision = client_revision;
8592 status = cli->dispatch(cli,
8593 mem_ctx,
8594 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8595 NDR_LSA_LOOKUPSIDS2,
8596 &r);
8598 if (!NT_STATUS_IS_OK(status)) {
8599 return status;
8602 if (NT_STATUS_IS_ERR(status)) {
8603 return status;
8606 /* Return variables */
8607 *domains = *r.out.domains;
8608 *names = *r.out.names;
8609 *count = *r.out.count;
8611 /* Return result */
8612 return r.out.result;
8615 struct rpccli_lsa_LookupNames2_state {
8616 struct lsa_LookupNames2 orig;
8617 struct lsa_LookupNames2 tmp;
8618 TALLOC_CTX *out_mem_ctx;
8619 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8622 static void rpccli_lsa_LookupNames2_done(struct tevent_req *subreq);
8624 struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx,
8625 struct tevent_context *ev,
8626 struct rpc_pipe_client *cli,
8627 struct policy_handle *_handle /* [in] [ref] */,
8628 uint32_t _num_names /* [in] [range(0,1000)] */,
8629 struct lsa_String *_names /* [in] [size_is(num_names)] */,
8630 struct lsa_RefDomainList **_domains /* [out] [ref] */,
8631 struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */,
8632 enum lsa_LookupNamesLevel _level /* [in] */,
8633 uint32_t *_count /* [in,out] [ref] */,
8634 enum lsa_LookupOptions _lookup_options /* [in] */,
8635 enum lsa_ClientRevision _client_revision /* [in] */)
8637 struct tevent_req *req;
8638 struct rpccli_lsa_LookupNames2_state *state;
8639 struct tevent_req *subreq;
8641 req = tevent_req_create(mem_ctx, &state,
8642 struct rpccli_lsa_LookupNames2_state);
8643 if (req == NULL) {
8644 return NULL;
8646 state->out_mem_ctx = NULL;
8647 state->dispatch_recv = cli->dispatch_recv;
8649 /* In parameters */
8650 state->orig.in.handle = _handle;
8651 state->orig.in.num_names = _num_names;
8652 state->orig.in.names = _names;
8653 state->orig.in.sids = _sids;
8654 state->orig.in.level = _level;
8655 state->orig.in.count = _count;
8656 state->orig.in.lookup_options = _lookup_options;
8657 state->orig.in.client_revision = _client_revision;
8659 /* Out parameters */
8660 state->orig.out.domains = _domains;
8661 state->orig.out.sids = _sids;
8662 state->orig.out.count = _count;
8664 /* Result */
8665 ZERO_STRUCT(state->orig.out.result);
8667 state->out_mem_ctx = talloc_named_const(state, 0,
8668 "rpccli_lsa_LookupNames2_out_memory");
8669 if (tevent_req_nomem(state->out_mem_ctx, req)) {
8670 return tevent_req_post(req, ev);
8673 /* make a temporary copy, that we pass to the dispatch function */
8674 state->tmp = state->orig;
8676 subreq = cli->dispatch_send(state, ev, cli,
8677 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8678 NDR_LSA_LOOKUPNAMES2,
8679 &state->tmp);
8680 if (tevent_req_nomem(subreq, req)) {
8681 return tevent_req_post(req, ev);
8683 tevent_req_set_callback(subreq, rpccli_lsa_LookupNames2_done, req);
8684 return req;
8687 static void rpccli_lsa_LookupNames2_done(struct tevent_req *subreq)
8689 struct tevent_req *req = tevent_req_callback_data(
8690 subreq, struct tevent_req);
8691 struct rpccli_lsa_LookupNames2_state *state = tevent_req_data(
8692 req, struct rpccli_lsa_LookupNames2_state);
8693 NTSTATUS status;
8694 TALLOC_CTX *mem_ctx;
8696 if (state->out_mem_ctx) {
8697 mem_ctx = state->out_mem_ctx;
8698 } else {
8699 mem_ctx = state;
8702 status = state->dispatch_recv(subreq, mem_ctx);
8703 TALLOC_FREE(subreq);
8704 if (!NT_STATUS_IS_OK(status)) {
8705 tevent_req_nterror(req, status);
8706 return;
8709 /* Copy out parameters */
8710 *state->orig.out.domains = *state->tmp.out.domains;
8711 *state->orig.out.sids = *state->tmp.out.sids;
8712 *state->orig.out.count = *state->tmp.out.count;
8714 /* Copy result */
8715 state->orig.out.result = state->tmp.out.result;
8717 /* Reset temporary structure */
8718 ZERO_STRUCT(state->tmp);
8720 tevent_req_done(req);
8723 NTSTATUS rpccli_lsa_LookupNames2_recv(struct tevent_req *req,
8724 TALLOC_CTX *mem_ctx,
8725 NTSTATUS *result)
8727 struct rpccli_lsa_LookupNames2_state *state = tevent_req_data(
8728 req, struct rpccli_lsa_LookupNames2_state);
8729 NTSTATUS status;
8731 if (tevent_req_is_nterror(req, &status)) {
8732 tevent_req_received(req);
8733 return status;
8736 /* Steal possbile out parameters to the callers context */
8737 talloc_steal(mem_ctx, state->out_mem_ctx);
8739 /* Return result */
8740 *result = state->orig.out.result;
8742 tevent_req_received(req);
8743 return NT_STATUS_OK;
8746 NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
8747 TALLOC_CTX *mem_ctx,
8748 struct policy_handle *handle /* [in] [ref] */,
8749 uint32_t num_names /* [in] [range(0,1000)] */,
8750 struct lsa_String *names /* [in] [size_is(num_names)] */,
8751 struct lsa_RefDomainList **domains /* [out] [ref] */,
8752 struct lsa_TransSidArray2 *sids /* [in,out] [ref] */,
8753 enum lsa_LookupNamesLevel level /* [in] */,
8754 uint32_t *count /* [in,out] [ref] */,
8755 enum lsa_LookupOptions lookup_options /* [in] */,
8756 enum lsa_ClientRevision client_revision /* [in] */)
8758 struct lsa_LookupNames2 r;
8759 NTSTATUS status;
8761 /* In parameters */
8762 r.in.handle = handle;
8763 r.in.num_names = num_names;
8764 r.in.names = names;
8765 r.in.sids = sids;
8766 r.in.level = level;
8767 r.in.count = count;
8768 r.in.lookup_options = lookup_options;
8769 r.in.client_revision = client_revision;
8771 status = cli->dispatch(cli,
8772 mem_ctx,
8773 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8774 NDR_LSA_LOOKUPNAMES2,
8775 &r);
8777 if (!NT_STATUS_IS_OK(status)) {
8778 return status;
8781 if (NT_STATUS_IS_ERR(status)) {
8782 return status;
8785 /* Return variables */
8786 *domains = *r.out.domains;
8787 *sids = *r.out.sids;
8788 *count = *r.out.count;
8790 /* Return result */
8791 return r.out.result;
8794 struct rpccli_lsa_CreateTrustedDomainEx2_state {
8795 struct lsa_CreateTrustedDomainEx2 orig;
8796 struct lsa_CreateTrustedDomainEx2 tmp;
8797 TALLOC_CTX *out_mem_ctx;
8798 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8801 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq);
8803 struct tevent_req *rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX *mem_ctx,
8804 struct tevent_context *ev,
8805 struct rpc_pipe_client *cli,
8806 struct policy_handle *_policy_handle /* [in] [ref] */,
8807 struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */,
8808 struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */,
8809 uint32_t _access_mask /* [in] */,
8810 struct policy_handle *_trustdom_handle /* [out] [ref] */)
8812 struct tevent_req *req;
8813 struct rpccli_lsa_CreateTrustedDomainEx2_state *state;
8814 struct tevent_req *subreq;
8816 req = tevent_req_create(mem_ctx, &state,
8817 struct rpccli_lsa_CreateTrustedDomainEx2_state);
8818 if (req == NULL) {
8819 return NULL;
8821 state->out_mem_ctx = NULL;
8822 state->dispatch_recv = cli->dispatch_recv;
8824 /* In parameters */
8825 state->orig.in.policy_handle = _policy_handle;
8826 state->orig.in.info = _info;
8827 state->orig.in.auth_info = _auth_info;
8828 state->orig.in.access_mask = _access_mask;
8830 /* Out parameters */
8831 state->orig.out.trustdom_handle = _trustdom_handle;
8833 /* Result */
8834 ZERO_STRUCT(state->orig.out.result);
8836 state->out_mem_ctx = talloc_named_const(state, 0,
8837 "rpccli_lsa_CreateTrustedDomainEx2_out_memory");
8838 if (tevent_req_nomem(state->out_mem_ctx, req)) {
8839 return tevent_req_post(req, ev);
8842 /* make a temporary copy, that we pass to the dispatch function */
8843 state->tmp = state->orig;
8845 subreq = cli->dispatch_send(state, ev, cli,
8846 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8847 NDR_LSA_CREATETRUSTEDDOMAINEX2,
8848 &state->tmp);
8849 if (tevent_req_nomem(subreq, req)) {
8850 return tevent_req_post(req, ev);
8852 tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomainEx2_done, req);
8853 return req;
8856 static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq)
8858 struct tevent_req *req = tevent_req_callback_data(
8859 subreq, struct tevent_req);
8860 struct rpccli_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data(
8861 req, struct rpccli_lsa_CreateTrustedDomainEx2_state);
8862 NTSTATUS status;
8863 TALLOC_CTX *mem_ctx;
8865 if (state->out_mem_ctx) {
8866 mem_ctx = state->out_mem_ctx;
8867 } else {
8868 mem_ctx = state;
8871 status = state->dispatch_recv(subreq, mem_ctx);
8872 TALLOC_FREE(subreq);
8873 if (!NT_STATUS_IS_OK(status)) {
8874 tevent_req_nterror(req, status);
8875 return;
8878 /* Copy out parameters */
8879 *state->orig.out.trustdom_handle = *state->tmp.out.trustdom_handle;
8881 /* Copy result */
8882 state->orig.out.result = state->tmp.out.result;
8884 /* Reset temporary structure */
8885 ZERO_STRUCT(state->tmp);
8887 tevent_req_done(req);
8890 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2_recv(struct tevent_req *req,
8891 TALLOC_CTX *mem_ctx,
8892 NTSTATUS *result)
8894 struct rpccli_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data(
8895 req, struct rpccli_lsa_CreateTrustedDomainEx2_state);
8896 NTSTATUS status;
8898 if (tevent_req_is_nterror(req, &status)) {
8899 tevent_req_received(req);
8900 return status;
8903 /* Steal possbile out parameters to the callers context */
8904 talloc_steal(mem_ctx, state->out_mem_ctx);
8906 /* Return result */
8907 *result = state->orig.out.result;
8909 tevent_req_received(req);
8910 return NT_STATUS_OK;
8913 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli,
8914 TALLOC_CTX *mem_ctx,
8915 struct policy_handle *policy_handle /* [in] [ref] */,
8916 struct lsa_TrustDomainInfoInfoEx *info /* [in] [ref] */,
8917 struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */,
8918 uint32_t access_mask /* [in] */,
8919 struct policy_handle *trustdom_handle /* [out] [ref] */)
8921 struct lsa_CreateTrustedDomainEx2 r;
8922 NTSTATUS status;
8924 /* In parameters */
8925 r.in.policy_handle = policy_handle;
8926 r.in.info = info;
8927 r.in.auth_info = auth_info;
8928 r.in.access_mask = access_mask;
8930 status = cli->dispatch(cli,
8931 mem_ctx,
8932 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8933 NDR_LSA_CREATETRUSTEDDOMAINEX2,
8934 &r);
8936 if (!NT_STATUS_IS_OK(status)) {
8937 return status;
8940 if (NT_STATUS_IS_ERR(status)) {
8941 return status;
8944 /* Return variables */
8945 *trustdom_handle = *r.out.trustdom_handle;
8947 /* Return result */
8948 return r.out.result;
8951 struct rpccli_lsa_CREDRWRITE_state {
8952 struct lsa_CREDRWRITE orig;
8953 struct lsa_CREDRWRITE tmp;
8954 TALLOC_CTX *out_mem_ctx;
8955 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
8958 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req *subreq);
8960 struct tevent_req *rpccli_lsa_CREDRWRITE_send(TALLOC_CTX *mem_ctx,
8961 struct tevent_context *ev,
8962 struct rpc_pipe_client *cli)
8964 struct tevent_req *req;
8965 struct rpccli_lsa_CREDRWRITE_state *state;
8966 struct tevent_req *subreq;
8968 req = tevent_req_create(mem_ctx, &state,
8969 struct rpccli_lsa_CREDRWRITE_state);
8970 if (req == NULL) {
8971 return NULL;
8973 state->out_mem_ctx = NULL;
8974 state->dispatch_recv = cli->dispatch_recv;
8976 /* In parameters */
8978 /* Out parameters */
8980 /* Result */
8981 ZERO_STRUCT(state->orig.out.result);
8983 /* make a temporary copy, that we pass to the dispatch function */
8984 state->tmp = state->orig;
8986 subreq = cli->dispatch_send(state, ev, cli,
8987 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
8988 NDR_LSA_CREDRWRITE,
8989 &state->tmp);
8990 if (tevent_req_nomem(subreq, req)) {
8991 return tevent_req_post(req, ev);
8993 tevent_req_set_callback(subreq, rpccli_lsa_CREDRWRITE_done, req);
8994 return req;
8997 static void rpccli_lsa_CREDRWRITE_done(struct tevent_req *subreq)
8999 struct tevent_req *req = tevent_req_callback_data(
9000 subreq, struct tevent_req);
9001 struct rpccli_lsa_CREDRWRITE_state *state = tevent_req_data(
9002 req, struct rpccli_lsa_CREDRWRITE_state);
9003 NTSTATUS status;
9004 TALLOC_CTX *mem_ctx;
9006 if (state->out_mem_ctx) {
9007 mem_ctx = state->out_mem_ctx;
9008 } else {
9009 mem_ctx = state;
9012 status = state->dispatch_recv(subreq, mem_ctx);
9013 TALLOC_FREE(subreq);
9014 if (!NT_STATUS_IS_OK(status)) {
9015 tevent_req_nterror(req, status);
9016 return;
9019 /* Copy out parameters */
9021 /* Copy result */
9022 state->orig.out.result = state->tmp.out.result;
9024 /* Reset temporary structure */
9025 ZERO_STRUCT(state->tmp);
9027 tevent_req_done(req);
9030 NTSTATUS rpccli_lsa_CREDRWRITE_recv(struct tevent_req *req,
9031 TALLOC_CTX *mem_ctx,
9032 NTSTATUS *result)
9034 struct rpccli_lsa_CREDRWRITE_state *state = tevent_req_data(
9035 req, struct rpccli_lsa_CREDRWRITE_state);
9036 NTSTATUS status;
9038 if (tevent_req_is_nterror(req, &status)) {
9039 tevent_req_received(req);
9040 return status;
9043 /* Steal possbile out parameters to the callers context */
9044 talloc_steal(mem_ctx, state->out_mem_ctx);
9046 /* Return result */
9047 *result = state->orig.out.result;
9049 tevent_req_received(req);
9050 return NT_STATUS_OK;
9053 NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli,
9054 TALLOC_CTX *mem_ctx)
9056 struct lsa_CREDRWRITE r;
9057 NTSTATUS status;
9059 /* In parameters */
9061 status = cli->dispatch(cli,
9062 mem_ctx,
9063 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9064 NDR_LSA_CREDRWRITE,
9065 &r);
9067 if (!NT_STATUS_IS_OK(status)) {
9068 return status;
9071 if (NT_STATUS_IS_ERR(status)) {
9072 return status;
9075 /* Return variables */
9077 /* Return result */
9078 return r.out.result;
9081 struct rpccli_lsa_CREDRREAD_state {
9082 struct lsa_CREDRREAD orig;
9083 struct lsa_CREDRREAD tmp;
9084 TALLOC_CTX *out_mem_ctx;
9085 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9088 static void rpccli_lsa_CREDRREAD_done(struct tevent_req *subreq);
9090 struct tevent_req *rpccli_lsa_CREDRREAD_send(TALLOC_CTX *mem_ctx,
9091 struct tevent_context *ev,
9092 struct rpc_pipe_client *cli)
9094 struct tevent_req *req;
9095 struct rpccli_lsa_CREDRREAD_state *state;
9096 struct tevent_req *subreq;
9098 req = tevent_req_create(mem_ctx, &state,
9099 struct rpccli_lsa_CREDRREAD_state);
9100 if (req == NULL) {
9101 return NULL;
9103 state->out_mem_ctx = NULL;
9104 state->dispatch_recv = cli->dispatch_recv;
9106 /* In parameters */
9108 /* Out parameters */
9110 /* Result */
9111 ZERO_STRUCT(state->orig.out.result);
9113 /* make a temporary copy, that we pass to the dispatch function */
9114 state->tmp = state->orig;
9116 subreq = cli->dispatch_send(state, ev, cli,
9117 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9118 NDR_LSA_CREDRREAD,
9119 &state->tmp);
9120 if (tevent_req_nomem(subreq, req)) {
9121 return tevent_req_post(req, ev);
9123 tevent_req_set_callback(subreq, rpccli_lsa_CREDRREAD_done, req);
9124 return req;
9127 static void rpccli_lsa_CREDRREAD_done(struct tevent_req *subreq)
9129 struct tevent_req *req = tevent_req_callback_data(
9130 subreq, struct tevent_req);
9131 struct rpccli_lsa_CREDRREAD_state *state = tevent_req_data(
9132 req, struct rpccli_lsa_CREDRREAD_state);
9133 NTSTATUS status;
9134 TALLOC_CTX *mem_ctx;
9136 if (state->out_mem_ctx) {
9137 mem_ctx = state->out_mem_ctx;
9138 } else {
9139 mem_ctx = state;
9142 status = state->dispatch_recv(subreq, mem_ctx);
9143 TALLOC_FREE(subreq);
9144 if (!NT_STATUS_IS_OK(status)) {
9145 tevent_req_nterror(req, status);
9146 return;
9149 /* Copy out parameters */
9151 /* Copy result */
9152 state->orig.out.result = state->tmp.out.result;
9154 /* Reset temporary structure */
9155 ZERO_STRUCT(state->tmp);
9157 tevent_req_done(req);
9160 NTSTATUS rpccli_lsa_CREDRREAD_recv(struct tevent_req *req,
9161 TALLOC_CTX *mem_ctx,
9162 NTSTATUS *result)
9164 struct rpccli_lsa_CREDRREAD_state *state = tevent_req_data(
9165 req, struct rpccli_lsa_CREDRREAD_state);
9166 NTSTATUS status;
9168 if (tevent_req_is_nterror(req, &status)) {
9169 tevent_req_received(req);
9170 return status;
9173 /* Steal possbile out parameters to the callers context */
9174 talloc_steal(mem_ctx, state->out_mem_ctx);
9176 /* Return result */
9177 *result = state->orig.out.result;
9179 tevent_req_received(req);
9180 return NT_STATUS_OK;
9183 NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli,
9184 TALLOC_CTX *mem_ctx)
9186 struct lsa_CREDRREAD r;
9187 NTSTATUS status;
9189 /* In parameters */
9191 status = cli->dispatch(cli,
9192 mem_ctx,
9193 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9194 NDR_LSA_CREDRREAD,
9195 &r);
9197 if (!NT_STATUS_IS_OK(status)) {
9198 return status;
9201 if (NT_STATUS_IS_ERR(status)) {
9202 return status;
9205 /* Return variables */
9207 /* Return result */
9208 return r.out.result;
9211 struct rpccli_lsa_CREDRENUMERATE_state {
9212 struct lsa_CREDRENUMERATE orig;
9213 struct lsa_CREDRENUMERATE tmp;
9214 TALLOC_CTX *out_mem_ctx;
9215 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9218 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req *subreq);
9220 struct tevent_req *rpccli_lsa_CREDRENUMERATE_send(TALLOC_CTX *mem_ctx,
9221 struct tevent_context *ev,
9222 struct rpc_pipe_client *cli)
9224 struct tevent_req *req;
9225 struct rpccli_lsa_CREDRENUMERATE_state *state;
9226 struct tevent_req *subreq;
9228 req = tevent_req_create(mem_ctx, &state,
9229 struct rpccli_lsa_CREDRENUMERATE_state);
9230 if (req == NULL) {
9231 return NULL;
9233 state->out_mem_ctx = NULL;
9234 state->dispatch_recv = cli->dispatch_recv;
9236 /* In parameters */
9238 /* Out parameters */
9240 /* Result */
9241 ZERO_STRUCT(state->orig.out.result);
9243 /* make a temporary copy, that we pass to the dispatch function */
9244 state->tmp = state->orig;
9246 subreq = cli->dispatch_send(state, ev, cli,
9247 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9248 NDR_LSA_CREDRENUMERATE,
9249 &state->tmp);
9250 if (tevent_req_nomem(subreq, req)) {
9251 return tevent_req_post(req, ev);
9253 tevent_req_set_callback(subreq, rpccli_lsa_CREDRENUMERATE_done, req);
9254 return req;
9257 static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req *subreq)
9259 struct tevent_req *req = tevent_req_callback_data(
9260 subreq, struct tevent_req);
9261 struct rpccli_lsa_CREDRENUMERATE_state *state = tevent_req_data(
9262 req, struct rpccli_lsa_CREDRENUMERATE_state);
9263 NTSTATUS status;
9264 TALLOC_CTX *mem_ctx;
9266 if (state->out_mem_ctx) {
9267 mem_ctx = state->out_mem_ctx;
9268 } else {
9269 mem_ctx = state;
9272 status = state->dispatch_recv(subreq, mem_ctx);
9273 TALLOC_FREE(subreq);
9274 if (!NT_STATUS_IS_OK(status)) {
9275 tevent_req_nterror(req, status);
9276 return;
9279 /* Copy out parameters */
9281 /* Copy result */
9282 state->orig.out.result = state->tmp.out.result;
9284 /* Reset temporary structure */
9285 ZERO_STRUCT(state->tmp);
9287 tevent_req_done(req);
9290 NTSTATUS rpccli_lsa_CREDRENUMERATE_recv(struct tevent_req *req,
9291 TALLOC_CTX *mem_ctx,
9292 NTSTATUS *result)
9294 struct rpccli_lsa_CREDRENUMERATE_state *state = tevent_req_data(
9295 req, struct rpccli_lsa_CREDRENUMERATE_state);
9296 NTSTATUS status;
9298 if (tevent_req_is_nterror(req, &status)) {
9299 tevent_req_received(req);
9300 return status;
9303 /* Steal possbile out parameters to the callers context */
9304 talloc_steal(mem_ctx, state->out_mem_ctx);
9306 /* Return result */
9307 *result = state->orig.out.result;
9309 tevent_req_received(req);
9310 return NT_STATUS_OK;
9313 NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli,
9314 TALLOC_CTX *mem_ctx)
9316 struct lsa_CREDRENUMERATE r;
9317 NTSTATUS status;
9319 /* In parameters */
9321 status = cli->dispatch(cli,
9322 mem_ctx,
9323 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9324 NDR_LSA_CREDRENUMERATE,
9325 &r);
9327 if (!NT_STATUS_IS_OK(status)) {
9328 return status;
9331 if (NT_STATUS_IS_ERR(status)) {
9332 return status;
9335 /* Return variables */
9337 /* Return result */
9338 return r.out.result;
9341 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state {
9342 struct lsa_CREDRWRITEDOMAINCREDENTIALS orig;
9343 struct lsa_CREDRWRITEDOMAINCREDENTIALS tmp;
9344 TALLOC_CTX *out_mem_ctx;
9345 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9348 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req *subreq);
9350 struct tevent_req *rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx,
9351 struct tevent_context *ev,
9352 struct rpc_pipe_client *cli)
9354 struct tevent_req *req;
9355 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state;
9356 struct tevent_req *subreq;
9358 req = tevent_req_create(mem_ctx, &state,
9359 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state);
9360 if (req == NULL) {
9361 return NULL;
9363 state->out_mem_ctx = NULL;
9364 state->dispatch_recv = cli->dispatch_recv;
9366 /* In parameters */
9368 /* Out parameters */
9370 /* Result */
9371 ZERO_STRUCT(state->orig.out.result);
9373 /* make a temporary copy, that we pass to the dispatch function */
9374 state->tmp = state->orig;
9376 subreq = cli->dispatch_send(state, ev, cli,
9377 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9378 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS,
9379 &state->tmp);
9380 if (tevent_req_nomem(subreq, req)) {
9381 return tevent_req_post(req, ev);
9383 tevent_req_set_callback(subreq, rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done, req);
9384 return req;
9387 static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req *subreq)
9389 struct tevent_req *req = tevent_req_callback_data(
9390 subreq, struct tevent_req);
9391 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state = tevent_req_data(
9392 req, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state);
9393 NTSTATUS status;
9394 TALLOC_CTX *mem_ctx;
9396 if (state->out_mem_ctx) {
9397 mem_ctx = state->out_mem_ctx;
9398 } else {
9399 mem_ctx = state;
9402 status = state->dispatch_recv(subreq, mem_ctx);
9403 TALLOC_FREE(subreq);
9404 if (!NT_STATUS_IS_OK(status)) {
9405 tevent_req_nterror(req, status);
9406 return;
9409 /* Copy out parameters */
9411 /* Copy result */
9412 state->orig.out.result = state->tmp.out.result;
9414 /* Reset temporary structure */
9415 ZERO_STRUCT(state->tmp);
9417 tevent_req_done(req);
9420 NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_recv(struct tevent_req *req,
9421 TALLOC_CTX *mem_ctx,
9422 NTSTATUS *result)
9424 struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state = tevent_req_data(
9425 req, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state);
9426 NTSTATUS status;
9428 if (tevent_req_is_nterror(req, &status)) {
9429 tevent_req_received(req);
9430 return status;
9433 /* Steal possbile out parameters to the callers context */
9434 talloc_steal(mem_ctx, state->out_mem_ctx);
9436 /* Return result */
9437 *result = state->orig.out.result;
9439 tevent_req_received(req);
9440 return NT_STATUS_OK;
9443 NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli,
9444 TALLOC_CTX *mem_ctx)
9446 struct lsa_CREDRWRITEDOMAINCREDENTIALS r;
9447 NTSTATUS status;
9449 /* In parameters */
9451 status = cli->dispatch(cli,
9452 mem_ctx,
9453 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9454 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS,
9455 &r);
9457 if (!NT_STATUS_IS_OK(status)) {
9458 return status;
9461 if (NT_STATUS_IS_ERR(status)) {
9462 return status;
9465 /* Return variables */
9467 /* Return result */
9468 return r.out.result;
9471 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state {
9472 struct lsa_CREDRREADDOMAINCREDENTIALS orig;
9473 struct lsa_CREDRREADDOMAINCREDENTIALS tmp;
9474 TALLOC_CTX *out_mem_ctx;
9475 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9478 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req *subreq);
9480 struct tevent_req *rpccli_lsa_CREDRREADDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx,
9481 struct tevent_context *ev,
9482 struct rpc_pipe_client *cli)
9484 struct tevent_req *req;
9485 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state;
9486 struct tevent_req *subreq;
9488 req = tevent_req_create(mem_ctx, &state,
9489 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state);
9490 if (req == NULL) {
9491 return NULL;
9493 state->out_mem_ctx = NULL;
9494 state->dispatch_recv = cli->dispatch_recv;
9496 /* In parameters */
9498 /* Out parameters */
9500 /* Result */
9501 ZERO_STRUCT(state->orig.out.result);
9503 /* make a temporary copy, that we pass to the dispatch function */
9504 state->tmp = state->orig;
9506 subreq = cli->dispatch_send(state, ev, cli,
9507 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9508 NDR_LSA_CREDRREADDOMAINCREDENTIALS,
9509 &state->tmp);
9510 if (tevent_req_nomem(subreq, req)) {
9511 return tevent_req_post(req, ev);
9513 tevent_req_set_callback(subreq, rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done, req);
9514 return req;
9517 static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req *subreq)
9519 struct tevent_req *req = tevent_req_callback_data(
9520 subreq, struct tevent_req);
9521 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state = tevent_req_data(
9522 req, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state);
9523 NTSTATUS status;
9524 TALLOC_CTX *mem_ctx;
9526 if (state->out_mem_ctx) {
9527 mem_ctx = state->out_mem_ctx;
9528 } else {
9529 mem_ctx = state;
9532 status = state->dispatch_recv(subreq, mem_ctx);
9533 TALLOC_FREE(subreq);
9534 if (!NT_STATUS_IS_OK(status)) {
9535 tevent_req_nterror(req, status);
9536 return;
9539 /* Copy out parameters */
9541 /* Copy result */
9542 state->orig.out.result = state->tmp.out.result;
9544 /* Reset temporary structure */
9545 ZERO_STRUCT(state->tmp);
9547 tevent_req_done(req);
9550 NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS_recv(struct tevent_req *req,
9551 TALLOC_CTX *mem_ctx,
9552 NTSTATUS *result)
9554 struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state = tevent_req_data(
9555 req, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state);
9556 NTSTATUS status;
9558 if (tevent_req_is_nterror(req, &status)) {
9559 tevent_req_received(req);
9560 return status;
9563 /* Steal possbile out parameters to the callers context */
9564 talloc_steal(mem_ctx, state->out_mem_ctx);
9566 /* Return result */
9567 *result = state->orig.out.result;
9569 tevent_req_received(req);
9570 return NT_STATUS_OK;
9573 NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli,
9574 TALLOC_CTX *mem_ctx)
9576 struct lsa_CREDRREADDOMAINCREDENTIALS r;
9577 NTSTATUS status;
9579 /* In parameters */
9581 status = cli->dispatch(cli,
9582 mem_ctx,
9583 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9584 NDR_LSA_CREDRREADDOMAINCREDENTIALS,
9585 &r);
9587 if (!NT_STATUS_IS_OK(status)) {
9588 return status;
9591 if (NT_STATUS_IS_ERR(status)) {
9592 return status;
9595 /* Return variables */
9597 /* Return result */
9598 return r.out.result;
9601 struct rpccli_lsa_CREDRDELETE_state {
9602 struct lsa_CREDRDELETE orig;
9603 struct lsa_CREDRDELETE tmp;
9604 TALLOC_CTX *out_mem_ctx;
9605 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9608 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req *subreq);
9610 struct tevent_req *rpccli_lsa_CREDRDELETE_send(TALLOC_CTX *mem_ctx,
9611 struct tevent_context *ev,
9612 struct rpc_pipe_client *cli)
9614 struct tevent_req *req;
9615 struct rpccli_lsa_CREDRDELETE_state *state;
9616 struct tevent_req *subreq;
9618 req = tevent_req_create(mem_ctx, &state,
9619 struct rpccli_lsa_CREDRDELETE_state);
9620 if (req == NULL) {
9621 return NULL;
9623 state->out_mem_ctx = NULL;
9624 state->dispatch_recv = cli->dispatch_recv;
9626 /* In parameters */
9628 /* Out parameters */
9630 /* Result */
9631 ZERO_STRUCT(state->orig.out.result);
9633 /* make a temporary copy, that we pass to the dispatch function */
9634 state->tmp = state->orig;
9636 subreq = cli->dispatch_send(state, ev, cli,
9637 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9638 NDR_LSA_CREDRDELETE,
9639 &state->tmp);
9640 if (tevent_req_nomem(subreq, req)) {
9641 return tevent_req_post(req, ev);
9643 tevent_req_set_callback(subreq, rpccli_lsa_CREDRDELETE_done, req);
9644 return req;
9647 static void rpccli_lsa_CREDRDELETE_done(struct tevent_req *subreq)
9649 struct tevent_req *req = tevent_req_callback_data(
9650 subreq, struct tevent_req);
9651 struct rpccli_lsa_CREDRDELETE_state *state = tevent_req_data(
9652 req, struct rpccli_lsa_CREDRDELETE_state);
9653 NTSTATUS status;
9654 TALLOC_CTX *mem_ctx;
9656 if (state->out_mem_ctx) {
9657 mem_ctx = state->out_mem_ctx;
9658 } else {
9659 mem_ctx = state;
9662 status = state->dispatch_recv(subreq, mem_ctx);
9663 TALLOC_FREE(subreq);
9664 if (!NT_STATUS_IS_OK(status)) {
9665 tevent_req_nterror(req, status);
9666 return;
9669 /* Copy out parameters */
9671 /* Copy result */
9672 state->orig.out.result = state->tmp.out.result;
9674 /* Reset temporary structure */
9675 ZERO_STRUCT(state->tmp);
9677 tevent_req_done(req);
9680 NTSTATUS rpccli_lsa_CREDRDELETE_recv(struct tevent_req *req,
9681 TALLOC_CTX *mem_ctx,
9682 NTSTATUS *result)
9684 struct rpccli_lsa_CREDRDELETE_state *state = tevent_req_data(
9685 req, struct rpccli_lsa_CREDRDELETE_state);
9686 NTSTATUS status;
9688 if (tevent_req_is_nterror(req, &status)) {
9689 tevent_req_received(req);
9690 return status;
9693 /* Steal possbile out parameters to the callers context */
9694 talloc_steal(mem_ctx, state->out_mem_ctx);
9696 /* Return result */
9697 *result = state->orig.out.result;
9699 tevent_req_received(req);
9700 return NT_STATUS_OK;
9703 NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli,
9704 TALLOC_CTX *mem_ctx)
9706 struct lsa_CREDRDELETE r;
9707 NTSTATUS status;
9709 /* In parameters */
9711 status = cli->dispatch(cli,
9712 mem_ctx,
9713 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9714 NDR_LSA_CREDRDELETE,
9715 &r);
9717 if (!NT_STATUS_IS_OK(status)) {
9718 return status;
9721 if (NT_STATUS_IS_ERR(status)) {
9722 return status;
9725 /* Return variables */
9727 /* Return result */
9728 return r.out.result;
9731 struct rpccli_lsa_CREDRGETTARGETINFO_state {
9732 struct lsa_CREDRGETTARGETINFO orig;
9733 struct lsa_CREDRGETTARGETINFO tmp;
9734 TALLOC_CTX *out_mem_ctx;
9735 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9738 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req *subreq);
9740 struct tevent_req *rpccli_lsa_CREDRGETTARGETINFO_send(TALLOC_CTX *mem_ctx,
9741 struct tevent_context *ev,
9742 struct rpc_pipe_client *cli)
9744 struct tevent_req *req;
9745 struct rpccli_lsa_CREDRGETTARGETINFO_state *state;
9746 struct tevent_req *subreq;
9748 req = tevent_req_create(mem_ctx, &state,
9749 struct rpccli_lsa_CREDRGETTARGETINFO_state);
9750 if (req == NULL) {
9751 return NULL;
9753 state->out_mem_ctx = NULL;
9754 state->dispatch_recv = cli->dispatch_recv;
9756 /* In parameters */
9758 /* Out parameters */
9760 /* Result */
9761 ZERO_STRUCT(state->orig.out.result);
9763 /* make a temporary copy, that we pass to the dispatch function */
9764 state->tmp = state->orig;
9766 subreq = cli->dispatch_send(state, ev, cli,
9767 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9768 NDR_LSA_CREDRGETTARGETINFO,
9769 &state->tmp);
9770 if (tevent_req_nomem(subreq, req)) {
9771 return tevent_req_post(req, ev);
9773 tevent_req_set_callback(subreq, rpccli_lsa_CREDRGETTARGETINFO_done, req);
9774 return req;
9777 static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req *subreq)
9779 struct tevent_req *req = tevent_req_callback_data(
9780 subreq, struct tevent_req);
9781 struct rpccli_lsa_CREDRGETTARGETINFO_state *state = tevent_req_data(
9782 req, struct rpccli_lsa_CREDRGETTARGETINFO_state);
9783 NTSTATUS status;
9784 TALLOC_CTX *mem_ctx;
9786 if (state->out_mem_ctx) {
9787 mem_ctx = state->out_mem_ctx;
9788 } else {
9789 mem_ctx = state;
9792 status = state->dispatch_recv(subreq, mem_ctx);
9793 TALLOC_FREE(subreq);
9794 if (!NT_STATUS_IS_OK(status)) {
9795 tevent_req_nterror(req, status);
9796 return;
9799 /* Copy out parameters */
9801 /* Copy result */
9802 state->orig.out.result = state->tmp.out.result;
9804 /* Reset temporary structure */
9805 ZERO_STRUCT(state->tmp);
9807 tevent_req_done(req);
9810 NTSTATUS rpccli_lsa_CREDRGETTARGETINFO_recv(struct tevent_req *req,
9811 TALLOC_CTX *mem_ctx,
9812 NTSTATUS *result)
9814 struct rpccli_lsa_CREDRGETTARGETINFO_state *state = tevent_req_data(
9815 req, struct rpccli_lsa_CREDRGETTARGETINFO_state);
9816 NTSTATUS status;
9818 if (tevent_req_is_nterror(req, &status)) {
9819 tevent_req_received(req);
9820 return status;
9823 /* Steal possbile out parameters to the callers context */
9824 talloc_steal(mem_ctx, state->out_mem_ctx);
9826 /* Return result */
9827 *result = state->orig.out.result;
9829 tevent_req_received(req);
9830 return NT_STATUS_OK;
9833 NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli,
9834 TALLOC_CTX *mem_ctx)
9836 struct lsa_CREDRGETTARGETINFO r;
9837 NTSTATUS status;
9839 /* In parameters */
9841 status = cli->dispatch(cli,
9842 mem_ctx,
9843 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9844 NDR_LSA_CREDRGETTARGETINFO,
9845 &r);
9847 if (!NT_STATUS_IS_OK(status)) {
9848 return status;
9851 if (NT_STATUS_IS_ERR(status)) {
9852 return status;
9855 /* Return variables */
9857 /* Return result */
9858 return r.out.result;
9861 struct rpccli_lsa_CREDRPROFILELOADED_state {
9862 struct lsa_CREDRPROFILELOADED orig;
9863 struct lsa_CREDRPROFILELOADED tmp;
9864 TALLOC_CTX *out_mem_ctx;
9865 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9868 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req *subreq);
9870 struct tevent_req *rpccli_lsa_CREDRPROFILELOADED_send(TALLOC_CTX *mem_ctx,
9871 struct tevent_context *ev,
9872 struct rpc_pipe_client *cli)
9874 struct tevent_req *req;
9875 struct rpccli_lsa_CREDRPROFILELOADED_state *state;
9876 struct tevent_req *subreq;
9878 req = tevent_req_create(mem_ctx, &state,
9879 struct rpccli_lsa_CREDRPROFILELOADED_state);
9880 if (req == NULL) {
9881 return NULL;
9883 state->out_mem_ctx = NULL;
9884 state->dispatch_recv = cli->dispatch_recv;
9886 /* In parameters */
9888 /* Out parameters */
9890 /* Result */
9891 ZERO_STRUCT(state->orig.out.result);
9893 /* make a temporary copy, that we pass to the dispatch function */
9894 state->tmp = state->orig;
9896 subreq = cli->dispatch_send(state, ev, cli,
9897 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9898 NDR_LSA_CREDRPROFILELOADED,
9899 &state->tmp);
9900 if (tevent_req_nomem(subreq, req)) {
9901 return tevent_req_post(req, ev);
9903 tevent_req_set_callback(subreq, rpccli_lsa_CREDRPROFILELOADED_done, req);
9904 return req;
9907 static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req *subreq)
9909 struct tevent_req *req = tevent_req_callback_data(
9910 subreq, struct tevent_req);
9911 struct rpccli_lsa_CREDRPROFILELOADED_state *state = tevent_req_data(
9912 req, struct rpccli_lsa_CREDRPROFILELOADED_state);
9913 NTSTATUS status;
9914 TALLOC_CTX *mem_ctx;
9916 if (state->out_mem_ctx) {
9917 mem_ctx = state->out_mem_ctx;
9918 } else {
9919 mem_ctx = state;
9922 status = state->dispatch_recv(subreq, mem_ctx);
9923 TALLOC_FREE(subreq);
9924 if (!NT_STATUS_IS_OK(status)) {
9925 tevent_req_nterror(req, status);
9926 return;
9929 /* Copy out parameters */
9931 /* Copy result */
9932 state->orig.out.result = state->tmp.out.result;
9934 /* Reset temporary structure */
9935 ZERO_STRUCT(state->tmp);
9937 tevent_req_done(req);
9940 NTSTATUS rpccli_lsa_CREDRPROFILELOADED_recv(struct tevent_req *req,
9941 TALLOC_CTX *mem_ctx,
9942 NTSTATUS *result)
9944 struct rpccli_lsa_CREDRPROFILELOADED_state *state = tevent_req_data(
9945 req, struct rpccli_lsa_CREDRPROFILELOADED_state);
9946 NTSTATUS status;
9948 if (tevent_req_is_nterror(req, &status)) {
9949 tevent_req_received(req);
9950 return status;
9953 /* Steal possbile out parameters to the callers context */
9954 talloc_steal(mem_ctx, state->out_mem_ctx);
9956 /* Return result */
9957 *result = state->orig.out.result;
9959 tevent_req_received(req);
9960 return NT_STATUS_OK;
9963 NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli,
9964 TALLOC_CTX *mem_ctx)
9966 struct lsa_CREDRPROFILELOADED r;
9967 NTSTATUS status;
9969 /* In parameters */
9971 status = cli->dispatch(cli,
9972 mem_ctx,
9973 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
9974 NDR_LSA_CREDRPROFILELOADED,
9975 &r);
9977 if (!NT_STATUS_IS_OK(status)) {
9978 return status;
9981 if (NT_STATUS_IS_ERR(status)) {
9982 return status;
9985 /* Return variables */
9987 /* Return result */
9988 return r.out.result;
9991 struct rpccli_lsa_LookupNames3_state {
9992 struct lsa_LookupNames3 orig;
9993 struct lsa_LookupNames3 tmp;
9994 TALLOC_CTX *out_mem_ctx;
9995 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
9998 static void rpccli_lsa_LookupNames3_done(struct tevent_req *subreq);
10000 struct tevent_req *rpccli_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx,
10001 struct tevent_context *ev,
10002 struct rpc_pipe_client *cli,
10003 struct policy_handle *_handle /* [in] [ref] */,
10004 uint32_t _num_names /* [in] [range(0,1000)] */,
10005 struct lsa_String *_names /* [in] [size_is(num_names)] */,
10006 struct lsa_RefDomainList **_domains /* [out] [ref] */,
10007 struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
10008 enum lsa_LookupNamesLevel _level /* [in] */,
10009 uint32_t *_count /* [in,out] [ref] */,
10010 enum lsa_LookupOptions _lookup_options /* [in] */,
10011 enum lsa_ClientRevision _client_revision /* [in] */)
10013 struct tevent_req *req;
10014 struct rpccli_lsa_LookupNames3_state *state;
10015 struct tevent_req *subreq;
10017 req = tevent_req_create(mem_ctx, &state,
10018 struct rpccli_lsa_LookupNames3_state);
10019 if (req == NULL) {
10020 return NULL;
10022 state->out_mem_ctx = NULL;
10023 state->dispatch_recv = cli->dispatch_recv;
10025 /* In parameters */
10026 state->orig.in.handle = _handle;
10027 state->orig.in.num_names = _num_names;
10028 state->orig.in.names = _names;
10029 state->orig.in.sids = _sids;
10030 state->orig.in.level = _level;
10031 state->orig.in.count = _count;
10032 state->orig.in.lookup_options = _lookup_options;
10033 state->orig.in.client_revision = _client_revision;
10035 /* Out parameters */
10036 state->orig.out.domains = _domains;
10037 state->orig.out.sids = _sids;
10038 state->orig.out.count = _count;
10040 /* Result */
10041 ZERO_STRUCT(state->orig.out.result);
10043 state->out_mem_ctx = talloc_named_const(state, 0,
10044 "rpccli_lsa_LookupNames3_out_memory");
10045 if (tevent_req_nomem(state->out_mem_ctx, req)) {
10046 return tevent_req_post(req, ev);
10049 /* make a temporary copy, that we pass to the dispatch function */
10050 state->tmp = state->orig;
10052 subreq = cli->dispatch_send(state, ev, cli,
10053 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10054 NDR_LSA_LOOKUPNAMES3,
10055 &state->tmp);
10056 if (tevent_req_nomem(subreq, req)) {
10057 return tevent_req_post(req, ev);
10059 tevent_req_set_callback(subreq, rpccli_lsa_LookupNames3_done, req);
10060 return req;
10063 static void rpccli_lsa_LookupNames3_done(struct tevent_req *subreq)
10065 struct tevent_req *req = tevent_req_callback_data(
10066 subreq, struct tevent_req);
10067 struct rpccli_lsa_LookupNames3_state *state = tevent_req_data(
10068 req, struct rpccli_lsa_LookupNames3_state);
10069 NTSTATUS status;
10070 TALLOC_CTX *mem_ctx;
10072 if (state->out_mem_ctx) {
10073 mem_ctx = state->out_mem_ctx;
10074 } else {
10075 mem_ctx = state;
10078 status = state->dispatch_recv(subreq, mem_ctx);
10079 TALLOC_FREE(subreq);
10080 if (!NT_STATUS_IS_OK(status)) {
10081 tevent_req_nterror(req, status);
10082 return;
10085 /* Copy out parameters */
10086 *state->orig.out.domains = *state->tmp.out.domains;
10087 *state->orig.out.sids = *state->tmp.out.sids;
10088 *state->orig.out.count = *state->tmp.out.count;
10090 /* Copy result */
10091 state->orig.out.result = state->tmp.out.result;
10093 /* Reset temporary structure */
10094 ZERO_STRUCT(state->tmp);
10096 tevent_req_done(req);
10099 NTSTATUS rpccli_lsa_LookupNames3_recv(struct tevent_req *req,
10100 TALLOC_CTX *mem_ctx,
10101 NTSTATUS *result)
10103 struct rpccli_lsa_LookupNames3_state *state = tevent_req_data(
10104 req, struct rpccli_lsa_LookupNames3_state);
10105 NTSTATUS status;
10107 if (tevent_req_is_nterror(req, &status)) {
10108 tevent_req_received(req);
10109 return status;
10112 /* Steal possbile out parameters to the callers context */
10113 talloc_steal(mem_ctx, state->out_mem_ctx);
10115 /* Return result */
10116 *result = state->orig.out.result;
10118 tevent_req_received(req);
10119 return NT_STATUS_OK;
10122 NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
10123 TALLOC_CTX *mem_ctx,
10124 struct policy_handle *handle /* [in] [ref] */,
10125 uint32_t num_names /* [in] [range(0,1000)] */,
10126 struct lsa_String *names /* [in] [size_is(num_names)] */,
10127 struct lsa_RefDomainList **domains /* [out] [ref] */,
10128 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
10129 enum lsa_LookupNamesLevel level /* [in] */,
10130 uint32_t *count /* [in,out] [ref] */,
10131 enum lsa_LookupOptions lookup_options /* [in] */,
10132 enum lsa_ClientRevision client_revision /* [in] */)
10134 struct lsa_LookupNames3 r;
10135 NTSTATUS status;
10137 /* In parameters */
10138 r.in.handle = handle;
10139 r.in.num_names = num_names;
10140 r.in.names = names;
10141 r.in.sids = sids;
10142 r.in.level = level;
10143 r.in.count = count;
10144 r.in.lookup_options = lookup_options;
10145 r.in.client_revision = client_revision;
10147 status = cli->dispatch(cli,
10148 mem_ctx,
10149 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10150 NDR_LSA_LOOKUPNAMES3,
10151 &r);
10153 if (!NT_STATUS_IS_OK(status)) {
10154 return status;
10157 if (NT_STATUS_IS_ERR(status)) {
10158 return status;
10161 /* Return variables */
10162 *domains = *r.out.domains;
10163 *sids = *r.out.sids;
10164 *count = *r.out.count;
10166 /* Return result */
10167 return r.out.result;
10170 struct rpccli_lsa_CREDRGETSESSIONTYPES_state {
10171 struct lsa_CREDRGETSESSIONTYPES orig;
10172 struct lsa_CREDRGETSESSIONTYPES tmp;
10173 TALLOC_CTX *out_mem_ctx;
10174 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10177 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req *subreq);
10179 struct tevent_req *rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX *mem_ctx,
10180 struct tevent_context *ev,
10181 struct rpc_pipe_client *cli)
10183 struct tevent_req *req;
10184 struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state;
10185 struct tevent_req *subreq;
10187 req = tevent_req_create(mem_ctx, &state,
10188 struct rpccli_lsa_CREDRGETSESSIONTYPES_state);
10189 if (req == NULL) {
10190 return NULL;
10192 state->out_mem_ctx = NULL;
10193 state->dispatch_recv = cli->dispatch_recv;
10195 /* In parameters */
10197 /* Out parameters */
10199 /* Result */
10200 ZERO_STRUCT(state->orig.out.result);
10202 /* make a temporary copy, that we pass to the dispatch function */
10203 state->tmp = state->orig;
10205 subreq = cli->dispatch_send(state, ev, cli,
10206 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10207 NDR_LSA_CREDRGETSESSIONTYPES,
10208 &state->tmp);
10209 if (tevent_req_nomem(subreq, req)) {
10210 return tevent_req_post(req, ev);
10212 tevent_req_set_callback(subreq, rpccli_lsa_CREDRGETSESSIONTYPES_done, req);
10213 return req;
10216 static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req *subreq)
10218 struct tevent_req *req = tevent_req_callback_data(
10219 subreq, struct tevent_req);
10220 struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state = tevent_req_data(
10221 req, struct rpccli_lsa_CREDRGETSESSIONTYPES_state);
10222 NTSTATUS status;
10223 TALLOC_CTX *mem_ctx;
10225 if (state->out_mem_ctx) {
10226 mem_ctx = state->out_mem_ctx;
10227 } else {
10228 mem_ctx = state;
10231 status = state->dispatch_recv(subreq, mem_ctx);
10232 TALLOC_FREE(subreq);
10233 if (!NT_STATUS_IS_OK(status)) {
10234 tevent_req_nterror(req, status);
10235 return;
10238 /* Copy out parameters */
10240 /* Copy result */
10241 state->orig.out.result = state->tmp.out.result;
10243 /* Reset temporary structure */
10244 ZERO_STRUCT(state->tmp);
10246 tevent_req_done(req);
10249 NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES_recv(struct tevent_req *req,
10250 TALLOC_CTX *mem_ctx,
10251 NTSTATUS *result)
10253 struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state = tevent_req_data(
10254 req, struct rpccli_lsa_CREDRGETSESSIONTYPES_state);
10255 NTSTATUS status;
10257 if (tevent_req_is_nterror(req, &status)) {
10258 tevent_req_received(req);
10259 return status;
10262 /* Steal possbile out parameters to the callers context */
10263 talloc_steal(mem_ctx, state->out_mem_ctx);
10265 /* Return result */
10266 *result = state->orig.out.result;
10268 tevent_req_received(req);
10269 return NT_STATUS_OK;
10272 NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli,
10273 TALLOC_CTX *mem_ctx)
10275 struct lsa_CREDRGETSESSIONTYPES r;
10276 NTSTATUS status;
10278 /* In parameters */
10280 status = cli->dispatch(cli,
10281 mem_ctx,
10282 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10283 NDR_LSA_CREDRGETSESSIONTYPES,
10284 &r);
10286 if (!NT_STATUS_IS_OK(status)) {
10287 return status;
10290 if (NT_STATUS_IS_ERR(status)) {
10291 return status;
10294 /* Return variables */
10296 /* Return result */
10297 return r.out.result;
10300 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state {
10301 struct lsa_LSARREGISTERAUDITEVENT orig;
10302 struct lsa_LSARREGISTERAUDITEVENT tmp;
10303 TALLOC_CTX *out_mem_ctx;
10304 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10307 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req *subreq);
10309 struct tevent_req *rpccli_lsa_LSARREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx,
10310 struct tevent_context *ev,
10311 struct rpc_pipe_client *cli)
10313 struct tevent_req *req;
10314 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state;
10315 struct tevent_req *subreq;
10317 req = tevent_req_create(mem_ctx, &state,
10318 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state);
10319 if (req == NULL) {
10320 return NULL;
10322 state->out_mem_ctx = NULL;
10323 state->dispatch_recv = cli->dispatch_recv;
10325 /* In parameters */
10327 /* Out parameters */
10329 /* Result */
10330 ZERO_STRUCT(state->orig.out.result);
10332 /* make a temporary copy, that we pass to the dispatch function */
10333 state->tmp = state->orig;
10335 subreq = cli->dispatch_send(state, ev, cli,
10336 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10337 NDR_LSA_LSARREGISTERAUDITEVENT,
10338 &state->tmp);
10339 if (tevent_req_nomem(subreq, req)) {
10340 return tevent_req_post(req, ev);
10342 tevent_req_set_callback(subreq, rpccli_lsa_LSARREGISTERAUDITEVENT_done, req);
10343 return req;
10346 static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req *subreq)
10348 struct tevent_req *req = tevent_req_callback_data(
10349 subreq, struct tevent_req);
10350 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state = tevent_req_data(
10351 req, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state);
10352 NTSTATUS status;
10353 TALLOC_CTX *mem_ctx;
10355 if (state->out_mem_ctx) {
10356 mem_ctx = state->out_mem_ctx;
10357 } else {
10358 mem_ctx = state;
10361 status = state->dispatch_recv(subreq, mem_ctx);
10362 TALLOC_FREE(subreq);
10363 if (!NT_STATUS_IS_OK(status)) {
10364 tevent_req_nterror(req, status);
10365 return;
10368 /* Copy out parameters */
10370 /* Copy result */
10371 state->orig.out.result = state->tmp.out.result;
10373 /* Reset temporary structure */
10374 ZERO_STRUCT(state->tmp);
10376 tevent_req_done(req);
10379 NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT_recv(struct tevent_req *req,
10380 TALLOC_CTX *mem_ctx,
10381 NTSTATUS *result)
10383 struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state = tevent_req_data(
10384 req, struct rpccli_lsa_LSARREGISTERAUDITEVENT_state);
10385 NTSTATUS status;
10387 if (tevent_req_is_nterror(req, &status)) {
10388 tevent_req_received(req);
10389 return status;
10392 /* Steal possbile out parameters to the callers context */
10393 talloc_steal(mem_ctx, state->out_mem_ctx);
10395 /* Return result */
10396 *result = state->orig.out.result;
10398 tevent_req_received(req);
10399 return NT_STATUS_OK;
10402 NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli,
10403 TALLOC_CTX *mem_ctx)
10405 struct lsa_LSARREGISTERAUDITEVENT r;
10406 NTSTATUS status;
10408 /* In parameters */
10410 status = cli->dispatch(cli,
10411 mem_ctx,
10412 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10413 NDR_LSA_LSARREGISTERAUDITEVENT,
10414 &r);
10416 if (!NT_STATUS_IS_OK(status)) {
10417 return status;
10420 if (NT_STATUS_IS_ERR(status)) {
10421 return status;
10424 /* Return variables */
10426 /* Return result */
10427 return r.out.result;
10430 struct rpccli_lsa_LSARGENAUDITEVENT_state {
10431 struct lsa_LSARGENAUDITEVENT orig;
10432 struct lsa_LSARGENAUDITEVENT tmp;
10433 TALLOC_CTX *out_mem_ctx;
10434 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10437 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req *subreq);
10439 struct tevent_req *rpccli_lsa_LSARGENAUDITEVENT_send(TALLOC_CTX *mem_ctx,
10440 struct tevent_context *ev,
10441 struct rpc_pipe_client *cli)
10443 struct tevent_req *req;
10444 struct rpccli_lsa_LSARGENAUDITEVENT_state *state;
10445 struct tevent_req *subreq;
10447 req = tevent_req_create(mem_ctx, &state,
10448 struct rpccli_lsa_LSARGENAUDITEVENT_state);
10449 if (req == NULL) {
10450 return NULL;
10452 state->out_mem_ctx = NULL;
10453 state->dispatch_recv = cli->dispatch_recv;
10455 /* In parameters */
10457 /* Out parameters */
10459 /* Result */
10460 ZERO_STRUCT(state->orig.out.result);
10462 /* make a temporary copy, that we pass to the dispatch function */
10463 state->tmp = state->orig;
10465 subreq = cli->dispatch_send(state, ev, cli,
10466 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10467 NDR_LSA_LSARGENAUDITEVENT,
10468 &state->tmp);
10469 if (tevent_req_nomem(subreq, req)) {
10470 return tevent_req_post(req, ev);
10472 tevent_req_set_callback(subreq, rpccli_lsa_LSARGENAUDITEVENT_done, req);
10473 return req;
10476 static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req *subreq)
10478 struct tevent_req *req = tevent_req_callback_data(
10479 subreq, struct tevent_req);
10480 struct rpccli_lsa_LSARGENAUDITEVENT_state *state = tevent_req_data(
10481 req, struct rpccli_lsa_LSARGENAUDITEVENT_state);
10482 NTSTATUS status;
10483 TALLOC_CTX *mem_ctx;
10485 if (state->out_mem_ctx) {
10486 mem_ctx = state->out_mem_ctx;
10487 } else {
10488 mem_ctx = state;
10491 status = state->dispatch_recv(subreq, mem_ctx);
10492 TALLOC_FREE(subreq);
10493 if (!NT_STATUS_IS_OK(status)) {
10494 tevent_req_nterror(req, status);
10495 return;
10498 /* Copy out parameters */
10500 /* Copy result */
10501 state->orig.out.result = state->tmp.out.result;
10503 /* Reset temporary structure */
10504 ZERO_STRUCT(state->tmp);
10506 tevent_req_done(req);
10509 NTSTATUS rpccli_lsa_LSARGENAUDITEVENT_recv(struct tevent_req *req,
10510 TALLOC_CTX *mem_ctx,
10511 NTSTATUS *result)
10513 struct rpccli_lsa_LSARGENAUDITEVENT_state *state = tevent_req_data(
10514 req, struct rpccli_lsa_LSARGENAUDITEVENT_state);
10515 NTSTATUS status;
10517 if (tevent_req_is_nterror(req, &status)) {
10518 tevent_req_received(req);
10519 return status;
10522 /* Steal possbile out parameters to the callers context */
10523 talloc_steal(mem_ctx, state->out_mem_ctx);
10525 /* Return result */
10526 *result = state->orig.out.result;
10528 tevent_req_received(req);
10529 return NT_STATUS_OK;
10532 NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli,
10533 TALLOC_CTX *mem_ctx)
10535 struct lsa_LSARGENAUDITEVENT r;
10536 NTSTATUS status;
10538 /* In parameters */
10540 status = cli->dispatch(cli,
10541 mem_ctx,
10542 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10543 NDR_LSA_LSARGENAUDITEVENT,
10544 &r);
10546 if (!NT_STATUS_IS_OK(status)) {
10547 return status;
10550 if (NT_STATUS_IS_ERR(status)) {
10551 return status;
10554 /* Return variables */
10556 /* Return result */
10557 return r.out.result;
10560 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state {
10561 struct lsa_LSARUNREGISTERAUDITEVENT orig;
10562 struct lsa_LSARUNREGISTERAUDITEVENT tmp;
10563 TALLOC_CTX *out_mem_ctx;
10564 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10567 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req *subreq);
10569 struct tevent_req *rpccli_lsa_LSARUNREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx,
10570 struct tevent_context *ev,
10571 struct rpc_pipe_client *cli)
10573 struct tevent_req *req;
10574 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state;
10575 struct tevent_req *subreq;
10577 req = tevent_req_create(mem_ctx, &state,
10578 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state);
10579 if (req == NULL) {
10580 return NULL;
10582 state->out_mem_ctx = NULL;
10583 state->dispatch_recv = cli->dispatch_recv;
10585 /* In parameters */
10587 /* Out parameters */
10589 /* Result */
10590 ZERO_STRUCT(state->orig.out.result);
10592 /* make a temporary copy, that we pass to the dispatch function */
10593 state->tmp = state->orig;
10595 subreq = cli->dispatch_send(state, ev, cli,
10596 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10597 NDR_LSA_LSARUNREGISTERAUDITEVENT,
10598 &state->tmp);
10599 if (tevent_req_nomem(subreq, req)) {
10600 return tevent_req_post(req, ev);
10602 tevent_req_set_callback(subreq, rpccli_lsa_LSARUNREGISTERAUDITEVENT_done, req);
10603 return req;
10606 static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req *subreq)
10608 struct tevent_req *req = tevent_req_callback_data(
10609 subreq, struct tevent_req);
10610 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state = tevent_req_data(
10611 req, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state);
10612 NTSTATUS status;
10613 TALLOC_CTX *mem_ctx;
10615 if (state->out_mem_ctx) {
10616 mem_ctx = state->out_mem_ctx;
10617 } else {
10618 mem_ctx = state;
10621 status = state->dispatch_recv(subreq, mem_ctx);
10622 TALLOC_FREE(subreq);
10623 if (!NT_STATUS_IS_OK(status)) {
10624 tevent_req_nterror(req, status);
10625 return;
10628 /* Copy out parameters */
10630 /* Copy result */
10631 state->orig.out.result = state->tmp.out.result;
10633 /* Reset temporary structure */
10634 ZERO_STRUCT(state->tmp);
10636 tevent_req_done(req);
10639 NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT_recv(struct tevent_req *req,
10640 TALLOC_CTX *mem_ctx,
10641 NTSTATUS *result)
10643 struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state = tevent_req_data(
10644 req, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state);
10645 NTSTATUS status;
10647 if (tevent_req_is_nterror(req, &status)) {
10648 tevent_req_received(req);
10649 return status;
10652 /* Steal possbile out parameters to the callers context */
10653 talloc_steal(mem_ctx, state->out_mem_ctx);
10655 /* Return result */
10656 *result = state->orig.out.result;
10658 tevent_req_received(req);
10659 return NT_STATUS_OK;
10662 NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli,
10663 TALLOC_CTX *mem_ctx)
10665 struct lsa_LSARUNREGISTERAUDITEVENT r;
10666 NTSTATUS status;
10668 /* In parameters */
10670 status = cli->dispatch(cli,
10671 mem_ctx,
10672 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10673 NDR_LSA_LSARUNREGISTERAUDITEVENT,
10674 &r);
10676 if (!NT_STATUS_IS_OK(status)) {
10677 return status;
10680 if (NT_STATUS_IS_ERR(status)) {
10681 return status;
10684 /* Return variables */
10686 /* Return result */
10687 return r.out.result;
10690 struct rpccli_lsa_lsaRQueryForestTrustInformation_state {
10691 struct lsa_lsaRQueryForestTrustInformation orig;
10692 struct lsa_lsaRQueryForestTrustInformation tmp;
10693 TALLOC_CTX *out_mem_ctx;
10694 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10697 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq);
10699 struct tevent_req *rpccli_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX *mem_ctx,
10700 struct tevent_context *ev,
10701 struct rpc_pipe_client *cli,
10702 struct policy_handle *_handle /* [in] [ref] */,
10703 struct lsa_String *_trusted_domain_name /* [in] [ref] */,
10704 uint16_t _unknown /* [in] */,
10705 struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */)
10707 struct tevent_req *req;
10708 struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state;
10709 struct tevent_req *subreq;
10711 req = tevent_req_create(mem_ctx, &state,
10712 struct rpccli_lsa_lsaRQueryForestTrustInformation_state);
10713 if (req == NULL) {
10714 return NULL;
10716 state->out_mem_ctx = NULL;
10717 state->dispatch_recv = cli->dispatch_recv;
10719 /* In parameters */
10720 state->orig.in.handle = _handle;
10721 state->orig.in.trusted_domain_name = _trusted_domain_name;
10722 state->orig.in.unknown = _unknown;
10724 /* Out parameters */
10725 state->orig.out.forest_trust_info = _forest_trust_info;
10727 /* Result */
10728 ZERO_STRUCT(state->orig.out.result);
10730 state->out_mem_ctx = talloc_named_const(state, 0,
10731 "rpccli_lsa_lsaRQueryForestTrustInformation_out_memory");
10732 if (tevent_req_nomem(state->out_mem_ctx, req)) {
10733 return tevent_req_post(req, ev);
10736 /* make a temporary copy, that we pass to the dispatch function */
10737 state->tmp = state->orig;
10739 subreq = cli->dispatch_send(state, ev, cli,
10740 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10741 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION,
10742 &state->tmp);
10743 if (tevent_req_nomem(subreq, req)) {
10744 return tevent_req_post(req, ev);
10746 tevent_req_set_callback(subreq, rpccli_lsa_lsaRQueryForestTrustInformation_done, req);
10747 return req;
10750 static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq)
10752 struct tevent_req *req = tevent_req_callback_data(
10753 subreq, struct tevent_req);
10754 struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data(
10755 req, struct rpccli_lsa_lsaRQueryForestTrustInformation_state);
10756 NTSTATUS status;
10757 TALLOC_CTX *mem_ctx;
10759 if (state->out_mem_ctx) {
10760 mem_ctx = state->out_mem_ctx;
10761 } else {
10762 mem_ctx = state;
10765 status = state->dispatch_recv(subreq, mem_ctx);
10766 TALLOC_FREE(subreq);
10767 if (!NT_STATUS_IS_OK(status)) {
10768 tevent_req_nterror(req, status);
10769 return;
10772 /* Copy out parameters */
10773 *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_info;
10775 /* Copy result */
10776 state->orig.out.result = state->tmp.out.result;
10778 /* Reset temporary structure */
10779 ZERO_STRUCT(state->tmp);
10781 tevent_req_done(req);
10784 NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req *req,
10785 TALLOC_CTX *mem_ctx,
10786 NTSTATUS *result)
10788 struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data(
10789 req, struct rpccli_lsa_lsaRQueryForestTrustInformation_state);
10790 NTSTATUS status;
10792 if (tevent_req_is_nterror(req, &status)) {
10793 tevent_req_received(req);
10794 return status;
10797 /* Steal possbile out parameters to the callers context */
10798 talloc_steal(mem_ctx, state->out_mem_ctx);
10800 /* Return result */
10801 *result = state->orig.out.result;
10803 tevent_req_received(req);
10804 return NT_STATUS_OK;
10807 NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli,
10808 TALLOC_CTX *mem_ctx,
10809 struct policy_handle *handle /* [in] [ref] */,
10810 struct lsa_String *trusted_domain_name /* [in] [ref] */,
10811 uint16_t unknown /* [in] */,
10812 struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */)
10814 struct lsa_lsaRQueryForestTrustInformation r;
10815 NTSTATUS status;
10817 /* In parameters */
10818 r.in.handle = handle;
10819 r.in.trusted_domain_name = trusted_domain_name;
10820 r.in.unknown = unknown;
10822 status = cli->dispatch(cli,
10823 mem_ctx,
10824 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10825 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION,
10826 &r);
10828 if (!NT_STATUS_IS_OK(status)) {
10829 return status;
10832 if (NT_STATUS_IS_ERR(status)) {
10833 return status;
10836 /* Return variables */
10837 *forest_trust_info = *r.out.forest_trust_info;
10839 /* Return result */
10840 return r.out.result;
10843 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state {
10844 struct lsa_LSARSETFORESTTRUSTINFORMATION orig;
10845 struct lsa_LSARSETFORESTTRUSTINFORMATION tmp;
10846 TALLOC_CTX *out_mem_ctx;
10847 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10850 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq);
10852 struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem_ctx,
10853 struct tevent_context *ev,
10854 struct rpc_pipe_client *cli)
10856 struct tevent_req *req;
10857 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state;
10858 struct tevent_req *subreq;
10860 req = tevent_req_create(mem_ctx, &state,
10861 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
10862 if (req == NULL) {
10863 return NULL;
10865 state->out_mem_ctx = NULL;
10866 state->dispatch_recv = cli->dispatch_recv;
10868 /* In parameters */
10870 /* Out parameters */
10872 /* Result */
10873 ZERO_STRUCT(state->orig.out.result);
10875 /* make a temporary copy, that we pass to the dispatch function */
10876 state->tmp = state->orig;
10878 subreq = cli->dispatch_send(state, ev, cli,
10879 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10880 NDR_LSA_LSARSETFORESTTRUSTINFORMATION,
10881 &state->tmp);
10882 if (tevent_req_nomem(subreq, req)) {
10883 return tevent_req_post(req, ev);
10885 tevent_req_set_callback(subreq, rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done, req);
10886 return req;
10889 static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq)
10891 struct tevent_req *req = tevent_req_callback_data(
10892 subreq, struct tevent_req);
10893 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data(
10894 req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
10895 NTSTATUS status;
10896 TALLOC_CTX *mem_ctx;
10898 if (state->out_mem_ctx) {
10899 mem_ctx = state->out_mem_ctx;
10900 } else {
10901 mem_ctx = state;
10904 status = state->dispatch_recv(subreq, mem_ctx);
10905 TALLOC_FREE(subreq);
10906 if (!NT_STATUS_IS_OK(status)) {
10907 tevent_req_nterror(req, status);
10908 return;
10911 /* Copy out parameters */
10913 /* Copy result */
10914 state->orig.out.result = state->tmp.out.result;
10916 /* Reset temporary structure */
10917 ZERO_STRUCT(state->tmp);
10919 tevent_req_done(req);
10922 NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req,
10923 TALLOC_CTX *mem_ctx,
10924 NTSTATUS *result)
10926 struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data(
10927 req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state);
10928 NTSTATUS status;
10930 if (tevent_req_is_nterror(req, &status)) {
10931 tevent_req_received(req);
10932 return status;
10935 /* Steal possbile out parameters to the callers context */
10936 talloc_steal(mem_ctx, state->out_mem_ctx);
10938 /* Return result */
10939 *result = state->orig.out.result;
10941 tevent_req_received(req);
10942 return NT_STATUS_OK;
10945 NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
10946 TALLOC_CTX *mem_ctx)
10948 struct lsa_LSARSETFORESTTRUSTINFORMATION r;
10949 NTSTATUS status;
10951 /* In parameters */
10953 status = cli->dispatch(cli,
10954 mem_ctx,
10955 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
10956 NDR_LSA_LSARSETFORESTTRUSTINFORMATION,
10957 &r);
10959 if (!NT_STATUS_IS_OK(status)) {
10960 return status;
10963 if (NT_STATUS_IS_ERR(status)) {
10964 return status;
10967 /* Return variables */
10969 /* Return result */
10970 return r.out.result;
10973 struct rpccli_lsa_CREDRRENAME_state {
10974 struct lsa_CREDRRENAME orig;
10975 struct lsa_CREDRRENAME tmp;
10976 TALLOC_CTX *out_mem_ctx;
10977 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
10980 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req *subreq);
10982 struct tevent_req *rpccli_lsa_CREDRRENAME_send(TALLOC_CTX *mem_ctx,
10983 struct tevent_context *ev,
10984 struct rpc_pipe_client *cli)
10986 struct tevent_req *req;
10987 struct rpccli_lsa_CREDRRENAME_state *state;
10988 struct tevent_req *subreq;
10990 req = tevent_req_create(mem_ctx, &state,
10991 struct rpccli_lsa_CREDRRENAME_state);
10992 if (req == NULL) {
10993 return NULL;
10995 state->out_mem_ctx = NULL;
10996 state->dispatch_recv = cli->dispatch_recv;
10998 /* In parameters */
11000 /* Out parameters */
11002 /* Result */
11003 ZERO_STRUCT(state->orig.out.result);
11005 /* make a temporary copy, that we pass to the dispatch function */
11006 state->tmp = state->orig;
11008 subreq = cli->dispatch_send(state, ev, cli,
11009 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11010 NDR_LSA_CREDRRENAME,
11011 &state->tmp);
11012 if (tevent_req_nomem(subreq, req)) {
11013 return tevent_req_post(req, ev);
11015 tevent_req_set_callback(subreq, rpccli_lsa_CREDRRENAME_done, req);
11016 return req;
11019 static void rpccli_lsa_CREDRRENAME_done(struct tevent_req *subreq)
11021 struct tevent_req *req = tevent_req_callback_data(
11022 subreq, struct tevent_req);
11023 struct rpccli_lsa_CREDRRENAME_state *state = tevent_req_data(
11024 req, struct rpccli_lsa_CREDRRENAME_state);
11025 NTSTATUS status;
11026 TALLOC_CTX *mem_ctx;
11028 if (state->out_mem_ctx) {
11029 mem_ctx = state->out_mem_ctx;
11030 } else {
11031 mem_ctx = state;
11034 status = state->dispatch_recv(subreq, mem_ctx);
11035 TALLOC_FREE(subreq);
11036 if (!NT_STATUS_IS_OK(status)) {
11037 tevent_req_nterror(req, status);
11038 return;
11041 /* Copy out parameters */
11043 /* Copy result */
11044 state->orig.out.result = state->tmp.out.result;
11046 /* Reset temporary structure */
11047 ZERO_STRUCT(state->tmp);
11049 tevent_req_done(req);
11052 NTSTATUS rpccli_lsa_CREDRRENAME_recv(struct tevent_req *req,
11053 TALLOC_CTX *mem_ctx,
11054 NTSTATUS *result)
11056 struct rpccli_lsa_CREDRRENAME_state *state = tevent_req_data(
11057 req, struct rpccli_lsa_CREDRRENAME_state);
11058 NTSTATUS status;
11060 if (tevent_req_is_nterror(req, &status)) {
11061 tevent_req_received(req);
11062 return status;
11065 /* Steal possbile out parameters to the callers context */
11066 talloc_steal(mem_ctx, state->out_mem_ctx);
11068 /* Return result */
11069 *result = state->orig.out.result;
11071 tevent_req_received(req);
11072 return NT_STATUS_OK;
11075 NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
11076 TALLOC_CTX *mem_ctx)
11078 struct lsa_CREDRRENAME r;
11079 NTSTATUS status;
11081 /* In parameters */
11083 status = cli->dispatch(cli,
11084 mem_ctx,
11085 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11086 NDR_LSA_CREDRRENAME,
11087 &r);
11089 if (!NT_STATUS_IS_OK(status)) {
11090 return status;
11093 if (NT_STATUS_IS_ERR(status)) {
11094 return status;
11097 /* Return variables */
11099 /* Return result */
11100 return r.out.result;
11103 struct rpccli_lsa_LookupSids3_state {
11104 struct lsa_LookupSids3 orig;
11105 struct lsa_LookupSids3 tmp;
11106 TALLOC_CTX *out_mem_ctx;
11107 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11110 static void rpccli_lsa_LookupSids3_done(struct tevent_req *subreq);
11112 struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx,
11113 struct tevent_context *ev,
11114 struct rpc_pipe_client *cli,
11115 struct lsa_SidArray *_sids /* [in] [ref] */,
11116 struct lsa_RefDomainList **_domains /* [out] [ref] */,
11117 struct lsa_TransNameArray2 *_names /* [in,out] [ref] */,
11118 enum lsa_LookupNamesLevel _level /* [in] */,
11119 uint32_t *_count /* [in,out] [ref] */,
11120 enum lsa_LookupOptions _lookup_options /* [in] */,
11121 enum lsa_ClientRevision _client_revision /* [in] */)
11123 struct tevent_req *req;
11124 struct rpccli_lsa_LookupSids3_state *state;
11125 struct tevent_req *subreq;
11127 req = tevent_req_create(mem_ctx, &state,
11128 struct rpccli_lsa_LookupSids3_state);
11129 if (req == NULL) {
11130 return NULL;
11132 state->out_mem_ctx = NULL;
11133 state->dispatch_recv = cli->dispatch_recv;
11135 /* In parameters */
11136 state->orig.in.sids = _sids;
11137 state->orig.in.names = _names;
11138 state->orig.in.level = _level;
11139 state->orig.in.count = _count;
11140 state->orig.in.lookup_options = _lookup_options;
11141 state->orig.in.client_revision = _client_revision;
11143 /* Out parameters */
11144 state->orig.out.domains = _domains;
11145 state->orig.out.names = _names;
11146 state->orig.out.count = _count;
11148 /* Result */
11149 ZERO_STRUCT(state->orig.out.result);
11151 state->out_mem_ctx = talloc_named_const(state, 0,
11152 "rpccli_lsa_LookupSids3_out_memory");
11153 if (tevent_req_nomem(state->out_mem_ctx, req)) {
11154 return tevent_req_post(req, ev);
11157 /* make a temporary copy, that we pass to the dispatch function */
11158 state->tmp = state->orig;
11160 subreq = cli->dispatch_send(state, ev, cli,
11161 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11162 NDR_LSA_LOOKUPSIDS3,
11163 &state->tmp);
11164 if (tevent_req_nomem(subreq, req)) {
11165 return tevent_req_post(req, ev);
11167 tevent_req_set_callback(subreq, rpccli_lsa_LookupSids3_done, req);
11168 return req;
11171 static void rpccli_lsa_LookupSids3_done(struct tevent_req *subreq)
11173 struct tevent_req *req = tevent_req_callback_data(
11174 subreq, struct tevent_req);
11175 struct rpccli_lsa_LookupSids3_state *state = tevent_req_data(
11176 req, struct rpccli_lsa_LookupSids3_state);
11177 NTSTATUS status;
11178 TALLOC_CTX *mem_ctx;
11180 if (state->out_mem_ctx) {
11181 mem_ctx = state->out_mem_ctx;
11182 } else {
11183 mem_ctx = state;
11186 status = state->dispatch_recv(subreq, mem_ctx);
11187 TALLOC_FREE(subreq);
11188 if (!NT_STATUS_IS_OK(status)) {
11189 tevent_req_nterror(req, status);
11190 return;
11193 /* Copy out parameters */
11194 *state->orig.out.domains = *state->tmp.out.domains;
11195 *state->orig.out.names = *state->tmp.out.names;
11196 *state->orig.out.count = *state->tmp.out.count;
11198 /* Copy result */
11199 state->orig.out.result = state->tmp.out.result;
11201 /* Reset temporary structure */
11202 ZERO_STRUCT(state->tmp);
11204 tevent_req_done(req);
11207 NTSTATUS rpccli_lsa_LookupSids3_recv(struct tevent_req *req,
11208 TALLOC_CTX *mem_ctx,
11209 NTSTATUS *result)
11211 struct rpccli_lsa_LookupSids3_state *state = tevent_req_data(
11212 req, struct rpccli_lsa_LookupSids3_state);
11213 NTSTATUS status;
11215 if (tevent_req_is_nterror(req, &status)) {
11216 tevent_req_received(req);
11217 return status;
11220 /* Steal possbile out parameters to the callers context */
11221 talloc_steal(mem_ctx, state->out_mem_ctx);
11223 /* Return result */
11224 *result = state->orig.out.result;
11226 tevent_req_received(req);
11227 return NT_STATUS_OK;
11230 NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
11231 TALLOC_CTX *mem_ctx,
11232 struct lsa_SidArray *sids /* [in] [ref] */,
11233 struct lsa_RefDomainList **domains /* [out] [ref] */,
11234 struct lsa_TransNameArray2 *names /* [in,out] [ref] */,
11235 enum lsa_LookupNamesLevel level /* [in] */,
11236 uint32_t *count /* [in,out] [ref] */,
11237 enum lsa_LookupOptions lookup_options /* [in] */,
11238 enum lsa_ClientRevision client_revision /* [in] */)
11240 struct lsa_LookupSids3 r;
11241 NTSTATUS status;
11243 /* In parameters */
11244 r.in.sids = sids;
11245 r.in.names = names;
11246 r.in.level = level;
11247 r.in.count = count;
11248 r.in.lookup_options = lookup_options;
11249 r.in.client_revision = client_revision;
11251 status = cli->dispatch(cli,
11252 mem_ctx,
11253 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11254 NDR_LSA_LOOKUPSIDS3,
11255 &r);
11257 if (!NT_STATUS_IS_OK(status)) {
11258 return status;
11261 if (NT_STATUS_IS_ERR(status)) {
11262 return status;
11265 /* Return variables */
11266 *domains = *r.out.domains;
11267 *names = *r.out.names;
11268 *count = *r.out.count;
11270 /* Return result */
11271 return r.out.result;
11274 struct rpccli_lsa_LookupNames4_state {
11275 struct lsa_LookupNames4 orig;
11276 struct lsa_LookupNames4 tmp;
11277 TALLOC_CTX *out_mem_ctx;
11278 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11281 static void rpccli_lsa_LookupNames4_done(struct tevent_req *subreq);
11283 struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx,
11284 struct tevent_context *ev,
11285 struct rpc_pipe_client *cli,
11286 uint32_t _num_names /* [in] [range(0,1000)] */,
11287 struct lsa_String *_names /* [in] [size_is(num_names)] */,
11288 struct lsa_RefDomainList **_domains /* [out] [ref] */,
11289 struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */,
11290 enum lsa_LookupNamesLevel _level /* [in] */,
11291 uint32_t *_count /* [in,out] [ref] */,
11292 enum lsa_LookupOptions _lookup_options /* [in] */,
11293 enum lsa_ClientRevision _client_revision /* [in] */)
11295 struct tevent_req *req;
11296 struct rpccli_lsa_LookupNames4_state *state;
11297 struct tevent_req *subreq;
11299 req = tevent_req_create(mem_ctx, &state,
11300 struct rpccli_lsa_LookupNames4_state);
11301 if (req == NULL) {
11302 return NULL;
11304 state->out_mem_ctx = NULL;
11305 state->dispatch_recv = cli->dispatch_recv;
11307 /* In parameters */
11308 state->orig.in.num_names = _num_names;
11309 state->orig.in.names = _names;
11310 state->orig.in.sids = _sids;
11311 state->orig.in.level = _level;
11312 state->orig.in.count = _count;
11313 state->orig.in.lookup_options = _lookup_options;
11314 state->orig.in.client_revision = _client_revision;
11316 /* Out parameters */
11317 state->orig.out.domains = _domains;
11318 state->orig.out.sids = _sids;
11319 state->orig.out.count = _count;
11321 /* Result */
11322 ZERO_STRUCT(state->orig.out.result);
11324 state->out_mem_ctx = talloc_named_const(state, 0,
11325 "rpccli_lsa_LookupNames4_out_memory");
11326 if (tevent_req_nomem(state->out_mem_ctx, req)) {
11327 return tevent_req_post(req, ev);
11330 /* make a temporary copy, that we pass to the dispatch function */
11331 state->tmp = state->orig;
11333 subreq = cli->dispatch_send(state, ev, cli,
11334 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11335 NDR_LSA_LOOKUPNAMES4,
11336 &state->tmp);
11337 if (tevent_req_nomem(subreq, req)) {
11338 return tevent_req_post(req, ev);
11340 tevent_req_set_callback(subreq, rpccli_lsa_LookupNames4_done, req);
11341 return req;
11344 static void rpccli_lsa_LookupNames4_done(struct tevent_req *subreq)
11346 struct tevent_req *req = tevent_req_callback_data(
11347 subreq, struct tevent_req);
11348 struct rpccli_lsa_LookupNames4_state *state = tevent_req_data(
11349 req, struct rpccli_lsa_LookupNames4_state);
11350 NTSTATUS status;
11351 TALLOC_CTX *mem_ctx;
11353 if (state->out_mem_ctx) {
11354 mem_ctx = state->out_mem_ctx;
11355 } else {
11356 mem_ctx = state;
11359 status = state->dispatch_recv(subreq, mem_ctx);
11360 TALLOC_FREE(subreq);
11361 if (!NT_STATUS_IS_OK(status)) {
11362 tevent_req_nterror(req, status);
11363 return;
11366 /* Copy out parameters */
11367 *state->orig.out.domains = *state->tmp.out.domains;
11368 *state->orig.out.sids = *state->tmp.out.sids;
11369 *state->orig.out.count = *state->tmp.out.count;
11371 /* Copy result */
11372 state->orig.out.result = state->tmp.out.result;
11374 /* Reset temporary structure */
11375 ZERO_STRUCT(state->tmp);
11377 tevent_req_done(req);
11380 NTSTATUS rpccli_lsa_LookupNames4_recv(struct tevent_req *req,
11381 TALLOC_CTX *mem_ctx,
11382 NTSTATUS *result)
11384 struct rpccli_lsa_LookupNames4_state *state = tevent_req_data(
11385 req, struct rpccli_lsa_LookupNames4_state);
11386 NTSTATUS status;
11388 if (tevent_req_is_nterror(req, &status)) {
11389 tevent_req_received(req);
11390 return status;
11393 /* Steal possbile out parameters to the callers context */
11394 talloc_steal(mem_ctx, state->out_mem_ctx);
11396 /* Return result */
11397 *result = state->orig.out.result;
11399 tevent_req_received(req);
11400 return NT_STATUS_OK;
11403 NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
11404 TALLOC_CTX *mem_ctx,
11405 uint32_t num_names /* [in] [range(0,1000)] */,
11406 struct lsa_String *names /* [in] [size_is(num_names)] */,
11407 struct lsa_RefDomainList **domains /* [out] [ref] */,
11408 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
11409 enum lsa_LookupNamesLevel level /* [in] */,
11410 uint32_t *count /* [in,out] [ref] */,
11411 enum lsa_LookupOptions lookup_options /* [in] */,
11412 enum lsa_ClientRevision client_revision /* [in] */)
11414 struct lsa_LookupNames4 r;
11415 NTSTATUS status;
11417 /* In parameters */
11418 r.in.num_names = num_names;
11419 r.in.names = names;
11420 r.in.sids = sids;
11421 r.in.level = level;
11422 r.in.count = count;
11423 r.in.lookup_options = lookup_options;
11424 r.in.client_revision = client_revision;
11426 status = cli->dispatch(cli,
11427 mem_ctx,
11428 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11429 NDR_LSA_LOOKUPNAMES4,
11430 &r);
11432 if (!NT_STATUS_IS_OK(status)) {
11433 return status;
11436 if (NT_STATUS_IS_ERR(status)) {
11437 return status;
11440 /* Return variables */
11441 *domains = *r.out.domains;
11442 *sids = *r.out.sids;
11443 *count = *r.out.count;
11445 /* Return result */
11446 return r.out.result;
11449 struct rpccli_lsa_LSAROPENPOLICYSCE_state {
11450 struct lsa_LSAROPENPOLICYSCE orig;
11451 struct lsa_LSAROPENPOLICYSCE tmp;
11452 TALLOC_CTX *out_mem_ctx;
11453 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11456 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req *subreq);
11458 struct tevent_req *rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX *mem_ctx,
11459 struct tevent_context *ev,
11460 struct rpc_pipe_client *cli)
11462 struct tevent_req *req;
11463 struct rpccli_lsa_LSAROPENPOLICYSCE_state *state;
11464 struct tevent_req *subreq;
11466 req = tevent_req_create(mem_ctx, &state,
11467 struct rpccli_lsa_LSAROPENPOLICYSCE_state);
11468 if (req == NULL) {
11469 return NULL;
11471 state->out_mem_ctx = NULL;
11472 state->dispatch_recv = cli->dispatch_recv;
11474 /* In parameters */
11476 /* Out parameters */
11478 /* Result */
11479 ZERO_STRUCT(state->orig.out.result);
11481 /* make a temporary copy, that we pass to the dispatch function */
11482 state->tmp = state->orig;
11484 subreq = cli->dispatch_send(state, ev, cli,
11485 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11486 NDR_LSA_LSAROPENPOLICYSCE,
11487 &state->tmp);
11488 if (tevent_req_nomem(subreq, req)) {
11489 return tevent_req_post(req, ev);
11491 tevent_req_set_callback(subreq, rpccli_lsa_LSAROPENPOLICYSCE_done, req);
11492 return req;
11495 static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req *subreq)
11497 struct tevent_req *req = tevent_req_callback_data(
11498 subreq, struct tevent_req);
11499 struct rpccli_lsa_LSAROPENPOLICYSCE_state *state = tevent_req_data(
11500 req, struct rpccli_lsa_LSAROPENPOLICYSCE_state);
11501 NTSTATUS status;
11502 TALLOC_CTX *mem_ctx;
11504 if (state->out_mem_ctx) {
11505 mem_ctx = state->out_mem_ctx;
11506 } else {
11507 mem_ctx = state;
11510 status = state->dispatch_recv(subreq, mem_ctx);
11511 TALLOC_FREE(subreq);
11512 if (!NT_STATUS_IS_OK(status)) {
11513 tevent_req_nterror(req, status);
11514 return;
11517 /* Copy out parameters */
11519 /* Copy result */
11520 state->orig.out.result = state->tmp.out.result;
11522 /* Reset temporary structure */
11523 ZERO_STRUCT(state->tmp);
11525 tevent_req_done(req);
11528 NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE_recv(struct tevent_req *req,
11529 TALLOC_CTX *mem_ctx,
11530 NTSTATUS *result)
11532 struct rpccli_lsa_LSAROPENPOLICYSCE_state *state = tevent_req_data(
11533 req, struct rpccli_lsa_LSAROPENPOLICYSCE_state);
11534 NTSTATUS status;
11536 if (tevent_req_is_nterror(req, &status)) {
11537 tevent_req_received(req);
11538 return status;
11541 /* Steal possbile out parameters to the callers context */
11542 talloc_steal(mem_ctx, state->out_mem_ctx);
11544 /* Return result */
11545 *result = state->orig.out.result;
11547 tevent_req_received(req);
11548 return NT_STATUS_OK;
11551 NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli,
11552 TALLOC_CTX *mem_ctx)
11554 struct lsa_LSAROPENPOLICYSCE r;
11555 NTSTATUS status;
11557 /* In parameters */
11559 status = cli->dispatch(cli,
11560 mem_ctx,
11561 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11562 NDR_LSA_LSAROPENPOLICYSCE,
11563 &r);
11565 if (!NT_STATUS_IS_OK(status)) {
11566 return status;
11569 if (NT_STATUS_IS_ERR(status)) {
11570 return status;
11573 /* Return variables */
11575 /* Return result */
11576 return r.out.result;
11579 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state {
11580 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE orig;
11581 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE tmp;
11582 TALLOC_CTX *out_mem_ctx;
11583 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11586 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq);
11588 struct tevent_req *rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx,
11589 struct tevent_context *ev,
11590 struct rpc_pipe_client *cli)
11592 struct tevent_req *req;
11593 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state;
11594 struct tevent_req *subreq;
11596 req = tevent_req_create(mem_ctx, &state,
11597 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state);
11598 if (req == NULL) {
11599 return NULL;
11601 state->out_mem_ctx = NULL;
11602 state->dispatch_recv = cli->dispatch_recv;
11604 /* In parameters */
11606 /* Out parameters */
11608 /* Result */
11609 ZERO_STRUCT(state->orig.out.result);
11611 /* make a temporary copy, that we pass to the dispatch function */
11612 state->tmp = state->orig;
11614 subreq = cli->dispatch_send(state, ev, cli,
11615 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11616 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE,
11617 &state->tmp);
11618 if (tevent_req_nomem(subreq, req)) {
11619 return tevent_req_post(req, ev);
11621 tevent_req_set_callback(subreq, rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done, req);
11622 return req;
11625 static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq)
11627 struct tevent_req *req = tevent_req_callback_data(
11628 subreq, struct tevent_req);
11629 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data(
11630 req, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state);
11631 NTSTATUS status;
11632 TALLOC_CTX *mem_ctx;
11634 if (state->out_mem_ctx) {
11635 mem_ctx = state->out_mem_ctx;
11636 } else {
11637 mem_ctx = state;
11640 status = state->dispatch_recv(subreq, mem_ctx);
11641 TALLOC_FREE(subreq);
11642 if (!NT_STATUS_IS_OK(status)) {
11643 tevent_req_nterror(req, status);
11644 return;
11647 /* Copy out parameters */
11649 /* Copy result */
11650 state->orig.out.result = state->tmp.out.result;
11652 /* Reset temporary structure */
11653 ZERO_STRUCT(state->tmp);
11655 tevent_req_done(req);
11658 NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req,
11659 TALLOC_CTX *mem_ctx,
11660 NTSTATUS *result)
11662 struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data(
11663 req, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state);
11664 NTSTATUS status;
11666 if (tevent_req_is_nterror(req, &status)) {
11667 tevent_req_received(req);
11668 return status;
11671 /* Steal possbile out parameters to the callers context */
11672 talloc_steal(mem_ctx, state->out_mem_ctx);
11674 /* Return result */
11675 *result = state->orig.out.result;
11677 tevent_req_received(req);
11678 return NT_STATUS_OK;
11681 NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli,
11682 TALLOC_CTX *mem_ctx)
11684 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r;
11685 NTSTATUS status;
11687 /* In parameters */
11689 status = cli->dispatch(cli,
11690 mem_ctx,
11691 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11692 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE,
11693 &r);
11695 if (!NT_STATUS_IS_OK(status)) {
11696 return status;
11699 if (NT_STATUS_IS_ERR(status)) {
11700 return status;
11703 /* Return variables */
11705 /* Return result */
11706 return r.out.result;
11709 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state {
11710 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE orig;
11711 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE tmp;
11712 TALLOC_CTX *out_mem_ctx;
11713 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11716 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq);
11718 struct tevent_req *rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx,
11719 struct tevent_context *ev,
11720 struct rpc_pipe_client *cli)
11722 struct tevent_req *req;
11723 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state;
11724 struct tevent_req *subreq;
11726 req = tevent_req_create(mem_ctx, &state,
11727 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state);
11728 if (req == NULL) {
11729 return NULL;
11731 state->out_mem_ctx = NULL;
11732 state->dispatch_recv = cli->dispatch_recv;
11734 /* In parameters */
11736 /* Out parameters */
11738 /* Result */
11739 ZERO_STRUCT(state->orig.out.result);
11741 /* make a temporary copy, that we pass to the dispatch function */
11742 state->tmp = state->orig;
11744 subreq = cli->dispatch_send(state, ev, cli,
11745 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11746 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE,
11747 &state->tmp);
11748 if (tevent_req_nomem(subreq, req)) {
11749 return tevent_req_post(req, ev);
11751 tevent_req_set_callback(subreq, rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done, req);
11752 return req;
11755 static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq)
11757 struct tevent_req *req = tevent_req_callback_data(
11758 subreq, struct tevent_req);
11759 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data(
11760 req, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state);
11761 NTSTATUS status;
11762 TALLOC_CTX *mem_ctx;
11764 if (state->out_mem_ctx) {
11765 mem_ctx = state->out_mem_ctx;
11766 } else {
11767 mem_ctx = state;
11770 status = state->dispatch_recv(subreq, mem_ctx);
11771 TALLOC_FREE(subreq);
11772 if (!NT_STATUS_IS_OK(status)) {
11773 tevent_req_nterror(req, status);
11774 return;
11777 /* Copy out parameters */
11779 /* Copy result */
11780 state->orig.out.result = state->tmp.out.result;
11782 /* Reset temporary structure */
11783 ZERO_STRUCT(state->tmp);
11785 tevent_req_done(req);
11788 NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req,
11789 TALLOC_CTX *mem_ctx,
11790 NTSTATUS *result)
11792 struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data(
11793 req, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state);
11794 NTSTATUS status;
11796 if (tevent_req_is_nterror(req, &status)) {
11797 tevent_req_received(req);
11798 return status;
11801 /* Steal possbile out parameters to the callers context */
11802 talloc_steal(mem_ctx, state->out_mem_ctx);
11804 /* Return result */
11805 *result = state->orig.out.result;
11807 tevent_req_received(req);
11808 return NT_STATUS_OK;
11811 NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli,
11812 TALLOC_CTX *mem_ctx)
11814 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r;
11815 NTSTATUS status;
11817 /* In parameters */
11819 status = cli->dispatch(cli,
11820 mem_ctx,
11821 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11822 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE,
11823 &r);
11825 if (!NT_STATUS_IS_OK(status)) {
11826 return status;
11829 if (NT_STATUS_IS_ERR(status)) {
11830 return status;
11833 /* Return variables */
11835 /* Return result */
11836 return r.out.result;
11839 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state {
11840 struct lsa_LSARADTREPORTSECURITYEVENT orig;
11841 struct lsa_LSARADTREPORTSECURITYEVENT tmp;
11842 TALLOC_CTX *out_mem_ctx;
11843 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
11846 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req *subreq);
11848 struct tevent_req *rpccli_lsa_LSARADTREPORTSECURITYEVENT_send(TALLOC_CTX *mem_ctx,
11849 struct tevent_context *ev,
11850 struct rpc_pipe_client *cli)
11852 struct tevent_req *req;
11853 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state;
11854 struct tevent_req *subreq;
11856 req = tevent_req_create(mem_ctx, &state,
11857 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state);
11858 if (req == NULL) {
11859 return NULL;
11861 state->out_mem_ctx = NULL;
11862 state->dispatch_recv = cli->dispatch_recv;
11864 /* In parameters */
11866 /* Out parameters */
11868 /* Result */
11869 ZERO_STRUCT(state->orig.out.result);
11871 /* make a temporary copy, that we pass to the dispatch function */
11872 state->tmp = state->orig;
11874 subreq = cli->dispatch_send(state, ev, cli,
11875 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11876 NDR_LSA_LSARADTREPORTSECURITYEVENT,
11877 &state->tmp);
11878 if (tevent_req_nomem(subreq, req)) {
11879 return tevent_req_post(req, ev);
11881 tevent_req_set_callback(subreq, rpccli_lsa_LSARADTREPORTSECURITYEVENT_done, req);
11882 return req;
11885 static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req *subreq)
11887 struct tevent_req *req = tevent_req_callback_data(
11888 subreq, struct tevent_req);
11889 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state = tevent_req_data(
11890 req, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state);
11891 NTSTATUS status;
11892 TALLOC_CTX *mem_ctx;
11894 if (state->out_mem_ctx) {
11895 mem_ctx = state->out_mem_ctx;
11896 } else {
11897 mem_ctx = state;
11900 status = state->dispatch_recv(subreq, mem_ctx);
11901 TALLOC_FREE(subreq);
11902 if (!NT_STATUS_IS_OK(status)) {
11903 tevent_req_nterror(req, status);
11904 return;
11907 /* Copy out parameters */
11909 /* Copy result */
11910 state->orig.out.result = state->tmp.out.result;
11912 /* Reset temporary structure */
11913 ZERO_STRUCT(state->tmp);
11915 tevent_req_done(req);
11918 NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT_recv(struct tevent_req *req,
11919 TALLOC_CTX *mem_ctx,
11920 NTSTATUS *result)
11922 struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state = tevent_req_data(
11923 req, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state);
11924 NTSTATUS status;
11926 if (tevent_req_is_nterror(req, &status)) {
11927 tevent_req_received(req);
11928 return status;
11931 /* Steal possbile out parameters to the callers context */
11932 talloc_steal(mem_ctx, state->out_mem_ctx);
11934 /* Return result */
11935 *result = state->orig.out.result;
11937 tevent_req_received(req);
11938 return NT_STATUS_OK;
11941 NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli,
11942 TALLOC_CTX *mem_ctx)
11944 struct lsa_LSARADTREPORTSECURITYEVENT r;
11945 NTSTATUS status;
11947 /* In parameters */
11949 status = cli->dispatch(cli,
11950 mem_ctx,
11951 NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
11952 NDR_LSA_LSARADTREPORTSECURITYEVENT,
11953 &r);
11955 if (!NT_STATUS_IS_OK(status)) {
11956 return status;
11959 if (NT_STATUS_IS_ERR(status)) {
11960 return status;
11963 /* Return variables */
11965 /* Return result */
11966 return r.out.result;