s3/libsmb: Fix typo in error message.
[Samba/gbeck.git] / librpc / gen_ndr / srv_lsa.c
blobc86d0857f845a59ba0c300d1b0bfd0a14ac55003
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/srv_lsa.h"
9 static bool api_lsa_Close(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
15 DATA_BLOB blob;
16 struct lsa_Close *r;
18 call = &ndr_table_lsarpc.calls[NDR_LSA_CLOSE];
20 r = talloc(talloc_tos(), struct lsa_Close);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(lsa_Close, r);
47 ZERO_STRUCT(r->out);
48 r->out.handle = r->in.handle;
49 r->out.result = _lsa_Close(p, r);
51 if (p->rng_fault_state) {
52 talloc_free(r);
53 /* Return true here, srv_pipe_hnd.c will take care */
54 return true;
57 if (DEBUGLEVEL >= 10) {
58 NDR_PRINT_OUT_DEBUG(lsa_Close, r);
61 push = ndr_push_init_ctx(r, NULL);
62 if (push == NULL) {
63 talloc_free(r);
64 return false;
67 ndr_err = call->ndr_push(push, NDR_OUT, r);
68 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
69 talloc_free(r);
70 return false;
73 blob = ndr_push_blob(push);
74 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
75 talloc_free(r);
76 return false;
79 talloc_free(r);
81 return true;
84 static bool api_lsa_Delete(pipes_struct *p)
86 const struct ndr_interface_call *call;
87 struct ndr_pull *pull;
88 struct ndr_push *push;
89 enum ndr_err_code ndr_err;
90 DATA_BLOB blob;
91 struct lsa_Delete *r;
93 call = &ndr_table_lsarpc.calls[NDR_LSA_DELETE];
95 r = talloc(talloc_tos(), struct lsa_Delete);
96 if (r == NULL) {
97 return false;
100 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
101 talloc_free(r);
102 return false;
105 pull = ndr_pull_init_blob(&blob, r, NULL);
106 if (pull == NULL) {
107 talloc_free(r);
108 return false;
111 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
112 ndr_err = call->ndr_pull(pull, NDR_IN, r);
113 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
114 talloc_free(r);
115 return false;
118 if (DEBUGLEVEL >= 10) {
119 NDR_PRINT_IN_DEBUG(lsa_Delete, r);
122 r->out.result = _lsa_Delete(p, r);
124 if (p->rng_fault_state) {
125 talloc_free(r);
126 /* Return true here, srv_pipe_hnd.c will take care */
127 return true;
130 if (DEBUGLEVEL >= 10) {
131 NDR_PRINT_OUT_DEBUG(lsa_Delete, r);
134 push = ndr_push_init_ctx(r, NULL);
135 if (push == NULL) {
136 talloc_free(r);
137 return false;
140 ndr_err = call->ndr_push(push, NDR_OUT, r);
141 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
142 talloc_free(r);
143 return false;
146 blob = ndr_push_blob(push);
147 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
148 talloc_free(r);
149 return false;
152 talloc_free(r);
154 return true;
157 static bool api_lsa_EnumPrivs(pipes_struct *p)
159 const struct ndr_interface_call *call;
160 struct ndr_pull *pull;
161 struct ndr_push *push;
162 enum ndr_err_code ndr_err;
163 DATA_BLOB blob;
164 struct lsa_EnumPrivs *r;
166 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMPRIVS];
168 r = talloc(talloc_tos(), struct lsa_EnumPrivs);
169 if (r == NULL) {
170 return false;
173 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
174 talloc_free(r);
175 return false;
178 pull = ndr_pull_init_blob(&blob, r, NULL);
179 if (pull == NULL) {
180 talloc_free(r);
181 return false;
184 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
185 ndr_err = call->ndr_pull(pull, NDR_IN, r);
186 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
187 talloc_free(r);
188 return false;
191 if (DEBUGLEVEL >= 10) {
192 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs, r);
195 ZERO_STRUCT(r->out);
196 r->out.resume_handle = r->in.resume_handle;
197 r->out.privs = talloc_zero(r, struct lsa_PrivArray);
198 if (r->out.privs == NULL) {
199 talloc_free(r);
200 return false;
203 r->out.result = _lsa_EnumPrivs(p, r);
205 if (p->rng_fault_state) {
206 talloc_free(r);
207 /* Return true here, srv_pipe_hnd.c will take care */
208 return true;
211 if (DEBUGLEVEL >= 10) {
212 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, r);
215 push = ndr_push_init_ctx(r, NULL);
216 if (push == NULL) {
217 talloc_free(r);
218 return false;
221 ndr_err = call->ndr_push(push, NDR_OUT, r);
222 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
223 talloc_free(r);
224 return false;
227 blob = ndr_push_blob(push);
228 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
229 talloc_free(r);
230 return false;
233 talloc_free(r);
235 return true;
238 static bool api_lsa_QuerySecurity(pipes_struct *p)
240 const struct ndr_interface_call *call;
241 struct ndr_pull *pull;
242 struct ndr_push *push;
243 enum ndr_err_code ndr_err;
244 DATA_BLOB blob;
245 struct lsa_QuerySecurity *r;
247 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYSECURITY];
249 r = talloc(talloc_tos(), struct lsa_QuerySecurity);
250 if (r == NULL) {
251 return false;
254 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
255 talloc_free(r);
256 return false;
259 pull = ndr_pull_init_blob(&blob, r, NULL);
260 if (pull == NULL) {
261 talloc_free(r);
262 return false;
265 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
266 ndr_err = call->ndr_pull(pull, NDR_IN, r);
267 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
268 talloc_free(r);
269 return false;
272 if (DEBUGLEVEL >= 10) {
273 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, r);
276 ZERO_STRUCT(r->out);
277 r->out.sdbuf = talloc_zero(r, struct sec_desc_buf *);
278 if (r->out.sdbuf == NULL) {
279 talloc_free(r);
280 return false;
283 r->out.result = _lsa_QuerySecurity(p, r);
285 if (p->rng_fault_state) {
286 talloc_free(r);
287 /* Return true here, srv_pipe_hnd.c will take care */
288 return true;
291 if (DEBUGLEVEL >= 10) {
292 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, r);
295 push = ndr_push_init_ctx(r, NULL);
296 if (push == NULL) {
297 talloc_free(r);
298 return false;
301 ndr_err = call->ndr_push(push, NDR_OUT, r);
302 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
303 talloc_free(r);
304 return false;
307 blob = ndr_push_blob(push);
308 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
309 talloc_free(r);
310 return false;
313 talloc_free(r);
315 return true;
318 static bool api_lsa_SetSecObj(pipes_struct *p)
320 const struct ndr_interface_call *call;
321 struct ndr_pull *pull;
322 struct ndr_push *push;
323 enum ndr_err_code ndr_err;
324 DATA_BLOB blob;
325 struct lsa_SetSecObj *r;
327 call = &ndr_table_lsarpc.calls[NDR_LSA_SETSECOBJ];
329 r = talloc(talloc_tos(), struct lsa_SetSecObj);
330 if (r == NULL) {
331 return false;
334 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
335 talloc_free(r);
336 return false;
339 pull = ndr_pull_init_blob(&blob, r, NULL);
340 if (pull == NULL) {
341 talloc_free(r);
342 return false;
345 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
346 ndr_err = call->ndr_pull(pull, NDR_IN, r);
347 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
348 talloc_free(r);
349 return false;
352 if (DEBUGLEVEL >= 10) {
353 NDR_PRINT_IN_DEBUG(lsa_SetSecObj, r);
356 r->out.result = _lsa_SetSecObj(p, r);
358 if (p->rng_fault_state) {
359 talloc_free(r);
360 /* Return true here, srv_pipe_hnd.c will take care */
361 return true;
364 if (DEBUGLEVEL >= 10) {
365 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, r);
368 push = ndr_push_init_ctx(r, NULL);
369 if (push == NULL) {
370 talloc_free(r);
371 return false;
374 ndr_err = call->ndr_push(push, NDR_OUT, r);
375 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
376 talloc_free(r);
377 return false;
380 blob = ndr_push_blob(push);
381 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
382 talloc_free(r);
383 return false;
386 talloc_free(r);
388 return true;
391 static bool api_lsa_ChangePassword(pipes_struct *p)
393 const struct ndr_interface_call *call;
394 struct ndr_pull *pull;
395 struct ndr_push *push;
396 enum ndr_err_code ndr_err;
397 DATA_BLOB blob;
398 struct lsa_ChangePassword *r;
400 call = &ndr_table_lsarpc.calls[NDR_LSA_CHANGEPASSWORD];
402 r = talloc(talloc_tos(), struct lsa_ChangePassword);
403 if (r == NULL) {
404 return false;
407 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
408 talloc_free(r);
409 return false;
412 pull = ndr_pull_init_blob(&blob, r, NULL);
413 if (pull == NULL) {
414 talloc_free(r);
415 return false;
418 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
419 ndr_err = call->ndr_pull(pull, NDR_IN, r);
420 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
421 talloc_free(r);
422 return false;
425 if (DEBUGLEVEL >= 10) {
426 NDR_PRINT_IN_DEBUG(lsa_ChangePassword, r);
429 r->out.result = _lsa_ChangePassword(p, r);
431 if (p->rng_fault_state) {
432 talloc_free(r);
433 /* Return true here, srv_pipe_hnd.c will take care */
434 return true;
437 if (DEBUGLEVEL >= 10) {
438 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, r);
441 push = ndr_push_init_ctx(r, NULL);
442 if (push == NULL) {
443 talloc_free(r);
444 return false;
447 ndr_err = call->ndr_push(push, NDR_OUT, r);
448 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
449 talloc_free(r);
450 return false;
453 blob = ndr_push_blob(push);
454 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
455 talloc_free(r);
456 return false;
459 talloc_free(r);
461 return true;
464 static bool api_lsa_OpenPolicy(pipes_struct *p)
466 const struct ndr_interface_call *call;
467 struct ndr_pull *pull;
468 struct ndr_push *push;
469 enum ndr_err_code ndr_err;
470 DATA_BLOB blob;
471 struct lsa_OpenPolicy *r;
473 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENPOLICY];
475 r = talloc(talloc_tos(), struct lsa_OpenPolicy);
476 if (r == NULL) {
477 return false;
480 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
481 talloc_free(r);
482 return false;
485 pull = ndr_pull_init_blob(&blob, r, NULL);
486 if (pull == NULL) {
487 talloc_free(r);
488 return false;
491 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
492 ndr_err = call->ndr_pull(pull, NDR_IN, r);
493 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
494 talloc_free(r);
495 return false;
498 if (DEBUGLEVEL >= 10) {
499 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, r);
502 ZERO_STRUCT(r->out);
503 r->out.handle = talloc_zero(r, struct policy_handle);
504 if (r->out.handle == NULL) {
505 talloc_free(r);
506 return false;
509 r->out.result = _lsa_OpenPolicy(p, r);
511 if (p->rng_fault_state) {
512 talloc_free(r);
513 /* Return true here, srv_pipe_hnd.c will take care */
514 return true;
517 if (DEBUGLEVEL >= 10) {
518 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, r);
521 push = ndr_push_init_ctx(r, NULL);
522 if (push == NULL) {
523 talloc_free(r);
524 return false;
527 ndr_err = call->ndr_push(push, NDR_OUT, r);
528 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
529 talloc_free(r);
530 return false;
533 blob = ndr_push_blob(push);
534 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
535 talloc_free(r);
536 return false;
539 talloc_free(r);
541 return true;
544 static bool api_lsa_QueryInfoPolicy(pipes_struct *p)
546 const struct ndr_interface_call *call;
547 struct ndr_pull *pull;
548 struct ndr_push *push;
549 enum ndr_err_code ndr_err;
550 DATA_BLOB blob;
551 struct lsa_QueryInfoPolicy *r;
553 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYINFOPOLICY];
555 r = talloc(talloc_tos(), struct lsa_QueryInfoPolicy);
556 if (r == NULL) {
557 return false;
560 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
561 talloc_free(r);
562 return false;
565 pull = ndr_pull_init_blob(&blob, r, NULL);
566 if (pull == NULL) {
567 talloc_free(r);
568 return false;
571 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
572 ndr_err = call->ndr_pull(pull, NDR_IN, r);
573 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
574 talloc_free(r);
575 return false;
578 if (DEBUGLEVEL >= 10) {
579 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, r);
582 ZERO_STRUCT(r->out);
583 r->out.info = talloc_zero(r, union lsa_PolicyInformation *);
584 if (r->out.info == NULL) {
585 talloc_free(r);
586 return false;
589 r->out.result = _lsa_QueryInfoPolicy(p, r);
591 if (p->rng_fault_state) {
592 talloc_free(r);
593 /* Return true here, srv_pipe_hnd.c will take care */
594 return true;
597 if (DEBUGLEVEL >= 10) {
598 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, r);
601 push = ndr_push_init_ctx(r, NULL);
602 if (push == NULL) {
603 talloc_free(r);
604 return false;
607 ndr_err = call->ndr_push(push, NDR_OUT, r);
608 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
609 talloc_free(r);
610 return false;
613 blob = ndr_push_blob(push);
614 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
615 talloc_free(r);
616 return false;
619 talloc_free(r);
621 return true;
624 static bool api_lsa_SetInfoPolicy(pipes_struct *p)
626 const struct ndr_interface_call *call;
627 struct ndr_pull *pull;
628 struct ndr_push *push;
629 enum ndr_err_code ndr_err;
630 DATA_BLOB blob;
631 struct lsa_SetInfoPolicy *r;
633 call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFOPOLICY];
635 r = talloc(talloc_tos(), struct lsa_SetInfoPolicy);
636 if (r == NULL) {
637 return false;
640 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
641 talloc_free(r);
642 return false;
645 pull = ndr_pull_init_blob(&blob, r, NULL);
646 if (pull == NULL) {
647 talloc_free(r);
648 return false;
651 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
652 ndr_err = call->ndr_pull(pull, NDR_IN, r);
653 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
654 talloc_free(r);
655 return false;
658 if (DEBUGLEVEL >= 10) {
659 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy, r);
662 r->out.result = _lsa_SetInfoPolicy(p, r);
664 if (p->rng_fault_state) {
665 talloc_free(r);
666 /* Return true here, srv_pipe_hnd.c will take care */
667 return true;
670 if (DEBUGLEVEL >= 10) {
671 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, r);
674 push = ndr_push_init_ctx(r, NULL);
675 if (push == NULL) {
676 talloc_free(r);
677 return false;
680 ndr_err = call->ndr_push(push, NDR_OUT, r);
681 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
682 talloc_free(r);
683 return false;
686 blob = ndr_push_blob(push);
687 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
688 talloc_free(r);
689 return false;
692 talloc_free(r);
694 return true;
697 static bool api_lsa_ClearAuditLog(pipes_struct *p)
699 const struct ndr_interface_call *call;
700 struct ndr_pull *pull;
701 struct ndr_push *push;
702 enum ndr_err_code ndr_err;
703 DATA_BLOB blob;
704 struct lsa_ClearAuditLog *r;
706 call = &ndr_table_lsarpc.calls[NDR_LSA_CLEARAUDITLOG];
708 r = talloc(talloc_tos(), struct lsa_ClearAuditLog);
709 if (r == NULL) {
710 return false;
713 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
714 talloc_free(r);
715 return false;
718 pull = ndr_pull_init_blob(&blob, r, NULL);
719 if (pull == NULL) {
720 talloc_free(r);
721 return false;
724 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
725 ndr_err = call->ndr_pull(pull, NDR_IN, r);
726 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
727 talloc_free(r);
728 return false;
731 if (DEBUGLEVEL >= 10) {
732 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog, r);
735 r->out.result = _lsa_ClearAuditLog(p, r);
737 if (p->rng_fault_state) {
738 talloc_free(r);
739 /* Return true here, srv_pipe_hnd.c will take care */
740 return true;
743 if (DEBUGLEVEL >= 10) {
744 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, r);
747 push = ndr_push_init_ctx(r, NULL);
748 if (push == NULL) {
749 talloc_free(r);
750 return false;
753 ndr_err = call->ndr_push(push, NDR_OUT, r);
754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
755 talloc_free(r);
756 return false;
759 blob = ndr_push_blob(push);
760 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
761 talloc_free(r);
762 return false;
765 talloc_free(r);
767 return true;
770 static bool api_lsa_CreateAccount(pipes_struct *p)
772 const struct ndr_interface_call *call;
773 struct ndr_pull *pull;
774 struct ndr_push *push;
775 enum ndr_err_code ndr_err;
776 DATA_BLOB blob;
777 struct lsa_CreateAccount *r;
779 call = &ndr_table_lsarpc.calls[NDR_LSA_CREATEACCOUNT];
781 r = talloc(talloc_tos(), struct lsa_CreateAccount);
782 if (r == NULL) {
783 return false;
786 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
787 talloc_free(r);
788 return false;
791 pull = ndr_pull_init_blob(&blob, r, NULL);
792 if (pull == NULL) {
793 talloc_free(r);
794 return false;
797 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
798 ndr_err = call->ndr_pull(pull, NDR_IN, r);
799 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
800 talloc_free(r);
801 return false;
804 if (DEBUGLEVEL >= 10) {
805 NDR_PRINT_IN_DEBUG(lsa_CreateAccount, r);
808 ZERO_STRUCT(r->out);
809 r->out.acct_handle = talloc_zero(r, struct policy_handle);
810 if (r->out.acct_handle == NULL) {
811 talloc_free(r);
812 return false;
815 r->out.result = _lsa_CreateAccount(p, r);
817 if (p->rng_fault_state) {
818 talloc_free(r);
819 /* Return true here, srv_pipe_hnd.c will take care */
820 return true;
823 if (DEBUGLEVEL >= 10) {
824 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, r);
827 push = ndr_push_init_ctx(r, NULL);
828 if (push == NULL) {
829 talloc_free(r);
830 return false;
833 ndr_err = call->ndr_push(push, NDR_OUT, r);
834 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
835 talloc_free(r);
836 return false;
839 blob = ndr_push_blob(push);
840 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
841 talloc_free(r);
842 return false;
845 talloc_free(r);
847 return true;
850 static bool api_lsa_EnumAccounts(pipes_struct *p)
852 const struct ndr_interface_call *call;
853 struct ndr_pull *pull;
854 struct ndr_push *push;
855 enum ndr_err_code ndr_err;
856 DATA_BLOB blob;
857 struct lsa_EnumAccounts *r;
859 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTS];
861 r = talloc(talloc_tos(), struct lsa_EnumAccounts);
862 if (r == NULL) {
863 return false;
866 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
867 talloc_free(r);
868 return false;
871 pull = ndr_pull_init_blob(&blob, r, NULL);
872 if (pull == NULL) {
873 talloc_free(r);
874 return false;
877 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
878 ndr_err = call->ndr_pull(pull, NDR_IN, r);
879 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
880 talloc_free(r);
881 return false;
884 if (DEBUGLEVEL >= 10) {
885 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts, r);
888 ZERO_STRUCT(r->out);
889 r->out.resume_handle = r->in.resume_handle;
890 r->out.sids = talloc_zero(r, struct lsa_SidArray);
891 if (r->out.sids == NULL) {
892 talloc_free(r);
893 return false;
896 r->out.result = _lsa_EnumAccounts(p, r);
898 if (p->rng_fault_state) {
899 talloc_free(r);
900 /* Return true here, srv_pipe_hnd.c will take care */
901 return true;
904 if (DEBUGLEVEL >= 10) {
905 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, r);
908 push = ndr_push_init_ctx(r, NULL);
909 if (push == NULL) {
910 talloc_free(r);
911 return false;
914 ndr_err = call->ndr_push(push, NDR_OUT, r);
915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
916 talloc_free(r);
917 return false;
920 blob = ndr_push_blob(push);
921 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
922 talloc_free(r);
923 return false;
926 talloc_free(r);
928 return true;
931 static bool api_lsa_CreateTrustedDomain(pipes_struct *p)
933 const struct ndr_interface_call *call;
934 struct ndr_pull *pull;
935 struct ndr_push *push;
936 enum ndr_err_code ndr_err;
937 DATA_BLOB blob;
938 struct lsa_CreateTrustedDomain *r;
940 call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAIN];
942 r = talloc(talloc_tos(), struct lsa_CreateTrustedDomain);
943 if (r == NULL) {
944 return false;
947 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
948 talloc_free(r);
949 return false;
952 pull = ndr_pull_init_blob(&blob, r, NULL);
953 if (pull == NULL) {
954 talloc_free(r);
955 return false;
958 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
959 ndr_err = call->ndr_pull(pull, NDR_IN, r);
960 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
961 talloc_free(r);
962 return false;
965 if (DEBUGLEVEL >= 10) {
966 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, r);
969 ZERO_STRUCT(r->out);
970 r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
971 if (r->out.trustdom_handle == NULL) {
972 talloc_free(r);
973 return false;
976 r->out.result = _lsa_CreateTrustedDomain(p, r);
978 if (p->rng_fault_state) {
979 talloc_free(r);
980 /* Return true here, srv_pipe_hnd.c will take care */
981 return true;
984 if (DEBUGLEVEL >= 10) {
985 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, r);
988 push = ndr_push_init_ctx(r, NULL);
989 if (push == NULL) {
990 talloc_free(r);
991 return false;
994 ndr_err = call->ndr_push(push, NDR_OUT, r);
995 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
996 talloc_free(r);
997 return false;
1000 blob = ndr_push_blob(push);
1001 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1002 talloc_free(r);
1003 return false;
1006 talloc_free(r);
1008 return true;
1011 static bool api_lsa_EnumTrustDom(pipes_struct *p)
1013 const struct ndr_interface_call *call;
1014 struct ndr_pull *pull;
1015 struct ndr_push *push;
1016 enum ndr_err_code ndr_err;
1017 DATA_BLOB blob;
1018 struct lsa_EnumTrustDom *r;
1020 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMTRUSTDOM];
1022 r = talloc(talloc_tos(), struct lsa_EnumTrustDom);
1023 if (r == NULL) {
1024 return false;
1027 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1028 talloc_free(r);
1029 return false;
1032 pull = ndr_pull_init_blob(&blob, r, NULL);
1033 if (pull == NULL) {
1034 talloc_free(r);
1035 return false;
1038 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1039 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1040 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1041 talloc_free(r);
1042 return false;
1045 if (DEBUGLEVEL >= 10) {
1046 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom, r);
1049 ZERO_STRUCT(r->out);
1050 r->out.resume_handle = r->in.resume_handle;
1051 r->out.domains = talloc_zero(r, struct lsa_DomainList);
1052 if (r->out.domains == NULL) {
1053 talloc_free(r);
1054 return false;
1057 r->out.result = _lsa_EnumTrustDom(p, r);
1059 if (p->rng_fault_state) {
1060 talloc_free(r);
1061 /* Return true here, srv_pipe_hnd.c will take care */
1062 return true;
1065 if (DEBUGLEVEL >= 10) {
1066 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, r);
1069 push = ndr_push_init_ctx(r, NULL);
1070 if (push == NULL) {
1071 talloc_free(r);
1072 return false;
1075 ndr_err = call->ndr_push(push, NDR_OUT, r);
1076 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1077 talloc_free(r);
1078 return false;
1081 blob = ndr_push_blob(push);
1082 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1083 talloc_free(r);
1084 return false;
1087 talloc_free(r);
1089 return true;
1092 static bool api_lsa_LookupNames(pipes_struct *p)
1094 const struct ndr_interface_call *call;
1095 struct ndr_pull *pull;
1096 struct ndr_push *push;
1097 enum ndr_err_code ndr_err;
1098 DATA_BLOB blob;
1099 struct lsa_LookupNames *r;
1101 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES];
1103 r = talloc(talloc_tos(), struct lsa_LookupNames);
1104 if (r == NULL) {
1105 return false;
1108 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1109 talloc_free(r);
1110 return false;
1113 pull = ndr_pull_init_blob(&blob, r, NULL);
1114 if (pull == NULL) {
1115 talloc_free(r);
1116 return false;
1119 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1120 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1121 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1122 talloc_free(r);
1123 return false;
1126 if (DEBUGLEVEL >= 10) {
1127 NDR_PRINT_IN_DEBUG(lsa_LookupNames, r);
1130 ZERO_STRUCT(r->out);
1131 r->out.sids = r->in.sids;
1132 r->out.count = r->in.count;
1133 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
1134 if (r->out.domains == NULL) {
1135 talloc_free(r);
1136 return false;
1139 r->out.result = _lsa_LookupNames(p, r);
1141 if (p->rng_fault_state) {
1142 talloc_free(r);
1143 /* Return true here, srv_pipe_hnd.c will take care */
1144 return true;
1147 if (DEBUGLEVEL >= 10) {
1148 NDR_PRINT_OUT_DEBUG(lsa_LookupNames, r);
1151 push = ndr_push_init_ctx(r, NULL);
1152 if (push == NULL) {
1153 talloc_free(r);
1154 return false;
1157 ndr_err = call->ndr_push(push, NDR_OUT, r);
1158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1159 talloc_free(r);
1160 return false;
1163 blob = ndr_push_blob(push);
1164 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1165 talloc_free(r);
1166 return false;
1169 talloc_free(r);
1171 return true;
1174 static bool api_lsa_LookupSids(pipes_struct *p)
1176 const struct ndr_interface_call *call;
1177 struct ndr_pull *pull;
1178 struct ndr_push *push;
1179 enum ndr_err_code ndr_err;
1180 DATA_BLOB blob;
1181 struct lsa_LookupSids *r;
1183 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS];
1185 r = talloc(talloc_tos(), struct lsa_LookupSids);
1186 if (r == NULL) {
1187 return false;
1190 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1191 talloc_free(r);
1192 return false;
1195 pull = ndr_pull_init_blob(&blob, r, NULL);
1196 if (pull == NULL) {
1197 talloc_free(r);
1198 return false;
1201 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1202 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1204 talloc_free(r);
1205 return false;
1208 if (DEBUGLEVEL >= 10) {
1209 NDR_PRINT_IN_DEBUG(lsa_LookupSids, r);
1212 ZERO_STRUCT(r->out);
1213 r->out.names = r->in.names;
1214 r->out.count = r->in.count;
1215 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
1216 if (r->out.domains == NULL) {
1217 talloc_free(r);
1218 return false;
1221 r->out.result = _lsa_LookupSids(p, r);
1223 if (p->rng_fault_state) {
1224 talloc_free(r);
1225 /* Return true here, srv_pipe_hnd.c will take care */
1226 return true;
1229 if (DEBUGLEVEL >= 10) {
1230 NDR_PRINT_OUT_DEBUG(lsa_LookupSids, r);
1233 push = ndr_push_init_ctx(r, NULL);
1234 if (push == NULL) {
1235 talloc_free(r);
1236 return false;
1239 ndr_err = call->ndr_push(push, NDR_OUT, r);
1240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1241 talloc_free(r);
1242 return false;
1245 blob = ndr_push_blob(push);
1246 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1247 talloc_free(r);
1248 return false;
1251 talloc_free(r);
1253 return true;
1256 static bool api_lsa_CreateSecret(pipes_struct *p)
1258 const struct ndr_interface_call *call;
1259 struct ndr_pull *pull;
1260 struct ndr_push *push;
1261 enum ndr_err_code ndr_err;
1262 DATA_BLOB blob;
1263 struct lsa_CreateSecret *r;
1265 call = &ndr_table_lsarpc.calls[NDR_LSA_CREATESECRET];
1267 r = talloc(talloc_tos(), struct lsa_CreateSecret);
1268 if (r == NULL) {
1269 return false;
1272 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1273 talloc_free(r);
1274 return false;
1277 pull = ndr_pull_init_blob(&blob, r, NULL);
1278 if (pull == NULL) {
1279 talloc_free(r);
1280 return false;
1283 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1284 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1286 talloc_free(r);
1287 return false;
1290 if (DEBUGLEVEL >= 10) {
1291 NDR_PRINT_IN_DEBUG(lsa_CreateSecret, r);
1294 ZERO_STRUCT(r->out);
1295 r->out.sec_handle = talloc_zero(r, struct policy_handle);
1296 if (r->out.sec_handle == NULL) {
1297 talloc_free(r);
1298 return false;
1301 r->out.result = _lsa_CreateSecret(p, r);
1303 if (p->rng_fault_state) {
1304 talloc_free(r);
1305 /* Return true here, srv_pipe_hnd.c will take care */
1306 return true;
1309 if (DEBUGLEVEL >= 10) {
1310 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, r);
1313 push = ndr_push_init_ctx(r, NULL);
1314 if (push == NULL) {
1315 talloc_free(r);
1316 return false;
1319 ndr_err = call->ndr_push(push, NDR_OUT, r);
1320 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1321 talloc_free(r);
1322 return false;
1325 blob = ndr_push_blob(push);
1326 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1327 talloc_free(r);
1328 return false;
1331 talloc_free(r);
1333 return true;
1336 static bool api_lsa_OpenAccount(pipes_struct *p)
1338 const struct ndr_interface_call *call;
1339 struct ndr_pull *pull;
1340 struct ndr_push *push;
1341 enum ndr_err_code ndr_err;
1342 DATA_BLOB blob;
1343 struct lsa_OpenAccount *r;
1345 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENACCOUNT];
1347 r = talloc(talloc_tos(), struct lsa_OpenAccount);
1348 if (r == NULL) {
1349 return false;
1352 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1353 talloc_free(r);
1354 return false;
1357 pull = ndr_pull_init_blob(&blob, r, NULL);
1358 if (pull == NULL) {
1359 talloc_free(r);
1360 return false;
1363 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1364 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1366 talloc_free(r);
1367 return false;
1370 if (DEBUGLEVEL >= 10) {
1371 NDR_PRINT_IN_DEBUG(lsa_OpenAccount, r);
1374 ZERO_STRUCT(r->out);
1375 r->out.acct_handle = talloc_zero(r, struct policy_handle);
1376 if (r->out.acct_handle == NULL) {
1377 talloc_free(r);
1378 return false;
1381 r->out.result = _lsa_OpenAccount(p, r);
1383 if (p->rng_fault_state) {
1384 talloc_free(r);
1385 /* Return true here, srv_pipe_hnd.c will take care */
1386 return true;
1389 if (DEBUGLEVEL >= 10) {
1390 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, r);
1393 push = ndr_push_init_ctx(r, NULL);
1394 if (push == NULL) {
1395 talloc_free(r);
1396 return false;
1399 ndr_err = call->ndr_push(push, NDR_OUT, r);
1400 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1401 talloc_free(r);
1402 return false;
1405 blob = ndr_push_blob(push);
1406 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1407 talloc_free(r);
1408 return false;
1411 talloc_free(r);
1413 return true;
1416 static bool api_lsa_EnumPrivsAccount(pipes_struct *p)
1418 const struct ndr_interface_call *call;
1419 struct ndr_pull *pull;
1420 struct ndr_push *push;
1421 enum ndr_err_code ndr_err;
1422 DATA_BLOB blob;
1423 struct lsa_EnumPrivsAccount *r;
1425 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMPRIVSACCOUNT];
1427 r = talloc(talloc_tos(), struct lsa_EnumPrivsAccount);
1428 if (r == NULL) {
1429 return false;
1432 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1433 talloc_free(r);
1434 return false;
1437 pull = ndr_pull_init_blob(&blob, r, NULL);
1438 if (pull == NULL) {
1439 talloc_free(r);
1440 return false;
1443 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1444 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1445 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1446 talloc_free(r);
1447 return false;
1450 if (DEBUGLEVEL >= 10) {
1451 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, r);
1454 ZERO_STRUCT(r->out);
1455 r->out.privs = talloc_zero(r, struct lsa_PrivilegeSet *);
1456 if (r->out.privs == NULL) {
1457 talloc_free(r);
1458 return false;
1461 r->out.result = _lsa_EnumPrivsAccount(p, r);
1463 if (p->rng_fault_state) {
1464 talloc_free(r);
1465 /* Return true here, srv_pipe_hnd.c will take care */
1466 return true;
1469 if (DEBUGLEVEL >= 10) {
1470 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, r);
1473 push = ndr_push_init_ctx(r, NULL);
1474 if (push == NULL) {
1475 talloc_free(r);
1476 return false;
1479 ndr_err = call->ndr_push(push, NDR_OUT, r);
1480 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1481 talloc_free(r);
1482 return false;
1485 blob = ndr_push_blob(push);
1486 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1487 talloc_free(r);
1488 return false;
1491 talloc_free(r);
1493 return true;
1496 static bool api_lsa_AddPrivilegesToAccount(pipes_struct *p)
1498 const struct ndr_interface_call *call;
1499 struct ndr_pull *pull;
1500 struct ndr_push *push;
1501 enum ndr_err_code ndr_err;
1502 DATA_BLOB blob;
1503 struct lsa_AddPrivilegesToAccount *r;
1505 call = &ndr_table_lsarpc.calls[NDR_LSA_ADDPRIVILEGESTOACCOUNT];
1507 r = talloc(talloc_tos(), struct lsa_AddPrivilegesToAccount);
1508 if (r == NULL) {
1509 return false;
1512 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1513 talloc_free(r);
1514 return false;
1517 pull = ndr_pull_init_blob(&blob, r, NULL);
1518 if (pull == NULL) {
1519 talloc_free(r);
1520 return false;
1523 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1524 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1525 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1526 talloc_free(r);
1527 return false;
1530 if (DEBUGLEVEL >= 10) {
1531 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount, r);
1534 r->out.result = _lsa_AddPrivilegesToAccount(p, r);
1536 if (p->rng_fault_state) {
1537 talloc_free(r);
1538 /* Return true here, srv_pipe_hnd.c will take care */
1539 return true;
1542 if (DEBUGLEVEL >= 10) {
1543 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, r);
1546 push = ndr_push_init_ctx(r, NULL);
1547 if (push == NULL) {
1548 talloc_free(r);
1549 return false;
1552 ndr_err = call->ndr_push(push, NDR_OUT, r);
1553 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1554 talloc_free(r);
1555 return false;
1558 blob = ndr_push_blob(push);
1559 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1560 talloc_free(r);
1561 return false;
1564 talloc_free(r);
1566 return true;
1569 static bool api_lsa_RemovePrivilegesFromAccount(pipes_struct *p)
1571 const struct ndr_interface_call *call;
1572 struct ndr_pull *pull;
1573 struct ndr_push *push;
1574 enum ndr_err_code ndr_err;
1575 DATA_BLOB blob;
1576 struct lsa_RemovePrivilegesFromAccount *r;
1578 call = &ndr_table_lsarpc.calls[NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT];
1580 r = talloc(talloc_tos(), struct lsa_RemovePrivilegesFromAccount);
1581 if (r == NULL) {
1582 return false;
1585 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1586 talloc_free(r);
1587 return false;
1590 pull = ndr_pull_init_blob(&blob, r, NULL);
1591 if (pull == NULL) {
1592 talloc_free(r);
1593 return false;
1596 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1597 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1598 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1599 talloc_free(r);
1600 return false;
1603 if (DEBUGLEVEL >= 10) {
1604 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount, r);
1607 r->out.result = _lsa_RemovePrivilegesFromAccount(p, r);
1609 if (p->rng_fault_state) {
1610 talloc_free(r);
1611 /* Return true here, srv_pipe_hnd.c will take care */
1612 return true;
1615 if (DEBUGLEVEL >= 10) {
1616 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, r);
1619 push = ndr_push_init_ctx(r, NULL);
1620 if (push == NULL) {
1621 talloc_free(r);
1622 return false;
1625 ndr_err = call->ndr_push(push, NDR_OUT, r);
1626 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1627 talloc_free(r);
1628 return false;
1631 blob = ndr_push_blob(push);
1632 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1633 talloc_free(r);
1634 return false;
1637 talloc_free(r);
1639 return true;
1642 static bool api_lsa_GetQuotasForAccount(pipes_struct *p)
1644 const struct ndr_interface_call *call;
1645 struct ndr_pull *pull;
1646 struct ndr_push *push;
1647 enum ndr_err_code ndr_err;
1648 DATA_BLOB blob;
1649 struct lsa_GetQuotasForAccount *r;
1651 call = &ndr_table_lsarpc.calls[NDR_LSA_GETQUOTASFORACCOUNT];
1653 r = talloc(talloc_tos(), struct lsa_GetQuotasForAccount);
1654 if (r == NULL) {
1655 return false;
1658 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1659 talloc_free(r);
1660 return false;
1663 pull = ndr_pull_init_blob(&blob, r, NULL);
1664 if (pull == NULL) {
1665 talloc_free(r);
1666 return false;
1669 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1670 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1671 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1672 talloc_free(r);
1673 return false;
1676 if (DEBUGLEVEL >= 10) {
1677 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount, r);
1680 r->out.result = _lsa_GetQuotasForAccount(p, r);
1682 if (p->rng_fault_state) {
1683 talloc_free(r);
1684 /* Return true here, srv_pipe_hnd.c will take care */
1685 return true;
1688 if (DEBUGLEVEL >= 10) {
1689 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, r);
1692 push = ndr_push_init_ctx(r, NULL);
1693 if (push == NULL) {
1694 talloc_free(r);
1695 return false;
1698 ndr_err = call->ndr_push(push, NDR_OUT, r);
1699 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1700 talloc_free(r);
1701 return false;
1704 blob = ndr_push_blob(push);
1705 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1706 talloc_free(r);
1707 return false;
1710 talloc_free(r);
1712 return true;
1715 static bool api_lsa_SetQuotasForAccount(pipes_struct *p)
1717 const struct ndr_interface_call *call;
1718 struct ndr_pull *pull;
1719 struct ndr_push *push;
1720 enum ndr_err_code ndr_err;
1721 DATA_BLOB blob;
1722 struct lsa_SetQuotasForAccount *r;
1724 call = &ndr_table_lsarpc.calls[NDR_LSA_SETQUOTASFORACCOUNT];
1726 r = talloc(talloc_tos(), struct lsa_SetQuotasForAccount);
1727 if (r == NULL) {
1728 return false;
1731 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1732 talloc_free(r);
1733 return false;
1736 pull = ndr_pull_init_blob(&blob, r, NULL);
1737 if (pull == NULL) {
1738 talloc_free(r);
1739 return false;
1742 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1743 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1744 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1745 talloc_free(r);
1746 return false;
1749 if (DEBUGLEVEL >= 10) {
1750 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount, r);
1753 r->out.result = _lsa_SetQuotasForAccount(p, r);
1755 if (p->rng_fault_state) {
1756 talloc_free(r);
1757 /* Return true here, srv_pipe_hnd.c will take care */
1758 return true;
1761 if (DEBUGLEVEL >= 10) {
1762 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, r);
1765 push = ndr_push_init_ctx(r, NULL);
1766 if (push == NULL) {
1767 talloc_free(r);
1768 return false;
1771 ndr_err = call->ndr_push(push, NDR_OUT, r);
1772 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1773 talloc_free(r);
1774 return false;
1777 blob = ndr_push_blob(push);
1778 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1779 talloc_free(r);
1780 return false;
1783 talloc_free(r);
1785 return true;
1788 static bool api_lsa_GetSystemAccessAccount(pipes_struct *p)
1790 const struct ndr_interface_call *call;
1791 struct ndr_pull *pull;
1792 struct ndr_push *push;
1793 enum ndr_err_code ndr_err;
1794 DATA_BLOB blob;
1795 struct lsa_GetSystemAccessAccount *r;
1797 call = &ndr_table_lsarpc.calls[NDR_LSA_GETSYSTEMACCESSACCOUNT];
1799 r = talloc(talloc_tos(), struct lsa_GetSystemAccessAccount);
1800 if (r == NULL) {
1801 return false;
1804 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1805 talloc_free(r);
1806 return false;
1809 pull = ndr_pull_init_blob(&blob, r, NULL);
1810 if (pull == NULL) {
1811 talloc_free(r);
1812 return false;
1815 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1816 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1817 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1818 talloc_free(r);
1819 return false;
1822 if (DEBUGLEVEL >= 10) {
1823 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, r);
1826 ZERO_STRUCT(r->out);
1827 r->out.access_mask = talloc_zero(r, uint32_t);
1828 if (r->out.access_mask == NULL) {
1829 talloc_free(r);
1830 return false;
1833 r->out.result = _lsa_GetSystemAccessAccount(p, r);
1835 if (p->rng_fault_state) {
1836 talloc_free(r);
1837 /* Return true here, srv_pipe_hnd.c will take care */
1838 return true;
1841 if (DEBUGLEVEL >= 10) {
1842 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, r);
1845 push = ndr_push_init_ctx(r, NULL);
1846 if (push == NULL) {
1847 talloc_free(r);
1848 return false;
1851 ndr_err = call->ndr_push(push, NDR_OUT, r);
1852 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1853 talloc_free(r);
1854 return false;
1857 blob = ndr_push_blob(push);
1858 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1859 talloc_free(r);
1860 return false;
1863 talloc_free(r);
1865 return true;
1868 static bool api_lsa_SetSystemAccessAccount(pipes_struct *p)
1870 const struct ndr_interface_call *call;
1871 struct ndr_pull *pull;
1872 struct ndr_push *push;
1873 enum ndr_err_code ndr_err;
1874 DATA_BLOB blob;
1875 struct lsa_SetSystemAccessAccount *r;
1877 call = &ndr_table_lsarpc.calls[NDR_LSA_SETSYSTEMACCESSACCOUNT];
1879 r = talloc(talloc_tos(), struct lsa_SetSystemAccessAccount);
1880 if (r == NULL) {
1881 return false;
1884 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1885 talloc_free(r);
1886 return false;
1889 pull = ndr_pull_init_blob(&blob, r, NULL);
1890 if (pull == NULL) {
1891 talloc_free(r);
1892 return false;
1895 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1896 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1897 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1898 talloc_free(r);
1899 return false;
1902 if (DEBUGLEVEL >= 10) {
1903 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, r);
1906 r->out.result = _lsa_SetSystemAccessAccount(p, r);
1908 if (p->rng_fault_state) {
1909 talloc_free(r);
1910 /* Return true here, srv_pipe_hnd.c will take care */
1911 return true;
1914 if (DEBUGLEVEL >= 10) {
1915 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, r);
1918 push = ndr_push_init_ctx(r, NULL);
1919 if (push == NULL) {
1920 talloc_free(r);
1921 return false;
1924 ndr_err = call->ndr_push(push, NDR_OUT, r);
1925 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1926 talloc_free(r);
1927 return false;
1930 blob = ndr_push_blob(push);
1931 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1932 talloc_free(r);
1933 return false;
1936 talloc_free(r);
1938 return true;
1941 static bool api_lsa_OpenTrustedDomain(pipes_struct *p)
1943 const struct ndr_interface_call *call;
1944 struct ndr_pull *pull;
1945 struct ndr_push *push;
1946 enum ndr_err_code ndr_err;
1947 DATA_BLOB blob;
1948 struct lsa_OpenTrustedDomain *r;
1950 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENTRUSTEDDOMAIN];
1952 r = talloc(talloc_tos(), struct lsa_OpenTrustedDomain);
1953 if (r == NULL) {
1954 return false;
1957 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1958 talloc_free(r);
1959 return false;
1962 pull = ndr_pull_init_blob(&blob, r, NULL);
1963 if (pull == NULL) {
1964 talloc_free(r);
1965 return false;
1968 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1969 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1971 talloc_free(r);
1972 return false;
1975 if (DEBUGLEVEL >= 10) {
1976 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, r);
1979 ZERO_STRUCT(r->out);
1980 r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
1981 if (r->out.trustdom_handle == NULL) {
1982 talloc_free(r);
1983 return false;
1986 r->out.result = _lsa_OpenTrustedDomain(p, r);
1988 if (p->rng_fault_state) {
1989 talloc_free(r);
1990 /* Return true here, srv_pipe_hnd.c will take care */
1991 return true;
1994 if (DEBUGLEVEL >= 10) {
1995 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, r);
1998 push = ndr_push_init_ctx(r, NULL);
1999 if (push == NULL) {
2000 talloc_free(r);
2001 return false;
2004 ndr_err = call->ndr_push(push, NDR_OUT, r);
2005 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2006 talloc_free(r);
2007 return false;
2010 blob = ndr_push_blob(push);
2011 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2012 talloc_free(r);
2013 return false;
2016 talloc_free(r);
2018 return true;
2021 static bool api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
2023 const struct ndr_interface_call *call;
2024 struct ndr_pull *pull;
2025 struct ndr_push *push;
2026 enum ndr_err_code ndr_err;
2027 DATA_BLOB blob;
2028 struct lsa_QueryTrustedDomainInfo *r;
2030 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFO];
2032 r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfo);
2033 if (r == NULL) {
2034 return false;
2037 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2038 talloc_free(r);
2039 return false;
2042 pull = ndr_pull_init_blob(&blob, r, NULL);
2043 if (pull == NULL) {
2044 talloc_free(r);
2045 return false;
2048 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2049 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2050 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2051 talloc_free(r);
2052 return false;
2055 if (DEBUGLEVEL >= 10) {
2056 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, r);
2059 ZERO_STRUCT(r->out);
2060 r->out.info = talloc_zero(r, union lsa_TrustedDomainInfo *);
2061 if (r->out.info == NULL) {
2062 talloc_free(r);
2063 return false;
2066 r->out.result = _lsa_QueryTrustedDomainInfo(p, r);
2068 if (p->rng_fault_state) {
2069 talloc_free(r);
2070 /* Return true here, srv_pipe_hnd.c will take care */
2071 return true;
2074 if (DEBUGLEVEL >= 10) {
2075 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, r);
2078 push = ndr_push_init_ctx(r, NULL);
2079 if (push == NULL) {
2080 talloc_free(r);
2081 return false;
2084 ndr_err = call->ndr_push(push, NDR_OUT, r);
2085 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2086 talloc_free(r);
2087 return false;
2090 blob = ndr_push_blob(push);
2091 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2092 talloc_free(r);
2093 return false;
2096 talloc_free(r);
2098 return true;
2101 static bool api_lsa_SetInformationTrustedDomain(pipes_struct *p)
2103 const struct ndr_interface_call *call;
2104 struct ndr_pull *pull;
2105 struct ndr_push *push;
2106 enum ndr_err_code ndr_err;
2107 DATA_BLOB blob;
2108 struct lsa_SetInformationTrustedDomain *r;
2110 call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN];
2112 r = talloc(talloc_tos(), struct lsa_SetInformationTrustedDomain);
2113 if (r == NULL) {
2114 return false;
2117 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2118 talloc_free(r);
2119 return false;
2122 pull = ndr_pull_init_blob(&blob, r, NULL);
2123 if (pull == NULL) {
2124 talloc_free(r);
2125 return false;
2128 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2129 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2130 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2131 talloc_free(r);
2132 return false;
2135 if (DEBUGLEVEL >= 10) {
2136 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, r);
2139 r->out.result = _lsa_SetInformationTrustedDomain(p, r);
2141 if (p->rng_fault_state) {
2142 talloc_free(r);
2143 /* Return true here, srv_pipe_hnd.c will take care */
2144 return true;
2147 if (DEBUGLEVEL >= 10) {
2148 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, r);
2151 push = ndr_push_init_ctx(r, NULL);
2152 if (push == NULL) {
2153 talloc_free(r);
2154 return false;
2157 ndr_err = call->ndr_push(push, NDR_OUT, r);
2158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2159 talloc_free(r);
2160 return false;
2163 blob = ndr_push_blob(push);
2164 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2165 talloc_free(r);
2166 return false;
2169 talloc_free(r);
2171 return true;
2174 static bool api_lsa_OpenSecret(pipes_struct *p)
2176 const struct ndr_interface_call *call;
2177 struct ndr_pull *pull;
2178 struct ndr_push *push;
2179 enum ndr_err_code ndr_err;
2180 DATA_BLOB blob;
2181 struct lsa_OpenSecret *r;
2183 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENSECRET];
2185 r = talloc(talloc_tos(), struct lsa_OpenSecret);
2186 if (r == NULL) {
2187 return false;
2190 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2191 talloc_free(r);
2192 return false;
2195 pull = ndr_pull_init_blob(&blob, r, NULL);
2196 if (pull == NULL) {
2197 talloc_free(r);
2198 return false;
2201 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2202 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2204 talloc_free(r);
2205 return false;
2208 if (DEBUGLEVEL >= 10) {
2209 NDR_PRINT_IN_DEBUG(lsa_OpenSecret, r);
2212 ZERO_STRUCT(r->out);
2213 r->out.sec_handle = talloc_zero(r, struct policy_handle);
2214 if (r->out.sec_handle == NULL) {
2215 talloc_free(r);
2216 return false;
2219 r->out.result = _lsa_OpenSecret(p, r);
2221 if (p->rng_fault_state) {
2222 talloc_free(r);
2223 /* Return true here, srv_pipe_hnd.c will take care */
2224 return true;
2227 if (DEBUGLEVEL >= 10) {
2228 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, r);
2231 push = ndr_push_init_ctx(r, NULL);
2232 if (push == NULL) {
2233 talloc_free(r);
2234 return false;
2237 ndr_err = call->ndr_push(push, NDR_OUT, r);
2238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2239 talloc_free(r);
2240 return false;
2243 blob = ndr_push_blob(push);
2244 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2245 talloc_free(r);
2246 return false;
2249 talloc_free(r);
2251 return true;
2254 static bool api_lsa_SetSecret(pipes_struct *p)
2256 const struct ndr_interface_call *call;
2257 struct ndr_pull *pull;
2258 struct ndr_push *push;
2259 enum ndr_err_code ndr_err;
2260 DATA_BLOB blob;
2261 struct lsa_SetSecret *r;
2263 call = &ndr_table_lsarpc.calls[NDR_LSA_SETSECRET];
2265 r = talloc(talloc_tos(), struct lsa_SetSecret);
2266 if (r == NULL) {
2267 return false;
2270 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2271 talloc_free(r);
2272 return false;
2275 pull = ndr_pull_init_blob(&blob, r, NULL);
2276 if (pull == NULL) {
2277 talloc_free(r);
2278 return false;
2281 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2282 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2284 talloc_free(r);
2285 return false;
2288 if (DEBUGLEVEL >= 10) {
2289 NDR_PRINT_IN_DEBUG(lsa_SetSecret, r);
2292 r->out.result = _lsa_SetSecret(p, r);
2294 if (p->rng_fault_state) {
2295 talloc_free(r);
2296 /* Return true here, srv_pipe_hnd.c will take care */
2297 return true;
2300 if (DEBUGLEVEL >= 10) {
2301 NDR_PRINT_OUT_DEBUG(lsa_SetSecret, r);
2304 push = ndr_push_init_ctx(r, NULL);
2305 if (push == NULL) {
2306 talloc_free(r);
2307 return false;
2310 ndr_err = call->ndr_push(push, NDR_OUT, r);
2311 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2312 talloc_free(r);
2313 return false;
2316 blob = ndr_push_blob(push);
2317 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2318 talloc_free(r);
2319 return false;
2322 talloc_free(r);
2324 return true;
2327 static bool api_lsa_QuerySecret(pipes_struct *p)
2329 const struct ndr_interface_call *call;
2330 struct ndr_pull *pull;
2331 struct ndr_push *push;
2332 enum ndr_err_code ndr_err;
2333 DATA_BLOB blob;
2334 struct lsa_QuerySecret *r;
2336 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYSECRET];
2338 r = talloc(talloc_tos(), struct lsa_QuerySecret);
2339 if (r == NULL) {
2340 return false;
2343 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2344 talloc_free(r);
2345 return false;
2348 pull = ndr_pull_init_blob(&blob, r, NULL);
2349 if (pull == NULL) {
2350 talloc_free(r);
2351 return false;
2354 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2355 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2356 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2357 talloc_free(r);
2358 return false;
2361 if (DEBUGLEVEL >= 10) {
2362 NDR_PRINT_IN_DEBUG(lsa_QuerySecret, r);
2365 ZERO_STRUCT(r->out);
2366 r->out.new_val = r->in.new_val;
2367 r->out.new_mtime = r->in.new_mtime;
2368 r->out.old_val = r->in.old_val;
2369 r->out.old_mtime = r->in.old_mtime;
2370 r->out.result = _lsa_QuerySecret(p, r);
2372 if (p->rng_fault_state) {
2373 talloc_free(r);
2374 /* Return true here, srv_pipe_hnd.c will take care */
2375 return true;
2378 if (DEBUGLEVEL >= 10) {
2379 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, r);
2382 push = ndr_push_init_ctx(r, NULL);
2383 if (push == NULL) {
2384 talloc_free(r);
2385 return false;
2388 ndr_err = call->ndr_push(push, NDR_OUT, r);
2389 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2390 talloc_free(r);
2391 return false;
2394 blob = ndr_push_blob(push);
2395 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2396 talloc_free(r);
2397 return false;
2400 talloc_free(r);
2402 return true;
2405 static bool api_lsa_LookupPrivValue(pipes_struct *p)
2407 const struct ndr_interface_call *call;
2408 struct ndr_pull *pull;
2409 struct ndr_push *push;
2410 enum ndr_err_code ndr_err;
2411 DATA_BLOB blob;
2412 struct lsa_LookupPrivValue *r;
2414 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVVALUE];
2416 r = talloc(talloc_tos(), struct lsa_LookupPrivValue);
2417 if (r == NULL) {
2418 return false;
2421 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2422 talloc_free(r);
2423 return false;
2426 pull = ndr_pull_init_blob(&blob, r, NULL);
2427 if (pull == NULL) {
2428 talloc_free(r);
2429 return false;
2432 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2433 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2434 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2435 talloc_free(r);
2436 return false;
2439 if (DEBUGLEVEL >= 10) {
2440 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, r);
2443 ZERO_STRUCT(r->out);
2444 r->out.luid = talloc_zero(r, struct lsa_LUID);
2445 if (r->out.luid == NULL) {
2446 talloc_free(r);
2447 return false;
2450 r->out.result = _lsa_LookupPrivValue(p, r);
2452 if (p->rng_fault_state) {
2453 talloc_free(r);
2454 /* Return true here, srv_pipe_hnd.c will take care */
2455 return true;
2458 if (DEBUGLEVEL >= 10) {
2459 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, r);
2462 push = ndr_push_init_ctx(r, NULL);
2463 if (push == NULL) {
2464 talloc_free(r);
2465 return false;
2468 ndr_err = call->ndr_push(push, NDR_OUT, r);
2469 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2470 talloc_free(r);
2471 return false;
2474 blob = ndr_push_blob(push);
2475 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2476 talloc_free(r);
2477 return false;
2480 talloc_free(r);
2482 return true;
2485 static bool api_lsa_LookupPrivName(pipes_struct *p)
2487 const struct ndr_interface_call *call;
2488 struct ndr_pull *pull;
2489 struct ndr_push *push;
2490 enum ndr_err_code ndr_err;
2491 DATA_BLOB blob;
2492 struct lsa_LookupPrivName *r;
2494 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVNAME];
2496 r = talloc(talloc_tos(), struct lsa_LookupPrivName);
2497 if (r == NULL) {
2498 return false;
2501 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2502 talloc_free(r);
2503 return false;
2506 pull = ndr_pull_init_blob(&blob, r, NULL);
2507 if (pull == NULL) {
2508 talloc_free(r);
2509 return false;
2512 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2513 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2515 talloc_free(r);
2516 return false;
2519 if (DEBUGLEVEL >= 10) {
2520 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, r);
2523 ZERO_STRUCT(r->out);
2524 r->out.name = talloc_zero(r, struct lsa_StringLarge *);
2525 if (r->out.name == NULL) {
2526 talloc_free(r);
2527 return false;
2530 r->out.result = _lsa_LookupPrivName(p, r);
2532 if (p->rng_fault_state) {
2533 talloc_free(r);
2534 /* Return true here, srv_pipe_hnd.c will take care */
2535 return true;
2538 if (DEBUGLEVEL >= 10) {
2539 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, r);
2542 push = ndr_push_init_ctx(r, NULL);
2543 if (push == NULL) {
2544 talloc_free(r);
2545 return false;
2548 ndr_err = call->ndr_push(push, NDR_OUT, r);
2549 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2550 talloc_free(r);
2551 return false;
2554 blob = ndr_push_blob(push);
2555 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2556 talloc_free(r);
2557 return false;
2560 talloc_free(r);
2562 return true;
2565 static bool api_lsa_LookupPrivDisplayName(pipes_struct *p)
2567 const struct ndr_interface_call *call;
2568 struct ndr_pull *pull;
2569 struct ndr_push *push;
2570 enum ndr_err_code ndr_err;
2571 DATA_BLOB blob;
2572 struct lsa_LookupPrivDisplayName *r;
2574 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPPRIVDISPLAYNAME];
2576 r = talloc(talloc_tos(), struct lsa_LookupPrivDisplayName);
2577 if (r == NULL) {
2578 return false;
2581 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2582 talloc_free(r);
2583 return false;
2586 pull = ndr_pull_init_blob(&blob, r, NULL);
2587 if (pull == NULL) {
2588 talloc_free(r);
2589 return false;
2592 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2593 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2594 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2595 talloc_free(r);
2596 return false;
2599 if (DEBUGLEVEL >= 10) {
2600 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, r);
2603 ZERO_STRUCT(r->out);
2604 r->out.disp_name = talloc_zero(r, struct lsa_StringLarge *);
2605 if (r->out.disp_name == NULL) {
2606 talloc_free(r);
2607 return false;
2610 r->out.returned_language_id = talloc_zero(r, uint16_t);
2611 if (r->out.returned_language_id == NULL) {
2612 talloc_free(r);
2613 return false;
2616 r->out.result = _lsa_LookupPrivDisplayName(p, r);
2618 if (p->rng_fault_state) {
2619 talloc_free(r);
2620 /* Return true here, srv_pipe_hnd.c will take care */
2621 return true;
2624 if (DEBUGLEVEL >= 10) {
2625 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, r);
2628 push = ndr_push_init_ctx(r, NULL);
2629 if (push == NULL) {
2630 talloc_free(r);
2631 return false;
2634 ndr_err = call->ndr_push(push, NDR_OUT, r);
2635 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2636 talloc_free(r);
2637 return false;
2640 blob = ndr_push_blob(push);
2641 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2642 talloc_free(r);
2643 return false;
2646 talloc_free(r);
2648 return true;
2651 static bool api_lsa_DeleteObject(pipes_struct *p)
2653 const struct ndr_interface_call *call;
2654 struct ndr_pull *pull;
2655 struct ndr_push *push;
2656 enum ndr_err_code ndr_err;
2657 DATA_BLOB blob;
2658 struct lsa_DeleteObject *r;
2660 call = &ndr_table_lsarpc.calls[NDR_LSA_DELETEOBJECT];
2662 r = talloc(talloc_tos(), struct lsa_DeleteObject);
2663 if (r == NULL) {
2664 return false;
2667 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2668 talloc_free(r);
2669 return false;
2672 pull = ndr_pull_init_blob(&blob, r, NULL);
2673 if (pull == NULL) {
2674 talloc_free(r);
2675 return false;
2678 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2679 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2680 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2681 talloc_free(r);
2682 return false;
2685 if (DEBUGLEVEL >= 10) {
2686 NDR_PRINT_IN_DEBUG(lsa_DeleteObject, r);
2689 ZERO_STRUCT(r->out);
2690 r->out.handle = r->in.handle;
2691 r->out.result = _lsa_DeleteObject(p, r);
2693 if (p->rng_fault_state) {
2694 talloc_free(r);
2695 /* Return true here, srv_pipe_hnd.c will take care */
2696 return true;
2699 if (DEBUGLEVEL >= 10) {
2700 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, r);
2703 push = ndr_push_init_ctx(r, NULL);
2704 if (push == NULL) {
2705 talloc_free(r);
2706 return false;
2709 ndr_err = call->ndr_push(push, NDR_OUT, r);
2710 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2711 talloc_free(r);
2712 return false;
2715 blob = ndr_push_blob(push);
2716 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2717 talloc_free(r);
2718 return false;
2721 talloc_free(r);
2723 return true;
2726 static bool api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
2728 const struct ndr_interface_call *call;
2729 struct ndr_pull *pull;
2730 struct ndr_push *push;
2731 enum ndr_err_code ndr_err;
2732 DATA_BLOB blob;
2733 struct lsa_EnumAccountsWithUserRight *r;
2735 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT];
2737 r = talloc(talloc_tos(), struct lsa_EnumAccountsWithUserRight);
2738 if (r == NULL) {
2739 return false;
2742 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2743 talloc_free(r);
2744 return false;
2747 pull = ndr_pull_init_blob(&blob, r, NULL);
2748 if (pull == NULL) {
2749 talloc_free(r);
2750 return false;
2753 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2754 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2755 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2756 talloc_free(r);
2757 return false;
2760 if (DEBUGLEVEL >= 10) {
2761 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, r);
2764 ZERO_STRUCT(r->out);
2765 r->out.sids = talloc_zero(r, struct lsa_SidArray);
2766 if (r->out.sids == NULL) {
2767 talloc_free(r);
2768 return false;
2771 r->out.result = _lsa_EnumAccountsWithUserRight(p, r);
2773 if (p->rng_fault_state) {
2774 talloc_free(r);
2775 /* Return true here, srv_pipe_hnd.c will take care */
2776 return true;
2779 if (DEBUGLEVEL >= 10) {
2780 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, r);
2783 push = ndr_push_init_ctx(r, NULL);
2784 if (push == NULL) {
2785 talloc_free(r);
2786 return false;
2789 ndr_err = call->ndr_push(push, NDR_OUT, r);
2790 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2791 talloc_free(r);
2792 return false;
2795 blob = ndr_push_blob(push);
2796 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2797 talloc_free(r);
2798 return false;
2801 talloc_free(r);
2803 return true;
2806 static bool api_lsa_EnumAccountRights(pipes_struct *p)
2808 const struct ndr_interface_call *call;
2809 struct ndr_pull *pull;
2810 struct ndr_push *push;
2811 enum ndr_err_code ndr_err;
2812 DATA_BLOB blob;
2813 struct lsa_EnumAccountRights *r;
2815 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMACCOUNTRIGHTS];
2817 r = talloc(talloc_tos(), struct lsa_EnumAccountRights);
2818 if (r == NULL) {
2819 return false;
2822 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2823 talloc_free(r);
2824 return false;
2827 pull = ndr_pull_init_blob(&blob, r, NULL);
2828 if (pull == NULL) {
2829 talloc_free(r);
2830 return false;
2833 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2834 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2835 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2836 talloc_free(r);
2837 return false;
2840 if (DEBUGLEVEL >= 10) {
2841 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, r);
2844 ZERO_STRUCT(r->out);
2845 r->out.rights = talloc_zero(r, struct lsa_RightSet);
2846 if (r->out.rights == NULL) {
2847 talloc_free(r);
2848 return false;
2851 r->out.result = _lsa_EnumAccountRights(p, r);
2853 if (p->rng_fault_state) {
2854 talloc_free(r);
2855 /* Return true here, srv_pipe_hnd.c will take care */
2856 return true;
2859 if (DEBUGLEVEL >= 10) {
2860 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, r);
2863 push = ndr_push_init_ctx(r, NULL);
2864 if (push == NULL) {
2865 talloc_free(r);
2866 return false;
2869 ndr_err = call->ndr_push(push, NDR_OUT, r);
2870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2871 talloc_free(r);
2872 return false;
2875 blob = ndr_push_blob(push);
2876 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2877 talloc_free(r);
2878 return false;
2881 talloc_free(r);
2883 return true;
2886 static bool api_lsa_AddAccountRights(pipes_struct *p)
2888 const struct ndr_interface_call *call;
2889 struct ndr_pull *pull;
2890 struct ndr_push *push;
2891 enum ndr_err_code ndr_err;
2892 DATA_BLOB blob;
2893 struct lsa_AddAccountRights *r;
2895 call = &ndr_table_lsarpc.calls[NDR_LSA_ADDACCOUNTRIGHTS];
2897 r = talloc(talloc_tos(), struct lsa_AddAccountRights);
2898 if (r == NULL) {
2899 return false;
2902 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2903 talloc_free(r);
2904 return false;
2907 pull = ndr_pull_init_blob(&blob, r, NULL);
2908 if (pull == NULL) {
2909 talloc_free(r);
2910 return false;
2913 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2914 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2916 talloc_free(r);
2917 return false;
2920 if (DEBUGLEVEL >= 10) {
2921 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights, r);
2924 r->out.result = _lsa_AddAccountRights(p, r);
2926 if (p->rng_fault_state) {
2927 talloc_free(r);
2928 /* Return true here, srv_pipe_hnd.c will take care */
2929 return true;
2932 if (DEBUGLEVEL >= 10) {
2933 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, r);
2936 push = ndr_push_init_ctx(r, NULL);
2937 if (push == NULL) {
2938 talloc_free(r);
2939 return false;
2942 ndr_err = call->ndr_push(push, NDR_OUT, r);
2943 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2944 talloc_free(r);
2945 return false;
2948 blob = ndr_push_blob(push);
2949 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2950 talloc_free(r);
2951 return false;
2954 talloc_free(r);
2956 return true;
2959 static bool api_lsa_RemoveAccountRights(pipes_struct *p)
2961 const struct ndr_interface_call *call;
2962 struct ndr_pull *pull;
2963 struct ndr_push *push;
2964 enum ndr_err_code ndr_err;
2965 DATA_BLOB blob;
2966 struct lsa_RemoveAccountRights *r;
2968 call = &ndr_table_lsarpc.calls[NDR_LSA_REMOVEACCOUNTRIGHTS];
2970 r = talloc(talloc_tos(), struct lsa_RemoveAccountRights);
2971 if (r == NULL) {
2972 return false;
2975 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2976 talloc_free(r);
2977 return false;
2980 pull = ndr_pull_init_blob(&blob, r, NULL);
2981 if (pull == NULL) {
2982 talloc_free(r);
2983 return false;
2986 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2987 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2989 talloc_free(r);
2990 return false;
2993 if (DEBUGLEVEL >= 10) {
2994 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights, r);
2997 r->out.result = _lsa_RemoveAccountRights(p, r);
2999 if (p->rng_fault_state) {
3000 talloc_free(r);
3001 /* Return true here, srv_pipe_hnd.c will take care */
3002 return true;
3005 if (DEBUGLEVEL >= 10) {
3006 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, r);
3009 push = ndr_push_init_ctx(r, NULL);
3010 if (push == NULL) {
3011 talloc_free(r);
3012 return false;
3015 ndr_err = call->ndr_push(push, NDR_OUT, r);
3016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3017 talloc_free(r);
3018 return false;
3021 blob = ndr_push_blob(push);
3022 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3023 talloc_free(r);
3024 return false;
3027 talloc_free(r);
3029 return true;
3032 static bool api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
3034 const struct ndr_interface_call *call;
3035 struct ndr_pull *pull;
3036 struct ndr_push *push;
3037 enum ndr_err_code ndr_err;
3038 DATA_BLOB blob;
3039 struct lsa_QueryTrustedDomainInfoBySid *r;
3041 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID];
3043 r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfoBySid);
3044 if (r == NULL) {
3045 return false;
3048 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3049 talloc_free(r);
3050 return false;
3053 pull = ndr_pull_init_blob(&blob, r, NULL);
3054 if (pull == NULL) {
3055 talloc_free(r);
3056 return false;
3059 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3060 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3062 talloc_free(r);
3063 return false;
3066 if (DEBUGLEVEL >= 10) {
3067 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, r);
3070 ZERO_STRUCT(r->out);
3071 r->out.info = talloc_zero(r, union lsa_TrustedDomainInfo *);
3072 if (r->out.info == NULL) {
3073 talloc_free(r);
3074 return false;
3077 r->out.result = _lsa_QueryTrustedDomainInfoBySid(p, r);
3079 if (p->rng_fault_state) {
3080 talloc_free(r);
3081 /* Return true here, srv_pipe_hnd.c will take care */
3082 return true;
3085 if (DEBUGLEVEL >= 10) {
3086 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, r);
3089 push = ndr_push_init_ctx(r, NULL);
3090 if (push == NULL) {
3091 talloc_free(r);
3092 return false;
3095 ndr_err = call->ndr_push(push, NDR_OUT, r);
3096 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3097 talloc_free(r);
3098 return false;
3101 blob = ndr_push_blob(push);
3102 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3103 talloc_free(r);
3104 return false;
3107 talloc_free(r);
3109 return true;
3112 static bool api_lsa_SetTrustedDomainInfo(pipes_struct *p)
3114 const struct ndr_interface_call *call;
3115 struct ndr_pull *pull;
3116 struct ndr_push *push;
3117 enum ndr_err_code ndr_err;
3118 DATA_BLOB blob;
3119 struct lsa_SetTrustedDomainInfo *r;
3121 call = &ndr_table_lsarpc.calls[NDR_LSA_SETTRUSTEDDOMAININFO];
3123 r = talloc(talloc_tos(), struct lsa_SetTrustedDomainInfo);
3124 if (r == NULL) {
3125 return false;
3128 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3129 talloc_free(r);
3130 return false;
3133 pull = ndr_pull_init_blob(&blob, r, NULL);
3134 if (pull == NULL) {
3135 talloc_free(r);
3136 return false;
3139 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3140 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3141 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3142 talloc_free(r);
3143 return false;
3146 if (DEBUGLEVEL >= 10) {
3147 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, r);
3150 r->out.result = _lsa_SetTrustedDomainInfo(p, r);
3152 if (p->rng_fault_state) {
3153 talloc_free(r);
3154 /* Return true here, srv_pipe_hnd.c will take care */
3155 return true;
3158 if (DEBUGLEVEL >= 10) {
3159 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, r);
3162 push = ndr_push_init_ctx(r, NULL);
3163 if (push == NULL) {
3164 talloc_free(r);
3165 return false;
3168 ndr_err = call->ndr_push(push, NDR_OUT, r);
3169 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3170 talloc_free(r);
3171 return false;
3174 blob = ndr_push_blob(push);
3175 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3176 talloc_free(r);
3177 return false;
3180 talloc_free(r);
3182 return true;
3185 static bool api_lsa_DeleteTrustedDomain(pipes_struct *p)
3187 const struct ndr_interface_call *call;
3188 struct ndr_pull *pull;
3189 struct ndr_push *push;
3190 enum ndr_err_code ndr_err;
3191 DATA_BLOB blob;
3192 struct lsa_DeleteTrustedDomain *r;
3194 call = &ndr_table_lsarpc.calls[NDR_LSA_DELETETRUSTEDDOMAIN];
3196 r = talloc(talloc_tos(), struct lsa_DeleteTrustedDomain);
3197 if (r == NULL) {
3198 return false;
3201 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3202 talloc_free(r);
3203 return false;
3206 pull = ndr_pull_init_blob(&blob, r, NULL);
3207 if (pull == NULL) {
3208 talloc_free(r);
3209 return false;
3212 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3213 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3214 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3215 talloc_free(r);
3216 return false;
3219 if (DEBUGLEVEL >= 10) {
3220 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain, r);
3223 r->out.result = _lsa_DeleteTrustedDomain(p, r);
3225 if (p->rng_fault_state) {
3226 talloc_free(r);
3227 /* Return true here, srv_pipe_hnd.c will take care */
3228 return true;
3231 if (DEBUGLEVEL >= 10) {
3232 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, r);
3235 push = ndr_push_init_ctx(r, NULL);
3236 if (push == NULL) {
3237 talloc_free(r);
3238 return false;
3241 ndr_err = call->ndr_push(push, NDR_OUT, r);
3242 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3243 talloc_free(r);
3244 return false;
3247 blob = ndr_push_blob(push);
3248 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3249 talloc_free(r);
3250 return false;
3253 talloc_free(r);
3255 return true;
3258 static bool api_lsa_StorePrivateData(pipes_struct *p)
3260 const struct ndr_interface_call *call;
3261 struct ndr_pull *pull;
3262 struct ndr_push *push;
3263 enum ndr_err_code ndr_err;
3264 DATA_BLOB blob;
3265 struct lsa_StorePrivateData *r;
3267 call = &ndr_table_lsarpc.calls[NDR_LSA_STOREPRIVATEDATA];
3269 r = talloc(talloc_tos(), struct lsa_StorePrivateData);
3270 if (r == NULL) {
3271 return false;
3274 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3275 talloc_free(r);
3276 return false;
3279 pull = ndr_pull_init_blob(&blob, r, NULL);
3280 if (pull == NULL) {
3281 talloc_free(r);
3282 return false;
3285 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3286 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3287 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3288 talloc_free(r);
3289 return false;
3292 if (DEBUGLEVEL >= 10) {
3293 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, r);
3296 r->out.result = _lsa_StorePrivateData(p, r);
3298 if (p->rng_fault_state) {
3299 talloc_free(r);
3300 /* Return true here, srv_pipe_hnd.c will take care */
3301 return true;
3304 if (DEBUGLEVEL >= 10) {
3305 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, r);
3308 push = ndr_push_init_ctx(r, NULL);
3309 if (push == NULL) {
3310 talloc_free(r);
3311 return false;
3314 ndr_err = call->ndr_push(push, NDR_OUT, r);
3315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3316 talloc_free(r);
3317 return false;
3320 blob = ndr_push_blob(push);
3321 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3322 talloc_free(r);
3323 return false;
3326 talloc_free(r);
3328 return true;
3331 static bool api_lsa_RetrievePrivateData(pipes_struct *p)
3333 const struct ndr_interface_call *call;
3334 struct ndr_pull *pull;
3335 struct ndr_push *push;
3336 enum ndr_err_code ndr_err;
3337 DATA_BLOB blob;
3338 struct lsa_RetrievePrivateData *r;
3340 call = &ndr_table_lsarpc.calls[NDR_LSA_RETRIEVEPRIVATEDATA];
3342 r = talloc(talloc_tos(), struct lsa_RetrievePrivateData);
3343 if (r == NULL) {
3344 return false;
3347 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3348 talloc_free(r);
3349 return false;
3352 pull = ndr_pull_init_blob(&blob, r, NULL);
3353 if (pull == NULL) {
3354 talloc_free(r);
3355 return false;
3358 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3359 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3360 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3361 talloc_free(r);
3362 return false;
3365 if (DEBUGLEVEL >= 10) {
3366 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, r);
3369 r->out.result = _lsa_RetrievePrivateData(p, r);
3371 if (p->rng_fault_state) {
3372 talloc_free(r);
3373 /* Return true here, srv_pipe_hnd.c will take care */
3374 return true;
3377 if (DEBUGLEVEL >= 10) {
3378 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, r);
3381 push = ndr_push_init_ctx(r, NULL);
3382 if (push == NULL) {
3383 talloc_free(r);
3384 return false;
3387 ndr_err = call->ndr_push(push, NDR_OUT, r);
3388 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3389 talloc_free(r);
3390 return false;
3393 blob = ndr_push_blob(push);
3394 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3395 talloc_free(r);
3396 return false;
3399 talloc_free(r);
3401 return true;
3404 static bool api_lsa_OpenPolicy2(pipes_struct *p)
3406 const struct ndr_interface_call *call;
3407 struct ndr_pull *pull;
3408 struct ndr_push *push;
3409 enum ndr_err_code ndr_err;
3410 DATA_BLOB blob;
3411 struct lsa_OpenPolicy2 *r;
3413 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENPOLICY2];
3415 r = talloc(talloc_tos(), struct lsa_OpenPolicy2);
3416 if (r == NULL) {
3417 return false;
3420 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3421 talloc_free(r);
3422 return false;
3425 pull = ndr_pull_init_blob(&blob, r, NULL);
3426 if (pull == NULL) {
3427 talloc_free(r);
3428 return false;
3431 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3432 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3433 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3434 talloc_free(r);
3435 return false;
3438 if (DEBUGLEVEL >= 10) {
3439 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, r);
3442 ZERO_STRUCT(r->out);
3443 r->out.handle = talloc_zero(r, struct policy_handle);
3444 if (r->out.handle == NULL) {
3445 talloc_free(r);
3446 return false;
3449 r->out.result = _lsa_OpenPolicy2(p, r);
3451 if (p->rng_fault_state) {
3452 talloc_free(r);
3453 /* Return true here, srv_pipe_hnd.c will take care */
3454 return true;
3457 if (DEBUGLEVEL >= 10) {
3458 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, r);
3461 push = ndr_push_init_ctx(r, NULL);
3462 if (push == NULL) {
3463 talloc_free(r);
3464 return false;
3467 ndr_err = call->ndr_push(push, NDR_OUT, r);
3468 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3469 talloc_free(r);
3470 return false;
3473 blob = ndr_push_blob(push);
3474 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3475 talloc_free(r);
3476 return false;
3479 talloc_free(r);
3481 return true;
3484 static bool api_lsa_GetUserName(pipes_struct *p)
3486 const struct ndr_interface_call *call;
3487 struct ndr_pull *pull;
3488 struct ndr_push *push;
3489 enum ndr_err_code ndr_err;
3490 DATA_BLOB blob;
3491 struct lsa_GetUserName *r;
3493 call = &ndr_table_lsarpc.calls[NDR_LSA_GETUSERNAME];
3495 r = talloc(talloc_tos(), struct lsa_GetUserName);
3496 if (r == NULL) {
3497 return false;
3500 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3501 talloc_free(r);
3502 return false;
3505 pull = ndr_pull_init_blob(&blob, r, NULL);
3506 if (pull == NULL) {
3507 talloc_free(r);
3508 return false;
3511 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3512 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3513 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3514 talloc_free(r);
3515 return false;
3518 if (DEBUGLEVEL >= 10) {
3519 NDR_PRINT_IN_DEBUG(lsa_GetUserName, r);
3522 ZERO_STRUCT(r->out);
3523 r->out.account_name = r->in.account_name;
3524 r->out.authority_name = r->in.authority_name;
3525 r->out.result = _lsa_GetUserName(p, r);
3527 if (p->rng_fault_state) {
3528 talloc_free(r);
3529 /* Return true here, srv_pipe_hnd.c will take care */
3530 return true;
3533 if (DEBUGLEVEL >= 10) {
3534 NDR_PRINT_OUT_DEBUG(lsa_GetUserName, r);
3537 push = ndr_push_init_ctx(r, NULL);
3538 if (push == NULL) {
3539 talloc_free(r);
3540 return false;
3543 ndr_err = call->ndr_push(push, NDR_OUT, r);
3544 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3545 talloc_free(r);
3546 return false;
3549 blob = ndr_push_blob(push);
3550 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3551 talloc_free(r);
3552 return false;
3555 talloc_free(r);
3557 return true;
3560 static bool api_lsa_QueryInfoPolicy2(pipes_struct *p)
3562 const struct ndr_interface_call *call;
3563 struct ndr_pull *pull;
3564 struct ndr_push *push;
3565 enum ndr_err_code ndr_err;
3566 DATA_BLOB blob;
3567 struct lsa_QueryInfoPolicy2 *r;
3569 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYINFOPOLICY2];
3571 r = talloc(talloc_tos(), struct lsa_QueryInfoPolicy2);
3572 if (r == NULL) {
3573 return false;
3576 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3577 talloc_free(r);
3578 return false;
3581 pull = ndr_pull_init_blob(&blob, r, NULL);
3582 if (pull == NULL) {
3583 talloc_free(r);
3584 return false;
3587 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3588 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3589 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3590 talloc_free(r);
3591 return false;
3594 if (DEBUGLEVEL >= 10) {
3595 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, r);
3598 ZERO_STRUCT(r->out);
3599 r->out.info = talloc_zero(r, union lsa_PolicyInformation *);
3600 if (r->out.info == NULL) {
3601 talloc_free(r);
3602 return false;
3605 r->out.result = _lsa_QueryInfoPolicy2(p, r);
3607 if (p->rng_fault_state) {
3608 talloc_free(r);
3609 /* Return true here, srv_pipe_hnd.c will take care */
3610 return true;
3613 if (DEBUGLEVEL >= 10) {
3614 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, r);
3617 push = ndr_push_init_ctx(r, NULL);
3618 if (push == NULL) {
3619 talloc_free(r);
3620 return false;
3623 ndr_err = call->ndr_push(push, NDR_OUT, r);
3624 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3625 talloc_free(r);
3626 return false;
3629 blob = ndr_push_blob(push);
3630 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3631 talloc_free(r);
3632 return false;
3635 talloc_free(r);
3637 return true;
3640 static bool api_lsa_SetInfoPolicy2(pipes_struct *p)
3642 const struct ndr_interface_call *call;
3643 struct ndr_pull *pull;
3644 struct ndr_push *push;
3645 enum ndr_err_code ndr_err;
3646 DATA_BLOB blob;
3647 struct lsa_SetInfoPolicy2 *r;
3649 call = &ndr_table_lsarpc.calls[NDR_LSA_SETINFOPOLICY2];
3651 r = talloc(talloc_tos(), struct lsa_SetInfoPolicy2);
3652 if (r == NULL) {
3653 return false;
3656 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3657 talloc_free(r);
3658 return false;
3661 pull = ndr_pull_init_blob(&blob, r, NULL);
3662 if (pull == NULL) {
3663 talloc_free(r);
3664 return false;
3667 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3668 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3669 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3670 talloc_free(r);
3671 return false;
3674 if (DEBUGLEVEL >= 10) {
3675 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2, r);
3678 r->out.result = _lsa_SetInfoPolicy2(p, r);
3680 if (p->rng_fault_state) {
3681 talloc_free(r);
3682 /* Return true here, srv_pipe_hnd.c will take care */
3683 return true;
3686 if (DEBUGLEVEL >= 10) {
3687 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, r);
3690 push = ndr_push_init_ctx(r, NULL);
3691 if (push == NULL) {
3692 talloc_free(r);
3693 return false;
3696 ndr_err = call->ndr_push(push, NDR_OUT, r);
3697 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3698 talloc_free(r);
3699 return false;
3702 blob = ndr_push_blob(push);
3703 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3704 talloc_free(r);
3705 return false;
3708 talloc_free(r);
3710 return true;
3713 static bool api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
3715 const struct ndr_interface_call *call;
3716 struct ndr_pull *pull;
3717 struct ndr_push *push;
3718 enum ndr_err_code ndr_err;
3719 DATA_BLOB blob;
3720 struct lsa_QueryTrustedDomainInfoByName *r;
3722 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME];
3724 r = talloc(talloc_tos(), struct lsa_QueryTrustedDomainInfoByName);
3725 if (r == NULL) {
3726 return false;
3729 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3730 talloc_free(r);
3731 return false;
3734 pull = ndr_pull_init_blob(&blob, r, NULL);
3735 if (pull == NULL) {
3736 talloc_free(r);
3737 return false;
3740 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3741 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3742 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3743 talloc_free(r);
3744 return false;
3747 if (DEBUGLEVEL >= 10) {
3748 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, r);
3751 ZERO_STRUCT(r->out);
3752 r->out.info = talloc_zero(r, union lsa_TrustedDomainInfo *);
3753 if (r->out.info == NULL) {
3754 talloc_free(r);
3755 return false;
3758 r->out.result = _lsa_QueryTrustedDomainInfoByName(p, r);
3760 if (p->rng_fault_state) {
3761 talloc_free(r);
3762 /* Return true here, srv_pipe_hnd.c will take care */
3763 return true;
3766 if (DEBUGLEVEL >= 10) {
3767 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, r);
3770 push = ndr_push_init_ctx(r, NULL);
3771 if (push == NULL) {
3772 talloc_free(r);
3773 return false;
3776 ndr_err = call->ndr_push(push, NDR_OUT, r);
3777 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3778 talloc_free(r);
3779 return false;
3782 blob = ndr_push_blob(push);
3783 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3784 talloc_free(r);
3785 return false;
3788 talloc_free(r);
3790 return true;
3793 static bool api_lsa_SetTrustedDomainInfoByName(pipes_struct *p)
3795 const struct ndr_interface_call *call;
3796 struct ndr_pull *pull;
3797 struct ndr_push *push;
3798 enum ndr_err_code ndr_err;
3799 DATA_BLOB blob;
3800 struct lsa_SetTrustedDomainInfoByName *r;
3802 call = &ndr_table_lsarpc.calls[NDR_LSA_SETTRUSTEDDOMAININFOBYNAME];
3804 r = talloc(talloc_tos(), struct lsa_SetTrustedDomainInfoByName);
3805 if (r == NULL) {
3806 return false;
3809 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3810 talloc_free(r);
3811 return false;
3814 pull = ndr_pull_init_blob(&blob, r, NULL);
3815 if (pull == NULL) {
3816 talloc_free(r);
3817 return false;
3820 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3821 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3822 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3823 talloc_free(r);
3824 return false;
3827 if (DEBUGLEVEL >= 10) {
3828 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName, r);
3831 r->out.result = _lsa_SetTrustedDomainInfoByName(p, r);
3833 if (p->rng_fault_state) {
3834 talloc_free(r);
3835 /* Return true here, srv_pipe_hnd.c will take care */
3836 return true;
3839 if (DEBUGLEVEL >= 10) {
3840 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, r);
3843 push = ndr_push_init_ctx(r, NULL);
3844 if (push == NULL) {
3845 talloc_free(r);
3846 return false;
3849 ndr_err = call->ndr_push(push, NDR_OUT, r);
3850 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3851 talloc_free(r);
3852 return false;
3855 blob = ndr_push_blob(push);
3856 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3857 talloc_free(r);
3858 return false;
3861 talloc_free(r);
3863 return true;
3866 static bool api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
3868 const struct ndr_interface_call *call;
3869 struct ndr_pull *pull;
3870 struct ndr_push *push;
3871 enum ndr_err_code ndr_err;
3872 DATA_BLOB blob;
3873 struct lsa_EnumTrustedDomainsEx *r;
3875 call = &ndr_table_lsarpc.calls[NDR_LSA_ENUMTRUSTEDDOMAINSEX];
3877 r = talloc(talloc_tos(), struct lsa_EnumTrustedDomainsEx);
3878 if (r == NULL) {
3879 return false;
3882 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3883 talloc_free(r);
3884 return false;
3887 pull = ndr_pull_init_blob(&blob, r, NULL);
3888 if (pull == NULL) {
3889 talloc_free(r);
3890 return false;
3893 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3894 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3895 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3896 talloc_free(r);
3897 return false;
3900 if (DEBUGLEVEL >= 10) {
3901 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx, r);
3904 ZERO_STRUCT(r->out);
3905 r->out.resume_handle = r->in.resume_handle;
3906 r->out.domains = talloc_zero(r, struct lsa_DomainListEx);
3907 if (r->out.domains == NULL) {
3908 talloc_free(r);
3909 return false;
3912 r->out.result = _lsa_EnumTrustedDomainsEx(p, r);
3914 if (p->rng_fault_state) {
3915 talloc_free(r);
3916 /* Return true here, srv_pipe_hnd.c will take care */
3917 return true;
3920 if (DEBUGLEVEL >= 10) {
3921 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, r);
3924 push = ndr_push_init_ctx(r, NULL);
3925 if (push == NULL) {
3926 talloc_free(r);
3927 return false;
3930 ndr_err = call->ndr_push(push, NDR_OUT, r);
3931 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3932 talloc_free(r);
3933 return false;
3936 blob = ndr_push_blob(push);
3937 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3938 talloc_free(r);
3939 return false;
3942 talloc_free(r);
3944 return true;
3947 static bool api_lsa_CreateTrustedDomainEx(pipes_struct *p)
3949 const struct ndr_interface_call *call;
3950 struct ndr_pull *pull;
3951 struct ndr_push *push;
3952 enum ndr_err_code ndr_err;
3953 DATA_BLOB blob;
3954 struct lsa_CreateTrustedDomainEx *r;
3956 call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAINEX];
3958 r = talloc(talloc_tos(), struct lsa_CreateTrustedDomainEx);
3959 if (r == NULL) {
3960 return false;
3963 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3964 talloc_free(r);
3965 return false;
3968 pull = ndr_pull_init_blob(&blob, r, NULL);
3969 if (pull == NULL) {
3970 talloc_free(r);
3971 return false;
3974 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3975 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3976 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3977 talloc_free(r);
3978 return false;
3981 if (DEBUGLEVEL >= 10) {
3982 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, r);
3985 ZERO_STRUCT(r->out);
3986 r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
3987 if (r->out.trustdom_handle == NULL) {
3988 talloc_free(r);
3989 return false;
3992 r->out.result = _lsa_CreateTrustedDomainEx(p, r);
3994 if (p->rng_fault_state) {
3995 talloc_free(r);
3996 /* Return true here, srv_pipe_hnd.c will take care */
3997 return true;
4000 if (DEBUGLEVEL >= 10) {
4001 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, r);
4004 push = ndr_push_init_ctx(r, NULL);
4005 if (push == NULL) {
4006 talloc_free(r);
4007 return false;
4010 ndr_err = call->ndr_push(push, NDR_OUT, r);
4011 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4012 talloc_free(r);
4013 return false;
4016 blob = ndr_push_blob(push);
4017 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4018 talloc_free(r);
4019 return false;
4022 talloc_free(r);
4024 return true;
4027 static bool api_lsa_CloseTrustedDomainEx(pipes_struct *p)
4029 const struct ndr_interface_call *call;
4030 struct ndr_pull *pull;
4031 struct ndr_push *push;
4032 enum ndr_err_code ndr_err;
4033 DATA_BLOB blob;
4034 struct lsa_CloseTrustedDomainEx *r;
4036 call = &ndr_table_lsarpc.calls[NDR_LSA_CLOSETRUSTEDDOMAINEX];
4038 r = talloc(talloc_tos(), struct lsa_CloseTrustedDomainEx);
4039 if (r == NULL) {
4040 return false;
4043 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4044 talloc_free(r);
4045 return false;
4048 pull = ndr_pull_init_blob(&blob, r, NULL);
4049 if (pull == NULL) {
4050 talloc_free(r);
4051 return false;
4054 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4055 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4056 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4057 talloc_free(r);
4058 return false;
4061 if (DEBUGLEVEL >= 10) {
4062 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx, r);
4065 ZERO_STRUCT(r->out);
4066 r->out.handle = r->in.handle;
4067 r->out.result = _lsa_CloseTrustedDomainEx(p, r);
4069 if (p->rng_fault_state) {
4070 talloc_free(r);
4071 /* Return true here, srv_pipe_hnd.c will take care */
4072 return true;
4075 if (DEBUGLEVEL >= 10) {
4076 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, r);
4079 push = ndr_push_init_ctx(r, NULL);
4080 if (push == NULL) {
4081 talloc_free(r);
4082 return false;
4085 ndr_err = call->ndr_push(push, NDR_OUT, r);
4086 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4087 talloc_free(r);
4088 return false;
4091 blob = ndr_push_blob(push);
4092 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4093 talloc_free(r);
4094 return false;
4097 talloc_free(r);
4099 return true;
4102 static bool api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
4104 const struct ndr_interface_call *call;
4105 struct ndr_pull *pull;
4106 struct ndr_push *push;
4107 enum ndr_err_code ndr_err;
4108 DATA_BLOB blob;
4109 struct lsa_QueryDomainInformationPolicy *r;
4111 call = &ndr_table_lsarpc.calls[NDR_LSA_QUERYDOMAININFORMATIONPOLICY];
4113 r = talloc(talloc_tos(), struct lsa_QueryDomainInformationPolicy);
4114 if (r == NULL) {
4115 return false;
4118 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4119 talloc_free(r);
4120 return false;
4123 pull = ndr_pull_init_blob(&blob, r, NULL);
4124 if (pull == NULL) {
4125 talloc_free(r);
4126 return false;
4129 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4130 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4131 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4132 talloc_free(r);
4133 return false;
4136 if (DEBUGLEVEL >= 10) {
4137 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, r);
4140 ZERO_STRUCT(r->out);
4141 r->out.info = talloc_zero(r, union lsa_DomainInformationPolicy *);
4142 if (r->out.info == NULL) {
4143 talloc_free(r);
4144 return false;
4147 r->out.result = _lsa_QueryDomainInformationPolicy(p, r);
4149 if (p->rng_fault_state) {
4150 talloc_free(r);
4151 /* Return true here, srv_pipe_hnd.c will take care */
4152 return true;
4155 if (DEBUGLEVEL >= 10) {
4156 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, r);
4159 push = ndr_push_init_ctx(r, NULL);
4160 if (push == NULL) {
4161 talloc_free(r);
4162 return false;
4165 ndr_err = call->ndr_push(push, NDR_OUT, r);
4166 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4167 talloc_free(r);
4168 return false;
4171 blob = ndr_push_blob(push);
4172 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4173 talloc_free(r);
4174 return false;
4177 talloc_free(r);
4179 return true;
4182 static bool api_lsa_SetDomainInformationPolicy(pipes_struct *p)
4184 const struct ndr_interface_call *call;
4185 struct ndr_pull *pull;
4186 struct ndr_push *push;
4187 enum ndr_err_code ndr_err;
4188 DATA_BLOB blob;
4189 struct lsa_SetDomainInformationPolicy *r;
4191 call = &ndr_table_lsarpc.calls[NDR_LSA_SETDOMAININFORMATIONPOLICY];
4193 r = talloc(talloc_tos(), struct lsa_SetDomainInformationPolicy);
4194 if (r == NULL) {
4195 return false;
4198 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4199 talloc_free(r);
4200 return false;
4203 pull = ndr_pull_init_blob(&blob, r, NULL);
4204 if (pull == NULL) {
4205 talloc_free(r);
4206 return false;
4209 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4210 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4211 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4212 talloc_free(r);
4213 return false;
4216 if (DEBUGLEVEL >= 10) {
4217 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy, r);
4220 r->out.result = _lsa_SetDomainInformationPolicy(p, r);
4222 if (p->rng_fault_state) {
4223 talloc_free(r);
4224 /* Return true here, srv_pipe_hnd.c will take care */
4225 return true;
4228 if (DEBUGLEVEL >= 10) {
4229 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, r);
4232 push = ndr_push_init_ctx(r, NULL);
4233 if (push == NULL) {
4234 talloc_free(r);
4235 return false;
4238 ndr_err = call->ndr_push(push, NDR_OUT, r);
4239 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4240 talloc_free(r);
4241 return false;
4244 blob = ndr_push_blob(push);
4245 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4246 talloc_free(r);
4247 return false;
4250 talloc_free(r);
4252 return true;
4255 static bool api_lsa_OpenTrustedDomainByName(pipes_struct *p)
4257 const struct ndr_interface_call *call;
4258 struct ndr_pull *pull;
4259 struct ndr_push *push;
4260 enum ndr_err_code ndr_err;
4261 DATA_BLOB blob;
4262 struct lsa_OpenTrustedDomainByName *r;
4264 call = &ndr_table_lsarpc.calls[NDR_LSA_OPENTRUSTEDDOMAINBYNAME];
4266 r = talloc(talloc_tos(), struct lsa_OpenTrustedDomainByName);
4267 if (r == NULL) {
4268 return false;
4271 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4272 talloc_free(r);
4273 return false;
4276 pull = ndr_pull_init_blob(&blob, r, NULL);
4277 if (pull == NULL) {
4278 talloc_free(r);
4279 return false;
4282 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4283 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4284 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4285 talloc_free(r);
4286 return false;
4289 if (DEBUGLEVEL >= 10) {
4290 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, r);
4293 ZERO_STRUCT(r->out);
4294 r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
4295 if (r->out.trustdom_handle == NULL) {
4296 talloc_free(r);
4297 return false;
4300 r->out.result = _lsa_OpenTrustedDomainByName(p, r);
4302 if (p->rng_fault_state) {
4303 talloc_free(r);
4304 /* Return true here, srv_pipe_hnd.c will take care */
4305 return true;
4308 if (DEBUGLEVEL >= 10) {
4309 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, r);
4312 push = ndr_push_init_ctx(r, NULL);
4313 if (push == NULL) {
4314 talloc_free(r);
4315 return false;
4318 ndr_err = call->ndr_push(push, NDR_OUT, r);
4319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4320 talloc_free(r);
4321 return false;
4324 blob = ndr_push_blob(push);
4325 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4326 talloc_free(r);
4327 return false;
4330 talloc_free(r);
4332 return true;
4335 static bool api_lsa_TestCall(pipes_struct *p)
4337 const struct ndr_interface_call *call;
4338 struct ndr_pull *pull;
4339 struct ndr_push *push;
4340 enum ndr_err_code ndr_err;
4341 DATA_BLOB blob;
4342 struct lsa_TestCall *r;
4344 call = &ndr_table_lsarpc.calls[NDR_LSA_TESTCALL];
4346 r = talloc(talloc_tos(), struct lsa_TestCall);
4347 if (r == NULL) {
4348 return false;
4351 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4352 talloc_free(r);
4353 return false;
4356 pull = ndr_pull_init_blob(&blob, r, NULL);
4357 if (pull == NULL) {
4358 talloc_free(r);
4359 return false;
4362 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4363 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4364 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4365 talloc_free(r);
4366 return false;
4369 if (DEBUGLEVEL >= 10) {
4370 NDR_PRINT_IN_DEBUG(lsa_TestCall, r);
4373 r->out.result = _lsa_TestCall(p, r);
4375 if (p->rng_fault_state) {
4376 talloc_free(r);
4377 /* Return true here, srv_pipe_hnd.c will take care */
4378 return true;
4381 if (DEBUGLEVEL >= 10) {
4382 NDR_PRINT_OUT_DEBUG(lsa_TestCall, r);
4385 push = ndr_push_init_ctx(r, NULL);
4386 if (push == NULL) {
4387 talloc_free(r);
4388 return false;
4391 ndr_err = call->ndr_push(push, NDR_OUT, r);
4392 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4393 talloc_free(r);
4394 return false;
4397 blob = ndr_push_blob(push);
4398 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4399 talloc_free(r);
4400 return false;
4403 talloc_free(r);
4405 return true;
4408 static bool api_lsa_LookupSids2(pipes_struct *p)
4410 const struct ndr_interface_call *call;
4411 struct ndr_pull *pull;
4412 struct ndr_push *push;
4413 enum ndr_err_code ndr_err;
4414 DATA_BLOB blob;
4415 struct lsa_LookupSids2 *r;
4417 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS2];
4419 r = talloc(talloc_tos(), struct lsa_LookupSids2);
4420 if (r == NULL) {
4421 return false;
4424 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4425 talloc_free(r);
4426 return false;
4429 pull = ndr_pull_init_blob(&blob, r, NULL);
4430 if (pull == NULL) {
4431 talloc_free(r);
4432 return false;
4435 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4436 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4437 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4438 talloc_free(r);
4439 return false;
4442 if (DEBUGLEVEL >= 10) {
4443 NDR_PRINT_IN_DEBUG(lsa_LookupSids2, r);
4446 ZERO_STRUCT(r->out);
4447 r->out.names = r->in.names;
4448 r->out.count = r->in.count;
4449 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
4450 if (r->out.domains == NULL) {
4451 talloc_free(r);
4452 return false;
4455 r->out.result = _lsa_LookupSids2(p, r);
4457 if (p->rng_fault_state) {
4458 talloc_free(r);
4459 /* Return true here, srv_pipe_hnd.c will take care */
4460 return true;
4463 if (DEBUGLEVEL >= 10) {
4464 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, r);
4467 push = ndr_push_init_ctx(r, NULL);
4468 if (push == NULL) {
4469 talloc_free(r);
4470 return false;
4473 ndr_err = call->ndr_push(push, NDR_OUT, r);
4474 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4475 talloc_free(r);
4476 return false;
4479 blob = ndr_push_blob(push);
4480 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4481 talloc_free(r);
4482 return false;
4485 talloc_free(r);
4487 return true;
4490 static bool api_lsa_LookupNames2(pipes_struct *p)
4492 const struct ndr_interface_call *call;
4493 struct ndr_pull *pull;
4494 struct ndr_push *push;
4495 enum ndr_err_code ndr_err;
4496 DATA_BLOB blob;
4497 struct lsa_LookupNames2 *r;
4499 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES2];
4501 r = talloc(talloc_tos(), struct lsa_LookupNames2);
4502 if (r == NULL) {
4503 return false;
4506 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4507 talloc_free(r);
4508 return false;
4511 pull = ndr_pull_init_blob(&blob, r, NULL);
4512 if (pull == NULL) {
4513 talloc_free(r);
4514 return false;
4517 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4518 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4519 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4520 talloc_free(r);
4521 return false;
4524 if (DEBUGLEVEL >= 10) {
4525 NDR_PRINT_IN_DEBUG(lsa_LookupNames2, r);
4528 ZERO_STRUCT(r->out);
4529 r->out.sids = r->in.sids;
4530 r->out.count = r->in.count;
4531 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
4532 if (r->out.domains == NULL) {
4533 talloc_free(r);
4534 return false;
4537 r->out.result = _lsa_LookupNames2(p, r);
4539 if (p->rng_fault_state) {
4540 talloc_free(r);
4541 /* Return true here, srv_pipe_hnd.c will take care */
4542 return true;
4545 if (DEBUGLEVEL >= 10) {
4546 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, r);
4549 push = ndr_push_init_ctx(r, NULL);
4550 if (push == NULL) {
4551 talloc_free(r);
4552 return false;
4555 ndr_err = call->ndr_push(push, NDR_OUT, r);
4556 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4557 talloc_free(r);
4558 return false;
4561 blob = ndr_push_blob(push);
4562 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4563 talloc_free(r);
4564 return false;
4567 talloc_free(r);
4569 return true;
4572 static bool api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
4574 const struct ndr_interface_call *call;
4575 struct ndr_pull *pull;
4576 struct ndr_push *push;
4577 enum ndr_err_code ndr_err;
4578 DATA_BLOB blob;
4579 struct lsa_CreateTrustedDomainEx2 *r;
4581 call = &ndr_table_lsarpc.calls[NDR_LSA_CREATETRUSTEDDOMAINEX2];
4583 r = talloc(talloc_tos(), struct lsa_CreateTrustedDomainEx2);
4584 if (r == NULL) {
4585 return false;
4588 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4589 talloc_free(r);
4590 return false;
4593 pull = ndr_pull_init_blob(&blob, r, NULL);
4594 if (pull == NULL) {
4595 talloc_free(r);
4596 return false;
4599 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4600 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4601 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4602 talloc_free(r);
4603 return false;
4606 if (DEBUGLEVEL >= 10) {
4607 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, r);
4610 ZERO_STRUCT(r->out);
4611 r->out.trustdom_handle = talloc_zero(r, struct policy_handle);
4612 if (r->out.trustdom_handle == NULL) {
4613 talloc_free(r);
4614 return false;
4617 r->out.result = _lsa_CreateTrustedDomainEx2(p, r);
4619 if (p->rng_fault_state) {
4620 talloc_free(r);
4621 /* Return true here, srv_pipe_hnd.c will take care */
4622 return true;
4625 if (DEBUGLEVEL >= 10) {
4626 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, r);
4629 push = ndr_push_init_ctx(r, NULL);
4630 if (push == NULL) {
4631 talloc_free(r);
4632 return false;
4635 ndr_err = call->ndr_push(push, NDR_OUT, r);
4636 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4637 talloc_free(r);
4638 return false;
4641 blob = ndr_push_blob(push);
4642 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4643 talloc_free(r);
4644 return false;
4647 talloc_free(r);
4649 return true;
4652 static bool api_lsa_CREDRWRITE(pipes_struct *p)
4654 const struct ndr_interface_call *call;
4655 struct ndr_pull *pull;
4656 struct ndr_push *push;
4657 enum ndr_err_code ndr_err;
4658 DATA_BLOB blob;
4659 struct lsa_CREDRWRITE *r;
4661 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRWRITE];
4663 r = talloc(talloc_tos(), struct lsa_CREDRWRITE);
4664 if (r == NULL) {
4665 return false;
4668 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4669 talloc_free(r);
4670 return false;
4673 pull = ndr_pull_init_blob(&blob, r, NULL);
4674 if (pull == NULL) {
4675 talloc_free(r);
4676 return false;
4679 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4680 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4681 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4682 talloc_free(r);
4683 return false;
4686 if (DEBUGLEVEL >= 10) {
4687 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE, r);
4690 r->out.result = _lsa_CREDRWRITE(p, r);
4692 if (p->rng_fault_state) {
4693 talloc_free(r);
4694 /* Return true here, srv_pipe_hnd.c will take care */
4695 return true;
4698 if (DEBUGLEVEL >= 10) {
4699 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, r);
4702 push = ndr_push_init_ctx(r, NULL);
4703 if (push == NULL) {
4704 talloc_free(r);
4705 return false;
4708 ndr_err = call->ndr_push(push, NDR_OUT, r);
4709 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4710 talloc_free(r);
4711 return false;
4714 blob = ndr_push_blob(push);
4715 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4716 talloc_free(r);
4717 return false;
4720 talloc_free(r);
4722 return true;
4725 static bool api_lsa_CREDRREAD(pipes_struct *p)
4727 const struct ndr_interface_call *call;
4728 struct ndr_pull *pull;
4729 struct ndr_push *push;
4730 enum ndr_err_code ndr_err;
4731 DATA_BLOB blob;
4732 struct lsa_CREDRREAD *r;
4734 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRREAD];
4736 r = talloc(talloc_tos(), struct lsa_CREDRREAD);
4737 if (r == NULL) {
4738 return false;
4741 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4742 talloc_free(r);
4743 return false;
4746 pull = ndr_pull_init_blob(&blob, r, NULL);
4747 if (pull == NULL) {
4748 talloc_free(r);
4749 return false;
4752 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4753 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4755 talloc_free(r);
4756 return false;
4759 if (DEBUGLEVEL >= 10) {
4760 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD, r);
4763 r->out.result = _lsa_CREDRREAD(p, r);
4765 if (p->rng_fault_state) {
4766 talloc_free(r);
4767 /* Return true here, srv_pipe_hnd.c will take care */
4768 return true;
4771 if (DEBUGLEVEL >= 10) {
4772 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, r);
4775 push = ndr_push_init_ctx(r, NULL);
4776 if (push == NULL) {
4777 talloc_free(r);
4778 return false;
4781 ndr_err = call->ndr_push(push, NDR_OUT, r);
4782 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4783 talloc_free(r);
4784 return false;
4787 blob = ndr_push_blob(push);
4788 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4789 talloc_free(r);
4790 return false;
4793 talloc_free(r);
4795 return true;
4798 static bool api_lsa_CREDRENUMERATE(pipes_struct *p)
4800 const struct ndr_interface_call *call;
4801 struct ndr_pull *pull;
4802 struct ndr_push *push;
4803 enum ndr_err_code ndr_err;
4804 DATA_BLOB blob;
4805 struct lsa_CREDRENUMERATE *r;
4807 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRENUMERATE];
4809 r = talloc(talloc_tos(), struct lsa_CREDRENUMERATE);
4810 if (r == NULL) {
4811 return false;
4814 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4815 talloc_free(r);
4816 return false;
4819 pull = ndr_pull_init_blob(&blob, r, NULL);
4820 if (pull == NULL) {
4821 talloc_free(r);
4822 return false;
4825 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4826 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4827 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4828 talloc_free(r);
4829 return false;
4832 if (DEBUGLEVEL >= 10) {
4833 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE, r);
4836 r->out.result = _lsa_CREDRENUMERATE(p, r);
4838 if (p->rng_fault_state) {
4839 talloc_free(r);
4840 /* Return true here, srv_pipe_hnd.c will take care */
4841 return true;
4844 if (DEBUGLEVEL >= 10) {
4845 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, r);
4848 push = ndr_push_init_ctx(r, NULL);
4849 if (push == NULL) {
4850 talloc_free(r);
4851 return false;
4854 ndr_err = call->ndr_push(push, NDR_OUT, r);
4855 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4856 talloc_free(r);
4857 return false;
4860 blob = ndr_push_blob(push);
4861 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4862 talloc_free(r);
4863 return false;
4866 talloc_free(r);
4868 return true;
4871 static bool api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p)
4873 const struct ndr_interface_call *call;
4874 struct ndr_pull *pull;
4875 struct ndr_push *push;
4876 enum ndr_err_code ndr_err;
4877 DATA_BLOB blob;
4878 struct lsa_CREDRWRITEDOMAINCREDENTIALS *r;
4880 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRWRITEDOMAINCREDENTIALS];
4882 r = talloc(talloc_tos(), struct lsa_CREDRWRITEDOMAINCREDENTIALS);
4883 if (r == NULL) {
4884 return false;
4887 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4888 talloc_free(r);
4889 return false;
4892 pull = ndr_pull_init_blob(&blob, r, NULL);
4893 if (pull == NULL) {
4894 talloc_free(r);
4895 return false;
4898 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4899 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4900 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4901 talloc_free(r);
4902 return false;
4905 if (DEBUGLEVEL >= 10) {
4906 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, r);
4909 r->out.result = _lsa_CREDRWRITEDOMAINCREDENTIALS(p, r);
4911 if (p->rng_fault_state) {
4912 talloc_free(r);
4913 /* Return true here, srv_pipe_hnd.c will take care */
4914 return true;
4917 if (DEBUGLEVEL >= 10) {
4918 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, r);
4921 push = ndr_push_init_ctx(r, NULL);
4922 if (push == NULL) {
4923 talloc_free(r);
4924 return false;
4927 ndr_err = call->ndr_push(push, NDR_OUT, r);
4928 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4929 talloc_free(r);
4930 return false;
4933 blob = ndr_push_blob(push);
4934 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4935 talloc_free(r);
4936 return false;
4939 talloc_free(r);
4941 return true;
4944 static bool api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p)
4946 const struct ndr_interface_call *call;
4947 struct ndr_pull *pull;
4948 struct ndr_push *push;
4949 enum ndr_err_code ndr_err;
4950 DATA_BLOB blob;
4951 struct lsa_CREDRREADDOMAINCREDENTIALS *r;
4953 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRREADDOMAINCREDENTIALS];
4955 r = talloc(talloc_tos(), struct lsa_CREDRREADDOMAINCREDENTIALS);
4956 if (r == NULL) {
4957 return false;
4960 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4961 talloc_free(r);
4962 return false;
4965 pull = ndr_pull_init_blob(&blob, r, NULL);
4966 if (pull == NULL) {
4967 talloc_free(r);
4968 return false;
4971 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4972 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4973 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4974 talloc_free(r);
4975 return false;
4978 if (DEBUGLEVEL >= 10) {
4979 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, r);
4982 r->out.result = _lsa_CREDRREADDOMAINCREDENTIALS(p, r);
4984 if (p->rng_fault_state) {
4985 talloc_free(r);
4986 /* Return true here, srv_pipe_hnd.c will take care */
4987 return true;
4990 if (DEBUGLEVEL >= 10) {
4991 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, r);
4994 push = ndr_push_init_ctx(r, NULL);
4995 if (push == NULL) {
4996 talloc_free(r);
4997 return false;
5000 ndr_err = call->ndr_push(push, NDR_OUT, r);
5001 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5002 talloc_free(r);
5003 return false;
5006 blob = ndr_push_blob(push);
5007 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5008 talloc_free(r);
5009 return false;
5012 talloc_free(r);
5014 return true;
5017 static bool api_lsa_CREDRDELETE(pipes_struct *p)
5019 const struct ndr_interface_call *call;
5020 struct ndr_pull *pull;
5021 struct ndr_push *push;
5022 enum ndr_err_code ndr_err;
5023 DATA_BLOB blob;
5024 struct lsa_CREDRDELETE *r;
5026 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRDELETE];
5028 r = talloc(talloc_tos(), struct lsa_CREDRDELETE);
5029 if (r == NULL) {
5030 return false;
5033 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5034 talloc_free(r);
5035 return false;
5038 pull = ndr_pull_init_blob(&blob, r, NULL);
5039 if (pull == NULL) {
5040 talloc_free(r);
5041 return false;
5044 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5045 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5046 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5047 talloc_free(r);
5048 return false;
5051 if (DEBUGLEVEL >= 10) {
5052 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE, r);
5055 r->out.result = _lsa_CREDRDELETE(p, r);
5057 if (p->rng_fault_state) {
5058 talloc_free(r);
5059 /* Return true here, srv_pipe_hnd.c will take care */
5060 return true;
5063 if (DEBUGLEVEL >= 10) {
5064 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, r);
5067 push = ndr_push_init_ctx(r, NULL);
5068 if (push == NULL) {
5069 talloc_free(r);
5070 return false;
5073 ndr_err = call->ndr_push(push, NDR_OUT, r);
5074 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5075 talloc_free(r);
5076 return false;
5079 blob = ndr_push_blob(push);
5080 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5081 talloc_free(r);
5082 return false;
5085 talloc_free(r);
5087 return true;
5090 static bool api_lsa_CREDRGETTARGETINFO(pipes_struct *p)
5092 const struct ndr_interface_call *call;
5093 struct ndr_pull *pull;
5094 struct ndr_push *push;
5095 enum ndr_err_code ndr_err;
5096 DATA_BLOB blob;
5097 struct lsa_CREDRGETTARGETINFO *r;
5099 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRGETTARGETINFO];
5101 r = talloc(talloc_tos(), struct lsa_CREDRGETTARGETINFO);
5102 if (r == NULL) {
5103 return false;
5106 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5107 talloc_free(r);
5108 return false;
5111 pull = ndr_pull_init_blob(&blob, r, NULL);
5112 if (pull == NULL) {
5113 talloc_free(r);
5114 return false;
5117 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5118 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5119 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5120 talloc_free(r);
5121 return false;
5124 if (DEBUGLEVEL >= 10) {
5125 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO, r);
5128 r->out.result = _lsa_CREDRGETTARGETINFO(p, r);
5130 if (p->rng_fault_state) {
5131 talloc_free(r);
5132 /* Return true here, srv_pipe_hnd.c will take care */
5133 return true;
5136 if (DEBUGLEVEL >= 10) {
5137 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, r);
5140 push = ndr_push_init_ctx(r, NULL);
5141 if (push == NULL) {
5142 talloc_free(r);
5143 return false;
5146 ndr_err = call->ndr_push(push, NDR_OUT, r);
5147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5148 talloc_free(r);
5149 return false;
5152 blob = ndr_push_blob(push);
5153 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5154 talloc_free(r);
5155 return false;
5158 talloc_free(r);
5160 return true;
5163 static bool api_lsa_CREDRPROFILELOADED(pipes_struct *p)
5165 const struct ndr_interface_call *call;
5166 struct ndr_pull *pull;
5167 struct ndr_push *push;
5168 enum ndr_err_code ndr_err;
5169 DATA_BLOB blob;
5170 struct lsa_CREDRPROFILELOADED *r;
5172 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRPROFILELOADED];
5174 r = talloc(talloc_tos(), struct lsa_CREDRPROFILELOADED);
5175 if (r == NULL) {
5176 return false;
5179 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5180 talloc_free(r);
5181 return false;
5184 pull = ndr_pull_init_blob(&blob, r, NULL);
5185 if (pull == NULL) {
5186 talloc_free(r);
5187 return false;
5190 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5191 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5192 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5193 talloc_free(r);
5194 return false;
5197 if (DEBUGLEVEL >= 10) {
5198 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED, r);
5201 r->out.result = _lsa_CREDRPROFILELOADED(p, r);
5203 if (p->rng_fault_state) {
5204 talloc_free(r);
5205 /* Return true here, srv_pipe_hnd.c will take care */
5206 return true;
5209 if (DEBUGLEVEL >= 10) {
5210 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, r);
5213 push = ndr_push_init_ctx(r, NULL);
5214 if (push == NULL) {
5215 talloc_free(r);
5216 return false;
5219 ndr_err = call->ndr_push(push, NDR_OUT, r);
5220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5221 talloc_free(r);
5222 return false;
5225 blob = ndr_push_blob(push);
5226 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5227 talloc_free(r);
5228 return false;
5231 talloc_free(r);
5233 return true;
5236 static bool api_lsa_LookupNames3(pipes_struct *p)
5238 const struct ndr_interface_call *call;
5239 struct ndr_pull *pull;
5240 struct ndr_push *push;
5241 enum ndr_err_code ndr_err;
5242 DATA_BLOB blob;
5243 struct lsa_LookupNames3 *r;
5245 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES3];
5247 r = talloc(talloc_tos(), struct lsa_LookupNames3);
5248 if (r == NULL) {
5249 return false;
5252 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5253 talloc_free(r);
5254 return false;
5257 pull = ndr_pull_init_blob(&blob, r, NULL);
5258 if (pull == NULL) {
5259 talloc_free(r);
5260 return false;
5263 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5264 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5265 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5266 talloc_free(r);
5267 return false;
5270 if (DEBUGLEVEL >= 10) {
5271 NDR_PRINT_IN_DEBUG(lsa_LookupNames3, r);
5274 ZERO_STRUCT(r->out);
5275 r->out.sids = r->in.sids;
5276 r->out.count = r->in.count;
5277 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
5278 if (r->out.domains == NULL) {
5279 talloc_free(r);
5280 return false;
5283 r->out.result = _lsa_LookupNames3(p, r);
5285 if (p->rng_fault_state) {
5286 talloc_free(r);
5287 /* Return true here, srv_pipe_hnd.c will take care */
5288 return true;
5291 if (DEBUGLEVEL >= 10) {
5292 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, r);
5295 push = ndr_push_init_ctx(r, NULL);
5296 if (push == NULL) {
5297 talloc_free(r);
5298 return false;
5301 ndr_err = call->ndr_push(push, NDR_OUT, r);
5302 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5303 talloc_free(r);
5304 return false;
5307 blob = ndr_push_blob(push);
5308 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5309 talloc_free(r);
5310 return false;
5313 talloc_free(r);
5315 return true;
5318 static bool api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p)
5320 const struct ndr_interface_call *call;
5321 struct ndr_pull *pull;
5322 struct ndr_push *push;
5323 enum ndr_err_code ndr_err;
5324 DATA_BLOB blob;
5325 struct lsa_CREDRGETSESSIONTYPES *r;
5327 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRGETSESSIONTYPES];
5329 r = talloc(talloc_tos(), struct lsa_CREDRGETSESSIONTYPES);
5330 if (r == NULL) {
5331 return false;
5334 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5335 talloc_free(r);
5336 return false;
5339 pull = ndr_pull_init_blob(&blob, r, NULL);
5340 if (pull == NULL) {
5341 talloc_free(r);
5342 return false;
5345 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5346 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5347 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5348 talloc_free(r);
5349 return false;
5352 if (DEBUGLEVEL >= 10) {
5353 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES, r);
5356 r->out.result = _lsa_CREDRGETSESSIONTYPES(p, r);
5358 if (p->rng_fault_state) {
5359 talloc_free(r);
5360 /* Return true here, srv_pipe_hnd.c will take care */
5361 return true;
5364 if (DEBUGLEVEL >= 10) {
5365 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, r);
5368 push = ndr_push_init_ctx(r, NULL);
5369 if (push == NULL) {
5370 talloc_free(r);
5371 return false;
5374 ndr_err = call->ndr_push(push, NDR_OUT, r);
5375 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5376 talloc_free(r);
5377 return false;
5380 blob = ndr_push_blob(push);
5381 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5382 talloc_free(r);
5383 return false;
5386 talloc_free(r);
5388 return true;
5391 static bool api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p)
5393 const struct ndr_interface_call *call;
5394 struct ndr_pull *pull;
5395 struct ndr_push *push;
5396 enum ndr_err_code ndr_err;
5397 DATA_BLOB blob;
5398 struct lsa_LSARREGISTERAUDITEVENT *r;
5400 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARREGISTERAUDITEVENT];
5402 r = talloc(talloc_tos(), struct lsa_LSARREGISTERAUDITEVENT);
5403 if (r == NULL) {
5404 return false;
5407 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5408 talloc_free(r);
5409 return false;
5412 pull = ndr_pull_init_blob(&blob, r, NULL);
5413 if (pull == NULL) {
5414 talloc_free(r);
5415 return false;
5418 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5419 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5420 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5421 talloc_free(r);
5422 return false;
5425 if (DEBUGLEVEL >= 10) {
5426 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT, r);
5429 r->out.result = _lsa_LSARREGISTERAUDITEVENT(p, r);
5431 if (p->rng_fault_state) {
5432 talloc_free(r);
5433 /* Return true here, srv_pipe_hnd.c will take care */
5434 return true;
5437 if (DEBUGLEVEL >= 10) {
5438 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, r);
5441 push = ndr_push_init_ctx(r, NULL);
5442 if (push == NULL) {
5443 talloc_free(r);
5444 return false;
5447 ndr_err = call->ndr_push(push, NDR_OUT, r);
5448 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5449 talloc_free(r);
5450 return false;
5453 blob = ndr_push_blob(push);
5454 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5455 talloc_free(r);
5456 return false;
5459 talloc_free(r);
5461 return true;
5464 static bool api_lsa_LSARGENAUDITEVENT(pipes_struct *p)
5466 const struct ndr_interface_call *call;
5467 struct ndr_pull *pull;
5468 struct ndr_push *push;
5469 enum ndr_err_code ndr_err;
5470 DATA_BLOB blob;
5471 struct lsa_LSARGENAUDITEVENT *r;
5473 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARGENAUDITEVENT];
5475 r = talloc(talloc_tos(), struct lsa_LSARGENAUDITEVENT);
5476 if (r == NULL) {
5477 return false;
5480 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5481 talloc_free(r);
5482 return false;
5485 pull = ndr_pull_init_blob(&blob, r, NULL);
5486 if (pull == NULL) {
5487 talloc_free(r);
5488 return false;
5491 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5492 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5493 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5494 talloc_free(r);
5495 return false;
5498 if (DEBUGLEVEL >= 10) {
5499 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT, r);
5502 r->out.result = _lsa_LSARGENAUDITEVENT(p, r);
5504 if (p->rng_fault_state) {
5505 talloc_free(r);
5506 /* Return true here, srv_pipe_hnd.c will take care */
5507 return true;
5510 if (DEBUGLEVEL >= 10) {
5511 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, r);
5514 push = ndr_push_init_ctx(r, NULL);
5515 if (push == NULL) {
5516 talloc_free(r);
5517 return false;
5520 ndr_err = call->ndr_push(push, NDR_OUT, r);
5521 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5522 talloc_free(r);
5523 return false;
5526 blob = ndr_push_blob(push);
5527 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5528 talloc_free(r);
5529 return false;
5532 talloc_free(r);
5534 return true;
5537 static bool api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p)
5539 const struct ndr_interface_call *call;
5540 struct ndr_pull *pull;
5541 struct ndr_push *push;
5542 enum ndr_err_code ndr_err;
5543 DATA_BLOB blob;
5544 struct lsa_LSARUNREGISTERAUDITEVENT *r;
5546 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARUNREGISTERAUDITEVENT];
5548 r = talloc(talloc_tos(), struct lsa_LSARUNREGISTERAUDITEVENT);
5549 if (r == NULL) {
5550 return false;
5553 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5554 talloc_free(r);
5555 return false;
5558 pull = ndr_pull_init_blob(&blob, r, NULL);
5559 if (pull == NULL) {
5560 talloc_free(r);
5561 return false;
5564 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5565 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5566 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5567 talloc_free(r);
5568 return false;
5571 if (DEBUGLEVEL >= 10) {
5572 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, r);
5575 r->out.result = _lsa_LSARUNREGISTERAUDITEVENT(p, r);
5577 if (p->rng_fault_state) {
5578 talloc_free(r);
5579 /* Return true here, srv_pipe_hnd.c will take care */
5580 return true;
5583 if (DEBUGLEVEL >= 10) {
5584 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, r);
5587 push = ndr_push_init_ctx(r, NULL);
5588 if (push == NULL) {
5589 talloc_free(r);
5590 return false;
5593 ndr_err = call->ndr_push(push, NDR_OUT, r);
5594 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5595 talloc_free(r);
5596 return false;
5599 blob = ndr_push_blob(push);
5600 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5601 talloc_free(r);
5602 return false;
5605 talloc_free(r);
5607 return true;
5610 static bool api_lsa_lsaRQueryForestTrustInformation(pipes_struct *p)
5612 const struct ndr_interface_call *call;
5613 struct ndr_pull *pull;
5614 struct ndr_push *push;
5615 enum ndr_err_code ndr_err;
5616 DATA_BLOB blob;
5617 struct lsa_lsaRQueryForestTrustInformation *r;
5619 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION];
5621 r = talloc(talloc_tos(), struct lsa_lsaRQueryForestTrustInformation);
5622 if (r == NULL) {
5623 return false;
5626 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5627 talloc_free(r);
5628 return false;
5631 pull = ndr_pull_init_blob(&blob, r, NULL);
5632 if (pull == NULL) {
5633 talloc_free(r);
5634 return false;
5637 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5638 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5639 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5640 talloc_free(r);
5641 return false;
5644 if (DEBUGLEVEL >= 10) {
5645 NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation, r);
5648 ZERO_STRUCT(r->out);
5649 r->out.forest_trust_info = talloc_zero(r, struct lsa_ForestTrustInformation *);
5650 if (r->out.forest_trust_info == NULL) {
5651 talloc_free(r);
5652 return false;
5655 r->out.result = _lsa_lsaRQueryForestTrustInformation(p, r);
5657 if (p->rng_fault_state) {
5658 talloc_free(r);
5659 /* Return true here, srv_pipe_hnd.c will take care */
5660 return true;
5663 if (DEBUGLEVEL >= 10) {
5664 NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, r);
5667 push = ndr_push_init_ctx(r, NULL);
5668 if (push == NULL) {
5669 talloc_free(r);
5670 return false;
5673 ndr_err = call->ndr_push(push, NDR_OUT, r);
5674 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5675 talloc_free(r);
5676 return false;
5679 blob = ndr_push_blob(push);
5680 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5681 talloc_free(r);
5682 return false;
5685 talloc_free(r);
5687 return true;
5690 static bool api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p)
5692 const struct ndr_interface_call *call;
5693 struct ndr_pull *pull;
5694 struct ndr_push *push;
5695 enum ndr_err_code ndr_err;
5696 DATA_BLOB blob;
5697 struct lsa_LSARSETFORESTTRUSTINFORMATION *r;
5699 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARSETFORESTTRUSTINFORMATION];
5701 r = talloc(talloc_tos(), struct lsa_LSARSETFORESTTRUSTINFORMATION);
5702 if (r == NULL) {
5703 return false;
5706 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5707 talloc_free(r);
5708 return false;
5711 pull = ndr_pull_init_blob(&blob, r, NULL);
5712 if (pull == NULL) {
5713 talloc_free(r);
5714 return false;
5717 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5718 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5719 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5720 talloc_free(r);
5721 return false;
5724 if (DEBUGLEVEL >= 10) {
5725 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, r);
5728 r->out.result = _lsa_LSARSETFORESTTRUSTINFORMATION(p, r);
5730 if (p->rng_fault_state) {
5731 talloc_free(r);
5732 /* Return true here, srv_pipe_hnd.c will take care */
5733 return true;
5736 if (DEBUGLEVEL >= 10) {
5737 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, r);
5740 push = ndr_push_init_ctx(r, NULL);
5741 if (push == NULL) {
5742 talloc_free(r);
5743 return false;
5746 ndr_err = call->ndr_push(push, NDR_OUT, r);
5747 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5748 talloc_free(r);
5749 return false;
5752 blob = ndr_push_blob(push);
5753 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5754 talloc_free(r);
5755 return false;
5758 talloc_free(r);
5760 return true;
5763 static bool api_lsa_CREDRRENAME(pipes_struct *p)
5765 const struct ndr_interface_call *call;
5766 struct ndr_pull *pull;
5767 struct ndr_push *push;
5768 enum ndr_err_code ndr_err;
5769 DATA_BLOB blob;
5770 struct lsa_CREDRRENAME *r;
5772 call = &ndr_table_lsarpc.calls[NDR_LSA_CREDRRENAME];
5774 r = talloc(talloc_tos(), struct lsa_CREDRRENAME);
5775 if (r == NULL) {
5776 return false;
5779 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5780 talloc_free(r);
5781 return false;
5784 pull = ndr_pull_init_blob(&blob, r, NULL);
5785 if (pull == NULL) {
5786 talloc_free(r);
5787 return false;
5790 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5791 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5792 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5793 talloc_free(r);
5794 return false;
5797 if (DEBUGLEVEL >= 10) {
5798 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME, r);
5801 r->out.result = _lsa_CREDRRENAME(p, r);
5803 if (p->rng_fault_state) {
5804 talloc_free(r);
5805 /* Return true here, srv_pipe_hnd.c will take care */
5806 return true;
5809 if (DEBUGLEVEL >= 10) {
5810 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, r);
5813 push = ndr_push_init_ctx(r, NULL);
5814 if (push == NULL) {
5815 talloc_free(r);
5816 return false;
5819 ndr_err = call->ndr_push(push, NDR_OUT, r);
5820 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5821 talloc_free(r);
5822 return false;
5825 blob = ndr_push_blob(push);
5826 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5827 talloc_free(r);
5828 return false;
5831 talloc_free(r);
5833 return true;
5836 static bool api_lsa_LookupSids3(pipes_struct *p)
5838 const struct ndr_interface_call *call;
5839 struct ndr_pull *pull;
5840 struct ndr_push *push;
5841 enum ndr_err_code ndr_err;
5842 DATA_BLOB blob;
5843 struct lsa_LookupSids3 *r;
5845 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPSIDS3];
5847 r = talloc(talloc_tos(), struct lsa_LookupSids3);
5848 if (r == NULL) {
5849 return false;
5852 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5853 talloc_free(r);
5854 return false;
5857 pull = ndr_pull_init_blob(&blob, r, NULL);
5858 if (pull == NULL) {
5859 talloc_free(r);
5860 return false;
5863 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5864 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5865 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5866 talloc_free(r);
5867 return false;
5870 if (DEBUGLEVEL >= 10) {
5871 NDR_PRINT_IN_DEBUG(lsa_LookupSids3, r);
5874 ZERO_STRUCT(r->out);
5875 r->out.names = r->in.names;
5876 r->out.count = r->in.count;
5877 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
5878 if (r->out.domains == NULL) {
5879 talloc_free(r);
5880 return false;
5883 r->out.result = _lsa_LookupSids3(p, r);
5885 if (p->rng_fault_state) {
5886 talloc_free(r);
5887 /* Return true here, srv_pipe_hnd.c will take care */
5888 return true;
5891 if (DEBUGLEVEL >= 10) {
5892 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, r);
5895 push = ndr_push_init_ctx(r, NULL);
5896 if (push == NULL) {
5897 talloc_free(r);
5898 return false;
5901 ndr_err = call->ndr_push(push, NDR_OUT, r);
5902 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5903 talloc_free(r);
5904 return false;
5907 blob = ndr_push_blob(push);
5908 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5909 talloc_free(r);
5910 return false;
5913 talloc_free(r);
5915 return true;
5918 static bool api_lsa_LookupNames4(pipes_struct *p)
5920 const struct ndr_interface_call *call;
5921 struct ndr_pull *pull;
5922 struct ndr_push *push;
5923 enum ndr_err_code ndr_err;
5924 DATA_BLOB blob;
5925 struct lsa_LookupNames4 *r;
5927 call = &ndr_table_lsarpc.calls[NDR_LSA_LOOKUPNAMES4];
5929 r = talloc(talloc_tos(), struct lsa_LookupNames4);
5930 if (r == NULL) {
5931 return false;
5934 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5935 talloc_free(r);
5936 return false;
5939 pull = ndr_pull_init_blob(&blob, r, NULL);
5940 if (pull == NULL) {
5941 talloc_free(r);
5942 return false;
5945 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5946 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5947 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5948 talloc_free(r);
5949 return false;
5952 if (DEBUGLEVEL >= 10) {
5953 NDR_PRINT_IN_DEBUG(lsa_LookupNames4, r);
5956 ZERO_STRUCT(r->out);
5957 r->out.sids = r->in.sids;
5958 r->out.count = r->in.count;
5959 r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
5960 if (r->out.domains == NULL) {
5961 talloc_free(r);
5962 return false;
5965 r->out.result = _lsa_LookupNames4(p, r);
5967 if (p->rng_fault_state) {
5968 talloc_free(r);
5969 /* Return true here, srv_pipe_hnd.c will take care */
5970 return true;
5973 if (DEBUGLEVEL >= 10) {
5974 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, r);
5977 push = ndr_push_init_ctx(r, NULL);
5978 if (push == NULL) {
5979 talloc_free(r);
5980 return false;
5983 ndr_err = call->ndr_push(push, NDR_OUT, r);
5984 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5985 talloc_free(r);
5986 return false;
5989 blob = ndr_push_blob(push);
5990 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5991 talloc_free(r);
5992 return false;
5995 talloc_free(r);
5997 return true;
6000 static bool api_lsa_LSAROPENPOLICYSCE(pipes_struct *p)
6002 const struct ndr_interface_call *call;
6003 struct ndr_pull *pull;
6004 struct ndr_push *push;
6005 enum ndr_err_code ndr_err;
6006 DATA_BLOB blob;
6007 struct lsa_LSAROPENPOLICYSCE *r;
6009 call = &ndr_table_lsarpc.calls[NDR_LSA_LSAROPENPOLICYSCE];
6011 r = talloc(talloc_tos(), struct lsa_LSAROPENPOLICYSCE);
6012 if (r == NULL) {
6013 return false;
6016 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6017 talloc_free(r);
6018 return false;
6021 pull = ndr_pull_init_blob(&blob, r, NULL);
6022 if (pull == NULL) {
6023 talloc_free(r);
6024 return false;
6027 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6028 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6029 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6030 talloc_free(r);
6031 return false;
6034 if (DEBUGLEVEL >= 10) {
6035 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE, r);
6038 r->out.result = _lsa_LSAROPENPOLICYSCE(p, r);
6040 if (p->rng_fault_state) {
6041 talloc_free(r);
6042 /* Return true here, srv_pipe_hnd.c will take care */
6043 return true;
6046 if (DEBUGLEVEL >= 10) {
6047 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, r);
6050 push = ndr_push_init_ctx(r, NULL);
6051 if (push == NULL) {
6052 talloc_free(r);
6053 return false;
6056 ndr_err = call->ndr_push(push, NDR_OUT, r);
6057 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6058 talloc_free(r);
6059 return false;
6062 blob = ndr_push_blob(push);
6063 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6064 talloc_free(r);
6065 return false;
6068 talloc_free(r);
6070 return true;
6073 static bool api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
6075 const struct ndr_interface_call *call;
6076 struct ndr_pull *pull;
6077 struct ndr_push *push;
6078 enum ndr_err_code ndr_err;
6079 DATA_BLOB blob;
6080 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r;
6082 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE];
6084 r = talloc(talloc_tos(), struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE);
6085 if (r == NULL) {
6086 return false;
6089 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6090 talloc_free(r);
6091 return false;
6094 pull = ndr_pull_init_blob(&blob, r, NULL);
6095 if (pull == NULL) {
6096 talloc_free(r);
6097 return false;
6100 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6101 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6102 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6103 talloc_free(r);
6104 return false;
6107 if (DEBUGLEVEL >= 10) {
6108 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, r);
6111 r->out.result = _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(p, r);
6113 if (p->rng_fault_state) {
6114 talloc_free(r);
6115 /* Return true here, srv_pipe_hnd.c will take care */
6116 return true;
6119 if (DEBUGLEVEL >= 10) {
6120 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, r);
6123 push = ndr_push_init_ctx(r, NULL);
6124 if (push == NULL) {
6125 talloc_free(r);
6126 return false;
6129 ndr_err = call->ndr_push(push, NDR_OUT, r);
6130 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6131 talloc_free(r);
6132 return false;
6135 blob = ndr_push_blob(push);
6136 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6137 talloc_free(r);
6138 return false;
6141 talloc_free(r);
6143 return true;
6146 static bool api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
6148 const struct ndr_interface_call *call;
6149 struct ndr_pull *pull;
6150 struct ndr_push *push;
6151 enum ndr_err_code ndr_err;
6152 DATA_BLOB blob;
6153 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r;
6155 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE];
6157 r = talloc(talloc_tos(), struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE);
6158 if (r == NULL) {
6159 return false;
6162 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6163 talloc_free(r);
6164 return false;
6167 pull = ndr_pull_init_blob(&blob, r, NULL);
6168 if (pull == NULL) {
6169 talloc_free(r);
6170 return false;
6173 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6174 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6175 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6176 talloc_free(r);
6177 return false;
6180 if (DEBUGLEVEL >= 10) {
6181 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, r);
6184 r->out.result = _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(p, r);
6186 if (p->rng_fault_state) {
6187 talloc_free(r);
6188 /* Return true here, srv_pipe_hnd.c will take care */
6189 return true;
6192 if (DEBUGLEVEL >= 10) {
6193 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, r);
6196 push = ndr_push_init_ctx(r, NULL);
6197 if (push == NULL) {
6198 talloc_free(r);
6199 return false;
6202 ndr_err = call->ndr_push(push, NDR_OUT, r);
6203 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6204 talloc_free(r);
6205 return false;
6208 blob = ndr_push_blob(push);
6209 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6210 talloc_free(r);
6211 return false;
6214 talloc_free(r);
6216 return true;
6219 static bool api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p)
6221 const struct ndr_interface_call *call;
6222 struct ndr_pull *pull;
6223 struct ndr_push *push;
6224 enum ndr_err_code ndr_err;
6225 DATA_BLOB blob;
6226 struct lsa_LSARADTREPORTSECURITYEVENT *r;
6228 call = &ndr_table_lsarpc.calls[NDR_LSA_LSARADTREPORTSECURITYEVENT];
6230 r = talloc(talloc_tos(), struct lsa_LSARADTREPORTSECURITYEVENT);
6231 if (r == NULL) {
6232 return false;
6235 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6236 talloc_free(r);
6237 return false;
6240 pull = ndr_pull_init_blob(&blob, r, NULL);
6241 if (pull == NULL) {
6242 talloc_free(r);
6243 return false;
6246 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6247 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6248 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6249 talloc_free(r);
6250 return false;
6253 if (DEBUGLEVEL >= 10) {
6254 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, r);
6257 r->out.result = _lsa_LSARADTREPORTSECURITYEVENT(p, r);
6259 if (p->rng_fault_state) {
6260 talloc_free(r);
6261 /* Return true here, srv_pipe_hnd.c will take care */
6262 return true;
6265 if (DEBUGLEVEL >= 10) {
6266 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, r);
6269 push = ndr_push_init_ctx(r, NULL);
6270 if (push == NULL) {
6271 talloc_free(r);
6272 return false;
6275 ndr_err = call->ndr_push(push, NDR_OUT, r);
6276 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6277 talloc_free(r);
6278 return false;
6281 blob = ndr_push_blob(push);
6282 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6283 talloc_free(r);
6284 return false;
6287 talloc_free(r);
6289 return true;
6293 /* Tables */
6294 static struct api_struct api_lsarpc_cmds[] =
6296 {"LSA_CLOSE", NDR_LSA_CLOSE, api_lsa_Close},
6297 {"LSA_DELETE", NDR_LSA_DELETE, api_lsa_Delete},
6298 {"LSA_ENUMPRIVS", NDR_LSA_ENUMPRIVS, api_lsa_EnumPrivs},
6299 {"LSA_QUERYSECURITY", NDR_LSA_QUERYSECURITY, api_lsa_QuerySecurity},
6300 {"LSA_SETSECOBJ", NDR_LSA_SETSECOBJ, api_lsa_SetSecObj},
6301 {"LSA_CHANGEPASSWORD", NDR_LSA_CHANGEPASSWORD, api_lsa_ChangePassword},
6302 {"LSA_OPENPOLICY", NDR_LSA_OPENPOLICY, api_lsa_OpenPolicy},
6303 {"LSA_QUERYINFOPOLICY", NDR_LSA_QUERYINFOPOLICY, api_lsa_QueryInfoPolicy},
6304 {"LSA_SETINFOPOLICY", NDR_LSA_SETINFOPOLICY, api_lsa_SetInfoPolicy},
6305 {"LSA_CLEARAUDITLOG", NDR_LSA_CLEARAUDITLOG, api_lsa_ClearAuditLog},
6306 {"LSA_CREATEACCOUNT", NDR_LSA_CREATEACCOUNT, api_lsa_CreateAccount},
6307 {"LSA_ENUMACCOUNTS", NDR_LSA_ENUMACCOUNTS, api_lsa_EnumAccounts},
6308 {"LSA_CREATETRUSTEDDOMAIN", NDR_LSA_CREATETRUSTEDDOMAIN, api_lsa_CreateTrustedDomain},
6309 {"LSA_ENUMTRUSTDOM", NDR_LSA_ENUMTRUSTDOM, api_lsa_EnumTrustDom},
6310 {"LSA_LOOKUPNAMES", NDR_LSA_LOOKUPNAMES, api_lsa_LookupNames},
6311 {"LSA_LOOKUPSIDS", NDR_LSA_LOOKUPSIDS, api_lsa_LookupSids},
6312 {"LSA_CREATESECRET", NDR_LSA_CREATESECRET, api_lsa_CreateSecret},
6313 {"LSA_OPENACCOUNT", NDR_LSA_OPENACCOUNT, api_lsa_OpenAccount},
6314 {"LSA_ENUMPRIVSACCOUNT", NDR_LSA_ENUMPRIVSACCOUNT, api_lsa_EnumPrivsAccount},
6315 {"LSA_ADDPRIVILEGESTOACCOUNT", NDR_LSA_ADDPRIVILEGESTOACCOUNT, api_lsa_AddPrivilegesToAccount},
6316 {"LSA_REMOVEPRIVILEGESFROMACCOUNT", NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT, api_lsa_RemovePrivilegesFromAccount},
6317 {"LSA_GETQUOTASFORACCOUNT", NDR_LSA_GETQUOTASFORACCOUNT, api_lsa_GetQuotasForAccount},
6318 {"LSA_SETQUOTASFORACCOUNT", NDR_LSA_SETQUOTASFORACCOUNT, api_lsa_SetQuotasForAccount},
6319 {"LSA_GETSYSTEMACCESSACCOUNT", NDR_LSA_GETSYSTEMACCESSACCOUNT, api_lsa_GetSystemAccessAccount},
6320 {"LSA_SETSYSTEMACCESSACCOUNT", NDR_LSA_SETSYSTEMACCESSACCOUNT, api_lsa_SetSystemAccessAccount},
6321 {"LSA_OPENTRUSTEDDOMAIN", NDR_LSA_OPENTRUSTEDDOMAIN, api_lsa_OpenTrustedDomain},
6322 {"LSA_QUERYTRUSTEDDOMAININFO", NDR_LSA_QUERYTRUSTEDDOMAININFO, api_lsa_QueryTrustedDomainInfo},
6323 {"LSA_SETINFORMATIONTRUSTEDDOMAIN", NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN, api_lsa_SetInformationTrustedDomain},
6324 {"LSA_OPENSECRET", NDR_LSA_OPENSECRET, api_lsa_OpenSecret},
6325 {"LSA_SETSECRET", NDR_LSA_SETSECRET, api_lsa_SetSecret},
6326 {"LSA_QUERYSECRET", NDR_LSA_QUERYSECRET, api_lsa_QuerySecret},
6327 {"LSA_LOOKUPPRIVVALUE", NDR_LSA_LOOKUPPRIVVALUE, api_lsa_LookupPrivValue},
6328 {"LSA_LOOKUPPRIVNAME", NDR_LSA_LOOKUPPRIVNAME, api_lsa_LookupPrivName},
6329 {"LSA_LOOKUPPRIVDISPLAYNAME", NDR_LSA_LOOKUPPRIVDISPLAYNAME, api_lsa_LookupPrivDisplayName},
6330 {"LSA_DELETEOBJECT", NDR_LSA_DELETEOBJECT, api_lsa_DeleteObject},
6331 {"LSA_ENUMACCOUNTSWITHUSERRIGHT", NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT, api_lsa_EnumAccountsWithUserRight},
6332 {"LSA_ENUMACCOUNTRIGHTS", NDR_LSA_ENUMACCOUNTRIGHTS, api_lsa_EnumAccountRights},
6333 {"LSA_ADDACCOUNTRIGHTS", NDR_LSA_ADDACCOUNTRIGHTS, api_lsa_AddAccountRights},
6334 {"LSA_REMOVEACCOUNTRIGHTS", NDR_LSA_REMOVEACCOUNTRIGHTS, api_lsa_RemoveAccountRights},
6335 {"LSA_QUERYTRUSTEDDOMAININFOBYSID", NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID, api_lsa_QueryTrustedDomainInfoBySid},
6336 {"LSA_SETTRUSTEDDOMAININFO", NDR_LSA_SETTRUSTEDDOMAININFO, api_lsa_SetTrustedDomainInfo},
6337 {"LSA_DELETETRUSTEDDOMAIN", NDR_LSA_DELETETRUSTEDDOMAIN, api_lsa_DeleteTrustedDomain},
6338 {"LSA_STOREPRIVATEDATA", NDR_LSA_STOREPRIVATEDATA, api_lsa_StorePrivateData},
6339 {"LSA_RETRIEVEPRIVATEDATA", NDR_LSA_RETRIEVEPRIVATEDATA, api_lsa_RetrievePrivateData},
6340 {"LSA_OPENPOLICY2", NDR_LSA_OPENPOLICY2, api_lsa_OpenPolicy2},
6341 {"LSA_GETUSERNAME", NDR_LSA_GETUSERNAME, api_lsa_GetUserName},
6342 {"LSA_QUERYINFOPOLICY2", NDR_LSA_QUERYINFOPOLICY2, api_lsa_QueryInfoPolicy2},
6343 {"LSA_SETINFOPOLICY2", NDR_LSA_SETINFOPOLICY2, api_lsa_SetInfoPolicy2},
6344 {"LSA_QUERYTRUSTEDDOMAININFOBYNAME", NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME, api_lsa_QueryTrustedDomainInfoByName},
6345 {"LSA_SETTRUSTEDDOMAININFOBYNAME", NDR_LSA_SETTRUSTEDDOMAININFOBYNAME, api_lsa_SetTrustedDomainInfoByName},
6346 {"LSA_ENUMTRUSTEDDOMAINSEX", NDR_LSA_ENUMTRUSTEDDOMAINSEX, api_lsa_EnumTrustedDomainsEx},
6347 {"LSA_CREATETRUSTEDDOMAINEX", NDR_LSA_CREATETRUSTEDDOMAINEX, api_lsa_CreateTrustedDomainEx},
6348 {"LSA_CLOSETRUSTEDDOMAINEX", NDR_LSA_CLOSETRUSTEDDOMAINEX, api_lsa_CloseTrustedDomainEx},
6349 {"LSA_QUERYDOMAININFORMATIONPOLICY", NDR_LSA_QUERYDOMAININFORMATIONPOLICY, api_lsa_QueryDomainInformationPolicy},
6350 {"LSA_SETDOMAININFORMATIONPOLICY", NDR_LSA_SETDOMAININFORMATIONPOLICY, api_lsa_SetDomainInformationPolicy},
6351 {"LSA_OPENTRUSTEDDOMAINBYNAME", NDR_LSA_OPENTRUSTEDDOMAINBYNAME, api_lsa_OpenTrustedDomainByName},
6352 {"LSA_TESTCALL", NDR_LSA_TESTCALL, api_lsa_TestCall},
6353 {"LSA_LOOKUPSIDS2", NDR_LSA_LOOKUPSIDS2, api_lsa_LookupSids2},
6354 {"LSA_LOOKUPNAMES2", NDR_LSA_LOOKUPNAMES2, api_lsa_LookupNames2},
6355 {"LSA_CREATETRUSTEDDOMAINEX2", NDR_LSA_CREATETRUSTEDDOMAINEX2, api_lsa_CreateTrustedDomainEx2},
6356 {"LSA_CREDRWRITE", NDR_LSA_CREDRWRITE, api_lsa_CREDRWRITE},
6357 {"LSA_CREDRREAD", NDR_LSA_CREDRREAD, api_lsa_CREDRREAD},
6358 {"LSA_CREDRENUMERATE", NDR_LSA_CREDRENUMERATE, api_lsa_CREDRENUMERATE},
6359 {"LSA_CREDRWRITEDOMAINCREDENTIALS", NDR_LSA_CREDRWRITEDOMAINCREDENTIALS, api_lsa_CREDRWRITEDOMAINCREDENTIALS},
6360 {"LSA_CREDRREADDOMAINCREDENTIALS", NDR_LSA_CREDRREADDOMAINCREDENTIALS, api_lsa_CREDRREADDOMAINCREDENTIALS},
6361 {"LSA_CREDRDELETE", NDR_LSA_CREDRDELETE, api_lsa_CREDRDELETE},
6362 {"LSA_CREDRGETTARGETINFO", NDR_LSA_CREDRGETTARGETINFO, api_lsa_CREDRGETTARGETINFO},
6363 {"LSA_CREDRPROFILELOADED", NDR_LSA_CREDRPROFILELOADED, api_lsa_CREDRPROFILELOADED},
6364 {"LSA_LOOKUPNAMES3", NDR_LSA_LOOKUPNAMES3, api_lsa_LookupNames3},
6365 {"LSA_CREDRGETSESSIONTYPES", NDR_LSA_CREDRGETSESSIONTYPES, api_lsa_CREDRGETSESSIONTYPES},
6366 {"LSA_LSARREGISTERAUDITEVENT", NDR_LSA_LSARREGISTERAUDITEVENT, api_lsa_LSARREGISTERAUDITEVENT},
6367 {"LSA_LSARGENAUDITEVENT", NDR_LSA_LSARGENAUDITEVENT, api_lsa_LSARGENAUDITEVENT},
6368 {"LSA_LSARUNREGISTERAUDITEVENT", NDR_LSA_LSARUNREGISTERAUDITEVENT, api_lsa_LSARUNREGISTERAUDITEVENT},
6369 {"LSA_LSARQUERYFORESTTRUSTINFORMATION", NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, api_lsa_lsaRQueryForestTrustInformation},
6370 {"LSA_LSARSETFORESTTRUSTINFORMATION", NDR_LSA_LSARSETFORESTTRUSTINFORMATION, api_lsa_LSARSETFORESTTRUSTINFORMATION},
6371 {"LSA_CREDRRENAME", NDR_LSA_CREDRRENAME, api_lsa_CREDRRENAME},
6372 {"LSA_LOOKUPSIDS3", NDR_LSA_LOOKUPSIDS3, api_lsa_LookupSids3},
6373 {"LSA_LOOKUPNAMES4", NDR_LSA_LOOKUPNAMES4, api_lsa_LookupNames4},
6374 {"LSA_LSAROPENPOLICYSCE", NDR_LSA_LSAROPENPOLICYSCE, api_lsa_LSAROPENPOLICYSCE},
6375 {"LSA_LSARADTREGISTERSECURITYEVENTSOURCE", NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE},
6376 {"LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE", NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE},
6377 {"LSA_LSARADTREPORTSECURITYEVENT", NDR_LSA_LSARADTREPORTSECURITYEVENT, api_lsa_LSARADTREPORTSECURITYEVENT},
6380 void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns)
6382 *fns = api_lsarpc_cmds;
6383 *n_fns = sizeof(api_lsarpc_cmds) / sizeof(struct api_struct);
6386 NTSTATUS rpc_lsarpc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
6388 if (cli->pipes_struct == NULL) {
6389 return NT_STATUS_INVALID_PARAMETER;
6392 switch (opnum)
6394 case NDR_LSA_CLOSE: {
6395 struct lsa_Close *r = (struct lsa_Close *)_r;
6396 ZERO_STRUCT(r->out);
6397 r->out.handle = r->in.handle;
6398 r->out.result = _lsa_Close(cli->pipes_struct, r);
6399 return NT_STATUS_OK;
6402 case NDR_LSA_DELETE: {
6403 struct lsa_Delete *r = (struct lsa_Delete *)_r;
6404 r->out.result = _lsa_Delete(cli->pipes_struct, r);
6405 return NT_STATUS_OK;
6408 case NDR_LSA_ENUMPRIVS: {
6409 struct lsa_EnumPrivs *r = (struct lsa_EnumPrivs *)_r;
6410 ZERO_STRUCT(r->out);
6411 r->out.resume_handle = r->in.resume_handle;
6412 r->out.privs = talloc_zero(mem_ctx, struct lsa_PrivArray);
6413 if (r->out.privs == NULL) {
6414 return NT_STATUS_NO_MEMORY;
6417 r->out.result = _lsa_EnumPrivs(cli->pipes_struct, r);
6418 return NT_STATUS_OK;
6421 case NDR_LSA_QUERYSECURITY: {
6422 struct lsa_QuerySecurity *r = (struct lsa_QuerySecurity *)_r;
6423 ZERO_STRUCT(r->out);
6424 r->out.sdbuf = talloc_zero(mem_ctx, struct sec_desc_buf *);
6425 if (r->out.sdbuf == NULL) {
6426 return NT_STATUS_NO_MEMORY;
6429 r->out.result = _lsa_QuerySecurity(cli->pipes_struct, r);
6430 return NT_STATUS_OK;
6433 case NDR_LSA_SETSECOBJ: {
6434 struct lsa_SetSecObj *r = (struct lsa_SetSecObj *)_r;
6435 r->out.result = _lsa_SetSecObj(cli->pipes_struct, r);
6436 return NT_STATUS_OK;
6439 case NDR_LSA_CHANGEPASSWORD: {
6440 struct lsa_ChangePassword *r = (struct lsa_ChangePassword *)_r;
6441 r->out.result = _lsa_ChangePassword(cli->pipes_struct, r);
6442 return NT_STATUS_OK;
6445 case NDR_LSA_OPENPOLICY: {
6446 struct lsa_OpenPolicy *r = (struct lsa_OpenPolicy *)_r;
6447 ZERO_STRUCT(r->out);
6448 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
6449 if (r->out.handle == NULL) {
6450 return NT_STATUS_NO_MEMORY;
6453 r->out.result = _lsa_OpenPolicy(cli->pipes_struct, r);
6454 return NT_STATUS_OK;
6457 case NDR_LSA_QUERYINFOPOLICY: {
6458 struct lsa_QueryInfoPolicy *r = (struct lsa_QueryInfoPolicy *)_r;
6459 ZERO_STRUCT(r->out);
6460 r->out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation *);
6461 if (r->out.info == NULL) {
6462 return NT_STATUS_NO_MEMORY;
6465 r->out.result = _lsa_QueryInfoPolicy(cli->pipes_struct, r);
6466 return NT_STATUS_OK;
6469 case NDR_LSA_SETINFOPOLICY: {
6470 struct lsa_SetInfoPolicy *r = (struct lsa_SetInfoPolicy *)_r;
6471 r->out.result = _lsa_SetInfoPolicy(cli->pipes_struct, r);
6472 return NT_STATUS_OK;
6475 case NDR_LSA_CLEARAUDITLOG: {
6476 struct lsa_ClearAuditLog *r = (struct lsa_ClearAuditLog *)_r;
6477 r->out.result = _lsa_ClearAuditLog(cli->pipes_struct, r);
6478 return NT_STATUS_OK;
6481 case NDR_LSA_CREATEACCOUNT: {
6482 struct lsa_CreateAccount *r = (struct lsa_CreateAccount *)_r;
6483 ZERO_STRUCT(r->out);
6484 r->out.acct_handle = talloc_zero(mem_ctx, struct policy_handle);
6485 if (r->out.acct_handle == NULL) {
6486 return NT_STATUS_NO_MEMORY;
6489 r->out.result = _lsa_CreateAccount(cli->pipes_struct, r);
6490 return NT_STATUS_OK;
6493 case NDR_LSA_ENUMACCOUNTS: {
6494 struct lsa_EnumAccounts *r = (struct lsa_EnumAccounts *)_r;
6495 ZERO_STRUCT(r->out);
6496 r->out.resume_handle = r->in.resume_handle;
6497 r->out.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
6498 if (r->out.sids == NULL) {
6499 return NT_STATUS_NO_MEMORY;
6502 r->out.result = _lsa_EnumAccounts(cli->pipes_struct, r);
6503 return NT_STATUS_OK;
6506 case NDR_LSA_CREATETRUSTEDDOMAIN: {
6507 struct lsa_CreateTrustedDomain *r = (struct lsa_CreateTrustedDomain *)_r;
6508 ZERO_STRUCT(r->out);
6509 r->out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
6510 if (r->out.trustdom_handle == NULL) {
6511 return NT_STATUS_NO_MEMORY;
6514 r->out.result = _lsa_CreateTrustedDomain(cli->pipes_struct, r);
6515 return NT_STATUS_OK;
6518 case NDR_LSA_ENUMTRUSTDOM: {
6519 struct lsa_EnumTrustDom *r = (struct lsa_EnumTrustDom *)_r;
6520 ZERO_STRUCT(r->out);
6521 r->out.resume_handle = r->in.resume_handle;
6522 r->out.domains = talloc_zero(mem_ctx, struct lsa_DomainList);
6523 if (r->out.domains == NULL) {
6524 return NT_STATUS_NO_MEMORY;
6527 r->out.result = _lsa_EnumTrustDom(cli->pipes_struct, r);
6528 return NT_STATUS_OK;
6531 case NDR_LSA_LOOKUPNAMES: {
6532 struct lsa_LookupNames *r = (struct lsa_LookupNames *)_r;
6533 ZERO_STRUCT(r->out);
6534 r->out.sids = r->in.sids;
6535 r->out.count = r->in.count;
6536 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
6537 if (r->out.domains == NULL) {
6538 return NT_STATUS_NO_MEMORY;
6541 r->out.result = _lsa_LookupNames(cli->pipes_struct, r);
6542 return NT_STATUS_OK;
6545 case NDR_LSA_LOOKUPSIDS: {
6546 struct lsa_LookupSids *r = (struct lsa_LookupSids *)_r;
6547 ZERO_STRUCT(r->out);
6548 r->out.names = r->in.names;
6549 r->out.count = r->in.count;
6550 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
6551 if (r->out.domains == NULL) {
6552 return NT_STATUS_NO_MEMORY;
6555 r->out.result = _lsa_LookupSids(cli->pipes_struct, r);
6556 return NT_STATUS_OK;
6559 case NDR_LSA_CREATESECRET: {
6560 struct lsa_CreateSecret *r = (struct lsa_CreateSecret *)_r;
6561 ZERO_STRUCT(r->out);
6562 r->out.sec_handle = talloc_zero(mem_ctx, struct policy_handle);
6563 if (r->out.sec_handle == NULL) {
6564 return NT_STATUS_NO_MEMORY;
6567 r->out.result = _lsa_CreateSecret(cli->pipes_struct, r);
6568 return NT_STATUS_OK;
6571 case NDR_LSA_OPENACCOUNT: {
6572 struct lsa_OpenAccount *r = (struct lsa_OpenAccount *)_r;
6573 ZERO_STRUCT(r->out);
6574 r->out.acct_handle = talloc_zero(mem_ctx, struct policy_handle);
6575 if (r->out.acct_handle == NULL) {
6576 return NT_STATUS_NO_MEMORY;
6579 r->out.result = _lsa_OpenAccount(cli->pipes_struct, r);
6580 return NT_STATUS_OK;
6583 case NDR_LSA_ENUMPRIVSACCOUNT: {
6584 struct lsa_EnumPrivsAccount *r = (struct lsa_EnumPrivsAccount *)_r;
6585 ZERO_STRUCT(r->out);
6586 r->out.privs = talloc_zero(mem_ctx, struct lsa_PrivilegeSet *);
6587 if (r->out.privs == NULL) {
6588 return NT_STATUS_NO_MEMORY;
6591 r->out.result = _lsa_EnumPrivsAccount(cli->pipes_struct, r);
6592 return NT_STATUS_OK;
6595 case NDR_LSA_ADDPRIVILEGESTOACCOUNT: {
6596 struct lsa_AddPrivilegesToAccount *r = (struct lsa_AddPrivilegesToAccount *)_r;
6597 r->out.result = _lsa_AddPrivilegesToAccount(cli->pipes_struct, r);
6598 return NT_STATUS_OK;
6601 case NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT: {
6602 struct lsa_RemovePrivilegesFromAccount *r = (struct lsa_RemovePrivilegesFromAccount *)_r;
6603 r->out.result = _lsa_RemovePrivilegesFromAccount(cli->pipes_struct, r);
6604 return NT_STATUS_OK;
6607 case NDR_LSA_GETQUOTASFORACCOUNT: {
6608 struct lsa_GetQuotasForAccount *r = (struct lsa_GetQuotasForAccount *)_r;
6609 r->out.result = _lsa_GetQuotasForAccount(cli->pipes_struct, r);
6610 return NT_STATUS_OK;
6613 case NDR_LSA_SETQUOTASFORACCOUNT: {
6614 struct lsa_SetQuotasForAccount *r = (struct lsa_SetQuotasForAccount *)_r;
6615 r->out.result = _lsa_SetQuotasForAccount(cli->pipes_struct, r);
6616 return NT_STATUS_OK;
6619 case NDR_LSA_GETSYSTEMACCESSACCOUNT: {
6620 struct lsa_GetSystemAccessAccount *r = (struct lsa_GetSystemAccessAccount *)_r;
6621 ZERO_STRUCT(r->out);
6622 r->out.access_mask = talloc_zero(mem_ctx, uint32_t);
6623 if (r->out.access_mask == NULL) {
6624 return NT_STATUS_NO_MEMORY;
6627 r->out.result = _lsa_GetSystemAccessAccount(cli->pipes_struct, r);
6628 return NT_STATUS_OK;
6631 case NDR_LSA_SETSYSTEMACCESSACCOUNT: {
6632 struct lsa_SetSystemAccessAccount *r = (struct lsa_SetSystemAccessAccount *)_r;
6633 r->out.result = _lsa_SetSystemAccessAccount(cli->pipes_struct, r);
6634 return NT_STATUS_OK;
6637 case NDR_LSA_OPENTRUSTEDDOMAIN: {
6638 struct lsa_OpenTrustedDomain *r = (struct lsa_OpenTrustedDomain *)_r;
6639 ZERO_STRUCT(r->out);
6640 r->out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
6641 if (r->out.trustdom_handle == NULL) {
6642 return NT_STATUS_NO_MEMORY;
6645 r->out.result = _lsa_OpenTrustedDomain(cli->pipes_struct, r);
6646 return NT_STATUS_OK;
6649 case NDR_LSA_QUERYTRUSTEDDOMAININFO: {
6650 struct lsa_QueryTrustedDomainInfo *r = (struct lsa_QueryTrustedDomainInfo *)_r;
6651 ZERO_STRUCT(r->out);
6652 r->out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo *);
6653 if (r->out.info == NULL) {
6654 return NT_STATUS_NO_MEMORY;
6657 r->out.result = _lsa_QueryTrustedDomainInfo(cli->pipes_struct, r);
6658 return NT_STATUS_OK;
6661 case NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN: {
6662 struct lsa_SetInformationTrustedDomain *r = (struct lsa_SetInformationTrustedDomain *)_r;
6663 r->out.result = _lsa_SetInformationTrustedDomain(cli->pipes_struct, r);
6664 return NT_STATUS_OK;
6667 case NDR_LSA_OPENSECRET: {
6668 struct lsa_OpenSecret *r = (struct lsa_OpenSecret *)_r;
6669 ZERO_STRUCT(r->out);
6670 r->out.sec_handle = talloc_zero(mem_ctx, struct policy_handle);
6671 if (r->out.sec_handle == NULL) {
6672 return NT_STATUS_NO_MEMORY;
6675 r->out.result = _lsa_OpenSecret(cli->pipes_struct, r);
6676 return NT_STATUS_OK;
6679 case NDR_LSA_SETSECRET: {
6680 struct lsa_SetSecret *r = (struct lsa_SetSecret *)_r;
6681 r->out.result = _lsa_SetSecret(cli->pipes_struct, r);
6682 return NT_STATUS_OK;
6685 case NDR_LSA_QUERYSECRET: {
6686 struct lsa_QuerySecret *r = (struct lsa_QuerySecret *)_r;
6687 ZERO_STRUCT(r->out);
6688 r->out.new_val = r->in.new_val;
6689 r->out.new_mtime = r->in.new_mtime;
6690 r->out.old_val = r->in.old_val;
6691 r->out.old_mtime = r->in.old_mtime;
6692 r->out.result = _lsa_QuerySecret(cli->pipes_struct, r);
6693 return NT_STATUS_OK;
6696 case NDR_LSA_LOOKUPPRIVVALUE: {
6697 struct lsa_LookupPrivValue *r = (struct lsa_LookupPrivValue *)_r;
6698 ZERO_STRUCT(r->out);
6699 r->out.luid = talloc_zero(mem_ctx, struct lsa_LUID);
6700 if (r->out.luid == NULL) {
6701 return NT_STATUS_NO_MEMORY;
6704 r->out.result = _lsa_LookupPrivValue(cli->pipes_struct, r);
6705 return NT_STATUS_OK;
6708 case NDR_LSA_LOOKUPPRIVNAME: {
6709 struct lsa_LookupPrivName *r = (struct lsa_LookupPrivName *)_r;
6710 ZERO_STRUCT(r->out);
6711 r->out.name = talloc_zero(mem_ctx, struct lsa_StringLarge *);
6712 if (r->out.name == NULL) {
6713 return NT_STATUS_NO_MEMORY;
6716 r->out.result = _lsa_LookupPrivName(cli->pipes_struct, r);
6717 return NT_STATUS_OK;
6720 case NDR_LSA_LOOKUPPRIVDISPLAYNAME: {
6721 struct lsa_LookupPrivDisplayName *r = (struct lsa_LookupPrivDisplayName *)_r;
6722 ZERO_STRUCT(r->out);
6723 r->out.disp_name = talloc_zero(mem_ctx, struct lsa_StringLarge *);
6724 if (r->out.disp_name == NULL) {
6725 return NT_STATUS_NO_MEMORY;
6728 r->out.returned_language_id = talloc_zero(mem_ctx, uint16_t);
6729 if (r->out.returned_language_id == NULL) {
6730 return NT_STATUS_NO_MEMORY;
6733 r->out.result = _lsa_LookupPrivDisplayName(cli->pipes_struct, r);
6734 return NT_STATUS_OK;
6737 case NDR_LSA_DELETEOBJECT: {
6738 struct lsa_DeleteObject *r = (struct lsa_DeleteObject *)_r;
6739 ZERO_STRUCT(r->out);
6740 r->out.handle = r->in.handle;
6741 r->out.result = _lsa_DeleteObject(cli->pipes_struct, r);
6742 return NT_STATUS_OK;
6745 case NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT: {
6746 struct lsa_EnumAccountsWithUserRight *r = (struct lsa_EnumAccountsWithUserRight *)_r;
6747 ZERO_STRUCT(r->out);
6748 r->out.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
6749 if (r->out.sids == NULL) {
6750 return NT_STATUS_NO_MEMORY;
6753 r->out.result = _lsa_EnumAccountsWithUserRight(cli->pipes_struct, r);
6754 return NT_STATUS_OK;
6757 case NDR_LSA_ENUMACCOUNTRIGHTS: {
6758 struct lsa_EnumAccountRights *r = (struct lsa_EnumAccountRights *)_r;
6759 ZERO_STRUCT(r->out);
6760 r->out.rights = talloc_zero(mem_ctx, struct lsa_RightSet);
6761 if (r->out.rights == NULL) {
6762 return NT_STATUS_NO_MEMORY;
6765 r->out.result = _lsa_EnumAccountRights(cli->pipes_struct, r);
6766 return NT_STATUS_OK;
6769 case NDR_LSA_ADDACCOUNTRIGHTS: {
6770 struct lsa_AddAccountRights *r = (struct lsa_AddAccountRights *)_r;
6771 r->out.result = _lsa_AddAccountRights(cli->pipes_struct, r);
6772 return NT_STATUS_OK;
6775 case NDR_LSA_REMOVEACCOUNTRIGHTS: {
6776 struct lsa_RemoveAccountRights *r = (struct lsa_RemoveAccountRights *)_r;
6777 r->out.result = _lsa_RemoveAccountRights(cli->pipes_struct, r);
6778 return NT_STATUS_OK;
6781 case NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID: {
6782 struct lsa_QueryTrustedDomainInfoBySid *r = (struct lsa_QueryTrustedDomainInfoBySid *)_r;
6783 ZERO_STRUCT(r->out);
6784 r->out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo *);
6785 if (r->out.info == NULL) {
6786 return NT_STATUS_NO_MEMORY;
6789 r->out.result = _lsa_QueryTrustedDomainInfoBySid(cli->pipes_struct, r);
6790 return NT_STATUS_OK;
6793 case NDR_LSA_SETTRUSTEDDOMAININFO: {
6794 struct lsa_SetTrustedDomainInfo *r = (struct lsa_SetTrustedDomainInfo *)_r;
6795 r->out.result = _lsa_SetTrustedDomainInfo(cli->pipes_struct, r);
6796 return NT_STATUS_OK;
6799 case NDR_LSA_DELETETRUSTEDDOMAIN: {
6800 struct lsa_DeleteTrustedDomain *r = (struct lsa_DeleteTrustedDomain *)_r;
6801 r->out.result = _lsa_DeleteTrustedDomain(cli->pipes_struct, r);
6802 return NT_STATUS_OK;
6805 case NDR_LSA_STOREPRIVATEDATA: {
6806 struct lsa_StorePrivateData *r = (struct lsa_StorePrivateData *)_r;
6807 r->out.result = _lsa_StorePrivateData(cli->pipes_struct, r);
6808 return NT_STATUS_OK;
6811 case NDR_LSA_RETRIEVEPRIVATEDATA: {
6812 struct lsa_RetrievePrivateData *r = (struct lsa_RetrievePrivateData *)_r;
6813 r->out.result = _lsa_RetrievePrivateData(cli->pipes_struct, r);
6814 return NT_STATUS_OK;
6817 case NDR_LSA_OPENPOLICY2: {
6818 struct lsa_OpenPolicy2 *r = (struct lsa_OpenPolicy2 *)_r;
6819 ZERO_STRUCT(r->out);
6820 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
6821 if (r->out.handle == NULL) {
6822 return NT_STATUS_NO_MEMORY;
6825 r->out.result = _lsa_OpenPolicy2(cli->pipes_struct, r);
6826 return NT_STATUS_OK;
6829 case NDR_LSA_GETUSERNAME: {
6830 struct lsa_GetUserName *r = (struct lsa_GetUserName *)_r;
6831 ZERO_STRUCT(r->out);
6832 r->out.account_name = r->in.account_name;
6833 r->out.authority_name = r->in.authority_name;
6834 r->out.result = _lsa_GetUserName(cli->pipes_struct, r);
6835 return NT_STATUS_OK;
6838 case NDR_LSA_QUERYINFOPOLICY2: {
6839 struct lsa_QueryInfoPolicy2 *r = (struct lsa_QueryInfoPolicy2 *)_r;
6840 ZERO_STRUCT(r->out);
6841 r->out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation *);
6842 if (r->out.info == NULL) {
6843 return NT_STATUS_NO_MEMORY;
6846 r->out.result = _lsa_QueryInfoPolicy2(cli->pipes_struct, r);
6847 return NT_STATUS_OK;
6850 case NDR_LSA_SETINFOPOLICY2: {
6851 struct lsa_SetInfoPolicy2 *r = (struct lsa_SetInfoPolicy2 *)_r;
6852 r->out.result = _lsa_SetInfoPolicy2(cli->pipes_struct, r);
6853 return NT_STATUS_OK;
6856 case NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME: {
6857 struct lsa_QueryTrustedDomainInfoByName *r = (struct lsa_QueryTrustedDomainInfoByName *)_r;
6858 ZERO_STRUCT(r->out);
6859 r->out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo *);
6860 if (r->out.info == NULL) {
6861 return NT_STATUS_NO_MEMORY;
6864 r->out.result = _lsa_QueryTrustedDomainInfoByName(cli->pipes_struct, r);
6865 return NT_STATUS_OK;
6868 case NDR_LSA_SETTRUSTEDDOMAININFOBYNAME: {
6869 struct lsa_SetTrustedDomainInfoByName *r = (struct lsa_SetTrustedDomainInfoByName *)_r;
6870 r->out.result = _lsa_SetTrustedDomainInfoByName(cli->pipes_struct, r);
6871 return NT_STATUS_OK;
6874 case NDR_LSA_ENUMTRUSTEDDOMAINSEX: {
6875 struct lsa_EnumTrustedDomainsEx *r = (struct lsa_EnumTrustedDomainsEx *)_r;
6876 ZERO_STRUCT(r->out);
6877 r->out.resume_handle = r->in.resume_handle;
6878 r->out.domains = talloc_zero(mem_ctx, struct lsa_DomainListEx);
6879 if (r->out.domains == NULL) {
6880 return NT_STATUS_NO_MEMORY;
6883 r->out.result = _lsa_EnumTrustedDomainsEx(cli->pipes_struct, r);
6884 return NT_STATUS_OK;
6887 case NDR_LSA_CREATETRUSTEDDOMAINEX: {
6888 struct lsa_CreateTrustedDomainEx *r = (struct lsa_CreateTrustedDomainEx *)_r;
6889 ZERO_STRUCT(r->out);
6890 r->out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
6891 if (r->out.trustdom_handle == NULL) {
6892 return NT_STATUS_NO_MEMORY;
6895 r->out.result = _lsa_CreateTrustedDomainEx(cli->pipes_struct, r);
6896 return NT_STATUS_OK;
6899 case NDR_LSA_CLOSETRUSTEDDOMAINEX: {
6900 struct lsa_CloseTrustedDomainEx *r = (struct lsa_CloseTrustedDomainEx *)_r;
6901 ZERO_STRUCT(r->out);
6902 r->out.handle = r->in.handle;
6903 r->out.result = _lsa_CloseTrustedDomainEx(cli->pipes_struct, r);
6904 return NT_STATUS_OK;
6907 case NDR_LSA_QUERYDOMAININFORMATIONPOLICY: {
6908 struct lsa_QueryDomainInformationPolicy *r = (struct lsa_QueryDomainInformationPolicy *)_r;
6909 ZERO_STRUCT(r->out);
6910 r->out.info = talloc_zero(mem_ctx, union lsa_DomainInformationPolicy *);
6911 if (r->out.info == NULL) {
6912 return NT_STATUS_NO_MEMORY;
6915 r->out.result = _lsa_QueryDomainInformationPolicy(cli->pipes_struct, r);
6916 return NT_STATUS_OK;
6919 case NDR_LSA_SETDOMAININFORMATIONPOLICY: {
6920 struct lsa_SetDomainInformationPolicy *r = (struct lsa_SetDomainInformationPolicy *)_r;
6921 r->out.result = _lsa_SetDomainInformationPolicy(cli->pipes_struct, r);
6922 return NT_STATUS_OK;
6925 case NDR_LSA_OPENTRUSTEDDOMAINBYNAME: {
6926 struct lsa_OpenTrustedDomainByName *r = (struct lsa_OpenTrustedDomainByName *)_r;
6927 ZERO_STRUCT(r->out);
6928 r->out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
6929 if (r->out.trustdom_handle == NULL) {
6930 return NT_STATUS_NO_MEMORY;
6933 r->out.result = _lsa_OpenTrustedDomainByName(cli->pipes_struct, r);
6934 return NT_STATUS_OK;
6937 case NDR_LSA_TESTCALL: {
6938 struct lsa_TestCall *r = (struct lsa_TestCall *)_r;
6939 r->out.result = _lsa_TestCall(cli->pipes_struct, r);
6940 return NT_STATUS_OK;
6943 case NDR_LSA_LOOKUPSIDS2: {
6944 struct lsa_LookupSids2 *r = (struct lsa_LookupSids2 *)_r;
6945 ZERO_STRUCT(r->out);
6946 r->out.names = r->in.names;
6947 r->out.count = r->in.count;
6948 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
6949 if (r->out.domains == NULL) {
6950 return NT_STATUS_NO_MEMORY;
6953 r->out.result = _lsa_LookupSids2(cli->pipes_struct, r);
6954 return NT_STATUS_OK;
6957 case NDR_LSA_LOOKUPNAMES2: {
6958 struct lsa_LookupNames2 *r = (struct lsa_LookupNames2 *)_r;
6959 ZERO_STRUCT(r->out);
6960 r->out.sids = r->in.sids;
6961 r->out.count = r->in.count;
6962 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
6963 if (r->out.domains == NULL) {
6964 return NT_STATUS_NO_MEMORY;
6967 r->out.result = _lsa_LookupNames2(cli->pipes_struct, r);
6968 return NT_STATUS_OK;
6971 case NDR_LSA_CREATETRUSTEDDOMAINEX2: {
6972 struct lsa_CreateTrustedDomainEx2 *r = (struct lsa_CreateTrustedDomainEx2 *)_r;
6973 ZERO_STRUCT(r->out);
6974 r->out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
6975 if (r->out.trustdom_handle == NULL) {
6976 return NT_STATUS_NO_MEMORY;
6979 r->out.result = _lsa_CreateTrustedDomainEx2(cli->pipes_struct, r);
6980 return NT_STATUS_OK;
6983 case NDR_LSA_CREDRWRITE: {
6984 struct lsa_CREDRWRITE *r = (struct lsa_CREDRWRITE *)_r;
6985 r->out.result = _lsa_CREDRWRITE(cli->pipes_struct, r);
6986 return NT_STATUS_OK;
6989 case NDR_LSA_CREDRREAD: {
6990 struct lsa_CREDRREAD *r = (struct lsa_CREDRREAD *)_r;
6991 r->out.result = _lsa_CREDRREAD(cli->pipes_struct, r);
6992 return NT_STATUS_OK;
6995 case NDR_LSA_CREDRENUMERATE: {
6996 struct lsa_CREDRENUMERATE *r = (struct lsa_CREDRENUMERATE *)_r;
6997 r->out.result = _lsa_CREDRENUMERATE(cli->pipes_struct, r);
6998 return NT_STATUS_OK;
7001 case NDR_LSA_CREDRWRITEDOMAINCREDENTIALS: {
7002 struct lsa_CREDRWRITEDOMAINCREDENTIALS *r = (struct lsa_CREDRWRITEDOMAINCREDENTIALS *)_r;
7003 r->out.result = _lsa_CREDRWRITEDOMAINCREDENTIALS(cli->pipes_struct, r);
7004 return NT_STATUS_OK;
7007 case NDR_LSA_CREDRREADDOMAINCREDENTIALS: {
7008 struct lsa_CREDRREADDOMAINCREDENTIALS *r = (struct lsa_CREDRREADDOMAINCREDENTIALS *)_r;
7009 r->out.result = _lsa_CREDRREADDOMAINCREDENTIALS(cli->pipes_struct, r);
7010 return NT_STATUS_OK;
7013 case NDR_LSA_CREDRDELETE: {
7014 struct lsa_CREDRDELETE *r = (struct lsa_CREDRDELETE *)_r;
7015 r->out.result = _lsa_CREDRDELETE(cli->pipes_struct, r);
7016 return NT_STATUS_OK;
7019 case NDR_LSA_CREDRGETTARGETINFO: {
7020 struct lsa_CREDRGETTARGETINFO *r = (struct lsa_CREDRGETTARGETINFO *)_r;
7021 r->out.result = _lsa_CREDRGETTARGETINFO(cli->pipes_struct, r);
7022 return NT_STATUS_OK;
7025 case NDR_LSA_CREDRPROFILELOADED: {
7026 struct lsa_CREDRPROFILELOADED *r = (struct lsa_CREDRPROFILELOADED *)_r;
7027 r->out.result = _lsa_CREDRPROFILELOADED(cli->pipes_struct, r);
7028 return NT_STATUS_OK;
7031 case NDR_LSA_LOOKUPNAMES3: {
7032 struct lsa_LookupNames3 *r = (struct lsa_LookupNames3 *)_r;
7033 ZERO_STRUCT(r->out);
7034 r->out.sids = r->in.sids;
7035 r->out.count = r->in.count;
7036 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
7037 if (r->out.domains == NULL) {
7038 return NT_STATUS_NO_MEMORY;
7041 r->out.result = _lsa_LookupNames3(cli->pipes_struct, r);
7042 return NT_STATUS_OK;
7045 case NDR_LSA_CREDRGETSESSIONTYPES: {
7046 struct lsa_CREDRGETSESSIONTYPES *r = (struct lsa_CREDRGETSESSIONTYPES *)_r;
7047 r->out.result = _lsa_CREDRGETSESSIONTYPES(cli->pipes_struct, r);
7048 return NT_STATUS_OK;
7051 case NDR_LSA_LSARREGISTERAUDITEVENT: {
7052 struct lsa_LSARREGISTERAUDITEVENT *r = (struct lsa_LSARREGISTERAUDITEVENT *)_r;
7053 r->out.result = _lsa_LSARREGISTERAUDITEVENT(cli->pipes_struct, r);
7054 return NT_STATUS_OK;
7057 case NDR_LSA_LSARGENAUDITEVENT: {
7058 struct lsa_LSARGENAUDITEVENT *r = (struct lsa_LSARGENAUDITEVENT *)_r;
7059 r->out.result = _lsa_LSARGENAUDITEVENT(cli->pipes_struct, r);
7060 return NT_STATUS_OK;
7063 case NDR_LSA_LSARUNREGISTERAUDITEVENT: {
7064 struct lsa_LSARUNREGISTERAUDITEVENT *r = (struct lsa_LSARUNREGISTERAUDITEVENT *)_r;
7065 r->out.result = _lsa_LSARUNREGISTERAUDITEVENT(cli->pipes_struct, r);
7066 return NT_STATUS_OK;
7069 case NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION: {
7070 struct lsa_lsaRQueryForestTrustInformation *r = (struct lsa_lsaRQueryForestTrustInformation *)_r;
7071 ZERO_STRUCT(r->out);
7072 r->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
7073 if (r->out.forest_trust_info == NULL) {
7074 return NT_STATUS_NO_MEMORY;
7077 r->out.result = _lsa_lsaRQueryForestTrustInformation(cli->pipes_struct, r);
7078 return NT_STATUS_OK;
7081 case NDR_LSA_LSARSETFORESTTRUSTINFORMATION: {
7082 struct lsa_LSARSETFORESTTRUSTINFORMATION *r = (struct lsa_LSARSETFORESTTRUSTINFORMATION *)_r;
7083 r->out.result = _lsa_LSARSETFORESTTRUSTINFORMATION(cli->pipes_struct, r);
7084 return NT_STATUS_OK;
7087 case NDR_LSA_CREDRRENAME: {
7088 struct lsa_CREDRRENAME *r = (struct lsa_CREDRRENAME *)_r;
7089 r->out.result = _lsa_CREDRRENAME(cli->pipes_struct, r);
7090 return NT_STATUS_OK;
7093 case NDR_LSA_LOOKUPSIDS3: {
7094 struct lsa_LookupSids3 *r = (struct lsa_LookupSids3 *)_r;
7095 ZERO_STRUCT(r->out);
7096 r->out.names = r->in.names;
7097 r->out.count = r->in.count;
7098 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
7099 if (r->out.domains == NULL) {
7100 return NT_STATUS_NO_MEMORY;
7103 r->out.result = _lsa_LookupSids3(cli->pipes_struct, r);
7104 return NT_STATUS_OK;
7107 case NDR_LSA_LOOKUPNAMES4: {
7108 struct lsa_LookupNames4 *r = (struct lsa_LookupNames4 *)_r;
7109 ZERO_STRUCT(r->out);
7110 r->out.sids = r->in.sids;
7111 r->out.count = r->in.count;
7112 r->out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList *);
7113 if (r->out.domains == NULL) {
7114 return NT_STATUS_NO_MEMORY;
7117 r->out.result = _lsa_LookupNames4(cli->pipes_struct, r);
7118 return NT_STATUS_OK;
7121 case NDR_LSA_LSAROPENPOLICYSCE: {
7122 struct lsa_LSAROPENPOLICYSCE *r = (struct lsa_LSAROPENPOLICYSCE *)_r;
7123 r->out.result = _lsa_LSAROPENPOLICYSCE(cli->pipes_struct, r);
7124 return NT_STATUS_OK;
7127 case NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE: {
7128 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r = (struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *)_r;
7129 r->out.result = _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(cli->pipes_struct, r);
7130 return NT_STATUS_OK;
7133 case NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE: {
7134 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r = (struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *)_r;
7135 r->out.result = _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(cli->pipes_struct, r);
7136 return NT_STATUS_OK;
7139 case NDR_LSA_LSARADTREPORTSECURITYEVENT: {
7140 struct lsa_LSARADTREPORTSECURITYEVENT *r = (struct lsa_LSARADTREPORTSECURITYEVENT *)_r;
7141 r->out.result = _lsa_LSARADTREPORTSECURITYEVENT(cli->pipes_struct, r);
7142 return NT_STATUS_OK;
7145 default:
7146 return NT_STATUS_NOT_IMPLEMENTED;
7150 NTSTATUS rpc_lsarpc_init(void)
7152 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", &ndr_table_lsarpc, api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct));