r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
[Samba.git] / source / librpc / gen_ndr / srv_lsa.c
blob8e08f671eca267d33cbf68eb9922d37c9875f8ab
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 struct ndr_pull *pull;
12 struct ndr_push *push;
13 NTSTATUS status;
14 DATA_BLOB blob;
15 struct lsa_Close r;
16 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_Close");
18 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
19 talloc_free(mem_ctx);
20 return False;
23 pull = ndr_pull_init_blob(&blob, mem_ctx);
24 if (pull == NULL) {
25 talloc_free(mem_ctx);
26 return False;
29 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
30 status = ndr_pull_lsa_Close(pull, NDR_IN, &r);
31 if (NT_STATUS_IS_ERR(status)) {
32 talloc_free(mem_ctx);
33 return False;
36 if (DEBUGLEVEL >= 10)
37 NDR_PRINT_IN_DEBUG(lsa_Close, &r);
39 ZERO_STRUCT(r.out);
40 r.out.handle = r.in.handle;
41 r.out.result = _lsa_Close(p, &r);
43 if (p->rng_fault_state) {
44 talloc_free(mem_ctx);
45 /* Return True here, srv_pipe_hnd.c will take care */
46 return True;
49 if (DEBUGLEVEL >= 10)
50 NDR_PRINT_OUT_DEBUG(lsa_Close, &r);
52 push = ndr_push_init_ctx(mem_ctx);
53 if (push == NULL) {
54 talloc_free(mem_ctx);
55 return False;
58 status = ndr_push_lsa_Close(push, NDR_OUT, &r);
59 if (NT_STATUS_IS_ERR(status)) {
60 talloc_free(mem_ctx);
61 return False;
64 blob = ndr_push_blob(push);
65 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
66 talloc_free(mem_ctx);
67 return False;
70 talloc_free(mem_ctx);
72 return True;
75 static BOOL api_lsa_Delete(pipes_struct *p)
77 struct ndr_pull *pull;
78 struct ndr_push *push;
79 NTSTATUS status;
80 DATA_BLOB blob;
81 struct lsa_Delete r;
82 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_Delete");
84 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
85 talloc_free(mem_ctx);
86 return False;
89 pull = ndr_pull_init_blob(&blob, mem_ctx);
90 if (pull == NULL) {
91 talloc_free(mem_ctx);
92 return False;
95 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
96 status = ndr_pull_lsa_Delete(pull, NDR_IN, &r);
97 if (NT_STATUS_IS_ERR(status)) {
98 talloc_free(mem_ctx);
99 return False;
102 if (DEBUGLEVEL >= 10)
103 NDR_PRINT_IN_DEBUG(lsa_Delete, &r);
105 r.out.result = _lsa_Delete(p, &r);
107 if (p->rng_fault_state) {
108 talloc_free(mem_ctx);
109 /* Return True here, srv_pipe_hnd.c will take care */
110 return True;
113 if (DEBUGLEVEL >= 10)
114 NDR_PRINT_OUT_DEBUG(lsa_Delete, &r);
116 push = ndr_push_init_ctx(mem_ctx);
117 if (push == NULL) {
118 talloc_free(mem_ctx);
119 return False;
122 status = ndr_push_lsa_Delete(push, NDR_OUT, &r);
123 if (NT_STATUS_IS_ERR(status)) {
124 talloc_free(mem_ctx);
125 return False;
128 blob = ndr_push_blob(push);
129 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
130 talloc_free(mem_ctx);
131 return False;
134 talloc_free(mem_ctx);
136 return True;
139 static BOOL api_lsa_EnumPrivs(pipes_struct *p)
141 struct ndr_pull *pull;
142 struct ndr_push *push;
143 NTSTATUS status;
144 DATA_BLOB blob;
145 struct lsa_EnumPrivs r;
146 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumPrivs");
148 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
149 talloc_free(mem_ctx);
150 return False;
153 pull = ndr_pull_init_blob(&blob, mem_ctx);
154 if (pull == NULL) {
155 talloc_free(mem_ctx);
156 return False;
159 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
160 status = ndr_pull_lsa_EnumPrivs(pull, NDR_IN, &r);
161 if (NT_STATUS_IS_ERR(status)) {
162 talloc_free(mem_ctx);
163 return False;
166 if (DEBUGLEVEL >= 10)
167 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs, &r);
169 ZERO_STRUCT(r.out);
170 r.out.resume_handle = r.in.resume_handle;
171 r.out.privs = talloc_zero(mem_ctx, struct lsa_PrivArray);
172 if (r.out.privs == NULL) {
173 talloc_free(mem_ctx);
174 return False;
177 r.out.result = _lsa_EnumPrivs(p, &r);
179 if (p->rng_fault_state) {
180 talloc_free(mem_ctx);
181 /* Return True here, srv_pipe_hnd.c will take care */
182 return True;
185 if (DEBUGLEVEL >= 10)
186 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, &r);
188 push = ndr_push_init_ctx(mem_ctx);
189 if (push == NULL) {
190 talloc_free(mem_ctx);
191 return False;
194 status = ndr_push_lsa_EnumPrivs(push, NDR_OUT, &r);
195 if (NT_STATUS_IS_ERR(status)) {
196 talloc_free(mem_ctx);
197 return False;
200 blob = ndr_push_blob(push);
201 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
202 talloc_free(mem_ctx);
203 return False;
206 talloc_free(mem_ctx);
208 return True;
211 static BOOL api_lsa_QuerySecurity(pipes_struct *p)
213 struct ndr_pull *pull;
214 struct ndr_push *push;
215 NTSTATUS status;
216 DATA_BLOB blob;
217 struct lsa_QuerySecurity r;
218 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QuerySecurity");
220 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
221 talloc_free(mem_ctx);
222 return False;
225 pull = ndr_pull_init_blob(&blob, mem_ctx);
226 if (pull == NULL) {
227 talloc_free(mem_ctx);
228 return False;
231 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
232 status = ndr_pull_lsa_QuerySecurity(pull, NDR_IN, &r);
233 if (NT_STATUS_IS_ERR(status)) {
234 talloc_free(mem_ctx);
235 return False;
238 if (DEBUGLEVEL >= 10)
239 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &r);
241 ZERO_STRUCT(r.out);
242 r.out.sdbuf = talloc_zero(mem_ctx, struct sec_desc_buf);
243 if (r.out.sdbuf == NULL) {
244 talloc_free(mem_ctx);
245 return False;
248 r.out.result = _lsa_QuerySecurity(p, &r);
250 if (p->rng_fault_state) {
251 talloc_free(mem_ctx);
252 /* Return True here, srv_pipe_hnd.c will take care */
253 return True;
256 if (DEBUGLEVEL >= 10)
257 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, &r);
259 push = ndr_push_init_ctx(mem_ctx);
260 if (push == NULL) {
261 talloc_free(mem_ctx);
262 return False;
265 status = ndr_push_lsa_QuerySecurity(push, NDR_OUT, &r);
266 if (NT_STATUS_IS_ERR(status)) {
267 talloc_free(mem_ctx);
268 return False;
271 blob = ndr_push_blob(push);
272 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
273 talloc_free(mem_ctx);
274 return False;
277 talloc_free(mem_ctx);
279 return True;
282 static BOOL api_lsa_SetSecObj(pipes_struct *p)
284 struct ndr_pull *pull;
285 struct ndr_push *push;
286 NTSTATUS status;
287 DATA_BLOB blob;
288 struct lsa_SetSecObj r;
289 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetSecObj");
291 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
292 talloc_free(mem_ctx);
293 return False;
296 pull = ndr_pull_init_blob(&blob, mem_ctx);
297 if (pull == NULL) {
298 talloc_free(mem_ctx);
299 return False;
302 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
303 status = ndr_pull_lsa_SetSecObj(pull, NDR_IN, &r);
304 if (NT_STATUS_IS_ERR(status)) {
305 talloc_free(mem_ctx);
306 return False;
309 if (DEBUGLEVEL >= 10)
310 NDR_PRINT_IN_DEBUG(lsa_SetSecObj, &r);
312 r.out.result = _lsa_SetSecObj(p, &r);
314 if (p->rng_fault_state) {
315 talloc_free(mem_ctx);
316 /* Return True here, srv_pipe_hnd.c will take care */
317 return True;
320 if (DEBUGLEVEL >= 10)
321 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, &r);
323 push = ndr_push_init_ctx(mem_ctx);
324 if (push == NULL) {
325 talloc_free(mem_ctx);
326 return False;
329 status = ndr_push_lsa_SetSecObj(push, NDR_OUT, &r);
330 if (NT_STATUS_IS_ERR(status)) {
331 talloc_free(mem_ctx);
332 return False;
335 blob = ndr_push_blob(push);
336 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
337 talloc_free(mem_ctx);
338 return False;
341 talloc_free(mem_ctx);
343 return True;
346 static BOOL api_lsa_ChangePassword(pipes_struct *p)
348 struct ndr_pull *pull;
349 struct ndr_push *push;
350 NTSTATUS status;
351 DATA_BLOB blob;
352 struct lsa_ChangePassword r;
353 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_ChangePassword");
355 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
356 talloc_free(mem_ctx);
357 return False;
360 pull = ndr_pull_init_blob(&blob, mem_ctx);
361 if (pull == NULL) {
362 talloc_free(mem_ctx);
363 return False;
366 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
367 status = ndr_pull_lsa_ChangePassword(pull, NDR_IN, &r);
368 if (NT_STATUS_IS_ERR(status)) {
369 talloc_free(mem_ctx);
370 return False;
373 if (DEBUGLEVEL >= 10)
374 NDR_PRINT_IN_DEBUG(lsa_ChangePassword, &r);
376 r.out.result = _lsa_ChangePassword(p, &r);
378 if (p->rng_fault_state) {
379 talloc_free(mem_ctx);
380 /* Return True here, srv_pipe_hnd.c will take care */
381 return True;
384 if (DEBUGLEVEL >= 10)
385 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, &r);
387 push = ndr_push_init_ctx(mem_ctx);
388 if (push == NULL) {
389 talloc_free(mem_ctx);
390 return False;
393 status = ndr_push_lsa_ChangePassword(push, NDR_OUT, &r);
394 if (NT_STATUS_IS_ERR(status)) {
395 talloc_free(mem_ctx);
396 return False;
399 blob = ndr_push_blob(push);
400 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
401 talloc_free(mem_ctx);
402 return False;
405 talloc_free(mem_ctx);
407 return True;
410 static BOOL api_lsa_OpenPolicy(pipes_struct *p)
412 struct ndr_pull *pull;
413 struct ndr_push *push;
414 NTSTATUS status;
415 DATA_BLOB blob;
416 struct lsa_OpenPolicy r;
417 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenPolicy");
419 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
420 talloc_free(mem_ctx);
421 return False;
424 pull = ndr_pull_init_blob(&blob, mem_ctx);
425 if (pull == NULL) {
426 talloc_free(mem_ctx);
427 return False;
430 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
431 status = ndr_pull_lsa_OpenPolicy(pull, NDR_IN, &r);
432 if (NT_STATUS_IS_ERR(status)) {
433 talloc_free(mem_ctx);
434 return False;
437 if (DEBUGLEVEL >= 10)
438 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &r);
440 ZERO_STRUCT(r.out);
441 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
442 if (r.out.handle == NULL) {
443 talloc_free(mem_ctx);
444 return False;
447 r.out.result = _lsa_OpenPolicy(p, &r);
449 if (p->rng_fault_state) {
450 talloc_free(mem_ctx);
451 /* Return True here, srv_pipe_hnd.c will take care */
452 return True;
455 if (DEBUGLEVEL >= 10)
456 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, &r);
458 push = ndr_push_init_ctx(mem_ctx);
459 if (push == NULL) {
460 talloc_free(mem_ctx);
461 return False;
464 status = ndr_push_lsa_OpenPolicy(push, NDR_OUT, &r);
465 if (NT_STATUS_IS_ERR(status)) {
466 talloc_free(mem_ctx);
467 return False;
470 blob = ndr_push_blob(push);
471 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
472 talloc_free(mem_ctx);
473 return False;
476 talloc_free(mem_ctx);
478 return True;
481 static BOOL api_lsa_QueryInfoPolicy(pipes_struct *p)
483 struct ndr_pull *pull;
484 struct ndr_push *push;
485 NTSTATUS status;
486 DATA_BLOB blob;
487 struct lsa_QueryInfoPolicy r;
488 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryInfoPolicy");
490 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
491 talloc_free(mem_ctx);
492 return False;
495 pull = ndr_pull_init_blob(&blob, mem_ctx);
496 if (pull == NULL) {
497 talloc_free(mem_ctx);
498 return False;
501 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
502 status = ndr_pull_lsa_QueryInfoPolicy(pull, NDR_IN, &r);
503 if (NT_STATUS_IS_ERR(status)) {
504 talloc_free(mem_ctx);
505 return False;
508 if (DEBUGLEVEL >= 10)
509 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &r);
511 ZERO_STRUCT(r.out);
512 r.out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation);
513 if (r.out.info == NULL) {
514 talloc_free(mem_ctx);
515 return False;
518 r.out.result = _lsa_QueryInfoPolicy(p, &r);
520 if (p->rng_fault_state) {
521 talloc_free(mem_ctx);
522 /* Return True here, srv_pipe_hnd.c will take care */
523 return True;
526 if (DEBUGLEVEL >= 10)
527 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, &r);
529 push = ndr_push_init_ctx(mem_ctx);
530 if (push == NULL) {
531 talloc_free(mem_ctx);
532 return False;
535 status = ndr_push_lsa_QueryInfoPolicy(push, NDR_OUT, &r);
536 if (NT_STATUS_IS_ERR(status)) {
537 talloc_free(mem_ctx);
538 return False;
541 blob = ndr_push_blob(push);
542 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
543 talloc_free(mem_ctx);
544 return False;
547 talloc_free(mem_ctx);
549 return True;
552 static BOOL api_lsa_SetInfoPolicy(pipes_struct *p)
554 struct ndr_pull *pull;
555 struct ndr_push *push;
556 NTSTATUS status;
557 DATA_BLOB blob;
558 struct lsa_SetInfoPolicy r;
559 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetInfoPolicy");
561 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
562 talloc_free(mem_ctx);
563 return False;
566 pull = ndr_pull_init_blob(&blob, mem_ctx);
567 if (pull == NULL) {
568 talloc_free(mem_ctx);
569 return False;
572 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
573 status = ndr_pull_lsa_SetInfoPolicy(pull, NDR_IN, &r);
574 if (NT_STATUS_IS_ERR(status)) {
575 talloc_free(mem_ctx);
576 return False;
579 if (DEBUGLEVEL >= 10)
580 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy, &r);
582 r.out.result = _lsa_SetInfoPolicy(p, &r);
584 if (p->rng_fault_state) {
585 talloc_free(mem_ctx);
586 /* Return True here, srv_pipe_hnd.c will take care */
587 return True;
590 if (DEBUGLEVEL >= 10)
591 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, &r);
593 push = ndr_push_init_ctx(mem_ctx);
594 if (push == NULL) {
595 talloc_free(mem_ctx);
596 return False;
599 status = ndr_push_lsa_SetInfoPolicy(push, NDR_OUT, &r);
600 if (NT_STATUS_IS_ERR(status)) {
601 talloc_free(mem_ctx);
602 return False;
605 blob = ndr_push_blob(push);
606 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
607 talloc_free(mem_ctx);
608 return False;
611 talloc_free(mem_ctx);
613 return True;
616 static BOOL api_lsa_ClearAuditLog(pipes_struct *p)
618 struct ndr_pull *pull;
619 struct ndr_push *push;
620 NTSTATUS status;
621 DATA_BLOB blob;
622 struct lsa_ClearAuditLog r;
623 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_ClearAuditLog");
625 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
626 talloc_free(mem_ctx);
627 return False;
630 pull = ndr_pull_init_blob(&blob, mem_ctx);
631 if (pull == NULL) {
632 talloc_free(mem_ctx);
633 return False;
636 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
637 status = ndr_pull_lsa_ClearAuditLog(pull, NDR_IN, &r);
638 if (NT_STATUS_IS_ERR(status)) {
639 talloc_free(mem_ctx);
640 return False;
643 if (DEBUGLEVEL >= 10)
644 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog, &r);
646 r.out.result = _lsa_ClearAuditLog(p, &r);
648 if (p->rng_fault_state) {
649 talloc_free(mem_ctx);
650 /* Return True here, srv_pipe_hnd.c will take care */
651 return True;
654 if (DEBUGLEVEL >= 10)
655 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, &r);
657 push = ndr_push_init_ctx(mem_ctx);
658 if (push == NULL) {
659 talloc_free(mem_ctx);
660 return False;
663 status = ndr_push_lsa_ClearAuditLog(push, NDR_OUT, &r);
664 if (NT_STATUS_IS_ERR(status)) {
665 talloc_free(mem_ctx);
666 return False;
669 blob = ndr_push_blob(push);
670 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
671 talloc_free(mem_ctx);
672 return False;
675 talloc_free(mem_ctx);
677 return True;
680 static BOOL api_lsa_CreateAccount(pipes_struct *p)
682 struct ndr_pull *pull;
683 struct ndr_push *push;
684 NTSTATUS status;
685 DATA_BLOB blob;
686 struct lsa_CreateAccount r;
687 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CreateAccount");
689 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
690 talloc_free(mem_ctx);
691 return False;
694 pull = ndr_pull_init_blob(&blob, mem_ctx);
695 if (pull == NULL) {
696 talloc_free(mem_ctx);
697 return False;
700 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
701 status = ndr_pull_lsa_CreateAccount(pull, NDR_IN, &r);
702 if (NT_STATUS_IS_ERR(status)) {
703 talloc_free(mem_ctx);
704 return False;
707 if (DEBUGLEVEL >= 10)
708 NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &r);
710 ZERO_STRUCT(r.out);
711 r.out.acct_handle = talloc_zero(mem_ctx, struct policy_handle);
712 if (r.out.acct_handle == NULL) {
713 talloc_free(mem_ctx);
714 return False;
717 r.out.result = _lsa_CreateAccount(p, &r);
719 if (p->rng_fault_state) {
720 talloc_free(mem_ctx);
721 /* Return True here, srv_pipe_hnd.c will take care */
722 return True;
725 if (DEBUGLEVEL >= 10)
726 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, &r);
728 push = ndr_push_init_ctx(mem_ctx);
729 if (push == NULL) {
730 talloc_free(mem_ctx);
731 return False;
734 status = ndr_push_lsa_CreateAccount(push, NDR_OUT, &r);
735 if (NT_STATUS_IS_ERR(status)) {
736 talloc_free(mem_ctx);
737 return False;
740 blob = ndr_push_blob(push);
741 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
742 talloc_free(mem_ctx);
743 return False;
746 talloc_free(mem_ctx);
748 return True;
751 static BOOL api_lsa_EnumAccounts(pipes_struct *p)
753 struct ndr_pull *pull;
754 struct ndr_push *push;
755 NTSTATUS status;
756 DATA_BLOB blob;
757 struct lsa_EnumAccounts r;
758 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumAccounts");
760 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
761 talloc_free(mem_ctx);
762 return False;
765 pull = ndr_pull_init_blob(&blob, mem_ctx);
766 if (pull == NULL) {
767 talloc_free(mem_ctx);
768 return False;
771 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
772 status = ndr_pull_lsa_EnumAccounts(pull, NDR_IN, &r);
773 if (NT_STATUS_IS_ERR(status)) {
774 talloc_free(mem_ctx);
775 return False;
778 if (DEBUGLEVEL >= 10)
779 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts, &r);
781 ZERO_STRUCT(r.out);
782 r.out.resume_handle = r.in.resume_handle;
783 r.out.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
784 if (r.out.sids == NULL) {
785 talloc_free(mem_ctx);
786 return False;
789 r.out.result = _lsa_EnumAccounts(p, &r);
791 if (p->rng_fault_state) {
792 talloc_free(mem_ctx);
793 /* Return True here, srv_pipe_hnd.c will take care */
794 return True;
797 if (DEBUGLEVEL >= 10)
798 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, &r);
800 push = ndr_push_init_ctx(mem_ctx);
801 if (push == NULL) {
802 talloc_free(mem_ctx);
803 return False;
806 status = ndr_push_lsa_EnumAccounts(push, NDR_OUT, &r);
807 if (NT_STATUS_IS_ERR(status)) {
808 talloc_free(mem_ctx);
809 return False;
812 blob = ndr_push_blob(push);
813 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
814 talloc_free(mem_ctx);
815 return False;
818 talloc_free(mem_ctx);
820 return True;
823 static BOOL api_lsa_CreateTrustedDomain(pipes_struct *p)
825 struct ndr_pull *pull;
826 struct ndr_push *push;
827 NTSTATUS status;
828 DATA_BLOB blob;
829 struct lsa_CreateTrustedDomain r;
830 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CreateTrustedDomain");
832 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
833 talloc_free(mem_ctx);
834 return False;
837 pull = ndr_pull_init_blob(&blob, mem_ctx);
838 if (pull == NULL) {
839 talloc_free(mem_ctx);
840 return False;
843 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
844 status = ndr_pull_lsa_CreateTrustedDomain(pull, NDR_IN, &r);
845 if (NT_STATUS_IS_ERR(status)) {
846 talloc_free(mem_ctx);
847 return False;
850 if (DEBUGLEVEL >= 10)
851 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &r);
853 ZERO_STRUCT(r.out);
854 r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
855 if (r.out.trustdom_handle == NULL) {
856 talloc_free(mem_ctx);
857 return False;
860 r.out.result = _lsa_CreateTrustedDomain(p, &r);
862 if (p->rng_fault_state) {
863 talloc_free(mem_ctx);
864 /* Return True here, srv_pipe_hnd.c will take care */
865 return True;
868 if (DEBUGLEVEL >= 10)
869 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, &r);
871 push = ndr_push_init_ctx(mem_ctx);
872 if (push == NULL) {
873 talloc_free(mem_ctx);
874 return False;
877 status = ndr_push_lsa_CreateTrustedDomain(push, NDR_OUT, &r);
878 if (NT_STATUS_IS_ERR(status)) {
879 talloc_free(mem_ctx);
880 return False;
883 blob = ndr_push_blob(push);
884 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
885 talloc_free(mem_ctx);
886 return False;
889 talloc_free(mem_ctx);
891 return True;
894 static BOOL api_lsa_EnumTrustDom(pipes_struct *p)
896 struct ndr_pull *pull;
897 struct ndr_push *push;
898 NTSTATUS status;
899 DATA_BLOB blob;
900 struct lsa_EnumTrustDom r;
901 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumTrustDom");
903 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
904 talloc_free(mem_ctx);
905 return False;
908 pull = ndr_pull_init_blob(&blob, mem_ctx);
909 if (pull == NULL) {
910 talloc_free(mem_ctx);
911 return False;
914 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
915 status = ndr_pull_lsa_EnumTrustDom(pull, NDR_IN, &r);
916 if (NT_STATUS_IS_ERR(status)) {
917 talloc_free(mem_ctx);
918 return False;
921 if (DEBUGLEVEL >= 10)
922 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom, &r);
924 ZERO_STRUCT(r.out);
925 r.out.resume_handle = r.in.resume_handle;
926 r.out.domains = talloc_zero(mem_ctx, struct lsa_DomainList);
927 if (r.out.domains == NULL) {
928 talloc_free(mem_ctx);
929 return False;
932 r.out.result = _lsa_EnumTrustDom(p, &r);
934 if (p->rng_fault_state) {
935 talloc_free(mem_ctx);
936 /* Return True here, srv_pipe_hnd.c will take care */
937 return True;
940 if (DEBUGLEVEL >= 10)
941 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, &r);
943 push = ndr_push_init_ctx(mem_ctx);
944 if (push == NULL) {
945 talloc_free(mem_ctx);
946 return False;
949 status = ndr_push_lsa_EnumTrustDom(push, NDR_OUT, &r);
950 if (NT_STATUS_IS_ERR(status)) {
951 talloc_free(mem_ctx);
952 return False;
955 blob = ndr_push_blob(push);
956 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
957 talloc_free(mem_ctx);
958 return False;
961 talloc_free(mem_ctx);
963 return True;
966 static BOOL api_lsa_LookupNames(pipes_struct *p)
968 struct ndr_pull *pull;
969 struct ndr_push *push;
970 NTSTATUS status;
971 DATA_BLOB blob;
972 struct lsa_LookupNames r;
973 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupNames");
975 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
976 talloc_free(mem_ctx);
977 return False;
980 pull = ndr_pull_init_blob(&blob, mem_ctx);
981 if (pull == NULL) {
982 talloc_free(mem_ctx);
983 return False;
986 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
987 status = ndr_pull_lsa_LookupNames(pull, NDR_IN, &r);
988 if (NT_STATUS_IS_ERR(status)) {
989 talloc_free(mem_ctx);
990 return False;
993 if (DEBUGLEVEL >= 10)
994 NDR_PRINT_IN_DEBUG(lsa_LookupNames, &r);
996 ZERO_STRUCT(r.out);
997 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
998 if (r.out.domains == NULL) {
999 talloc_free(mem_ctx);
1000 return False;
1003 r.out.sids = r.in.sids;
1004 r.out.count = r.in.count;
1005 r.out.result = _lsa_LookupNames(p, &r);
1007 if (p->rng_fault_state) {
1008 talloc_free(mem_ctx);
1009 /* Return True here, srv_pipe_hnd.c will take care */
1010 return True;
1013 if (DEBUGLEVEL >= 10)
1014 NDR_PRINT_OUT_DEBUG(lsa_LookupNames, &r);
1016 push = ndr_push_init_ctx(mem_ctx);
1017 if (push == NULL) {
1018 talloc_free(mem_ctx);
1019 return False;
1022 status = ndr_push_lsa_LookupNames(push, NDR_OUT, &r);
1023 if (NT_STATUS_IS_ERR(status)) {
1024 talloc_free(mem_ctx);
1025 return False;
1028 blob = ndr_push_blob(push);
1029 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1030 talloc_free(mem_ctx);
1031 return False;
1034 talloc_free(mem_ctx);
1036 return True;
1039 static BOOL api_lsa_LookupSids(pipes_struct *p)
1041 struct ndr_pull *pull;
1042 struct ndr_push *push;
1043 NTSTATUS status;
1044 DATA_BLOB blob;
1045 struct lsa_LookupSids r;
1046 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupSids");
1048 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1049 talloc_free(mem_ctx);
1050 return False;
1053 pull = ndr_pull_init_blob(&blob, mem_ctx);
1054 if (pull == NULL) {
1055 talloc_free(mem_ctx);
1056 return False;
1059 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1060 status = ndr_pull_lsa_LookupSids(pull, NDR_IN, &r);
1061 if (NT_STATUS_IS_ERR(status)) {
1062 talloc_free(mem_ctx);
1063 return False;
1066 if (DEBUGLEVEL >= 10)
1067 NDR_PRINT_IN_DEBUG(lsa_LookupSids, &r);
1069 ZERO_STRUCT(r.out);
1070 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
1071 if (r.out.domains == NULL) {
1072 talloc_free(mem_ctx);
1073 return False;
1076 r.out.names = r.in.names;
1077 r.out.count = r.in.count;
1078 r.out.result = _lsa_LookupSids(p, &r);
1080 if (p->rng_fault_state) {
1081 talloc_free(mem_ctx);
1082 /* Return True here, srv_pipe_hnd.c will take care */
1083 return True;
1086 if (DEBUGLEVEL >= 10)
1087 NDR_PRINT_OUT_DEBUG(lsa_LookupSids, &r);
1089 push = ndr_push_init_ctx(mem_ctx);
1090 if (push == NULL) {
1091 talloc_free(mem_ctx);
1092 return False;
1095 status = ndr_push_lsa_LookupSids(push, NDR_OUT, &r);
1096 if (NT_STATUS_IS_ERR(status)) {
1097 talloc_free(mem_ctx);
1098 return False;
1101 blob = ndr_push_blob(push);
1102 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1103 talloc_free(mem_ctx);
1104 return False;
1107 talloc_free(mem_ctx);
1109 return True;
1112 static BOOL api_lsa_CreateSecret(pipes_struct *p)
1114 struct ndr_pull *pull;
1115 struct ndr_push *push;
1116 NTSTATUS status;
1117 DATA_BLOB blob;
1118 struct lsa_CreateSecret r;
1119 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CreateSecret");
1121 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1122 talloc_free(mem_ctx);
1123 return False;
1126 pull = ndr_pull_init_blob(&blob, mem_ctx);
1127 if (pull == NULL) {
1128 talloc_free(mem_ctx);
1129 return False;
1132 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1133 status = ndr_pull_lsa_CreateSecret(pull, NDR_IN, &r);
1134 if (NT_STATUS_IS_ERR(status)) {
1135 talloc_free(mem_ctx);
1136 return False;
1139 if (DEBUGLEVEL >= 10)
1140 NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &r);
1142 ZERO_STRUCT(r.out);
1143 r.out.sec_handle = talloc_zero(mem_ctx, struct policy_handle);
1144 if (r.out.sec_handle == NULL) {
1145 talloc_free(mem_ctx);
1146 return False;
1149 r.out.result = _lsa_CreateSecret(p, &r);
1151 if (p->rng_fault_state) {
1152 talloc_free(mem_ctx);
1153 /* Return True here, srv_pipe_hnd.c will take care */
1154 return True;
1157 if (DEBUGLEVEL >= 10)
1158 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, &r);
1160 push = ndr_push_init_ctx(mem_ctx);
1161 if (push == NULL) {
1162 talloc_free(mem_ctx);
1163 return False;
1166 status = ndr_push_lsa_CreateSecret(push, NDR_OUT, &r);
1167 if (NT_STATUS_IS_ERR(status)) {
1168 talloc_free(mem_ctx);
1169 return False;
1172 blob = ndr_push_blob(push);
1173 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1174 talloc_free(mem_ctx);
1175 return False;
1178 talloc_free(mem_ctx);
1180 return True;
1183 static BOOL api_lsa_OpenAccount(pipes_struct *p)
1185 struct ndr_pull *pull;
1186 struct ndr_push *push;
1187 NTSTATUS status;
1188 DATA_BLOB blob;
1189 struct lsa_OpenAccount r;
1190 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenAccount");
1192 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1193 talloc_free(mem_ctx);
1194 return False;
1197 pull = ndr_pull_init_blob(&blob, mem_ctx);
1198 if (pull == NULL) {
1199 talloc_free(mem_ctx);
1200 return False;
1203 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1204 status = ndr_pull_lsa_OpenAccount(pull, NDR_IN, &r);
1205 if (NT_STATUS_IS_ERR(status)) {
1206 talloc_free(mem_ctx);
1207 return False;
1210 if (DEBUGLEVEL >= 10)
1211 NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &r);
1213 ZERO_STRUCT(r.out);
1214 r.out.acct_handle = talloc_zero(mem_ctx, struct policy_handle);
1215 if (r.out.acct_handle == NULL) {
1216 talloc_free(mem_ctx);
1217 return False;
1220 r.out.result = _lsa_OpenAccount(p, &r);
1222 if (p->rng_fault_state) {
1223 talloc_free(mem_ctx);
1224 /* Return True here, srv_pipe_hnd.c will take care */
1225 return True;
1228 if (DEBUGLEVEL >= 10)
1229 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, &r);
1231 push = ndr_push_init_ctx(mem_ctx);
1232 if (push == NULL) {
1233 talloc_free(mem_ctx);
1234 return False;
1237 status = ndr_push_lsa_OpenAccount(push, NDR_OUT, &r);
1238 if (NT_STATUS_IS_ERR(status)) {
1239 talloc_free(mem_ctx);
1240 return False;
1243 blob = ndr_push_blob(push);
1244 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1245 talloc_free(mem_ctx);
1246 return False;
1249 talloc_free(mem_ctx);
1251 return True;
1254 static BOOL api_lsa_EnumPrivsAccount(pipes_struct *p)
1256 struct ndr_pull *pull;
1257 struct ndr_push *push;
1258 NTSTATUS status;
1259 DATA_BLOB blob;
1260 struct lsa_EnumPrivsAccount r;
1261 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumPrivsAccount");
1263 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1264 talloc_free(mem_ctx);
1265 return False;
1268 pull = ndr_pull_init_blob(&blob, mem_ctx);
1269 if (pull == NULL) {
1270 talloc_free(mem_ctx);
1271 return False;
1274 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1275 status = ndr_pull_lsa_EnumPrivsAccount(pull, NDR_IN, &r);
1276 if (NT_STATUS_IS_ERR(status)) {
1277 talloc_free(mem_ctx);
1278 return False;
1281 if (DEBUGLEVEL >= 10)
1282 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &r);
1284 ZERO_STRUCT(r.out);
1285 r.out.privs = talloc_zero(mem_ctx, struct lsa_PrivilegeSet);
1286 if (r.out.privs == NULL) {
1287 talloc_free(mem_ctx);
1288 return False;
1291 r.out.result = _lsa_EnumPrivsAccount(p, &r);
1293 if (p->rng_fault_state) {
1294 talloc_free(mem_ctx);
1295 /* Return True here, srv_pipe_hnd.c will take care */
1296 return True;
1299 if (DEBUGLEVEL >= 10)
1300 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, &r);
1302 push = ndr_push_init_ctx(mem_ctx);
1303 if (push == NULL) {
1304 talloc_free(mem_ctx);
1305 return False;
1308 status = ndr_push_lsa_EnumPrivsAccount(push, NDR_OUT, &r);
1309 if (NT_STATUS_IS_ERR(status)) {
1310 talloc_free(mem_ctx);
1311 return False;
1314 blob = ndr_push_blob(push);
1315 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1316 talloc_free(mem_ctx);
1317 return False;
1320 talloc_free(mem_ctx);
1322 return True;
1325 static BOOL api_lsa_AddPrivilegesToAccount(pipes_struct *p)
1327 struct ndr_pull *pull;
1328 struct ndr_push *push;
1329 NTSTATUS status;
1330 DATA_BLOB blob;
1331 struct lsa_AddPrivilegesToAccount r;
1332 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_AddPrivilegesToAccount");
1334 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1335 talloc_free(mem_ctx);
1336 return False;
1339 pull = ndr_pull_init_blob(&blob, mem_ctx);
1340 if (pull == NULL) {
1341 talloc_free(mem_ctx);
1342 return False;
1345 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1346 status = ndr_pull_lsa_AddPrivilegesToAccount(pull, NDR_IN, &r);
1347 if (NT_STATUS_IS_ERR(status)) {
1348 talloc_free(mem_ctx);
1349 return False;
1352 if (DEBUGLEVEL >= 10)
1353 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount, &r);
1355 r.out.result = _lsa_AddPrivilegesToAccount(p, &r);
1357 if (p->rng_fault_state) {
1358 talloc_free(mem_ctx);
1359 /* Return True here, srv_pipe_hnd.c will take care */
1360 return True;
1363 if (DEBUGLEVEL >= 10)
1364 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, &r);
1366 push = ndr_push_init_ctx(mem_ctx);
1367 if (push == NULL) {
1368 talloc_free(mem_ctx);
1369 return False;
1372 status = ndr_push_lsa_AddPrivilegesToAccount(push, NDR_OUT, &r);
1373 if (NT_STATUS_IS_ERR(status)) {
1374 talloc_free(mem_ctx);
1375 return False;
1378 blob = ndr_push_blob(push);
1379 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1380 talloc_free(mem_ctx);
1381 return False;
1384 talloc_free(mem_ctx);
1386 return True;
1389 static BOOL api_lsa_RemovePrivilegesFromAccount(pipes_struct *p)
1391 struct ndr_pull *pull;
1392 struct ndr_push *push;
1393 NTSTATUS status;
1394 DATA_BLOB blob;
1395 struct lsa_RemovePrivilegesFromAccount r;
1396 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_RemovePrivilegesFromAccount");
1398 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1399 talloc_free(mem_ctx);
1400 return False;
1403 pull = ndr_pull_init_blob(&blob, mem_ctx);
1404 if (pull == NULL) {
1405 talloc_free(mem_ctx);
1406 return False;
1409 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1410 status = ndr_pull_lsa_RemovePrivilegesFromAccount(pull, NDR_IN, &r);
1411 if (NT_STATUS_IS_ERR(status)) {
1412 talloc_free(mem_ctx);
1413 return False;
1416 if (DEBUGLEVEL >= 10)
1417 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
1419 r.out.result = _lsa_RemovePrivilegesFromAccount(p, &r);
1421 if (p->rng_fault_state) {
1422 talloc_free(mem_ctx);
1423 /* Return True here, srv_pipe_hnd.c will take care */
1424 return True;
1427 if (DEBUGLEVEL >= 10)
1428 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
1430 push = ndr_push_init_ctx(mem_ctx);
1431 if (push == NULL) {
1432 talloc_free(mem_ctx);
1433 return False;
1436 status = ndr_push_lsa_RemovePrivilegesFromAccount(push, NDR_OUT, &r);
1437 if (NT_STATUS_IS_ERR(status)) {
1438 talloc_free(mem_ctx);
1439 return False;
1442 blob = ndr_push_blob(push);
1443 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1444 talloc_free(mem_ctx);
1445 return False;
1448 talloc_free(mem_ctx);
1450 return True;
1453 static BOOL api_lsa_GetQuotasForAccount(pipes_struct *p)
1455 struct ndr_pull *pull;
1456 struct ndr_push *push;
1457 NTSTATUS status;
1458 DATA_BLOB blob;
1459 struct lsa_GetQuotasForAccount r;
1460 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_GetQuotasForAccount");
1462 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1463 talloc_free(mem_ctx);
1464 return False;
1467 pull = ndr_pull_init_blob(&blob, mem_ctx);
1468 if (pull == NULL) {
1469 talloc_free(mem_ctx);
1470 return False;
1473 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1474 status = ndr_pull_lsa_GetQuotasForAccount(pull, NDR_IN, &r);
1475 if (NT_STATUS_IS_ERR(status)) {
1476 talloc_free(mem_ctx);
1477 return False;
1480 if (DEBUGLEVEL >= 10)
1481 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount, &r);
1483 r.out.result = _lsa_GetQuotasForAccount(p, &r);
1485 if (p->rng_fault_state) {
1486 talloc_free(mem_ctx);
1487 /* Return True here, srv_pipe_hnd.c will take care */
1488 return True;
1491 if (DEBUGLEVEL >= 10)
1492 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, &r);
1494 push = ndr_push_init_ctx(mem_ctx);
1495 if (push == NULL) {
1496 talloc_free(mem_ctx);
1497 return False;
1500 status = ndr_push_lsa_GetQuotasForAccount(push, NDR_OUT, &r);
1501 if (NT_STATUS_IS_ERR(status)) {
1502 talloc_free(mem_ctx);
1503 return False;
1506 blob = ndr_push_blob(push);
1507 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1508 talloc_free(mem_ctx);
1509 return False;
1512 talloc_free(mem_ctx);
1514 return True;
1517 static BOOL api_lsa_SetQuotasForAccount(pipes_struct *p)
1519 struct ndr_pull *pull;
1520 struct ndr_push *push;
1521 NTSTATUS status;
1522 DATA_BLOB blob;
1523 struct lsa_SetQuotasForAccount r;
1524 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetQuotasForAccount");
1526 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1527 talloc_free(mem_ctx);
1528 return False;
1531 pull = ndr_pull_init_blob(&blob, mem_ctx);
1532 if (pull == NULL) {
1533 talloc_free(mem_ctx);
1534 return False;
1537 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1538 status = ndr_pull_lsa_SetQuotasForAccount(pull, NDR_IN, &r);
1539 if (NT_STATUS_IS_ERR(status)) {
1540 talloc_free(mem_ctx);
1541 return False;
1544 if (DEBUGLEVEL >= 10)
1545 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount, &r);
1547 r.out.result = _lsa_SetQuotasForAccount(p, &r);
1549 if (p->rng_fault_state) {
1550 talloc_free(mem_ctx);
1551 /* Return True here, srv_pipe_hnd.c will take care */
1552 return True;
1555 if (DEBUGLEVEL >= 10)
1556 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, &r);
1558 push = ndr_push_init_ctx(mem_ctx);
1559 if (push == NULL) {
1560 talloc_free(mem_ctx);
1561 return False;
1564 status = ndr_push_lsa_SetQuotasForAccount(push, NDR_OUT, &r);
1565 if (NT_STATUS_IS_ERR(status)) {
1566 talloc_free(mem_ctx);
1567 return False;
1570 blob = ndr_push_blob(push);
1571 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1572 talloc_free(mem_ctx);
1573 return False;
1576 talloc_free(mem_ctx);
1578 return True;
1581 static BOOL api_lsa_GetSystemAccessAccount(pipes_struct *p)
1583 struct ndr_pull *pull;
1584 struct ndr_push *push;
1585 NTSTATUS status;
1586 DATA_BLOB blob;
1587 struct lsa_GetSystemAccessAccount r;
1588 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_GetSystemAccessAccount");
1590 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1591 talloc_free(mem_ctx);
1592 return False;
1595 pull = ndr_pull_init_blob(&blob, mem_ctx);
1596 if (pull == NULL) {
1597 talloc_free(mem_ctx);
1598 return False;
1601 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1602 status = ndr_pull_lsa_GetSystemAccessAccount(pull, NDR_IN, &r);
1603 if (NT_STATUS_IS_ERR(status)) {
1604 talloc_free(mem_ctx);
1605 return False;
1608 if (DEBUGLEVEL >= 10)
1609 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &r);
1611 r.out.result = _lsa_GetSystemAccessAccount(p, &r);
1613 if (p->rng_fault_state) {
1614 talloc_free(mem_ctx);
1615 /* Return True here, srv_pipe_hnd.c will take care */
1616 return True;
1619 if (DEBUGLEVEL >= 10)
1620 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, &r);
1622 push = ndr_push_init_ctx(mem_ctx);
1623 if (push == NULL) {
1624 talloc_free(mem_ctx);
1625 return False;
1628 status = ndr_push_lsa_GetSystemAccessAccount(push, NDR_OUT, &r);
1629 if (NT_STATUS_IS_ERR(status)) {
1630 talloc_free(mem_ctx);
1631 return False;
1634 blob = ndr_push_blob(push);
1635 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1636 talloc_free(mem_ctx);
1637 return False;
1640 talloc_free(mem_ctx);
1642 return True;
1645 static BOOL api_lsa_SetSystemAccessAccount(pipes_struct *p)
1647 struct ndr_pull *pull;
1648 struct ndr_push *push;
1649 NTSTATUS status;
1650 DATA_BLOB blob;
1651 struct lsa_SetSystemAccessAccount r;
1652 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetSystemAccessAccount");
1654 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1655 talloc_free(mem_ctx);
1656 return False;
1659 pull = ndr_pull_init_blob(&blob, mem_ctx);
1660 if (pull == NULL) {
1661 talloc_free(mem_ctx);
1662 return False;
1665 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1666 status = ndr_pull_lsa_SetSystemAccessAccount(pull, NDR_IN, &r);
1667 if (NT_STATUS_IS_ERR(status)) {
1668 talloc_free(mem_ctx);
1669 return False;
1672 if (DEBUGLEVEL >= 10)
1673 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &r);
1675 r.out.result = _lsa_SetSystemAccessAccount(p, &r);
1677 if (p->rng_fault_state) {
1678 talloc_free(mem_ctx);
1679 /* Return True here, srv_pipe_hnd.c will take care */
1680 return True;
1683 if (DEBUGLEVEL >= 10)
1684 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, &r);
1686 push = ndr_push_init_ctx(mem_ctx);
1687 if (push == NULL) {
1688 talloc_free(mem_ctx);
1689 return False;
1692 status = ndr_push_lsa_SetSystemAccessAccount(push, NDR_OUT, &r);
1693 if (NT_STATUS_IS_ERR(status)) {
1694 talloc_free(mem_ctx);
1695 return False;
1698 blob = ndr_push_blob(push);
1699 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1700 talloc_free(mem_ctx);
1701 return False;
1704 talloc_free(mem_ctx);
1706 return True;
1709 static BOOL api_lsa_OpenTrustedDomain(pipes_struct *p)
1711 struct ndr_pull *pull;
1712 struct ndr_push *push;
1713 NTSTATUS status;
1714 DATA_BLOB blob;
1715 struct lsa_OpenTrustedDomain r;
1716 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenTrustedDomain");
1718 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1719 talloc_free(mem_ctx);
1720 return False;
1723 pull = ndr_pull_init_blob(&blob, mem_ctx);
1724 if (pull == NULL) {
1725 talloc_free(mem_ctx);
1726 return False;
1729 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1730 status = ndr_pull_lsa_OpenTrustedDomain(pull, NDR_IN, &r);
1731 if (NT_STATUS_IS_ERR(status)) {
1732 talloc_free(mem_ctx);
1733 return False;
1736 if (DEBUGLEVEL >= 10)
1737 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &r);
1739 ZERO_STRUCT(r.out);
1740 r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
1741 if (r.out.trustdom_handle == NULL) {
1742 talloc_free(mem_ctx);
1743 return False;
1746 r.out.result = _lsa_OpenTrustedDomain(p, &r);
1748 if (p->rng_fault_state) {
1749 talloc_free(mem_ctx);
1750 /* Return True here, srv_pipe_hnd.c will take care */
1751 return True;
1754 if (DEBUGLEVEL >= 10)
1755 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, &r);
1757 push = ndr_push_init_ctx(mem_ctx);
1758 if (push == NULL) {
1759 talloc_free(mem_ctx);
1760 return False;
1763 status = ndr_push_lsa_OpenTrustedDomain(push, NDR_OUT, &r);
1764 if (NT_STATUS_IS_ERR(status)) {
1765 talloc_free(mem_ctx);
1766 return False;
1769 blob = ndr_push_blob(push);
1770 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1771 talloc_free(mem_ctx);
1772 return False;
1775 talloc_free(mem_ctx);
1777 return True;
1780 static BOOL api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
1782 struct ndr_pull *pull;
1783 struct ndr_push *push;
1784 NTSTATUS status;
1785 DATA_BLOB blob;
1786 struct lsa_QueryTrustedDomainInfo r;
1787 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryTrustedDomainInfo");
1789 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1790 talloc_free(mem_ctx);
1791 return False;
1794 pull = ndr_pull_init_blob(&blob, mem_ctx);
1795 if (pull == NULL) {
1796 talloc_free(mem_ctx);
1797 return False;
1800 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1801 status = ndr_pull_lsa_QueryTrustedDomainInfo(pull, NDR_IN, &r);
1802 if (NT_STATUS_IS_ERR(status)) {
1803 talloc_free(mem_ctx);
1804 return False;
1807 if (DEBUGLEVEL >= 10)
1808 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &r);
1810 ZERO_STRUCT(r.out);
1811 r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo);
1812 if (r.out.info == NULL) {
1813 talloc_free(mem_ctx);
1814 return False;
1817 r.out.result = _lsa_QueryTrustedDomainInfo(p, &r);
1819 if (p->rng_fault_state) {
1820 talloc_free(mem_ctx);
1821 /* Return True here, srv_pipe_hnd.c will take care */
1822 return True;
1825 if (DEBUGLEVEL >= 10)
1826 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, &r);
1828 push = ndr_push_init_ctx(mem_ctx);
1829 if (push == NULL) {
1830 talloc_free(mem_ctx);
1831 return False;
1834 status = ndr_push_lsa_QueryTrustedDomainInfo(push, NDR_OUT, &r);
1835 if (NT_STATUS_IS_ERR(status)) {
1836 talloc_free(mem_ctx);
1837 return False;
1840 blob = ndr_push_blob(push);
1841 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1842 talloc_free(mem_ctx);
1843 return False;
1846 talloc_free(mem_ctx);
1848 return True;
1851 static BOOL api_lsa_SetInformationTrustedDomain(pipes_struct *p)
1853 struct ndr_pull *pull;
1854 struct ndr_push *push;
1855 NTSTATUS status;
1856 DATA_BLOB blob;
1857 struct lsa_SetInformationTrustedDomain r;
1858 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetInformationTrustedDomain");
1860 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1861 talloc_free(mem_ctx);
1862 return False;
1865 pull = ndr_pull_init_blob(&blob, mem_ctx);
1866 if (pull == NULL) {
1867 talloc_free(mem_ctx);
1868 return False;
1871 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1872 status = ndr_pull_lsa_SetInformationTrustedDomain(pull, NDR_IN, &r);
1873 if (NT_STATUS_IS_ERR(status)) {
1874 talloc_free(mem_ctx);
1875 return False;
1878 if (DEBUGLEVEL >= 10)
1879 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &r);
1881 r.out.result = _lsa_SetInformationTrustedDomain(p, &r);
1883 if (p->rng_fault_state) {
1884 talloc_free(mem_ctx);
1885 /* Return True here, srv_pipe_hnd.c will take care */
1886 return True;
1889 if (DEBUGLEVEL >= 10)
1890 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, &r);
1892 push = ndr_push_init_ctx(mem_ctx);
1893 if (push == NULL) {
1894 talloc_free(mem_ctx);
1895 return False;
1898 status = ndr_push_lsa_SetInformationTrustedDomain(push, NDR_OUT, &r);
1899 if (NT_STATUS_IS_ERR(status)) {
1900 talloc_free(mem_ctx);
1901 return False;
1904 blob = ndr_push_blob(push);
1905 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1906 talloc_free(mem_ctx);
1907 return False;
1910 talloc_free(mem_ctx);
1912 return True;
1915 static BOOL api_lsa_OpenSecret(pipes_struct *p)
1917 struct ndr_pull *pull;
1918 struct ndr_push *push;
1919 NTSTATUS status;
1920 DATA_BLOB blob;
1921 struct lsa_OpenSecret r;
1922 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenSecret");
1924 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1925 talloc_free(mem_ctx);
1926 return False;
1929 pull = ndr_pull_init_blob(&blob, mem_ctx);
1930 if (pull == NULL) {
1931 talloc_free(mem_ctx);
1932 return False;
1935 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1936 status = ndr_pull_lsa_OpenSecret(pull, NDR_IN, &r);
1937 if (NT_STATUS_IS_ERR(status)) {
1938 talloc_free(mem_ctx);
1939 return False;
1942 if (DEBUGLEVEL >= 10)
1943 NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &r);
1945 ZERO_STRUCT(r.out);
1946 r.out.sec_handle = talloc_zero(mem_ctx, struct policy_handle);
1947 if (r.out.sec_handle == NULL) {
1948 talloc_free(mem_ctx);
1949 return False;
1952 r.out.result = _lsa_OpenSecret(p, &r);
1954 if (p->rng_fault_state) {
1955 talloc_free(mem_ctx);
1956 /* Return True here, srv_pipe_hnd.c will take care */
1957 return True;
1960 if (DEBUGLEVEL >= 10)
1961 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, &r);
1963 push = ndr_push_init_ctx(mem_ctx);
1964 if (push == NULL) {
1965 talloc_free(mem_ctx);
1966 return False;
1969 status = ndr_push_lsa_OpenSecret(push, NDR_OUT, &r);
1970 if (NT_STATUS_IS_ERR(status)) {
1971 talloc_free(mem_ctx);
1972 return False;
1975 blob = ndr_push_blob(push);
1976 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
1977 talloc_free(mem_ctx);
1978 return False;
1981 talloc_free(mem_ctx);
1983 return True;
1986 static BOOL api_lsa_SetSecret(pipes_struct *p)
1988 struct ndr_pull *pull;
1989 struct ndr_push *push;
1990 NTSTATUS status;
1991 DATA_BLOB blob;
1992 struct lsa_SetSecret r;
1993 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetSecret");
1995 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
1996 talloc_free(mem_ctx);
1997 return False;
2000 pull = ndr_pull_init_blob(&blob, mem_ctx);
2001 if (pull == NULL) {
2002 talloc_free(mem_ctx);
2003 return False;
2006 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2007 status = ndr_pull_lsa_SetSecret(pull, NDR_IN, &r);
2008 if (NT_STATUS_IS_ERR(status)) {
2009 talloc_free(mem_ctx);
2010 return False;
2013 if (DEBUGLEVEL >= 10)
2014 NDR_PRINT_IN_DEBUG(lsa_SetSecret, &r);
2016 r.out.result = _lsa_SetSecret(p, &r);
2018 if (p->rng_fault_state) {
2019 talloc_free(mem_ctx);
2020 /* Return True here, srv_pipe_hnd.c will take care */
2021 return True;
2024 if (DEBUGLEVEL >= 10)
2025 NDR_PRINT_OUT_DEBUG(lsa_SetSecret, &r);
2027 push = ndr_push_init_ctx(mem_ctx);
2028 if (push == NULL) {
2029 talloc_free(mem_ctx);
2030 return False;
2033 status = ndr_push_lsa_SetSecret(push, NDR_OUT, &r);
2034 if (NT_STATUS_IS_ERR(status)) {
2035 talloc_free(mem_ctx);
2036 return False;
2039 blob = ndr_push_blob(push);
2040 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2041 talloc_free(mem_ctx);
2042 return False;
2045 talloc_free(mem_ctx);
2047 return True;
2050 static BOOL api_lsa_QuerySecret(pipes_struct *p)
2052 struct ndr_pull *pull;
2053 struct ndr_push *push;
2054 NTSTATUS status;
2055 DATA_BLOB blob;
2056 struct lsa_QuerySecret r;
2057 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QuerySecret");
2059 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2060 talloc_free(mem_ctx);
2061 return False;
2064 pull = ndr_pull_init_blob(&blob, mem_ctx);
2065 if (pull == NULL) {
2066 talloc_free(mem_ctx);
2067 return False;
2070 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2071 status = ndr_pull_lsa_QuerySecret(pull, NDR_IN, &r);
2072 if (NT_STATUS_IS_ERR(status)) {
2073 talloc_free(mem_ctx);
2074 return False;
2077 if (DEBUGLEVEL >= 10)
2078 NDR_PRINT_IN_DEBUG(lsa_QuerySecret, &r);
2080 ZERO_STRUCT(r.out);
2081 r.out.new_val = r.in.new_val;
2082 r.out.new_mtime = r.in.new_mtime;
2083 r.out.old_val = r.in.old_val;
2084 r.out.old_mtime = r.in.old_mtime;
2085 r.out.result = _lsa_QuerySecret(p, &r);
2087 if (p->rng_fault_state) {
2088 talloc_free(mem_ctx);
2089 /* Return True here, srv_pipe_hnd.c will take care */
2090 return True;
2093 if (DEBUGLEVEL >= 10)
2094 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, &r);
2096 push = ndr_push_init_ctx(mem_ctx);
2097 if (push == NULL) {
2098 talloc_free(mem_ctx);
2099 return False;
2102 status = ndr_push_lsa_QuerySecret(push, NDR_OUT, &r);
2103 if (NT_STATUS_IS_ERR(status)) {
2104 talloc_free(mem_ctx);
2105 return False;
2108 blob = ndr_push_blob(push);
2109 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2110 talloc_free(mem_ctx);
2111 return False;
2114 talloc_free(mem_ctx);
2116 return True;
2119 static BOOL api_lsa_LookupPrivValue(pipes_struct *p)
2121 struct ndr_pull *pull;
2122 struct ndr_push *push;
2123 NTSTATUS status;
2124 DATA_BLOB blob;
2125 struct lsa_LookupPrivValue r;
2126 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupPrivValue");
2128 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2129 talloc_free(mem_ctx);
2130 return False;
2133 pull = ndr_pull_init_blob(&blob, mem_ctx);
2134 if (pull == NULL) {
2135 talloc_free(mem_ctx);
2136 return False;
2139 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2140 status = ndr_pull_lsa_LookupPrivValue(pull, NDR_IN, &r);
2141 if (NT_STATUS_IS_ERR(status)) {
2142 talloc_free(mem_ctx);
2143 return False;
2146 if (DEBUGLEVEL >= 10)
2147 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &r);
2149 ZERO_STRUCT(r.out);
2150 r.out.luid = talloc_zero(mem_ctx, struct lsa_LUID);
2151 if (r.out.luid == NULL) {
2152 talloc_free(mem_ctx);
2153 return False;
2156 r.out.result = _lsa_LookupPrivValue(p, &r);
2158 if (p->rng_fault_state) {
2159 talloc_free(mem_ctx);
2160 /* Return True here, srv_pipe_hnd.c will take care */
2161 return True;
2164 if (DEBUGLEVEL >= 10)
2165 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, &r);
2167 push = ndr_push_init_ctx(mem_ctx);
2168 if (push == NULL) {
2169 talloc_free(mem_ctx);
2170 return False;
2173 status = ndr_push_lsa_LookupPrivValue(push, NDR_OUT, &r);
2174 if (NT_STATUS_IS_ERR(status)) {
2175 talloc_free(mem_ctx);
2176 return False;
2179 blob = ndr_push_blob(push);
2180 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2181 talloc_free(mem_ctx);
2182 return False;
2185 talloc_free(mem_ctx);
2187 return True;
2190 static BOOL api_lsa_LookupPrivName(pipes_struct *p)
2192 struct ndr_pull *pull;
2193 struct ndr_push *push;
2194 NTSTATUS status;
2195 DATA_BLOB blob;
2196 struct lsa_LookupPrivName r;
2197 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupPrivName");
2199 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2200 talloc_free(mem_ctx);
2201 return False;
2204 pull = ndr_pull_init_blob(&blob, mem_ctx);
2205 if (pull == NULL) {
2206 talloc_free(mem_ctx);
2207 return False;
2210 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2211 status = ndr_pull_lsa_LookupPrivName(pull, NDR_IN, &r);
2212 if (NT_STATUS_IS_ERR(status)) {
2213 talloc_free(mem_ctx);
2214 return False;
2217 if (DEBUGLEVEL >= 10)
2218 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &r);
2220 ZERO_STRUCT(r.out);
2221 r.out.name = talloc_zero(mem_ctx, struct lsa_StringLarge);
2222 if (r.out.name == NULL) {
2223 talloc_free(mem_ctx);
2224 return False;
2227 r.out.result = _lsa_LookupPrivName(p, &r);
2229 if (p->rng_fault_state) {
2230 talloc_free(mem_ctx);
2231 /* Return True here, srv_pipe_hnd.c will take care */
2232 return True;
2235 if (DEBUGLEVEL >= 10)
2236 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, &r);
2238 push = ndr_push_init_ctx(mem_ctx);
2239 if (push == NULL) {
2240 talloc_free(mem_ctx);
2241 return False;
2244 status = ndr_push_lsa_LookupPrivName(push, NDR_OUT, &r);
2245 if (NT_STATUS_IS_ERR(status)) {
2246 talloc_free(mem_ctx);
2247 return False;
2250 blob = ndr_push_blob(push);
2251 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2252 talloc_free(mem_ctx);
2253 return False;
2256 talloc_free(mem_ctx);
2258 return True;
2261 static BOOL api_lsa_LookupPrivDisplayName(pipes_struct *p)
2263 struct ndr_pull *pull;
2264 struct ndr_push *push;
2265 NTSTATUS status;
2266 DATA_BLOB blob;
2267 struct lsa_LookupPrivDisplayName r;
2268 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupPrivDisplayName");
2270 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2271 talloc_free(mem_ctx);
2272 return False;
2275 pull = ndr_pull_init_blob(&blob, mem_ctx);
2276 if (pull == NULL) {
2277 talloc_free(mem_ctx);
2278 return False;
2281 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2282 status = ndr_pull_lsa_LookupPrivDisplayName(pull, NDR_IN, &r);
2283 if (NT_STATUS_IS_ERR(status)) {
2284 talloc_free(mem_ctx);
2285 return False;
2288 if (DEBUGLEVEL >= 10)
2289 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r);
2291 ZERO_STRUCT(r.out);
2292 r.out.disp_name = talloc_zero(mem_ctx, struct lsa_StringLarge);
2293 if (r.out.disp_name == NULL) {
2294 talloc_free(mem_ctx);
2295 return False;
2298 r.out.language_id = r.in.language_id;
2299 r.out.result = _lsa_LookupPrivDisplayName(p, &r);
2301 if (p->rng_fault_state) {
2302 talloc_free(mem_ctx);
2303 /* Return True here, srv_pipe_hnd.c will take care */
2304 return True;
2307 if (DEBUGLEVEL >= 10)
2308 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, &r);
2310 push = ndr_push_init_ctx(mem_ctx);
2311 if (push == NULL) {
2312 talloc_free(mem_ctx);
2313 return False;
2316 status = ndr_push_lsa_LookupPrivDisplayName(push, NDR_OUT, &r);
2317 if (NT_STATUS_IS_ERR(status)) {
2318 talloc_free(mem_ctx);
2319 return False;
2322 blob = ndr_push_blob(push);
2323 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2324 talloc_free(mem_ctx);
2325 return False;
2328 talloc_free(mem_ctx);
2330 return True;
2333 static BOOL api_lsa_DeleteObject(pipes_struct *p)
2335 struct ndr_pull *pull;
2336 struct ndr_push *push;
2337 NTSTATUS status;
2338 DATA_BLOB blob;
2339 struct lsa_DeleteObject r;
2340 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_DeleteObject");
2342 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2343 talloc_free(mem_ctx);
2344 return False;
2347 pull = ndr_pull_init_blob(&blob, mem_ctx);
2348 if (pull == NULL) {
2349 talloc_free(mem_ctx);
2350 return False;
2353 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2354 status = ndr_pull_lsa_DeleteObject(pull, NDR_IN, &r);
2355 if (NT_STATUS_IS_ERR(status)) {
2356 talloc_free(mem_ctx);
2357 return False;
2360 if (DEBUGLEVEL >= 10)
2361 NDR_PRINT_IN_DEBUG(lsa_DeleteObject, &r);
2363 r.out.result = _lsa_DeleteObject(p, &r);
2365 if (p->rng_fault_state) {
2366 talloc_free(mem_ctx);
2367 /* Return True here, srv_pipe_hnd.c will take care */
2368 return True;
2371 if (DEBUGLEVEL >= 10)
2372 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, &r);
2374 push = ndr_push_init_ctx(mem_ctx);
2375 if (push == NULL) {
2376 talloc_free(mem_ctx);
2377 return False;
2380 status = ndr_push_lsa_DeleteObject(push, NDR_OUT, &r);
2381 if (NT_STATUS_IS_ERR(status)) {
2382 talloc_free(mem_ctx);
2383 return False;
2386 blob = ndr_push_blob(push);
2387 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2388 talloc_free(mem_ctx);
2389 return False;
2392 talloc_free(mem_ctx);
2394 return True;
2397 static BOOL api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
2399 struct ndr_pull *pull;
2400 struct ndr_push *push;
2401 NTSTATUS status;
2402 DATA_BLOB blob;
2403 struct lsa_EnumAccountsWithUserRight r;
2404 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumAccountsWithUserRight");
2406 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2407 talloc_free(mem_ctx);
2408 return False;
2411 pull = ndr_pull_init_blob(&blob, mem_ctx);
2412 if (pull == NULL) {
2413 talloc_free(mem_ctx);
2414 return False;
2417 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2418 status = ndr_pull_lsa_EnumAccountsWithUserRight(pull, NDR_IN, &r);
2419 if (NT_STATUS_IS_ERR(status)) {
2420 talloc_free(mem_ctx);
2421 return False;
2424 if (DEBUGLEVEL >= 10)
2425 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &r);
2427 ZERO_STRUCT(r.out);
2428 r.out.sids = talloc_zero(mem_ctx, struct lsa_SidArray);
2429 if (r.out.sids == NULL) {
2430 talloc_free(mem_ctx);
2431 return False;
2434 r.out.result = _lsa_EnumAccountsWithUserRight(p, &r);
2436 if (p->rng_fault_state) {
2437 talloc_free(mem_ctx);
2438 /* Return True here, srv_pipe_hnd.c will take care */
2439 return True;
2442 if (DEBUGLEVEL >= 10)
2443 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, &r);
2445 push = ndr_push_init_ctx(mem_ctx);
2446 if (push == NULL) {
2447 talloc_free(mem_ctx);
2448 return False;
2451 status = ndr_push_lsa_EnumAccountsWithUserRight(push, NDR_OUT, &r);
2452 if (NT_STATUS_IS_ERR(status)) {
2453 talloc_free(mem_ctx);
2454 return False;
2457 blob = ndr_push_blob(push);
2458 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2459 talloc_free(mem_ctx);
2460 return False;
2463 talloc_free(mem_ctx);
2465 return True;
2468 static BOOL api_lsa_EnumAccountRights(pipes_struct *p)
2470 struct ndr_pull *pull;
2471 struct ndr_push *push;
2472 NTSTATUS status;
2473 DATA_BLOB blob;
2474 struct lsa_EnumAccountRights r;
2475 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumAccountRights");
2477 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2478 talloc_free(mem_ctx);
2479 return False;
2482 pull = ndr_pull_init_blob(&blob, mem_ctx);
2483 if (pull == NULL) {
2484 talloc_free(mem_ctx);
2485 return False;
2488 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2489 status = ndr_pull_lsa_EnumAccountRights(pull, NDR_IN, &r);
2490 if (NT_STATUS_IS_ERR(status)) {
2491 talloc_free(mem_ctx);
2492 return False;
2495 if (DEBUGLEVEL >= 10)
2496 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &r);
2498 ZERO_STRUCT(r.out);
2499 r.out.rights = talloc_zero(mem_ctx, struct lsa_RightSet);
2500 if (r.out.rights == NULL) {
2501 talloc_free(mem_ctx);
2502 return False;
2505 r.out.result = _lsa_EnumAccountRights(p, &r);
2507 if (p->rng_fault_state) {
2508 talloc_free(mem_ctx);
2509 /* Return True here, srv_pipe_hnd.c will take care */
2510 return True;
2513 if (DEBUGLEVEL >= 10)
2514 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, &r);
2516 push = ndr_push_init_ctx(mem_ctx);
2517 if (push == NULL) {
2518 talloc_free(mem_ctx);
2519 return False;
2522 status = ndr_push_lsa_EnumAccountRights(push, NDR_OUT, &r);
2523 if (NT_STATUS_IS_ERR(status)) {
2524 talloc_free(mem_ctx);
2525 return False;
2528 blob = ndr_push_blob(push);
2529 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2530 talloc_free(mem_ctx);
2531 return False;
2534 talloc_free(mem_ctx);
2536 return True;
2539 static BOOL api_lsa_AddAccountRights(pipes_struct *p)
2541 struct ndr_pull *pull;
2542 struct ndr_push *push;
2543 NTSTATUS status;
2544 DATA_BLOB blob;
2545 struct lsa_AddAccountRights r;
2546 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_AddAccountRights");
2548 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2549 talloc_free(mem_ctx);
2550 return False;
2553 pull = ndr_pull_init_blob(&blob, mem_ctx);
2554 if (pull == NULL) {
2555 talloc_free(mem_ctx);
2556 return False;
2559 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2560 status = ndr_pull_lsa_AddAccountRights(pull, NDR_IN, &r);
2561 if (NT_STATUS_IS_ERR(status)) {
2562 talloc_free(mem_ctx);
2563 return False;
2566 if (DEBUGLEVEL >= 10)
2567 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights, &r);
2569 r.out.result = _lsa_AddAccountRights(p, &r);
2571 if (p->rng_fault_state) {
2572 talloc_free(mem_ctx);
2573 /* Return True here, srv_pipe_hnd.c will take care */
2574 return True;
2577 if (DEBUGLEVEL >= 10)
2578 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, &r);
2580 push = ndr_push_init_ctx(mem_ctx);
2581 if (push == NULL) {
2582 talloc_free(mem_ctx);
2583 return False;
2586 status = ndr_push_lsa_AddAccountRights(push, NDR_OUT, &r);
2587 if (NT_STATUS_IS_ERR(status)) {
2588 talloc_free(mem_ctx);
2589 return False;
2592 blob = ndr_push_blob(push);
2593 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2594 talloc_free(mem_ctx);
2595 return False;
2598 talloc_free(mem_ctx);
2600 return True;
2603 static BOOL api_lsa_RemoveAccountRights(pipes_struct *p)
2605 struct ndr_pull *pull;
2606 struct ndr_push *push;
2607 NTSTATUS status;
2608 DATA_BLOB blob;
2609 struct lsa_RemoveAccountRights r;
2610 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_RemoveAccountRights");
2612 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2613 talloc_free(mem_ctx);
2614 return False;
2617 pull = ndr_pull_init_blob(&blob, mem_ctx);
2618 if (pull == NULL) {
2619 talloc_free(mem_ctx);
2620 return False;
2623 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2624 status = ndr_pull_lsa_RemoveAccountRights(pull, NDR_IN, &r);
2625 if (NT_STATUS_IS_ERR(status)) {
2626 talloc_free(mem_ctx);
2627 return False;
2630 if (DEBUGLEVEL >= 10)
2631 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights, &r);
2633 r.out.result = _lsa_RemoveAccountRights(p, &r);
2635 if (p->rng_fault_state) {
2636 talloc_free(mem_ctx);
2637 /* Return True here, srv_pipe_hnd.c will take care */
2638 return True;
2641 if (DEBUGLEVEL >= 10)
2642 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, &r);
2644 push = ndr_push_init_ctx(mem_ctx);
2645 if (push == NULL) {
2646 talloc_free(mem_ctx);
2647 return False;
2650 status = ndr_push_lsa_RemoveAccountRights(push, NDR_OUT, &r);
2651 if (NT_STATUS_IS_ERR(status)) {
2652 talloc_free(mem_ctx);
2653 return False;
2656 blob = ndr_push_blob(push);
2657 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2658 talloc_free(mem_ctx);
2659 return False;
2662 talloc_free(mem_ctx);
2664 return True;
2667 static BOOL api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
2669 struct ndr_pull *pull;
2670 struct ndr_push *push;
2671 NTSTATUS status;
2672 DATA_BLOB blob;
2673 struct lsa_QueryTrustedDomainInfoBySid r;
2674 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryTrustedDomainInfoBySid");
2676 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2677 talloc_free(mem_ctx);
2678 return False;
2681 pull = ndr_pull_init_blob(&blob, mem_ctx);
2682 if (pull == NULL) {
2683 talloc_free(mem_ctx);
2684 return False;
2687 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2688 status = ndr_pull_lsa_QueryTrustedDomainInfoBySid(pull, NDR_IN, &r);
2689 if (NT_STATUS_IS_ERR(status)) {
2690 talloc_free(mem_ctx);
2691 return False;
2694 if (DEBUGLEVEL >= 10)
2695 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
2697 ZERO_STRUCT(r.out);
2698 r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo);
2699 if (r.out.info == NULL) {
2700 talloc_free(mem_ctx);
2701 return False;
2704 r.out.result = _lsa_QueryTrustedDomainInfoBySid(p, &r);
2706 if (p->rng_fault_state) {
2707 talloc_free(mem_ctx);
2708 /* Return True here, srv_pipe_hnd.c will take care */
2709 return True;
2712 if (DEBUGLEVEL >= 10)
2713 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
2715 push = ndr_push_init_ctx(mem_ctx);
2716 if (push == NULL) {
2717 talloc_free(mem_ctx);
2718 return False;
2721 status = ndr_push_lsa_QueryTrustedDomainInfoBySid(push, NDR_OUT, &r);
2722 if (NT_STATUS_IS_ERR(status)) {
2723 talloc_free(mem_ctx);
2724 return False;
2727 blob = ndr_push_blob(push);
2728 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2729 talloc_free(mem_ctx);
2730 return False;
2733 talloc_free(mem_ctx);
2735 return True;
2738 static BOOL api_lsa_SetTrustedDomainInfo(pipes_struct *p)
2740 struct ndr_pull *pull;
2741 struct ndr_push *push;
2742 NTSTATUS status;
2743 DATA_BLOB blob;
2744 struct lsa_SetTrustedDomainInfo r;
2745 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetTrustedDomainInfo");
2747 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2748 talloc_free(mem_ctx);
2749 return False;
2752 pull = ndr_pull_init_blob(&blob, mem_ctx);
2753 if (pull == NULL) {
2754 talloc_free(mem_ctx);
2755 return False;
2758 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2759 status = ndr_pull_lsa_SetTrustedDomainInfo(pull, NDR_IN, &r);
2760 if (NT_STATUS_IS_ERR(status)) {
2761 talloc_free(mem_ctx);
2762 return False;
2765 if (DEBUGLEVEL >= 10)
2766 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &r);
2768 r.out.result = _lsa_SetTrustedDomainInfo(p, &r);
2770 if (p->rng_fault_state) {
2771 talloc_free(mem_ctx);
2772 /* Return True here, srv_pipe_hnd.c will take care */
2773 return True;
2776 if (DEBUGLEVEL >= 10)
2777 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, &r);
2779 push = ndr_push_init_ctx(mem_ctx);
2780 if (push == NULL) {
2781 talloc_free(mem_ctx);
2782 return False;
2785 status = ndr_push_lsa_SetTrustedDomainInfo(push, NDR_OUT, &r);
2786 if (NT_STATUS_IS_ERR(status)) {
2787 talloc_free(mem_ctx);
2788 return False;
2791 blob = ndr_push_blob(push);
2792 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2793 talloc_free(mem_ctx);
2794 return False;
2797 talloc_free(mem_ctx);
2799 return True;
2802 static BOOL api_lsa_DeleteTrustedDomain(pipes_struct *p)
2804 struct ndr_pull *pull;
2805 struct ndr_push *push;
2806 NTSTATUS status;
2807 DATA_BLOB blob;
2808 struct lsa_DeleteTrustedDomain r;
2809 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_DeleteTrustedDomain");
2811 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2812 talloc_free(mem_ctx);
2813 return False;
2816 pull = ndr_pull_init_blob(&blob, mem_ctx);
2817 if (pull == NULL) {
2818 talloc_free(mem_ctx);
2819 return False;
2822 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2823 status = ndr_pull_lsa_DeleteTrustedDomain(pull, NDR_IN, &r);
2824 if (NT_STATUS_IS_ERR(status)) {
2825 talloc_free(mem_ctx);
2826 return False;
2829 if (DEBUGLEVEL >= 10)
2830 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain, &r);
2832 r.out.result = _lsa_DeleteTrustedDomain(p, &r);
2834 if (p->rng_fault_state) {
2835 talloc_free(mem_ctx);
2836 /* Return True here, srv_pipe_hnd.c will take care */
2837 return True;
2840 if (DEBUGLEVEL >= 10)
2841 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, &r);
2843 push = ndr_push_init_ctx(mem_ctx);
2844 if (push == NULL) {
2845 talloc_free(mem_ctx);
2846 return False;
2849 status = ndr_push_lsa_DeleteTrustedDomain(push, NDR_OUT, &r);
2850 if (NT_STATUS_IS_ERR(status)) {
2851 talloc_free(mem_ctx);
2852 return False;
2855 blob = ndr_push_blob(push);
2856 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2857 talloc_free(mem_ctx);
2858 return False;
2861 talloc_free(mem_ctx);
2863 return True;
2866 static BOOL api_lsa_StorePrivateData(pipes_struct *p)
2868 struct ndr_pull *pull;
2869 struct ndr_push *push;
2870 NTSTATUS status;
2871 DATA_BLOB blob;
2872 struct lsa_StorePrivateData r;
2873 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_StorePrivateData");
2875 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2876 talloc_free(mem_ctx);
2877 return False;
2880 pull = ndr_pull_init_blob(&blob, mem_ctx);
2881 if (pull == NULL) {
2882 talloc_free(mem_ctx);
2883 return False;
2886 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2887 status = ndr_pull_lsa_StorePrivateData(pull, NDR_IN, &r);
2888 if (NT_STATUS_IS_ERR(status)) {
2889 talloc_free(mem_ctx);
2890 return False;
2893 if (DEBUGLEVEL >= 10)
2894 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, &r);
2896 r.out.result = _lsa_StorePrivateData(p, &r);
2898 if (p->rng_fault_state) {
2899 talloc_free(mem_ctx);
2900 /* Return True here, srv_pipe_hnd.c will take care */
2901 return True;
2904 if (DEBUGLEVEL >= 10)
2905 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, &r);
2907 push = ndr_push_init_ctx(mem_ctx);
2908 if (push == NULL) {
2909 talloc_free(mem_ctx);
2910 return False;
2913 status = ndr_push_lsa_StorePrivateData(push, NDR_OUT, &r);
2914 if (NT_STATUS_IS_ERR(status)) {
2915 talloc_free(mem_ctx);
2916 return False;
2919 blob = ndr_push_blob(push);
2920 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2921 talloc_free(mem_ctx);
2922 return False;
2925 talloc_free(mem_ctx);
2927 return True;
2930 static BOOL api_lsa_RetrievePrivateData(pipes_struct *p)
2932 struct ndr_pull *pull;
2933 struct ndr_push *push;
2934 NTSTATUS status;
2935 DATA_BLOB blob;
2936 struct lsa_RetrievePrivateData r;
2937 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_RetrievePrivateData");
2939 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
2940 talloc_free(mem_ctx);
2941 return False;
2944 pull = ndr_pull_init_blob(&blob, mem_ctx);
2945 if (pull == NULL) {
2946 talloc_free(mem_ctx);
2947 return False;
2950 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2951 status = ndr_pull_lsa_RetrievePrivateData(pull, NDR_IN, &r);
2952 if (NT_STATUS_IS_ERR(status)) {
2953 talloc_free(mem_ctx);
2954 return False;
2957 if (DEBUGLEVEL >= 10)
2958 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, &r);
2960 r.out.result = _lsa_RetrievePrivateData(p, &r);
2962 if (p->rng_fault_state) {
2963 talloc_free(mem_ctx);
2964 /* Return True here, srv_pipe_hnd.c will take care */
2965 return True;
2968 if (DEBUGLEVEL >= 10)
2969 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, &r);
2971 push = ndr_push_init_ctx(mem_ctx);
2972 if (push == NULL) {
2973 talloc_free(mem_ctx);
2974 return False;
2977 status = ndr_push_lsa_RetrievePrivateData(push, NDR_OUT, &r);
2978 if (NT_STATUS_IS_ERR(status)) {
2979 talloc_free(mem_ctx);
2980 return False;
2983 blob = ndr_push_blob(push);
2984 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
2985 talloc_free(mem_ctx);
2986 return False;
2989 talloc_free(mem_ctx);
2991 return True;
2994 static BOOL api_lsa_OpenPolicy2(pipes_struct *p)
2996 struct ndr_pull *pull;
2997 struct ndr_push *push;
2998 NTSTATUS status;
2999 DATA_BLOB blob;
3000 struct lsa_OpenPolicy2 r;
3001 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenPolicy2");
3003 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3004 talloc_free(mem_ctx);
3005 return False;
3008 pull = ndr_pull_init_blob(&blob, mem_ctx);
3009 if (pull == NULL) {
3010 talloc_free(mem_ctx);
3011 return False;
3014 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3015 status = ndr_pull_lsa_OpenPolicy2(pull, NDR_IN, &r);
3016 if (NT_STATUS_IS_ERR(status)) {
3017 talloc_free(mem_ctx);
3018 return False;
3021 if (DEBUGLEVEL >= 10)
3022 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &r);
3024 ZERO_STRUCT(r.out);
3025 r.out.handle = talloc_zero(mem_ctx, struct policy_handle);
3026 if (r.out.handle == NULL) {
3027 talloc_free(mem_ctx);
3028 return False;
3031 r.out.result = _lsa_OpenPolicy2(p, &r);
3033 if (p->rng_fault_state) {
3034 talloc_free(mem_ctx);
3035 /* Return True here, srv_pipe_hnd.c will take care */
3036 return True;
3039 if (DEBUGLEVEL >= 10)
3040 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, &r);
3042 push = ndr_push_init_ctx(mem_ctx);
3043 if (push == NULL) {
3044 talloc_free(mem_ctx);
3045 return False;
3048 status = ndr_push_lsa_OpenPolicy2(push, NDR_OUT, &r);
3049 if (NT_STATUS_IS_ERR(status)) {
3050 talloc_free(mem_ctx);
3051 return False;
3054 blob = ndr_push_blob(push);
3055 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3056 talloc_free(mem_ctx);
3057 return False;
3060 talloc_free(mem_ctx);
3062 return True;
3065 static BOOL api_lsa_GetUserName(pipes_struct *p)
3067 struct ndr_pull *pull;
3068 struct ndr_push *push;
3069 NTSTATUS status;
3070 DATA_BLOB blob;
3071 struct lsa_GetUserName r;
3072 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_GetUserName");
3074 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3075 talloc_free(mem_ctx);
3076 return False;
3079 pull = ndr_pull_init_blob(&blob, mem_ctx);
3080 if (pull == NULL) {
3081 talloc_free(mem_ctx);
3082 return False;
3085 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3086 status = ndr_pull_lsa_GetUserName(pull, NDR_IN, &r);
3087 if (NT_STATUS_IS_ERR(status)) {
3088 talloc_free(mem_ctx);
3089 return False;
3092 if (DEBUGLEVEL >= 10)
3093 NDR_PRINT_IN_DEBUG(lsa_GetUserName, &r);
3095 ZERO_STRUCT(r.out);
3096 r.out.account_name = r.in.account_name;
3097 r.out.authority_name = r.in.authority_name;
3098 r.out.result = _lsa_GetUserName(p, &r);
3100 if (p->rng_fault_state) {
3101 talloc_free(mem_ctx);
3102 /* Return True here, srv_pipe_hnd.c will take care */
3103 return True;
3106 if (DEBUGLEVEL >= 10)
3107 NDR_PRINT_OUT_DEBUG(lsa_GetUserName, &r);
3109 push = ndr_push_init_ctx(mem_ctx);
3110 if (push == NULL) {
3111 talloc_free(mem_ctx);
3112 return False;
3115 status = ndr_push_lsa_GetUserName(push, NDR_OUT, &r);
3116 if (NT_STATUS_IS_ERR(status)) {
3117 talloc_free(mem_ctx);
3118 return False;
3121 blob = ndr_push_blob(push);
3122 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3123 talloc_free(mem_ctx);
3124 return False;
3127 talloc_free(mem_ctx);
3129 return True;
3132 static BOOL api_lsa_QueryInfoPolicy2(pipes_struct *p)
3134 struct ndr_pull *pull;
3135 struct ndr_push *push;
3136 NTSTATUS status;
3137 DATA_BLOB blob;
3138 struct lsa_QueryInfoPolicy2 r;
3139 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryInfoPolicy2");
3141 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3142 talloc_free(mem_ctx);
3143 return False;
3146 pull = ndr_pull_init_blob(&blob, mem_ctx);
3147 if (pull == NULL) {
3148 talloc_free(mem_ctx);
3149 return False;
3152 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3153 status = ndr_pull_lsa_QueryInfoPolicy2(pull, NDR_IN, &r);
3154 if (NT_STATUS_IS_ERR(status)) {
3155 talloc_free(mem_ctx);
3156 return False;
3159 if (DEBUGLEVEL >= 10)
3160 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &r);
3162 ZERO_STRUCT(r.out);
3163 r.out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation);
3164 if (r.out.info == NULL) {
3165 talloc_free(mem_ctx);
3166 return False;
3169 r.out.result = _lsa_QueryInfoPolicy2(p, &r);
3171 if (p->rng_fault_state) {
3172 talloc_free(mem_ctx);
3173 /* Return True here, srv_pipe_hnd.c will take care */
3174 return True;
3177 if (DEBUGLEVEL >= 10)
3178 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, &r);
3180 push = ndr_push_init_ctx(mem_ctx);
3181 if (push == NULL) {
3182 talloc_free(mem_ctx);
3183 return False;
3186 status = ndr_push_lsa_QueryInfoPolicy2(push, NDR_OUT, &r);
3187 if (NT_STATUS_IS_ERR(status)) {
3188 talloc_free(mem_ctx);
3189 return False;
3192 blob = ndr_push_blob(push);
3193 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3194 talloc_free(mem_ctx);
3195 return False;
3198 talloc_free(mem_ctx);
3200 return True;
3203 static BOOL api_lsa_SetInfoPolicy2(pipes_struct *p)
3205 struct ndr_pull *pull;
3206 struct ndr_push *push;
3207 NTSTATUS status;
3208 DATA_BLOB blob;
3209 struct lsa_SetInfoPolicy2 r;
3210 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetInfoPolicy2");
3212 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3213 talloc_free(mem_ctx);
3214 return False;
3217 pull = ndr_pull_init_blob(&blob, mem_ctx);
3218 if (pull == NULL) {
3219 talloc_free(mem_ctx);
3220 return False;
3223 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3224 status = ndr_pull_lsa_SetInfoPolicy2(pull, NDR_IN, &r);
3225 if (NT_STATUS_IS_ERR(status)) {
3226 talloc_free(mem_ctx);
3227 return False;
3230 if (DEBUGLEVEL >= 10)
3231 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2, &r);
3233 r.out.result = _lsa_SetInfoPolicy2(p, &r);
3235 if (p->rng_fault_state) {
3236 talloc_free(mem_ctx);
3237 /* Return True here, srv_pipe_hnd.c will take care */
3238 return True;
3241 if (DEBUGLEVEL >= 10)
3242 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, &r);
3244 push = ndr_push_init_ctx(mem_ctx);
3245 if (push == NULL) {
3246 talloc_free(mem_ctx);
3247 return False;
3250 status = ndr_push_lsa_SetInfoPolicy2(push, NDR_OUT, &r);
3251 if (NT_STATUS_IS_ERR(status)) {
3252 talloc_free(mem_ctx);
3253 return False;
3256 blob = ndr_push_blob(push);
3257 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3258 talloc_free(mem_ctx);
3259 return False;
3262 talloc_free(mem_ctx);
3264 return True;
3267 static BOOL api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
3269 struct ndr_pull *pull;
3270 struct ndr_push *push;
3271 NTSTATUS status;
3272 DATA_BLOB blob;
3273 struct lsa_QueryTrustedDomainInfoByName r;
3274 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryTrustedDomainInfoByName");
3276 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3277 talloc_free(mem_ctx);
3278 return False;
3281 pull = ndr_pull_init_blob(&blob, mem_ctx);
3282 if (pull == NULL) {
3283 talloc_free(mem_ctx);
3284 return False;
3287 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3288 status = ndr_pull_lsa_QueryTrustedDomainInfoByName(pull, NDR_IN, &r);
3289 if (NT_STATUS_IS_ERR(status)) {
3290 talloc_free(mem_ctx);
3291 return False;
3294 if (DEBUGLEVEL >= 10)
3295 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
3297 ZERO_STRUCT(r.out);
3298 r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo);
3299 if (r.out.info == NULL) {
3300 talloc_free(mem_ctx);
3301 return False;
3304 r.out.result = _lsa_QueryTrustedDomainInfoByName(p, &r);
3306 if (p->rng_fault_state) {
3307 talloc_free(mem_ctx);
3308 /* Return True here, srv_pipe_hnd.c will take care */
3309 return True;
3312 if (DEBUGLEVEL >= 10)
3313 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
3315 push = ndr_push_init_ctx(mem_ctx);
3316 if (push == NULL) {
3317 talloc_free(mem_ctx);
3318 return False;
3321 status = ndr_push_lsa_QueryTrustedDomainInfoByName(push, NDR_OUT, &r);
3322 if (NT_STATUS_IS_ERR(status)) {
3323 talloc_free(mem_ctx);
3324 return False;
3327 blob = ndr_push_blob(push);
3328 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3329 talloc_free(mem_ctx);
3330 return False;
3333 talloc_free(mem_ctx);
3335 return True;
3338 static BOOL api_lsa_SetTrustedDomainInfoByName(pipes_struct *p)
3340 struct ndr_pull *pull;
3341 struct ndr_push *push;
3342 NTSTATUS status;
3343 DATA_BLOB blob;
3344 struct lsa_SetTrustedDomainInfoByName r;
3345 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetTrustedDomainInfoByName");
3347 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3348 talloc_free(mem_ctx);
3349 return False;
3352 pull = ndr_pull_init_blob(&blob, mem_ctx);
3353 if (pull == NULL) {
3354 talloc_free(mem_ctx);
3355 return False;
3358 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3359 status = ndr_pull_lsa_SetTrustedDomainInfoByName(pull, NDR_IN, &r);
3360 if (NT_STATUS_IS_ERR(status)) {
3361 talloc_free(mem_ctx);
3362 return False;
3365 if (DEBUGLEVEL >= 10)
3366 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
3368 r.out.result = _lsa_SetTrustedDomainInfoByName(p, &r);
3370 if (p->rng_fault_state) {
3371 talloc_free(mem_ctx);
3372 /* Return True here, srv_pipe_hnd.c will take care */
3373 return True;
3376 if (DEBUGLEVEL >= 10)
3377 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
3379 push = ndr_push_init_ctx(mem_ctx);
3380 if (push == NULL) {
3381 talloc_free(mem_ctx);
3382 return False;
3385 status = ndr_push_lsa_SetTrustedDomainInfoByName(push, NDR_OUT, &r);
3386 if (NT_STATUS_IS_ERR(status)) {
3387 talloc_free(mem_ctx);
3388 return False;
3391 blob = ndr_push_blob(push);
3392 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3393 talloc_free(mem_ctx);
3394 return False;
3397 talloc_free(mem_ctx);
3399 return True;
3402 static BOOL api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
3404 struct ndr_pull *pull;
3405 struct ndr_push *push;
3406 NTSTATUS status;
3407 DATA_BLOB blob;
3408 struct lsa_EnumTrustedDomainsEx r;
3409 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_EnumTrustedDomainsEx");
3411 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3412 talloc_free(mem_ctx);
3413 return False;
3416 pull = ndr_pull_init_blob(&blob, mem_ctx);
3417 if (pull == NULL) {
3418 talloc_free(mem_ctx);
3419 return False;
3422 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3423 status = ndr_pull_lsa_EnumTrustedDomainsEx(pull, NDR_IN, &r);
3424 if (NT_STATUS_IS_ERR(status)) {
3425 talloc_free(mem_ctx);
3426 return False;
3429 if (DEBUGLEVEL >= 10)
3430 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx, &r);
3432 ZERO_STRUCT(r.out);
3433 r.out.resume_handle = r.in.resume_handle;
3434 r.out.domains = talloc_zero(mem_ctx, struct lsa_DomainListEx);
3435 if (r.out.domains == NULL) {
3436 talloc_free(mem_ctx);
3437 return False;
3440 r.out.result = _lsa_EnumTrustedDomainsEx(p, &r);
3442 if (p->rng_fault_state) {
3443 talloc_free(mem_ctx);
3444 /* Return True here, srv_pipe_hnd.c will take care */
3445 return True;
3448 if (DEBUGLEVEL >= 10)
3449 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, &r);
3451 push = ndr_push_init_ctx(mem_ctx);
3452 if (push == NULL) {
3453 talloc_free(mem_ctx);
3454 return False;
3457 status = ndr_push_lsa_EnumTrustedDomainsEx(push, NDR_OUT, &r);
3458 if (NT_STATUS_IS_ERR(status)) {
3459 talloc_free(mem_ctx);
3460 return False;
3463 blob = ndr_push_blob(push);
3464 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3465 talloc_free(mem_ctx);
3466 return False;
3469 talloc_free(mem_ctx);
3471 return True;
3474 static BOOL api_lsa_CreateTrustedDomainEx(pipes_struct *p)
3476 struct ndr_pull *pull;
3477 struct ndr_push *push;
3478 NTSTATUS status;
3479 DATA_BLOB blob;
3480 struct lsa_CreateTrustedDomainEx r;
3481 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CreateTrustedDomainEx");
3483 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3484 talloc_free(mem_ctx);
3485 return False;
3488 pull = ndr_pull_init_blob(&blob, mem_ctx);
3489 if (pull == NULL) {
3490 talloc_free(mem_ctx);
3491 return False;
3494 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3495 status = ndr_pull_lsa_CreateTrustedDomainEx(pull, NDR_IN, &r);
3496 if (NT_STATUS_IS_ERR(status)) {
3497 talloc_free(mem_ctx);
3498 return False;
3501 if (DEBUGLEVEL >= 10)
3502 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &r);
3504 r.out.result = _lsa_CreateTrustedDomainEx(p, &r);
3506 if (p->rng_fault_state) {
3507 talloc_free(mem_ctx);
3508 /* Return True here, srv_pipe_hnd.c will take care */
3509 return True;
3512 if (DEBUGLEVEL >= 10)
3513 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, &r);
3515 push = ndr_push_init_ctx(mem_ctx);
3516 if (push == NULL) {
3517 talloc_free(mem_ctx);
3518 return False;
3521 status = ndr_push_lsa_CreateTrustedDomainEx(push, NDR_OUT, &r);
3522 if (NT_STATUS_IS_ERR(status)) {
3523 talloc_free(mem_ctx);
3524 return False;
3527 blob = ndr_push_blob(push);
3528 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3529 talloc_free(mem_ctx);
3530 return False;
3533 talloc_free(mem_ctx);
3535 return True;
3538 static BOOL api_lsa_CloseTrustedDomainEx(pipes_struct *p)
3540 struct ndr_pull *pull;
3541 struct ndr_push *push;
3542 NTSTATUS status;
3543 DATA_BLOB blob;
3544 struct lsa_CloseTrustedDomainEx r;
3545 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CloseTrustedDomainEx");
3547 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3548 talloc_free(mem_ctx);
3549 return False;
3552 pull = ndr_pull_init_blob(&blob, mem_ctx);
3553 if (pull == NULL) {
3554 talloc_free(mem_ctx);
3555 return False;
3558 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3559 status = ndr_pull_lsa_CloseTrustedDomainEx(pull, NDR_IN, &r);
3560 if (NT_STATUS_IS_ERR(status)) {
3561 talloc_free(mem_ctx);
3562 return False;
3565 if (DEBUGLEVEL >= 10)
3566 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx, &r);
3568 ZERO_STRUCT(r.out);
3569 r.out.handle = r.in.handle;
3570 r.out.result = _lsa_CloseTrustedDomainEx(p, &r);
3572 if (p->rng_fault_state) {
3573 talloc_free(mem_ctx);
3574 /* Return True here, srv_pipe_hnd.c will take care */
3575 return True;
3578 if (DEBUGLEVEL >= 10)
3579 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, &r);
3581 push = ndr_push_init_ctx(mem_ctx);
3582 if (push == NULL) {
3583 talloc_free(mem_ctx);
3584 return False;
3587 status = ndr_push_lsa_CloseTrustedDomainEx(push, NDR_OUT, &r);
3588 if (NT_STATUS_IS_ERR(status)) {
3589 talloc_free(mem_ctx);
3590 return False;
3593 blob = ndr_push_blob(push);
3594 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3595 talloc_free(mem_ctx);
3596 return False;
3599 talloc_free(mem_ctx);
3601 return True;
3604 static BOOL api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
3606 struct ndr_pull *pull;
3607 struct ndr_push *push;
3608 NTSTATUS status;
3609 DATA_BLOB blob;
3610 struct lsa_QueryDomainInformationPolicy r;
3611 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_QueryDomainInformationPolicy");
3613 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3614 talloc_free(mem_ctx);
3615 return False;
3618 pull = ndr_pull_init_blob(&blob, mem_ctx);
3619 if (pull == NULL) {
3620 talloc_free(mem_ctx);
3621 return False;
3624 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3625 status = ndr_pull_lsa_QueryDomainInformationPolicy(pull, NDR_IN, &r);
3626 if (NT_STATUS_IS_ERR(status)) {
3627 talloc_free(mem_ctx);
3628 return False;
3631 if (DEBUGLEVEL >= 10)
3632 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &r);
3634 ZERO_STRUCT(r.out);
3635 r.out.info = talloc_zero(mem_ctx, union lsa_DomainInformationPolicy);
3636 if (r.out.info == NULL) {
3637 talloc_free(mem_ctx);
3638 return False;
3641 r.out.result = _lsa_QueryDomainInformationPolicy(p, &r);
3643 if (p->rng_fault_state) {
3644 talloc_free(mem_ctx);
3645 /* Return True here, srv_pipe_hnd.c will take care */
3646 return True;
3649 if (DEBUGLEVEL >= 10)
3650 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, &r);
3652 push = ndr_push_init_ctx(mem_ctx);
3653 if (push == NULL) {
3654 talloc_free(mem_ctx);
3655 return False;
3658 status = ndr_push_lsa_QueryDomainInformationPolicy(push, NDR_OUT, &r);
3659 if (NT_STATUS_IS_ERR(status)) {
3660 talloc_free(mem_ctx);
3661 return False;
3664 blob = ndr_push_blob(push);
3665 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3666 talloc_free(mem_ctx);
3667 return False;
3670 talloc_free(mem_ctx);
3672 return True;
3675 static BOOL api_lsa_SetDomainInformationPolicy(pipes_struct *p)
3677 struct ndr_pull *pull;
3678 struct ndr_push *push;
3679 NTSTATUS status;
3680 DATA_BLOB blob;
3681 struct lsa_SetDomainInformationPolicy r;
3682 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_SetDomainInformationPolicy");
3684 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3685 talloc_free(mem_ctx);
3686 return False;
3689 pull = ndr_pull_init_blob(&blob, mem_ctx);
3690 if (pull == NULL) {
3691 talloc_free(mem_ctx);
3692 return False;
3695 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3696 status = ndr_pull_lsa_SetDomainInformationPolicy(pull, NDR_IN, &r);
3697 if (NT_STATUS_IS_ERR(status)) {
3698 talloc_free(mem_ctx);
3699 return False;
3702 if (DEBUGLEVEL >= 10)
3703 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy, &r);
3705 r.out.result = _lsa_SetDomainInformationPolicy(p, &r);
3707 if (p->rng_fault_state) {
3708 talloc_free(mem_ctx);
3709 /* Return True here, srv_pipe_hnd.c will take care */
3710 return True;
3713 if (DEBUGLEVEL >= 10)
3714 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, &r);
3716 push = ndr_push_init_ctx(mem_ctx);
3717 if (push == NULL) {
3718 talloc_free(mem_ctx);
3719 return False;
3722 status = ndr_push_lsa_SetDomainInformationPolicy(push, NDR_OUT, &r);
3723 if (NT_STATUS_IS_ERR(status)) {
3724 talloc_free(mem_ctx);
3725 return False;
3728 blob = ndr_push_blob(push);
3729 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3730 talloc_free(mem_ctx);
3731 return False;
3734 talloc_free(mem_ctx);
3736 return True;
3739 static BOOL api_lsa_OpenTrustedDomainByName(pipes_struct *p)
3741 struct ndr_pull *pull;
3742 struct ndr_push *push;
3743 NTSTATUS status;
3744 DATA_BLOB blob;
3745 struct lsa_OpenTrustedDomainByName r;
3746 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_OpenTrustedDomainByName");
3748 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3749 talloc_free(mem_ctx);
3750 return False;
3753 pull = ndr_pull_init_blob(&blob, mem_ctx);
3754 if (pull == NULL) {
3755 talloc_free(mem_ctx);
3756 return False;
3759 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3760 status = ndr_pull_lsa_OpenTrustedDomainByName(pull, NDR_IN, &r);
3761 if (NT_STATUS_IS_ERR(status)) {
3762 talloc_free(mem_ctx);
3763 return False;
3766 if (DEBUGLEVEL >= 10)
3767 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &r);
3769 ZERO_STRUCT(r.out);
3770 r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle);
3771 if (r.out.trustdom_handle == NULL) {
3772 talloc_free(mem_ctx);
3773 return False;
3776 r.out.result = _lsa_OpenTrustedDomainByName(p, &r);
3778 if (p->rng_fault_state) {
3779 talloc_free(mem_ctx);
3780 /* Return True here, srv_pipe_hnd.c will take care */
3781 return True;
3784 if (DEBUGLEVEL >= 10)
3785 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, &r);
3787 push = ndr_push_init_ctx(mem_ctx);
3788 if (push == NULL) {
3789 talloc_free(mem_ctx);
3790 return False;
3793 status = ndr_push_lsa_OpenTrustedDomainByName(push, NDR_OUT, &r);
3794 if (NT_STATUS_IS_ERR(status)) {
3795 talloc_free(mem_ctx);
3796 return False;
3799 blob = ndr_push_blob(push);
3800 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3801 talloc_free(mem_ctx);
3802 return False;
3805 talloc_free(mem_ctx);
3807 return True;
3810 static BOOL api_lsa_TestCall(pipes_struct *p)
3812 struct ndr_pull *pull;
3813 struct ndr_push *push;
3814 NTSTATUS status;
3815 DATA_BLOB blob;
3816 struct lsa_TestCall r;
3817 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_TestCall");
3819 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3820 talloc_free(mem_ctx);
3821 return False;
3824 pull = ndr_pull_init_blob(&blob, mem_ctx);
3825 if (pull == NULL) {
3826 talloc_free(mem_ctx);
3827 return False;
3830 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3831 status = ndr_pull_lsa_TestCall(pull, NDR_IN, &r);
3832 if (NT_STATUS_IS_ERR(status)) {
3833 talloc_free(mem_ctx);
3834 return False;
3837 if (DEBUGLEVEL >= 10)
3838 NDR_PRINT_IN_DEBUG(lsa_TestCall, &r);
3840 r.out.result = _lsa_TestCall(p, &r);
3842 if (p->rng_fault_state) {
3843 talloc_free(mem_ctx);
3844 /* Return True here, srv_pipe_hnd.c will take care */
3845 return True;
3848 if (DEBUGLEVEL >= 10)
3849 NDR_PRINT_OUT_DEBUG(lsa_TestCall, &r);
3851 push = ndr_push_init_ctx(mem_ctx);
3852 if (push == NULL) {
3853 talloc_free(mem_ctx);
3854 return False;
3857 status = ndr_push_lsa_TestCall(push, NDR_OUT, &r);
3858 if (NT_STATUS_IS_ERR(status)) {
3859 talloc_free(mem_ctx);
3860 return False;
3863 blob = ndr_push_blob(push);
3864 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3865 talloc_free(mem_ctx);
3866 return False;
3869 talloc_free(mem_ctx);
3871 return True;
3874 static BOOL api_lsa_LookupSids2(pipes_struct *p)
3876 struct ndr_pull *pull;
3877 struct ndr_push *push;
3878 NTSTATUS status;
3879 DATA_BLOB blob;
3880 struct lsa_LookupSids2 r;
3881 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupSids2");
3883 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3884 talloc_free(mem_ctx);
3885 return False;
3888 pull = ndr_pull_init_blob(&blob, mem_ctx);
3889 if (pull == NULL) {
3890 talloc_free(mem_ctx);
3891 return False;
3894 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3895 status = ndr_pull_lsa_LookupSids2(pull, NDR_IN, &r);
3896 if (NT_STATUS_IS_ERR(status)) {
3897 talloc_free(mem_ctx);
3898 return False;
3901 if (DEBUGLEVEL >= 10)
3902 NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r);
3904 ZERO_STRUCT(r.out);
3905 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
3906 if (r.out.domains == NULL) {
3907 talloc_free(mem_ctx);
3908 return False;
3911 r.out.names = r.in.names;
3912 r.out.count = r.in.count;
3913 r.out.result = _lsa_LookupSids2(p, &r);
3915 if (p->rng_fault_state) {
3916 talloc_free(mem_ctx);
3917 /* Return True here, srv_pipe_hnd.c will take care */
3918 return True;
3921 if (DEBUGLEVEL >= 10)
3922 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, &r);
3924 push = ndr_push_init_ctx(mem_ctx);
3925 if (push == NULL) {
3926 talloc_free(mem_ctx);
3927 return False;
3930 status = ndr_push_lsa_LookupSids2(push, NDR_OUT, &r);
3931 if (NT_STATUS_IS_ERR(status)) {
3932 talloc_free(mem_ctx);
3933 return False;
3936 blob = ndr_push_blob(push);
3937 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
3938 talloc_free(mem_ctx);
3939 return False;
3942 talloc_free(mem_ctx);
3944 return True;
3947 static BOOL api_lsa_LookupNames2(pipes_struct *p)
3949 struct ndr_pull *pull;
3950 struct ndr_push *push;
3951 NTSTATUS status;
3952 DATA_BLOB blob;
3953 struct lsa_LookupNames2 r;
3954 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupNames2");
3956 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
3957 talloc_free(mem_ctx);
3958 return False;
3961 pull = ndr_pull_init_blob(&blob, mem_ctx);
3962 if (pull == NULL) {
3963 talloc_free(mem_ctx);
3964 return False;
3967 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3968 status = ndr_pull_lsa_LookupNames2(pull, NDR_IN, &r);
3969 if (NT_STATUS_IS_ERR(status)) {
3970 talloc_free(mem_ctx);
3971 return False;
3974 if (DEBUGLEVEL >= 10)
3975 NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r);
3977 ZERO_STRUCT(r.out);
3978 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
3979 if (r.out.domains == NULL) {
3980 talloc_free(mem_ctx);
3981 return False;
3984 r.out.sids = r.in.sids;
3985 r.out.count = r.in.count;
3986 r.out.result = _lsa_LookupNames2(p, &r);
3988 if (p->rng_fault_state) {
3989 talloc_free(mem_ctx);
3990 /* Return True here, srv_pipe_hnd.c will take care */
3991 return True;
3994 if (DEBUGLEVEL >= 10)
3995 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, &r);
3997 push = ndr_push_init_ctx(mem_ctx);
3998 if (push == NULL) {
3999 talloc_free(mem_ctx);
4000 return False;
4003 status = ndr_push_lsa_LookupNames2(push, NDR_OUT, &r);
4004 if (NT_STATUS_IS_ERR(status)) {
4005 talloc_free(mem_ctx);
4006 return False;
4009 blob = ndr_push_blob(push);
4010 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4011 talloc_free(mem_ctx);
4012 return False;
4015 talloc_free(mem_ctx);
4017 return True;
4020 static BOOL api_lsa_CreateTrustedDomainEx2(pipes_struct *p)
4022 struct ndr_pull *pull;
4023 struct ndr_push *push;
4024 NTSTATUS status;
4025 DATA_BLOB blob;
4026 struct lsa_CreateTrustedDomainEx2 r;
4027 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CreateTrustedDomainEx2");
4029 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4030 talloc_free(mem_ctx);
4031 return False;
4034 pull = ndr_pull_init_blob(&blob, mem_ctx);
4035 if (pull == NULL) {
4036 talloc_free(mem_ctx);
4037 return False;
4040 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4041 status = ndr_pull_lsa_CreateTrustedDomainEx2(pull, NDR_IN, &r);
4042 if (NT_STATUS_IS_ERR(status)) {
4043 talloc_free(mem_ctx);
4044 return False;
4047 if (DEBUGLEVEL >= 10)
4048 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &r);
4050 r.out.result = _lsa_CreateTrustedDomainEx2(p, &r);
4052 if (p->rng_fault_state) {
4053 talloc_free(mem_ctx);
4054 /* Return True here, srv_pipe_hnd.c will take care */
4055 return True;
4058 if (DEBUGLEVEL >= 10)
4059 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, &r);
4061 push = ndr_push_init_ctx(mem_ctx);
4062 if (push == NULL) {
4063 talloc_free(mem_ctx);
4064 return False;
4067 status = ndr_push_lsa_CreateTrustedDomainEx2(push, NDR_OUT, &r);
4068 if (NT_STATUS_IS_ERR(status)) {
4069 talloc_free(mem_ctx);
4070 return False;
4073 blob = ndr_push_blob(push);
4074 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4075 talloc_free(mem_ctx);
4076 return False;
4079 talloc_free(mem_ctx);
4081 return True;
4084 static BOOL api_lsa_CREDRWRITE(pipes_struct *p)
4086 struct ndr_pull *pull;
4087 struct ndr_push *push;
4088 NTSTATUS status;
4089 DATA_BLOB blob;
4090 struct lsa_CREDRWRITE r;
4091 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRWRITE");
4093 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4094 talloc_free(mem_ctx);
4095 return False;
4098 pull = ndr_pull_init_blob(&blob, mem_ctx);
4099 if (pull == NULL) {
4100 talloc_free(mem_ctx);
4101 return False;
4104 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4105 status = ndr_pull_lsa_CREDRWRITE(pull, NDR_IN, &r);
4106 if (NT_STATUS_IS_ERR(status)) {
4107 talloc_free(mem_ctx);
4108 return False;
4111 if (DEBUGLEVEL >= 10)
4112 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE, &r);
4114 r.out.result = _lsa_CREDRWRITE(p, &r);
4116 if (p->rng_fault_state) {
4117 talloc_free(mem_ctx);
4118 /* Return True here, srv_pipe_hnd.c will take care */
4119 return True;
4122 if (DEBUGLEVEL >= 10)
4123 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, &r);
4125 push = ndr_push_init_ctx(mem_ctx);
4126 if (push == NULL) {
4127 talloc_free(mem_ctx);
4128 return False;
4131 status = ndr_push_lsa_CREDRWRITE(push, NDR_OUT, &r);
4132 if (NT_STATUS_IS_ERR(status)) {
4133 talloc_free(mem_ctx);
4134 return False;
4137 blob = ndr_push_blob(push);
4138 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4139 talloc_free(mem_ctx);
4140 return False;
4143 talloc_free(mem_ctx);
4145 return True;
4148 static BOOL api_lsa_CREDRREAD(pipes_struct *p)
4150 struct ndr_pull *pull;
4151 struct ndr_push *push;
4152 NTSTATUS status;
4153 DATA_BLOB blob;
4154 struct lsa_CREDRREAD r;
4155 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRREAD");
4157 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4158 talloc_free(mem_ctx);
4159 return False;
4162 pull = ndr_pull_init_blob(&blob, mem_ctx);
4163 if (pull == NULL) {
4164 talloc_free(mem_ctx);
4165 return False;
4168 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4169 status = ndr_pull_lsa_CREDRREAD(pull, NDR_IN, &r);
4170 if (NT_STATUS_IS_ERR(status)) {
4171 talloc_free(mem_ctx);
4172 return False;
4175 if (DEBUGLEVEL >= 10)
4176 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD, &r);
4178 r.out.result = _lsa_CREDRREAD(p, &r);
4180 if (p->rng_fault_state) {
4181 talloc_free(mem_ctx);
4182 /* Return True here, srv_pipe_hnd.c will take care */
4183 return True;
4186 if (DEBUGLEVEL >= 10)
4187 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, &r);
4189 push = ndr_push_init_ctx(mem_ctx);
4190 if (push == NULL) {
4191 talloc_free(mem_ctx);
4192 return False;
4195 status = ndr_push_lsa_CREDRREAD(push, NDR_OUT, &r);
4196 if (NT_STATUS_IS_ERR(status)) {
4197 talloc_free(mem_ctx);
4198 return False;
4201 blob = ndr_push_blob(push);
4202 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4203 talloc_free(mem_ctx);
4204 return False;
4207 talloc_free(mem_ctx);
4209 return True;
4212 static BOOL api_lsa_CREDRENUMERATE(pipes_struct *p)
4214 struct ndr_pull *pull;
4215 struct ndr_push *push;
4216 NTSTATUS status;
4217 DATA_BLOB blob;
4218 struct lsa_CREDRENUMERATE r;
4219 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRENUMERATE");
4221 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4222 talloc_free(mem_ctx);
4223 return False;
4226 pull = ndr_pull_init_blob(&blob, mem_ctx);
4227 if (pull == NULL) {
4228 talloc_free(mem_ctx);
4229 return False;
4232 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4233 status = ndr_pull_lsa_CREDRENUMERATE(pull, NDR_IN, &r);
4234 if (NT_STATUS_IS_ERR(status)) {
4235 talloc_free(mem_ctx);
4236 return False;
4239 if (DEBUGLEVEL >= 10)
4240 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE, &r);
4242 r.out.result = _lsa_CREDRENUMERATE(p, &r);
4244 if (p->rng_fault_state) {
4245 talloc_free(mem_ctx);
4246 /* Return True here, srv_pipe_hnd.c will take care */
4247 return True;
4250 if (DEBUGLEVEL >= 10)
4251 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, &r);
4253 push = ndr_push_init_ctx(mem_ctx);
4254 if (push == NULL) {
4255 talloc_free(mem_ctx);
4256 return False;
4259 status = ndr_push_lsa_CREDRENUMERATE(push, NDR_OUT, &r);
4260 if (NT_STATUS_IS_ERR(status)) {
4261 talloc_free(mem_ctx);
4262 return False;
4265 blob = ndr_push_blob(push);
4266 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4267 talloc_free(mem_ctx);
4268 return False;
4271 talloc_free(mem_ctx);
4273 return True;
4276 static BOOL api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct *p)
4278 struct ndr_pull *pull;
4279 struct ndr_push *push;
4280 NTSTATUS status;
4281 DATA_BLOB blob;
4282 struct lsa_CREDRWRITEDOMAINCREDENTIALS r;
4283 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRWRITEDOMAINCREDENTIALS");
4285 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4286 talloc_free(mem_ctx);
4287 return False;
4290 pull = ndr_pull_init_blob(&blob, mem_ctx);
4291 if (pull == NULL) {
4292 talloc_free(mem_ctx);
4293 return False;
4296 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4297 status = ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(pull, NDR_IN, &r);
4298 if (NT_STATUS_IS_ERR(status)) {
4299 talloc_free(mem_ctx);
4300 return False;
4303 if (DEBUGLEVEL >= 10)
4304 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
4306 r.out.result = _lsa_CREDRWRITEDOMAINCREDENTIALS(p, &r);
4308 if (p->rng_fault_state) {
4309 talloc_free(mem_ctx);
4310 /* Return True here, srv_pipe_hnd.c will take care */
4311 return True;
4314 if (DEBUGLEVEL >= 10)
4315 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
4317 push = ndr_push_init_ctx(mem_ctx);
4318 if (push == NULL) {
4319 talloc_free(mem_ctx);
4320 return False;
4323 status = ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(push, NDR_OUT, &r);
4324 if (NT_STATUS_IS_ERR(status)) {
4325 talloc_free(mem_ctx);
4326 return False;
4329 blob = ndr_push_blob(push);
4330 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4331 talloc_free(mem_ctx);
4332 return False;
4335 talloc_free(mem_ctx);
4337 return True;
4340 static BOOL api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct *p)
4342 struct ndr_pull *pull;
4343 struct ndr_push *push;
4344 NTSTATUS status;
4345 DATA_BLOB blob;
4346 struct lsa_CREDRREADDOMAINCREDENTIALS r;
4347 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRREADDOMAINCREDENTIALS");
4349 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4350 talloc_free(mem_ctx);
4351 return False;
4354 pull = ndr_pull_init_blob(&blob, mem_ctx);
4355 if (pull == NULL) {
4356 talloc_free(mem_ctx);
4357 return False;
4360 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4361 status = ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(pull, NDR_IN, &r);
4362 if (NT_STATUS_IS_ERR(status)) {
4363 talloc_free(mem_ctx);
4364 return False;
4367 if (DEBUGLEVEL >= 10)
4368 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
4370 r.out.result = _lsa_CREDRREADDOMAINCREDENTIALS(p, &r);
4372 if (p->rng_fault_state) {
4373 talloc_free(mem_ctx);
4374 /* Return True here, srv_pipe_hnd.c will take care */
4375 return True;
4378 if (DEBUGLEVEL >= 10)
4379 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
4381 push = ndr_push_init_ctx(mem_ctx);
4382 if (push == NULL) {
4383 talloc_free(mem_ctx);
4384 return False;
4387 status = ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(push, NDR_OUT, &r);
4388 if (NT_STATUS_IS_ERR(status)) {
4389 talloc_free(mem_ctx);
4390 return False;
4393 blob = ndr_push_blob(push);
4394 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4395 talloc_free(mem_ctx);
4396 return False;
4399 talloc_free(mem_ctx);
4401 return True;
4404 static BOOL api_lsa_CREDRDELETE(pipes_struct *p)
4406 struct ndr_pull *pull;
4407 struct ndr_push *push;
4408 NTSTATUS status;
4409 DATA_BLOB blob;
4410 struct lsa_CREDRDELETE r;
4411 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRDELETE");
4413 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4414 talloc_free(mem_ctx);
4415 return False;
4418 pull = ndr_pull_init_blob(&blob, mem_ctx);
4419 if (pull == NULL) {
4420 talloc_free(mem_ctx);
4421 return False;
4424 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4425 status = ndr_pull_lsa_CREDRDELETE(pull, NDR_IN, &r);
4426 if (NT_STATUS_IS_ERR(status)) {
4427 talloc_free(mem_ctx);
4428 return False;
4431 if (DEBUGLEVEL >= 10)
4432 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE, &r);
4434 r.out.result = _lsa_CREDRDELETE(p, &r);
4436 if (p->rng_fault_state) {
4437 talloc_free(mem_ctx);
4438 /* Return True here, srv_pipe_hnd.c will take care */
4439 return True;
4442 if (DEBUGLEVEL >= 10)
4443 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, &r);
4445 push = ndr_push_init_ctx(mem_ctx);
4446 if (push == NULL) {
4447 talloc_free(mem_ctx);
4448 return False;
4451 status = ndr_push_lsa_CREDRDELETE(push, NDR_OUT, &r);
4452 if (NT_STATUS_IS_ERR(status)) {
4453 talloc_free(mem_ctx);
4454 return False;
4457 blob = ndr_push_blob(push);
4458 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4459 talloc_free(mem_ctx);
4460 return False;
4463 talloc_free(mem_ctx);
4465 return True;
4468 static BOOL api_lsa_CREDRGETTARGETINFO(pipes_struct *p)
4470 struct ndr_pull *pull;
4471 struct ndr_push *push;
4472 NTSTATUS status;
4473 DATA_BLOB blob;
4474 struct lsa_CREDRGETTARGETINFO r;
4475 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRGETTARGETINFO");
4477 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4478 talloc_free(mem_ctx);
4479 return False;
4482 pull = ndr_pull_init_blob(&blob, mem_ctx);
4483 if (pull == NULL) {
4484 talloc_free(mem_ctx);
4485 return False;
4488 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4489 status = ndr_pull_lsa_CREDRGETTARGETINFO(pull, NDR_IN, &r);
4490 if (NT_STATUS_IS_ERR(status)) {
4491 talloc_free(mem_ctx);
4492 return False;
4495 if (DEBUGLEVEL >= 10)
4496 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO, &r);
4498 r.out.result = _lsa_CREDRGETTARGETINFO(p, &r);
4500 if (p->rng_fault_state) {
4501 talloc_free(mem_ctx);
4502 /* Return True here, srv_pipe_hnd.c will take care */
4503 return True;
4506 if (DEBUGLEVEL >= 10)
4507 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, &r);
4509 push = ndr_push_init_ctx(mem_ctx);
4510 if (push == NULL) {
4511 talloc_free(mem_ctx);
4512 return False;
4515 status = ndr_push_lsa_CREDRGETTARGETINFO(push, NDR_OUT, &r);
4516 if (NT_STATUS_IS_ERR(status)) {
4517 talloc_free(mem_ctx);
4518 return False;
4521 blob = ndr_push_blob(push);
4522 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4523 talloc_free(mem_ctx);
4524 return False;
4527 talloc_free(mem_ctx);
4529 return True;
4532 static BOOL api_lsa_CREDRPROFILELOADED(pipes_struct *p)
4534 struct ndr_pull *pull;
4535 struct ndr_push *push;
4536 NTSTATUS status;
4537 DATA_BLOB blob;
4538 struct lsa_CREDRPROFILELOADED r;
4539 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRPROFILELOADED");
4541 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4542 talloc_free(mem_ctx);
4543 return False;
4546 pull = ndr_pull_init_blob(&blob, mem_ctx);
4547 if (pull == NULL) {
4548 talloc_free(mem_ctx);
4549 return False;
4552 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4553 status = ndr_pull_lsa_CREDRPROFILELOADED(pull, NDR_IN, &r);
4554 if (NT_STATUS_IS_ERR(status)) {
4555 talloc_free(mem_ctx);
4556 return False;
4559 if (DEBUGLEVEL >= 10)
4560 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED, &r);
4562 r.out.result = _lsa_CREDRPROFILELOADED(p, &r);
4564 if (p->rng_fault_state) {
4565 talloc_free(mem_ctx);
4566 /* Return True here, srv_pipe_hnd.c will take care */
4567 return True;
4570 if (DEBUGLEVEL >= 10)
4571 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, &r);
4573 push = ndr_push_init_ctx(mem_ctx);
4574 if (push == NULL) {
4575 talloc_free(mem_ctx);
4576 return False;
4579 status = ndr_push_lsa_CREDRPROFILELOADED(push, NDR_OUT, &r);
4580 if (NT_STATUS_IS_ERR(status)) {
4581 talloc_free(mem_ctx);
4582 return False;
4585 blob = ndr_push_blob(push);
4586 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4587 talloc_free(mem_ctx);
4588 return False;
4591 talloc_free(mem_ctx);
4593 return True;
4596 static BOOL api_lsa_LookupNames3(pipes_struct *p)
4598 struct ndr_pull *pull;
4599 struct ndr_push *push;
4600 NTSTATUS status;
4601 DATA_BLOB blob;
4602 struct lsa_LookupNames3 r;
4603 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupNames3");
4605 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4606 talloc_free(mem_ctx);
4607 return False;
4610 pull = ndr_pull_init_blob(&blob, mem_ctx);
4611 if (pull == NULL) {
4612 talloc_free(mem_ctx);
4613 return False;
4616 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4617 status = ndr_pull_lsa_LookupNames3(pull, NDR_IN, &r);
4618 if (NT_STATUS_IS_ERR(status)) {
4619 talloc_free(mem_ctx);
4620 return False;
4623 if (DEBUGLEVEL >= 10)
4624 NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r);
4626 ZERO_STRUCT(r.out);
4627 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
4628 if (r.out.domains == NULL) {
4629 talloc_free(mem_ctx);
4630 return False;
4633 r.out.sids = r.in.sids;
4634 r.out.count = r.in.count;
4635 r.out.result = _lsa_LookupNames3(p, &r);
4637 if (p->rng_fault_state) {
4638 talloc_free(mem_ctx);
4639 /* Return True here, srv_pipe_hnd.c will take care */
4640 return True;
4643 if (DEBUGLEVEL >= 10)
4644 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, &r);
4646 push = ndr_push_init_ctx(mem_ctx);
4647 if (push == NULL) {
4648 talloc_free(mem_ctx);
4649 return False;
4652 status = ndr_push_lsa_LookupNames3(push, NDR_OUT, &r);
4653 if (NT_STATUS_IS_ERR(status)) {
4654 talloc_free(mem_ctx);
4655 return False;
4658 blob = ndr_push_blob(push);
4659 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4660 talloc_free(mem_ctx);
4661 return False;
4664 talloc_free(mem_ctx);
4666 return True;
4669 static BOOL api_lsa_CREDRGETSESSIONTYPES(pipes_struct *p)
4671 struct ndr_pull *pull;
4672 struct ndr_push *push;
4673 NTSTATUS status;
4674 DATA_BLOB blob;
4675 struct lsa_CREDRGETSESSIONTYPES r;
4676 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRGETSESSIONTYPES");
4678 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4679 talloc_free(mem_ctx);
4680 return False;
4683 pull = ndr_pull_init_blob(&blob, mem_ctx);
4684 if (pull == NULL) {
4685 talloc_free(mem_ctx);
4686 return False;
4689 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4690 status = ndr_pull_lsa_CREDRGETSESSIONTYPES(pull, NDR_IN, &r);
4691 if (NT_STATUS_IS_ERR(status)) {
4692 talloc_free(mem_ctx);
4693 return False;
4696 if (DEBUGLEVEL >= 10)
4697 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
4699 r.out.result = _lsa_CREDRGETSESSIONTYPES(p, &r);
4701 if (p->rng_fault_state) {
4702 talloc_free(mem_ctx);
4703 /* Return True here, srv_pipe_hnd.c will take care */
4704 return True;
4707 if (DEBUGLEVEL >= 10)
4708 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
4710 push = ndr_push_init_ctx(mem_ctx);
4711 if (push == NULL) {
4712 talloc_free(mem_ctx);
4713 return False;
4716 status = ndr_push_lsa_CREDRGETSESSIONTYPES(push, NDR_OUT, &r);
4717 if (NT_STATUS_IS_ERR(status)) {
4718 talloc_free(mem_ctx);
4719 return False;
4722 blob = ndr_push_blob(push);
4723 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4724 talloc_free(mem_ctx);
4725 return False;
4728 talloc_free(mem_ctx);
4730 return True;
4733 static BOOL api_lsa_LSARREGISTERAUDITEVENT(pipes_struct *p)
4735 struct ndr_pull *pull;
4736 struct ndr_push *push;
4737 NTSTATUS status;
4738 DATA_BLOB blob;
4739 struct lsa_LSARREGISTERAUDITEVENT r;
4740 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARREGISTERAUDITEVENT");
4742 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4743 talloc_free(mem_ctx);
4744 return False;
4747 pull = ndr_pull_init_blob(&blob, mem_ctx);
4748 if (pull == NULL) {
4749 talloc_free(mem_ctx);
4750 return False;
4753 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4754 status = ndr_pull_lsa_LSARREGISTERAUDITEVENT(pull, NDR_IN, &r);
4755 if (NT_STATUS_IS_ERR(status)) {
4756 talloc_free(mem_ctx);
4757 return False;
4760 if (DEBUGLEVEL >= 10)
4761 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
4763 r.out.result = _lsa_LSARREGISTERAUDITEVENT(p, &r);
4765 if (p->rng_fault_state) {
4766 talloc_free(mem_ctx);
4767 /* Return True here, srv_pipe_hnd.c will take care */
4768 return True;
4771 if (DEBUGLEVEL >= 10)
4772 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
4774 push = ndr_push_init_ctx(mem_ctx);
4775 if (push == NULL) {
4776 talloc_free(mem_ctx);
4777 return False;
4780 status = ndr_push_lsa_LSARREGISTERAUDITEVENT(push, NDR_OUT, &r);
4781 if (NT_STATUS_IS_ERR(status)) {
4782 talloc_free(mem_ctx);
4783 return False;
4786 blob = ndr_push_blob(push);
4787 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4788 talloc_free(mem_ctx);
4789 return False;
4792 talloc_free(mem_ctx);
4794 return True;
4797 static BOOL api_lsa_LSARGENAUDITEVENT(pipes_struct *p)
4799 struct ndr_pull *pull;
4800 struct ndr_push *push;
4801 NTSTATUS status;
4802 DATA_BLOB blob;
4803 struct lsa_LSARGENAUDITEVENT r;
4804 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARGENAUDITEVENT");
4806 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4807 talloc_free(mem_ctx);
4808 return False;
4811 pull = ndr_pull_init_blob(&blob, mem_ctx);
4812 if (pull == NULL) {
4813 talloc_free(mem_ctx);
4814 return False;
4817 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4818 status = ndr_pull_lsa_LSARGENAUDITEVENT(pull, NDR_IN, &r);
4819 if (NT_STATUS_IS_ERR(status)) {
4820 talloc_free(mem_ctx);
4821 return False;
4824 if (DEBUGLEVEL >= 10)
4825 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT, &r);
4827 r.out.result = _lsa_LSARGENAUDITEVENT(p, &r);
4829 if (p->rng_fault_state) {
4830 talloc_free(mem_ctx);
4831 /* Return True here, srv_pipe_hnd.c will take care */
4832 return True;
4835 if (DEBUGLEVEL >= 10)
4836 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, &r);
4838 push = ndr_push_init_ctx(mem_ctx);
4839 if (push == NULL) {
4840 talloc_free(mem_ctx);
4841 return False;
4844 status = ndr_push_lsa_LSARGENAUDITEVENT(push, NDR_OUT, &r);
4845 if (NT_STATUS_IS_ERR(status)) {
4846 talloc_free(mem_ctx);
4847 return False;
4850 blob = ndr_push_blob(push);
4851 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4852 talloc_free(mem_ctx);
4853 return False;
4856 talloc_free(mem_ctx);
4858 return True;
4861 static BOOL api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct *p)
4863 struct ndr_pull *pull;
4864 struct ndr_push *push;
4865 NTSTATUS status;
4866 DATA_BLOB blob;
4867 struct lsa_LSARUNREGISTERAUDITEVENT r;
4868 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARUNREGISTERAUDITEVENT");
4870 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4871 talloc_free(mem_ctx);
4872 return False;
4875 pull = ndr_pull_init_blob(&blob, mem_ctx);
4876 if (pull == NULL) {
4877 talloc_free(mem_ctx);
4878 return False;
4881 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4882 status = ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(pull, NDR_IN, &r);
4883 if (NT_STATUS_IS_ERR(status)) {
4884 talloc_free(mem_ctx);
4885 return False;
4888 if (DEBUGLEVEL >= 10)
4889 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
4891 r.out.result = _lsa_LSARUNREGISTERAUDITEVENT(p, &r);
4893 if (p->rng_fault_state) {
4894 talloc_free(mem_ctx);
4895 /* Return True here, srv_pipe_hnd.c will take care */
4896 return True;
4899 if (DEBUGLEVEL >= 10)
4900 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
4902 push = ndr_push_init_ctx(mem_ctx);
4903 if (push == NULL) {
4904 talloc_free(mem_ctx);
4905 return False;
4908 status = ndr_push_lsa_LSARUNREGISTERAUDITEVENT(push, NDR_OUT, &r);
4909 if (NT_STATUS_IS_ERR(status)) {
4910 talloc_free(mem_ctx);
4911 return False;
4914 blob = ndr_push_blob(push);
4915 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4916 talloc_free(mem_ctx);
4917 return False;
4920 talloc_free(mem_ctx);
4922 return True;
4925 static BOOL api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct *p)
4927 struct ndr_pull *pull;
4928 struct ndr_push *push;
4929 NTSTATUS status;
4930 DATA_BLOB blob;
4931 struct lsa_LSARQUERYFORESTTRUSTINFORMATION r;
4932 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARQUERYFORESTTRUSTINFORMATION");
4934 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4935 talloc_free(mem_ctx);
4936 return False;
4939 pull = ndr_pull_init_blob(&blob, mem_ctx);
4940 if (pull == NULL) {
4941 talloc_free(mem_ctx);
4942 return False;
4945 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4946 status = ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION(pull, NDR_IN, &r);
4947 if (NT_STATUS_IS_ERR(status)) {
4948 talloc_free(mem_ctx);
4949 return False;
4952 if (DEBUGLEVEL >= 10)
4953 NDR_PRINT_IN_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r);
4955 r.out.result = _lsa_LSARQUERYFORESTTRUSTINFORMATION(p, &r);
4957 if (p->rng_fault_state) {
4958 talloc_free(mem_ctx);
4959 /* Return True here, srv_pipe_hnd.c will take care */
4960 return True;
4963 if (DEBUGLEVEL >= 10)
4964 NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r);
4966 push = ndr_push_init_ctx(mem_ctx);
4967 if (push == NULL) {
4968 talloc_free(mem_ctx);
4969 return False;
4972 status = ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(push, NDR_OUT, &r);
4973 if (NT_STATUS_IS_ERR(status)) {
4974 talloc_free(mem_ctx);
4975 return False;
4978 blob = ndr_push_blob(push);
4979 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
4980 talloc_free(mem_ctx);
4981 return False;
4984 talloc_free(mem_ctx);
4986 return True;
4989 static BOOL api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct *p)
4991 struct ndr_pull *pull;
4992 struct ndr_push *push;
4993 NTSTATUS status;
4994 DATA_BLOB blob;
4995 struct lsa_LSARSETFORESTTRUSTINFORMATION r;
4996 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARSETFORESTTRUSTINFORMATION");
4998 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
4999 talloc_free(mem_ctx);
5000 return False;
5003 pull = ndr_pull_init_blob(&blob, mem_ctx);
5004 if (pull == NULL) {
5005 talloc_free(mem_ctx);
5006 return False;
5009 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5010 status = ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(pull, NDR_IN, &r);
5011 if (NT_STATUS_IS_ERR(status)) {
5012 talloc_free(mem_ctx);
5013 return False;
5016 if (DEBUGLEVEL >= 10)
5017 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
5019 r.out.result = _lsa_LSARSETFORESTTRUSTINFORMATION(p, &r);
5021 if (p->rng_fault_state) {
5022 talloc_free(mem_ctx);
5023 /* Return True here, srv_pipe_hnd.c will take care */
5024 return True;
5027 if (DEBUGLEVEL >= 10)
5028 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
5030 push = ndr_push_init_ctx(mem_ctx);
5031 if (push == NULL) {
5032 talloc_free(mem_ctx);
5033 return False;
5036 status = ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(push, NDR_OUT, &r);
5037 if (NT_STATUS_IS_ERR(status)) {
5038 talloc_free(mem_ctx);
5039 return False;
5042 blob = ndr_push_blob(push);
5043 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5044 talloc_free(mem_ctx);
5045 return False;
5048 talloc_free(mem_ctx);
5050 return True;
5053 static BOOL api_lsa_CREDRRENAME(pipes_struct *p)
5055 struct ndr_pull *pull;
5056 struct ndr_push *push;
5057 NTSTATUS status;
5058 DATA_BLOB blob;
5059 struct lsa_CREDRRENAME r;
5060 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_CREDRRENAME");
5062 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5063 talloc_free(mem_ctx);
5064 return False;
5067 pull = ndr_pull_init_blob(&blob, mem_ctx);
5068 if (pull == NULL) {
5069 talloc_free(mem_ctx);
5070 return False;
5073 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5074 status = ndr_pull_lsa_CREDRRENAME(pull, NDR_IN, &r);
5075 if (NT_STATUS_IS_ERR(status)) {
5076 talloc_free(mem_ctx);
5077 return False;
5080 if (DEBUGLEVEL >= 10)
5081 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME, &r);
5083 r.out.result = _lsa_CREDRRENAME(p, &r);
5085 if (p->rng_fault_state) {
5086 talloc_free(mem_ctx);
5087 /* Return True here, srv_pipe_hnd.c will take care */
5088 return True;
5091 if (DEBUGLEVEL >= 10)
5092 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, &r);
5094 push = ndr_push_init_ctx(mem_ctx);
5095 if (push == NULL) {
5096 talloc_free(mem_ctx);
5097 return False;
5100 status = ndr_push_lsa_CREDRRENAME(push, NDR_OUT, &r);
5101 if (NT_STATUS_IS_ERR(status)) {
5102 talloc_free(mem_ctx);
5103 return False;
5106 blob = ndr_push_blob(push);
5107 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5108 talloc_free(mem_ctx);
5109 return False;
5112 talloc_free(mem_ctx);
5114 return True;
5117 static BOOL api_lsa_LookupSids3(pipes_struct *p)
5119 struct ndr_pull *pull;
5120 struct ndr_push *push;
5121 NTSTATUS status;
5122 DATA_BLOB blob;
5123 struct lsa_LookupSids3 r;
5124 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupSids3");
5126 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5127 talloc_free(mem_ctx);
5128 return False;
5131 pull = ndr_pull_init_blob(&blob, mem_ctx);
5132 if (pull == NULL) {
5133 talloc_free(mem_ctx);
5134 return False;
5137 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5138 status = ndr_pull_lsa_LookupSids3(pull, NDR_IN, &r);
5139 if (NT_STATUS_IS_ERR(status)) {
5140 talloc_free(mem_ctx);
5141 return False;
5144 if (DEBUGLEVEL >= 10)
5145 NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r);
5147 ZERO_STRUCT(r.out);
5148 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
5149 if (r.out.domains == NULL) {
5150 talloc_free(mem_ctx);
5151 return False;
5154 r.out.names = r.in.names;
5155 r.out.count = r.in.count;
5156 r.out.result = _lsa_LookupSids3(p, &r);
5158 if (p->rng_fault_state) {
5159 talloc_free(mem_ctx);
5160 /* Return True here, srv_pipe_hnd.c will take care */
5161 return True;
5164 if (DEBUGLEVEL >= 10)
5165 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, &r);
5167 push = ndr_push_init_ctx(mem_ctx);
5168 if (push == NULL) {
5169 talloc_free(mem_ctx);
5170 return False;
5173 status = ndr_push_lsa_LookupSids3(push, NDR_OUT, &r);
5174 if (NT_STATUS_IS_ERR(status)) {
5175 talloc_free(mem_ctx);
5176 return False;
5179 blob = ndr_push_blob(push);
5180 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5181 talloc_free(mem_ctx);
5182 return False;
5185 talloc_free(mem_ctx);
5187 return True;
5190 static BOOL api_lsa_LookupNames4(pipes_struct *p)
5192 struct ndr_pull *pull;
5193 struct ndr_push *push;
5194 NTSTATUS status;
5195 DATA_BLOB blob;
5196 struct lsa_LookupNames4 r;
5197 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LookupNames4");
5199 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5200 talloc_free(mem_ctx);
5201 return False;
5204 pull = ndr_pull_init_blob(&blob, mem_ctx);
5205 if (pull == NULL) {
5206 talloc_free(mem_ctx);
5207 return False;
5210 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5211 status = ndr_pull_lsa_LookupNames4(pull, NDR_IN, &r);
5212 if (NT_STATUS_IS_ERR(status)) {
5213 talloc_free(mem_ctx);
5214 return False;
5217 if (DEBUGLEVEL >= 10)
5218 NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r);
5220 ZERO_STRUCT(r.out);
5221 r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList);
5222 if (r.out.domains == NULL) {
5223 talloc_free(mem_ctx);
5224 return False;
5227 r.out.sids = r.in.sids;
5228 r.out.count = r.in.count;
5229 r.out.result = _lsa_LookupNames4(p, &r);
5231 if (p->rng_fault_state) {
5232 talloc_free(mem_ctx);
5233 /* Return True here, srv_pipe_hnd.c will take care */
5234 return True;
5237 if (DEBUGLEVEL >= 10)
5238 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, &r);
5240 push = ndr_push_init_ctx(mem_ctx);
5241 if (push == NULL) {
5242 talloc_free(mem_ctx);
5243 return False;
5246 status = ndr_push_lsa_LookupNames4(push, NDR_OUT, &r);
5247 if (NT_STATUS_IS_ERR(status)) {
5248 talloc_free(mem_ctx);
5249 return False;
5252 blob = ndr_push_blob(push);
5253 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5254 talloc_free(mem_ctx);
5255 return False;
5258 talloc_free(mem_ctx);
5260 return True;
5263 static BOOL api_lsa_LSAROPENPOLICYSCE(pipes_struct *p)
5265 struct ndr_pull *pull;
5266 struct ndr_push *push;
5267 NTSTATUS status;
5268 DATA_BLOB blob;
5269 struct lsa_LSAROPENPOLICYSCE r;
5270 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSAROPENPOLICYSCE");
5272 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5273 talloc_free(mem_ctx);
5274 return False;
5277 pull = ndr_pull_init_blob(&blob, mem_ctx);
5278 if (pull == NULL) {
5279 talloc_free(mem_ctx);
5280 return False;
5283 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5284 status = ndr_pull_lsa_LSAROPENPOLICYSCE(pull, NDR_IN, &r);
5285 if (NT_STATUS_IS_ERR(status)) {
5286 talloc_free(mem_ctx);
5287 return False;
5290 if (DEBUGLEVEL >= 10)
5291 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
5293 r.out.result = _lsa_LSAROPENPOLICYSCE(p, &r);
5295 if (p->rng_fault_state) {
5296 talloc_free(mem_ctx);
5297 /* Return True here, srv_pipe_hnd.c will take care */
5298 return True;
5301 if (DEBUGLEVEL >= 10)
5302 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
5304 push = ndr_push_init_ctx(mem_ctx);
5305 if (push == NULL) {
5306 talloc_free(mem_ctx);
5307 return False;
5310 status = ndr_push_lsa_LSAROPENPOLICYSCE(push, NDR_OUT, &r);
5311 if (NT_STATUS_IS_ERR(status)) {
5312 talloc_free(mem_ctx);
5313 return False;
5316 blob = ndr_push_blob(push);
5317 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5318 talloc_free(mem_ctx);
5319 return False;
5322 talloc_free(mem_ctx);
5324 return True;
5327 static BOOL api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
5329 struct ndr_pull *pull;
5330 struct ndr_push *push;
5331 NTSTATUS status;
5332 DATA_BLOB blob;
5333 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r;
5334 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
5336 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5337 talloc_free(mem_ctx);
5338 return False;
5341 pull = ndr_pull_init_blob(&blob, mem_ctx);
5342 if (pull == NULL) {
5343 talloc_free(mem_ctx);
5344 return False;
5347 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5348 status = ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pull, NDR_IN, &r);
5349 if (NT_STATUS_IS_ERR(status)) {
5350 talloc_free(mem_ctx);
5351 return False;
5354 if (DEBUGLEVEL >= 10)
5355 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
5357 r.out.result = _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(p, &r);
5359 if (p->rng_fault_state) {
5360 talloc_free(mem_ctx);
5361 /* Return True here, srv_pipe_hnd.c will take care */
5362 return True;
5365 if (DEBUGLEVEL >= 10)
5366 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
5368 push = ndr_push_init_ctx(mem_ctx);
5369 if (push == NULL) {
5370 talloc_free(mem_ctx);
5371 return False;
5374 status = ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(push, NDR_OUT, &r);
5375 if (NT_STATUS_IS_ERR(status)) {
5376 talloc_free(mem_ctx);
5377 return False;
5380 blob = ndr_push_blob(push);
5381 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5382 talloc_free(mem_ctx);
5383 return False;
5386 talloc_free(mem_ctx);
5388 return True;
5391 static BOOL api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p)
5393 struct ndr_pull *pull;
5394 struct ndr_push *push;
5395 NTSTATUS status;
5396 DATA_BLOB blob;
5397 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r;
5398 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
5400 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5401 talloc_free(mem_ctx);
5402 return False;
5405 pull = ndr_pull_init_blob(&blob, mem_ctx);
5406 if (pull == NULL) {
5407 talloc_free(mem_ctx);
5408 return False;
5411 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5412 status = ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pull, NDR_IN, &r);
5413 if (NT_STATUS_IS_ERR(status)) {
5414 talloc_free(mem_ctx);
5415 return False;
5418 if (DEBUGLEVEL >= 10)
5419 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
5421 r.out.result = _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(p, &r);
5423 if (p->rng_fault_state) {
5424 talloc_free(mem_ctx);
5425 /* Return True here, srv_pipe_hnd.c will take care */
5426 return True;
5429 if (DEBUGLEVEL >= 10)
5430 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
5432 push = ndr_push_init_ctx(mem_ctx);
5433 if (push == NULL) {
5434 talloc_free(mem_ctx);
5435 return False;
5438 status = ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(push, NDR_OUT, &r);
5439 if (NT_STATUS_IS_ERR(status)) {
5440 talloc_free(mem_ctx);
5441 return False;
5444 blob = ndr_push_blob(push);
5445 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5446 talloc_free(mem_ctx);
5447 return False;
5450 talloc_free(mem_ctx);
5452 return True;
5455 static BOOL api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p)
5457 struct ndr_pull *pull;
5458 struct ndr_push *push;
5459 NTSTATUS status;
5460 DATA_BLOB blob;
5461 struct lsa_LSARADTREPORTSECURITYEVENT r;
5462 TALLOC_CTX *mem_ctx = talloc_init("api_lsa_LSARADTREPORTSECURITYEVENT");
5464 if (!prs_data_blob(&p->in_data.data, &blob, mem_ctx)) {
5465 talloc_free(mem_ctx);
5466 return False;
5469 pull = ndr_pull_init_blob(&blob, mem_ctx);
5470 if (pull == NULL) {
5471 talloc_free(mem_ctx);
5472 return False;
5475 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5476 status = ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(pull, NDR_IN, &r);
5477 if (NT_STATUS_IS_ERR(status)) {
5478 talloc_free(mem_ctx);
5479 return False;
5482 if (DEBUGLEVEL >= 10)
5483 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
5485 r.out.result = _lsa_LSARADTREPORTSECURITYEVENT(p, &r);
5487 if (p->rng_fault_state) {
5488 talloc_free(mem_ctx);
5489 /* Return True here, srv_pipe_hnd.c will take care */
5490 return True;
5493 if (DEBUGLEVEL >= 10)
5494 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
5496 push = ndr_push_init_ctx(mem_ctx);
5497 if (push == NULL) {
5498 talloc_free(mem_ctx);
5499 return False;
5502 status = ndr_push_lsa_LSARADTREPORTSECURITYEVENT(push, NDR_OUT, &r);
5503 if (NT_STATUS_IS_ERR(status)) {
5504 talloc_free(mem_ctx);
5505 return False;
5508 blob = ndr_push_blob(push);
5509 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
5510 talloc_free(mem_ctx);
5511 return False;
5514 talloc_free(mem_ctx);
5516 return True;
5520 /* Tables */
5521 static struct api_struct api_lsarpc_cmds[] =
5523 {"LSA_CLOSE", DCERPC_LSA_CLOSE, api_lsa_Close},
5524 {"LSA_DELETE", DCERPC_LSA_DELETE, api_lsa_Delete},
5525 {"LSA_ENUMPRIVS", DCERPC_LSA_ENUMPRIVS, api_lsa_EnumPrivs},
5526 {"LSA_QUERYSECURITY", DCERPC_LSA_QUERYSECURITY, api_lsa_QuerySecurity},
5527 {"LSA_SETSECOBJ", DCERPC_LSA_SETSECOBJ, api_lsa_SetSecObj},
5528 {"LSA_CHANGEPASSWORD", DCERPC_LSA_CHANGEPASSWORD, api_lsa_ChangePassword},
5529 {"LSA_OPENPOLICY", DCERPC_LSA_OPENPOLICY, api_lsa_OpenPolicy},
5530 {"LSA_QUERYINFOPOLICY", DCERPC_LSA_QUERYINFOPOLICY, api_lsa_QueryInfoPolicy},
5531 {"LSA_SETINFOPOLICY", DCERPC_LSA_SETINFOPOLICY, api_lsa_SetInfoPolicy},
5532 {"LSA_CLEARAUDITLOG", DCERPC_LSA_CLEARAUDITLOG, api_lsa_ClearAuditLog},
5533 {"LSA_CREATEACCOUNT", DCERPC_LSA_CREATEACCOUNT, api_lsa_CreateAccount},
5534 {"LSA_ENUMACCOUNTS", DCERPC_LSA_ENUMACCOUNTS, api_lsa_EnumAccounts},
5535 {"LSA_CREATETRUSTEDDOMAIN", DCERPC_LSA_CREATETRUSTEDDOMAIN, api_lsa_CreateTrustedDomain},
5536 {"LSA_ENUMTRUSTDOM", DCERPC_LSA_ENUMTRUSTDOM, api_lsa_EnumTrustDom},
5537 {"LSA_LOOKUPNAMES", DCERPC_LSA_LOOKUPNAMES, api_lsa_LookupNames},
5538 {"LSA_LOOKUPSIDS", DCERPC_LSA_LOOKUPSIDS, api_lsa_LookupSids},
5539 {"LSA_CREATESECRET", DCERPC_LSA_CREATESECRET, api_lsa_CreateSecret},
5540 {"LSA_OPENACCOUNT", DCERPC_LSA_OPENACCOUNT, api_lsa_OpenAccount},
5541 {"LSA_ENUMPRIVSACCOUNT", DCERPC_LSA_ENUMPRIVSACCOUNT, api_lsa_EnumPrivsAccount},
5542 {"LSA_ADDPRIVILEGESTOACCOUNT", DCERPC_LSA_ADDPRIVILEGESTOACCOUNT, api_lsa_AddPrivilegesToAccount},
5543 {"LSA_REMOVEPRIVILEGESFROMACCOUNT", DCERPC_LSA_REMOVEPRIVILEGESFROMACCOUNT, api_lsa_RemovePrivilegesFromAccount},
5544 {"LSA_GETQUOTASFORACCOUNT", DCERPC_LSA_GETQUOTASFORACCOUNT, api_lsa_GetQuotasForAccount},
5545 {"LSA_SETQUOTASFORACCOUNT", DCERPC_LSA_SETQUOTASFORACCOUNT, api_lsa_SetQuotasForAccount},
5546 {"LSA_GETSYSTEMACCESSACCOUNT", DCERPC_LSA_GETSYSTEMACCESSACCOUNT, api_lsa_GetSystemAccessAccount},
5547 {"LSA_SETSYSTEMACCESSACCOUNT", DCERPC_LSA_SETSYSTEMACCESSACCOUNT, api_lsa_SetSystemAccessAccount},
5548 {"LSA_OPENTRUSTEDDOMAIN", DCERPC_LSA_OPENTRUSTEDDOMAIN, api_lsa_OpenTrustedDomain},
5549 {"LSA_QUERYTRUSTEDDOMAININFO", DCERPC_LSA_QUERYTRUSTEDDOMAININFO, api_lsa_QueryTrustedDomainInfo},
5550 {"LSA_SETINFORMATIONTRUSTEDDOMAIN", DCERPC_LSA_SETINFORMATIONTRUSTEDDOMAIN, api_lsa_SetInformationTrustedDomain},
5551 {"LSA_OPENSECRET", DCERPC_LSA_OPENSECRET, api_lsa_OpenSecret},
5552 {"LSA_SETSECRET", DCERPC_LSA_SETSECRET, api_lsa_SetSecret},
5553 {"LSA_QUERYSECRET", DCERPC_LSA_QUERYSECRET, api_lsa_QuerySecret},
5554 {"LSA_LOOKUPPRIVVALUE", DCERPC_LSA_LOOKUPPRIVVALUE, api_lsa_LookupPrivValue},
5555 {"LSA_LOOKUPPRIVNAME", DCERPC_LSA_LOOKUPPRIVNAME, api_lsa_LookupPrivName},
5556 {"LSA_LOOKUPPRIVDISPLAYNAME", DCERPC_LSA_LOOKUPPRIVDISPLAYNAME, api_lsa_LookupPrivDisplayName},
5557 {"LSA_DELETEOBJECT", DCERPC_LSA_DELETEOBJECT, api_lsa_DeleteObject},
5558 {"LSA_ENUMACCOUNTSWITHUSERRIGHT", DCERPC_LSA_ENUMACCOUNTSWITHUSERRIGHT, api_lsa_EnumAccountsWithUserRight},
5559 {"LSA_ENUMACCOUNTRIGHTS", DCERPC_LSA_ENUMACCOUNTRIGHTS, api_lsa_EnumAccountRights},
5560 {"LSA_ADDACCOUNTRIGHTS", DCERPC_LSA_ADDACCOUNTRIGHTS, api_lsa_AddAccountRights},
5561 {"LSA_REMOVEACCOUNTRIGHTS", DCERPC_LSA_REMOVEACCOUNTRIGHTS, api_lsa_RemoveAccountRights},
5562 {"LSA_QUERYTRUSTEDDOMAININFOBYSID", DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYSID, api_lsa_QueryTrustedDomainInfoBySid},
5563 {"LSA_SETTRUSTEDDOMAININFO", DCERPC_LSA_SETTRUSTEDDOMAININFO, api_lsa_SetTrustedDomainInfo},
5564 {"LSA_DELETETRUSTEDDOMAIN", DCERPC_LSA_DELETETRUSTEDDOMAIN, api_lsa_DeleteTrustedDomain},
5565 {"LSA_STOREPRIVATEDATA", DCERPC_LSA_STOREPRIVATEDATA, api_lsa_StorePrivateData},
5566 {"LSA_RETRIEVEPRIVATEDATA", DCERPC_LSA_RETRIEVEPRIVATEDATA, api_lsa_RetrievePrivateData},
5567 {"LSA_OPENPOLICY2", DCERPC_LSA_OPENPOLICY2, api_lsa_OpenPolicy2},
5568 {"LSA_GETUSERNAME", DCERPC_LSA_GETUSERNAME, api_lsa_GetUserName},
5569 {"LSA_QUERYINFOPOLICY2", DCERPC_LSA_QUERYINFOPOLICY2, api_lsa_QueryInfoPolicy2},
5570 {"LSA_SETINFOPOLICY2", DCERPC_LSA_SETINFOPOLICY2, api_lsa_SetInfoPolicy2},
5571 {"LSA_QUERYTRUSTEDDOMAININFOBYNAME", DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYNAME, api_lsa_QueryTrustedDomainInfoByName},
5572 {"LSA_SETTRUSTEDDOMAININFOBYNAME", DCERPC_LSA_SETTRUSTEDDOMAININFOBYNAME, api_lsa_SetTrustedDomainInfoByName},
5573 {"LSA_ENUMTRUSTEDDOMAINSEX", DCERPC_LSA_ENUMTRUSTEDDOMAINSEX, api_lsa_EnumTrustedDomainsEx},
5574 {"LSA_CREATETRUSTEDDOMAINEX", DCERPC_LSA_CREATETRUSTEDDOMAINEX, api_lsa_CreateTrustedDomainEx},
5575 {"LSA_CLOSETRUSTEDDOMAINEX", DCERPC_LSA_CLOSETRUSTEDDOMAINEX, api_lsa_CloseTrustedDomainEx},
5576 {"LSA_QUERYDOMAININFORMATIONPOLICY", DCERPC_LSA_QUERYDOMAININFORMATIONPOLICY, api_lsa_QueryDomainInformationPolicy},
5577 {"LSA_SETDOMAININFORMATIONPOLICY", DCERPC_LSA_SETDOMAININFORMATIONPOLICY, api_lsa_SetDomainInformationPolicy},
5578 {"LSA_OPENTRUSTEDDOMAINBYNAME", DCERPC_LSA_OPENTRUSTEDDOMAINBYNAME, api_lsa_OpenTrustedDomainByName},
5579 {"LSA_TESTCALL", DCERPC_LSA_TESTCALL, api_lsa_TestCall},
5580 {"LSA_LOOKUPSIDS2", DCERPC_LSA_LOOKUPSIDS2, api_lsa_LookupSids2},
5581 {"LSA_LOOKUPNAMES2", DCERPC_LSA_LOOKUPNAMES2, api_lsa_LookupNames2},
5582 {"LSA_CREATETRUSTEDDOMAINEX2", DCERPC_LSA_CREATETRUSTEDDOMAINEX2, api_lsa_CreateTrustedDomainEx2},
5583 {"LSA_CREDRWRITE", DCERPC_LSA_CREDRWRITE, api_lsa_CREDRWRITE},
5584 {"LSA_CREDRREAD", DCERPC_LSA_CREDRREAD, api_lsa_CREDRREAD},
5585 {"LSA_CREDRENUMERATE", DCERPC_LSA_CREDRENUMERATE, api_lsa_CREDRENUMERATE},
5586 {"LSA_CREDRWRITEDOMAINCREDENTIALS", DCERPC_LSA_CREDRWRITEDOMAINCREDENTIALS, api_lsa_CREDRWRITEDOMAINCREDENTIALS},
5587 {"LSA_CREDRREADDOMAINCREDENTIALS", DCERPC_LSA_CREDRREADDOMAINCREDENTIALS, api_lsa_CREDRREADDOMAINCREDENTIALS},
5588 {"LSA_CREDRDELETE", DCERPC_LSA_CREDRDELETE, api_lsa_CREDRDELETE},
5589 {"LSA_CREDRGETTARGETINFO", DCERPC_LSA_CREDRGETTARGETINFO, api_lsa_CREDRGETTARGETINFO},
5590 {"LSA_CREDRPROFILELOADED", DCERPC_LSA_CREDRPROFILELOADED, api_lsa_CREDRPROFILELOADED},
5591 {"LSA_LOOKUPNAMES3", DCERPC_LSA_LOOKUPNAMES3, api_lsa_LookupNames3},
5592 {"LSA_CREDRGETSESSIONTYPES", DCERPC_LSA_CREDRGETSESSIONTYPES, api_lsa_CREDRGETSESSIONTYPES},
5593 {"LSA_LSARREGISTERAUDITEVENT", DCERPC_LSA_LSARREGISTERAUDITEVENT, api_lsa_LSARREGISTERAUDITEVENT},
5594 {"LSA_LSARGENAUDITEVENT", DCERPC_LSA_LSARGENAUDITEVENT, api_lsa_LSARGENAUDITEVENT},
5595 {"LSA_LSARUNREGISTERAUDITEVENT", DCERPC_LSA_LSARUNREGISTERAUDITEVENT, api_lsa_LSARUNREGISTERAUDITEVENT},
5596 {"LSA_LSARQUERYFORESTTRUSTINFORMATION", DCERPC_LSA_LSARQUERYFORESTTRUSTINFORMATION, api_lsa_LSARQUERYFORESTTRUSTINFORMATION},
5597 {"LSA_LSARSETFORESTTRUSTINFORMATION", DCERPC_LSA_LSARSETFORESTTRUSTINFORMATION, api_lsa_LSARSETFORESTTRUSTINFORMATION},
5598 {"LSA_CREDRRENAME", DCERPC_LSA_CREDRRENAME, api_lsa_CREDRRENAME},
5599 {"LSA_LOOKUPSIDS3", DCERPC_LSA_LOOKUPSIDS3, api_lsa_LookupSids3},
5600 {"LSA_LOOKUPNAMES4", DCERPC_LSA_LOOKUPNAMES4, api_lsa_LookupNames4},
5601 {"LSA_LSAROPENPOLICYSCE", DCERPC_LSA_LSAROPENPOLICYSCE, api_lsa_LSAROPENPOLICYSCE},
5602 {"LSA_LSARADTREGISTERSECURITYEVENTSOURCE", DCERPC_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE},
5603 {"LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE", DCERPC_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE},
5604 {"LSA_LSARADTREPORTSECURITYEVENT", DCERPC_LSA_LSARADTREPORTSECURITYEVENT, api_lsa_LSARADTREPORTSECURITYEVENT},
5607 void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns)
5609 *fns = api_lsarpc_cmds;
5610 *n_fns = sizeof(api_lsarpc_cmds) / sizeof(struct api_struct);
5613 NTSTATUS rpc_lsarpc_init(void)
5615 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct));