2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
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
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_lsa_Close");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
29 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
30 status
= ndr_pull_lsa_Close(pull
, NDR_IN
, &r
);
31 if (NT_STATUS_IS_ERR(status
)) {
37 NDR_PRINT_IN_DEBUG(lsa_Close
, &r
);
40 r
.out
.handle
= r
.in
.handle
;
41 r
.out
.result
= _lsa_Close(p
, &r
);
43 if (p
->rng_fault_state
) {
45 /* Return True here, srv_pipe_hnd.c will take care */
50 NDR_PRINT_OUT_DEBUG(lsa_Close
, &r
);
52 push
= ndr_push_init_ctx(mem_ctx
);
58 status
= ndr_push_lsa_Close(push
, NDR_OUT
, &r
);
59 if (NT_STATUS_IS_ERR(status
)) {
64 blob
= ndr_push_blob(push
);
65 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32
)blob
.length
)) {
75 static BOOL
api_lsa_Delete(pipes_struct
*p
)
77 struct ndr_pull
*pull
;
78 struct ndr_push
*push
;
82 TALLOC_CTX
*mem_ctx
= talloc_init("api_lsa_Delete");
84 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
89 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
95 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
96 status
= ndr_pull_lsa_Delete(pull
, NDR_IN
, &r
);
97 if (NT_STATUS_IS_ERR(status
)) {
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 */
113 if (DEBUGLEVEL
>= 10)
114 NDR_PRINT_OUT_DEBUG(lsa_Delete
, &r
);
116 push
= ndr_push_init_ctx(mem_ctx
);
118 talloc_free(mem_ctx
);
122 status
= ndr_push_lsa_Delete(push
, NDR_OUT
, &r
);
123 if (NT_STATUS_IS_ERR(status
)) {
124 talloc_free(mem_ctx
);
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
);
134 talloc_free(mem_ctx
);
139 static BOOL
api_lsa_EnumPrivs(pipes_struct
*p
)
141 struct ndr_pull
*pull
;
142 struct ndr_push
*push
;
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
);
153 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
155 talloc_free(mem_ctx
);
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
);
166 if (DEBUGLEVEL
>= 10)
167 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs
, &r
);
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
);
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 */
185 if (DEBUGLEVEL
>= 10)
186 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs
, &r
);
188 push
= ndr_push_init_ctx(mem_ctx
);
190 talloc_free(mem_ctx
);
194 status
= ndr_push_lsa_EnumPrivs(push
, NDR_OUT
, &r
);
195 if (NT_STATUS_IS_ERR(status
)) {
196 talloc_free(mem_ctx
);
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
);
206 talloc_free(mem_ctx
);
211 static BOOL
api_lsa_QuerySecurity(pipes_struct
*p
)
213 struct ndr_pull
*pull
;
214 struct ndr_push
*push
;
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
);
225 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
227 talloc_free(mem_ctx
);
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
);
238 if (DEBUGLEVEL
>= 10)
239 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity
, &r
);
242 r
.out
.sdbuf
= talloc_zero(mem_ctx
, struct sec_desc_buf
);
243 if (r
.out
.sdbuf
== NULL
) {
244 talloc_free(mem_ctx
);
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 */
256 if (DEBUGLEVEL
>= 10)
257 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity
, &r
);
259 push
= ndr_push_init_ctx(mem_ctx
);
261 talloc_free(mem_ctx
);
265 status
= ndr_push_lsa_QuerySecurity(push
, NDR_OUT
, &r
);
266 if (NT_STATUS_IS_ERR(status
)) {
267 talloc_free(mem_ctx
);
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
);
277 talloc_free(mem_ctx
);
282 static BOOL
api_lsa_SetSecObj(pipes_struct
*p
)
284 struct ndr_pull
*pull
;
285 struct ndr_push
*push
;
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
);
296 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
298 talloc_free(mem_ctx
);
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
);
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 */
320 if (DEBUGLEVEL
>= 10)
321 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj
, &r
);
323 push
= ndr_push_init_ctx(mem_ctx
);
325 talloc_free(mem_ctx
);
329 status
= ndr_push_lsa_SetSecObj(push
, NDR_OUT
, &r
);
330 if (NT_STATUS_IS_ERR(status
)) {
331 talloc_free(mem_ctx
);
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
);
341 talloc_free(mem_ctx
);
346 static BOOL
api_lsa_ChangePassword(pipes_struct
*p
)
348 struct ndr_pull
*pull
;
349 struct ndr_push
*push
;
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
);
360 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
362 talloc_free(mem_ctx
);
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
);
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 */
384 if (DEBUGLEVEL
>= 10)
385 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword
, &r
);
387 push
= ndr_push_init_ctx(mem_ctx
);
389 talloc_free(mem_ctx
);
393 status
= ndr_push_lsa_ChangePassword(push
, NDR_OUT
, &r
);
394 if (NT_STATUS_IS_ERR(status
)) {
395 talloc_free(mem_ctx
);
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
);
405 talloc_free(mem_ctx
);
410 static BOOL
api_lsa_OpenPolicy(pipes_struct
*p
)
412 struct ndr_pull
*pull
;
413 struct ndr_push
*push
;
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
);
424 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
426 talloc_free(mem_ctx
);
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
);
437 if (DEBUGLEVEL
>= 10)
438 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy
, &r
);
441 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
442 if (r
.out
.handle
== NULL
) {
443 talloc_free(mem_ctx
);
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 */
455 if (DEBUGLEVEL
>= 10)
456 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy
, &r
);
458 push
= ndr_push_init_ctx(mem_ctx
);
460 talloc_free(mem_ctx
);
464 status
= ndr_push_lsa_OpenPolicy(push
, NDR_OUT
, &r
);
465 if (NT_STATUS_IS_ERR(status
)) {
466 talloc_free(mem_ctx
);
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
);
476 talloc_free(mem_ctx
);
481 static BOOL
api_lsa_QueryInfoPolicy(pipes_struct
*p
)
483 struct ndr_pull
*pull
;
484 struct ndr_push
*push
;
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
);
495 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
497 talloc_free(mem_ctx
);
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
);
508 if (DEBUGLEVEL
>= 10)
509 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy
, &r
);
512 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_PolicyInformation
);
513 if (r
.out
.info
== NULL
) {
514 talloc_free(mem_ctx
);
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 */
526 if (DEBUGLEVEL
>= 10)
527 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy
, &r
);
529 push
= ndr_push_init_ctx(mem_ctx
);
531 talloc_free(mem_ctx
);
535 status
= ndr_push_lsa_QueryInfoPolicy(push
, NDR_OUT
, &r
);
536 if (NT_STATUS_IS_ERR(status
)) {
537 talloc_free(mem_ctx
);
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
);
547 talloc_free(mem_ctx
);
552 static BOOL
api_lsa_SetInfoPolicy(pipes_struct
*p
)
554 struct ndr_pull
*pull
;
555 struct ndr_push
*push
;
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
);
566 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
568 talloc_free(mem_ctx
);
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
);
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 */
590 if (DEBUGLEVEL
>= 10)
591 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy
, &r
);
593 push
= ndr_push_init_ctx(mem_ctx
);
595 talloc_free(mem_ctx
);
599 status
= ndr_push_lsa_SetInfoPolicy(push
, NDR_OUT
, &r
);
600 if (NT_STATUS_IS_ERR(status
)) {
601 talloc_free(mem_ctx
);
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
);
611 talloc_free(mem_ctx
);
616 static BOOL
api_lsa_ClearAuditLog(pipes_struct
*p
)
618 struct ndr_pull
*pull
;
619 struct ndr_push
*push
;
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
);
630 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
632 talloc_free(mem_ctx
);
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
);
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 */
654 if (DEBUGLEVEL
>= 10)
655 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog
, &r
);
657 push
= ndr_push_init_ctx(mem_ctx
);
659 talloc_free(mem_ctx
);
663 status
= ndr_push_lsa_ClearAuditLog(push
, NDR_OUT
, &r
);
664 if (NT_STATUS_IS_ERR(status
)) {
665 talloc_free(mem_ctx
);
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
);
675 talloc_free(mem_ctx
);
680 static BOOL
api_lsa_CreateAccount(pipes_struct
*p
)
682 struct ndr_pull
*pull
;
683 struct ndr_push
*push
;
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
);
694 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
696 talloc_free(mem_ctx
);
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
);
707 if (DEBUGLEVEL
>= 10)
708 NDR_PRINT_IN_DEBUG(lsa_CreateAccount
, &r
);
711 r
.out
.acct_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
712 if (r
.out
.acct_handle
== NULL
) {
713 talloc_free(mem_ctx
);
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 */
725 if (DEBUGLEVEL
>= 10)
726 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount
, &r
);
728 push
= ndr_push_init_ctx(mem_ctx
);
730 talloc_free(mem_ctx
);
734 status
= ndr_push_lsa_CreateAccount(push
, NDR_OUT
, &r
);
735 if (NT_STATUS_IS_ERR(status
)) {
736 talloc_free(mem_ctx
);
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
);
746 talloc_free(mem_ctx
);
751 static BOOL
api_lsa_EnumAccounts(pipes_struct
*p
)
753 struct ndr_pull
*pull
;
754 struct ndr_push
*push
;
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
);
765 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
767 talloc_free(mem_ctx
);
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
);
778 if (DEBUGLEVEL
>= 10)
779 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts
, &r
);
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
);
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 */
797 if (DEBUGLEVEL
>= 10)
798 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts
, &r
);
800 push
= ndr_push_init_ctx(mem_ctx
);
802 talloc_free(mem_ctx
);
806 status
= ndr_push_lsa_EnumAccounts(push
, NDR_OUT
, &r
);
807 if (NT_STATUS_IS_ERR(status
)) {
808 talloc_free(mem_ctx
);
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
);
818 talloc_free(mem_ctx
);
823 static BOOL
api_lsa_CreateTrustedDomain(pipes_struct
*p
)
825 struct ndr_pull
*pull
;
826 struct ndr_push
*push
;
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
);
837 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
839 talloc_free(mem_ctx
);
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
);
850 if (DEBUGLEVEL
>= 10)
851 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain
, &r
);
854 r
.out
.trustdom_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
855 if (r
.out
.trustdom_handle
== NULL
) {
856 talloc_free(mem_ctx
);
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 */
868 if (DEBUGLEVEL
>= 10)
869 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain
, &r
);
871 push
= ndr_push_init_ctx(mem_ctx
);
873 talloc_free(mem_ctx
);
877 status
= ndr_push_lsa_CreateTrustedDomain(push
, NDR_OUT
, &r
);
878 if (NT_STATUS_IS_ERR(status
)) {
879 talloc_free(mem_ctx
);
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
);
889 talloc_free(mem_ctx
);
894 static BOOL
api_lsa_EnumTrustDom(pipes_struct
*p
)
896 struct ndr_pull
*pull
;
897 struct ndr_push
*push
;
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
);
908 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
910 talloc_free(mem_ctx
);
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
);
921 if (DEBUGLEVEL
>= 10)
922 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom
, &r
);
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
);
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 */
940 if (DEBUGLEVEL
>= 10)
941 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom
, &r
);
943 push
= ndr_push_init_ctx(mem_ctx
);
945 talloc_free(mem_ctx
);
949 status
= ndr_push_lsa_EnumTrustDom(push
, NDR_OUT
, &r
);
950 if (NT_STATUS_IS_ERR(status
)) {
951 talloc_free(mem_ctx
);
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
);
961 talloc_free(mem_ctx
);
966 static BOOL
api_lsa_LookupNames(pipes_struct
*p
)
968 struct ndr_pull
*pull
;
969 struct ndr_push
*push
;
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
);
980 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
982 talloc_free(mem_ctx
);
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
);
993 if (DEBUGLEVEL
>= 10)
994 NDR_PRINT_IN_DEBUG(lsa_LookupNames
, &r
);
997 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
998 if (r
.out
.domains
== NULL
) {
999 talloc_free(mem_ctx
);
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 */
1013 if (DEBUGLEVEL
>= 10)
1014 NDR_PRINT_OUT_DEBUG(lsa_LookupNames
, &r
);
1016 push
= ndr_push_init_ctx(mem_ctx
);
1018 talloc_free(mem_ctx
);
1022 status
= ndr_push_lsa_LookupNames(push
, NDR_OUT
, &r
);
1023 if (NT_STATUS_IS_ERR(status
)) {
1024 talloc_free(mem_ctx
);
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
);
1034 talloc_free(mem_ctx
);
1039 static BOOL
api_lsa_LookupSids(pipes_struct
*p
)
1041 struct ndr_pull
*pull
;
1042 struct ndr_push
*push
;
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
);
1053 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1055 talloc_free(mem_ctx
);
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
);
1066 if (DEBUGLEVEL
>= 10)
1067 NDR_PRINT_IN_DEBUG(lsa_LookupSids
, &r
);
1070 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
1071 if (r
.out
.domains
== NULL
) {
1072 talloc_free(mem_ctx
);
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 */
1086 if (DEBUGLEVEL
>= 10)
1087 NDR_PRINT_OUT_DEBUG(lsa_LookupSids
, &r
);
1089 push
= ndr_push_init_ctx(mem_ctx
);
1091 talloc_free(mem_ctx
);
1095 status
= ndr_push_lsa_LookupSids(push
, NDR_OUT
, &r
);
1096 if (NT_STATUS_IS_ERR(status
)) {
1097 talloc_free(mem_ctx
);
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
);
1107 talloc_free(mem_ctx
);
1112 static BOOL
api_lsa_CreateSecret(pipes_struct
*p
)
1114 struct ndr_pull
*pull
;
1115 struct ndr_push
*push
;
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
);
1126 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1128 talloc_free(mem_ctx
);
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
);
1139 if (DEBUGLEVEL
>= 10)
1140 NDR_PRINT_IN_DEBUG(lsa_CreateSecret
, &r
);
1143 r
.out
.sec_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1144 if (r
.out
.sec_handle
== NULL
) {
1145 talloc_free(mem_ctx
);
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 */
1157 if (DEBUGLEVEL
>= 10)
1158 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret
, &r
);
1160 push
= ndr_push_init_ctx(mem_ctx
);
1162 talloc_free(mem_ctx
);
1166 status
= ndr_push_lsa_CreateSecret(push
, NDR_OUT
, &r
);
1167 if (NT_STATUS_IS_ERR(status
)) {
1168 talloc_free(mem_ctx
);
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
);
1178 talloc_free(mem_ctx
);
1183 static BOOL
api_lsa_OpenAccount(pipes_struct
*p
)
1185 struct ndr_pull
*pull
;
1186 struct ndr_push
*push
;
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
);
1197 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1199 talloc_free(mem_ctx
);
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
);
1210 if (DEBUGLEVEL
>= 10)
1211 NDR_PRINT_IN_DEBUG(lsa_OpenAccount
, &r
);
1214 r
.out
.acct_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1215 if (r
.out
.acct_handle
== NULL
) {
1216 talloc_free(mem_ctx
);
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 */
1228 if (DEBUGLEVEL
>= 10)
1229 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount
, &r
);
1231 push
= ndr_push_init_ctx(mem_ctx
);
1233 talloc_free(mem_ctx
);
1237 status
= ndr_push_lsa_OpenAccount(push
, NDR_OUT
, &r
);
1238 if (NT_STATUS_IS_ERR(status
)) {
1239 talloc_free(mem_ctx
);
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
);
1249 talloc_free(mem_ctx
);
1254 static BOOL
api_lsa_EnumPrivsAccount(pipes_struct
*p
)
1256 struct ndr_pull
*pull
;
1257 struct ndr_push
*push
;
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
);
1268 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1270 talloc_free(mem_ctx
);
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
);
1281 if (DEBUGLEVEL
>= 10)
1282 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount
, &r
);
1285 r
.out
.privs
= talloc_zero(mem_ctx
, struct lsa_PrivilegeSet
);
1286 if (r
.out
.privs
== NULL
) {
1287 talloc_free(mem_ctx
);
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 */
1299 if (DEBUGLEVEL
>= 10)
1300 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount
, &r
);
1302 push
= ndr_push_init_ctx(mem_ctx
);
1304 talloc_free(mem_ctx
);
1308 status
= ndr_push_lsa_EnumPrivsAccount(push
, NDR_OUT
, &r
);
1309 if (NT_STATUS_IS_ERR(status
)) {
1310 talloc_free(mem_ctx
);
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
);
1320 talloc_free(mem_ctx
);
1325 static BOOL
api_lsa_AddPrivilegesToAccount(pipes_struct
*p
)
1327 struct ndr_pull
*pull
;
1328 struct ndr_push
*push
;
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
);
1339 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1341 talloc_free(mem_ctx
);
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
);
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 */
1363 if (DEBUGLEVEL
>= 10)
1364 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount
, &r
);
1366 push
= ndr_push_init_ctx(mem_ctx
);
1368 talloc_free(mem_ctx
);
1372 status
= ndr_push_lsa_AddPrivilegesToAccount(push
, NDR_OUT
, &r
);
1373 if (NT_STATUS_IS_ERR(status
)) {
1374 talloc_free(mem_ctx
);
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
);
1384 talloc_free(mem_ctx
);
1389 static BOOL
api_lsa_RemovePrivilegesFromAccount(pipes_struct
*p
)
1391 struct ndr_pull
*pull
;
1392 struct ndr_push
*push
;
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
);
1403 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1405 talloc_free(mem_ctx
);
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
);
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 */
1427 if (DEBUGLEVEL
>= 10)
1428 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount
, &r
);
1430 push
= ndr_push_init_ctx(mem_ctx
);
1432 talloc_free(mem_ctx
);
1436 status
= ndr_push_lsa_RemovePrivilegesFromAccount(push
, NDR_OUT
, &r
);
1437 if (NT_STATUS_IS_ERR(status
)) {
1438 talloc_free(mem_ctx
);
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
);
1448 talloc_free(mem_ctx
);
1453 static BOOL
api_lsa_GetQuotasForAccount(pipes_struct
*p
)
1455 struct ndr_pull
*pull
;
1456 struct ndr_push
*push
;
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
);
1467 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1469 talloc_free(mem_ctx
);
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
);
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 */
1491 if (DEBUGLEVEL
>= 10)
1492 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount
, &r
);
1494 push
= ndr_push_init_ctx(mem_ctx
);
1496 talloc_free(mem_ctx
);
1500 status
= ndr_push_lsa_GetQuotasForAccount(push
, NDR_OUT
, &r
);
1501 if (NT_STATUS_IS_ERR(status
)) {
1502 talloc_free(mem_ctx
);
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
);
1512 talloc_free(mem_ctx
);
1517 static BOOL
api_lsa_SetQuotasForAccount(pipes_struct
*p
)
1519 struct ndr_pull
*pull
;
1520 struct ndr_push
*push
;
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
);
1531 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1533 talloc_free(mem_ctx
);
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
);
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 */
1555 if (DEBUGLEVEL
>= 10)
1556 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount
, &r
);
1558 push
= ndr_push_init_ctx(mem_ctx
);
1560 talloc_free(mem_ctx
);
1564 status
= ndr_push_lsa_SetQuotasForAccount(push
, NDR_OUT
, &r
);
1565 if (NT_STATUS_IS_ERR(status
)) {
1566 talloc_free(mem_ctx
);
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
);
1576 talloc_free(mem_ctx
);
1581 static BOOL
api_lsa_GetSystemAccessAccount(pipes_struct
*p
)
1583 struct ndr_pull
*pull
;
1584 struct ndr_push
*push
;
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
);
1595 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1597 talloc_free(mem_ctx
);
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
);
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 */
1619 if (DEBUGLEVEL
>= 10)
1620 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount
, &r
);
1622 push
= ndr_push_init_ctx(mem_ctx
);
1624 talloc_free(mem_ctx
);
1628 status
= ndr_push_lsa_GetSystemAccessAccount(push
, NDR_OUT
, &r
);
1629 if (NT_STATUS_IS_ERR(status
)) {
1630 talloc_free(mem_ctx
);
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
);
1640 talloc_free(mem_ctx
);
1645 static BOOL
api_lsa_SetSystemAccessAccount(pipes_struct
*p
)
1647 struct ndr_pull
*pull
;
1648 struct ndr_push
*push
;
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
);
1659 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1661 talloc_free(mem_ctx
);
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
);
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 */
1683 if (DEBUGLEVEL
>= 10)
1684 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount
, &r
);
1686 push
= ndr_push_init_ctx(mem_ctx
);
1688 talloc_free(mem_ctx
);
1692 status
= ndr_push_lsa_SetSystemAccessAccount(push
, NDR_OUT
, &r
);
1693 if (NT_STATUS_IS_ERR(status
)) {
1694 talloc_free(mem_ctx
);
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
);
1704 talloc_free(mem_ctx
);
1709 static BOOL
api_lsa_OpenTrustedDomain(pipes_struct
*p
)
1711 struct ndr_pull
*pull
;
1712 struct ndr_push
*push
;
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
);
1723 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1725 talloc_free(mem_ctx
);
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
);
1736 if (DEBUGLEVEL
>= 10)
1737 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain
, &r
);
1740 r
.out
.trustdom_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1741 if (r
.out
.trustdom_handle
== NULL
) {
1742 talloc_free(mem_ctx
);
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 */
1754 if (DEBUGLEVEL
>= 10)
1755 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain
, &r
);
1757 push
= ndr_push_init_ctx(mem_ctx
);
1759 talloc_free(mem_ctx
);
1763 status
= ndr_push_lsa_OpenTrustedDomain(push
, NDR_OUT
, &r
);
1764 if (NT_STATUS_IS_ERR(status
)) {
1765 talloc_free(mem_ctx
);
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
);
1775 talloc_free(mem_ctx
);
1780 static BOOL
api_lsa_QueryTrustedDomainInfo(pipes_struct
*p
)
1782 struct ndr_pull
*pull
;
1783 struct ndr_push
*push
;
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
);
1794 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1796 talloc_free(mem_ctx
);
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
);
1807 if (DEBUGLEVEL
>= 10)
1808 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo
, &r
);
1811 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_TrustedDomainInfo
);
1812 if (r
.out
.info
== NULL
) {
1813 talloc_free(mem_ctx
);
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 */
1825 if (DEBUGLEVEL
>= 10)
1826 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo
, &r
);
1828 push
= ndr_push_init_ctx(mem_ctx
);
1830 talloc_free(mem_ctx
);
1834 status
= ndr_push_lsa_QueryTrustedDomainInfo(push
, NDR_OUT
, &r
);
1835 if (NT_STATUS_IS_ERR(status
)) {
1836 talloc_free(mem_ctx
);
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
);
1846 talloc_free(mem_ctx
);
1851 static BOOL
api_lsa_SetInformationTrustedDomain(pipes_struct
*p
)
1853 struct ndr_pull
*pull
;
1854 struct ndr_push
*push
;
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
);
1865 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1867 talloc_free(mem_ctx
);
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
);
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 */
1889 if (DEBUGLEVEL
>= 10)
1890 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain
, &r
);
1892 push
= ndr_push_init_ctx(mem_ctx
);
1894 talloc_free(mem_ctx
);
1898 status
= ndr_push_lsa_SetInformationTrustedDomain(push
, NDR_OUT
, &r
);
1899 if (NT_STATUS_IS_ERR(status
)) {
1900 talloc_free(mem_ctx
);
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
);
1910 talloc_free(mem_ctx
);
1915 static BOOL
api_lsa_OpenSecret(pipes_struct
*p
)
1917 struct ndr_pull
*pull
;
1918 struct ndr_push
*push
;
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
);
1929 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1931 talloc_free(mem_ctx
);
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
);
1942 if (DEBUGLEVEL
>= 10)
1943 NDR_PRINT_IN_DEBUG(lsa_OpenSecret
, &r
);
1946 r
.out
.sec_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
1947 if (r
.out
.sec_handle
== NULL
) {
1948 talloc_free(mem_ctx
);
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 */
1960 if (DEBUGLEVEL
>= 10)
1961 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret
, &r
);
1963 push
= ndr_push_init_ctx(mem_ctx
);
1965 talloc_free(mem_ctx
);
1969 status
= ndr_push_lsa_OpenSecret(push
, NDR_OUT
, &r
);
1970 if (NT_STATUS_IS_ERR(status
)) {
1971 talloc_free(mem_ctx
);
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
);
1981 talloc_free(mem_ctx
);
1986 static BOOL
api_lsa_SetSecret(pipes_struct
*p
)
1988 struct ndr_pull
*pull
;
1989 struct ndr_push
*push
;
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
);
2000 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2002 talloc_free(mem_ctx
);
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
);
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 */
2024 if (DEBUGLEVEL
>= 10)
2025 NDR_PRINT_OUT_DEBUG(lsa_SetSecret
, &r
);
2027 push
= ndr_push_init_ctx(mem_ctx
);
2029 talloc_free(mem_ctx
);
2033 status
= ndr_push_lsa_SetSecret(push
, NDR_OUT
, &r
);
2034 if (NT_STATUS_IS_ERR(status
)) {
2035 talloc_free(mem_ctx
);
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
);
2045 talloc_free(mem_ctx
);
2050 static BOOL
api_lsa_QuerySecret(pipes_struct
*p
)
2052 struct ndr_pull
*pull
;
2053 struct ndr_push
*push
;
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
);
2064 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2066 talloc_free(mem_ctx
);
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
);
2077 if (DEBUGLEVEL
>= 10)
2078 NDR_PRINT_IN_DEBUG(lsa_QuerySecret
, &r
);
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 */
2093 if (DEBUGLEVEL
>= 10)
2094 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret
, &r
);
2096 push
= ndr_push_init_ctx(mem_ctx
);
2098 talloc_free(mem_ctx
);
2102 status
= ndr_push_lsa_QuerySecret(push
, NDR_OUT
, &r
);
2103 if (NT_STATUS_IS_ERR(status
)) {
2104 talloc_free(mem_ctx
);
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
);
2114 talloc_free(mem_ctx
);
2119 static BOOL
api_lsa_LookupPrivValue(pipes_struct
*p
)
2121 struct ndr_pull
*pull
;
2122 struct ndr_push
*push
;
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
);
2133 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2135 talloc_free(mem_ctx
);
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
);
2146 if (DEBUGLEVEL
>= 10)
2147 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue
, &r
);
2150 r
.out
.luid
= talloc_zero(mem_ctx
, struct lsa_LUID
);
2151 if (r
.out
.luid
== NULL
) {
2152 talloc_free(mem_ctx
);
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 */
2164 if (DEBUGLEVEL
>= 10)
2165 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue
, &r
);
2167 push
= ndr_push_init_ctx(mem_ctx
);
2169 talloc_free(mem_ctx
);
2173 status
= ndr_push_lsa_LookupPrivValue(push
, NDR_OUT
, &r
);
2174 if (NT_STATUS_IS_ERR(status
)) {
2175 talloc_free(mem_ctx
);
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
);
2185 talloc_free(mem_ctx
);
2190 static BOOL
api_lsa_LookupPrivName(pipes_struct
*p
)
2192 struct ndr_pull
*pull
;
2193 struct ndr_push
*push
;
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
);
2204 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2206 talloc_free(mem_ctx
);
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
);
2217 if (DEBUGLEVEL
>= 10)
2218 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName
, &r
);
2221 r
.out
.name
= talloc_zero(mem_ctx
, struct lsa_StringLarge
);
2222 if (r
.out
.name
== NULL
) {
2223 talloc_free(mem_ctx
);
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 */
2235 if (DEBUGLEVEL
>= 10)
2236 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName
, &r
);
2238 push
= ndr_push_init_ctx(mem_ctx
);
2240 talloc_free(mem_ctx
);
2244 status
= ndr_push_lsa_LookupPrivName(push
, NDR_OUT
, &r
);
2245 if (NT_STATUS_IS_ERR(status
)) {
2246 talloc_free(mem_ctx
);
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
);
2256 talloc_free(mem_ctx
);
2261 static BOOL
api_lsa_LookupPrivDisplayName(pipes_struct
*p
)
2263 struct ndr_pull
*pull
;
2264 struct ndr_push
*push
;
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
);
2275 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2277 talloc_free(mem_ctx
);
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
);
2288 if (DEBUGLEVEL
>= 10)
2289 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName
, &r
);
2292 r
.out
.disp_name
= talloc_zero(mem_ctx
, struct lsa_StringLarge
);
2293 if (r
.out
.disp_name
== NULL
) {
2294 talloc_free(mem_ctx
);
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 */
2307 if (DEBUGLEVEL
>= 10)
2308 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName
, &r
);
2310 push
= ndr_push_init_ctx(mem_ctx
);
2312 talloc_free(mem_ctx
);
2316 status
= ndr_push_lsa_LookupPrivDisplayName(push
, NDR_OUT
, &r
);
2317 if (NT_STATUS_IS_ERR(status
)) {
2318 talloc_free(mem_ctx
);
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
);
2328 talloc_free(mem_ctx
);
2333 static BOOL
api_lsa_DeleteObject(pipes_struct
*p
)
2335 struct ndr_pull
*pull
;
2336 struct ndr_push
*push
;
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
);
2347 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2349 talloc_free(mem_ctx
);
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
);
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 */
2371 if (DEBUGLEVEL
>= 10)
2372 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject
, &r
);
2374 push
= ndr_push_init_ctx(mem_ctx
);
2376 talloc_free(mem_ctx
);
2380 status
= ndr_push_lsa_DeleteObject(push
, NDR_OUT
, &r
);
2381 if (NT_STATUS_IS_ERR(status
)) {
2382 talloc_free(mem_ctx
);
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
);
2392 talloc_free(mem_ctx
);
2397 static BOOL
api_lsa_EnumAccountsWithUserRight(pipes_struct
*p
)
2399 struct ndr_pull
*pull
;
2400 struct ndr_push
*push
;
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
);
2411 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2413 talloc_free(mem_ctx
);
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
);
2424 if (DEBUGLEVEL
>= 10)
2425 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight
, &r
);
2428 r
.out
.sids
= talloc_zero(mem_ctx
, struct lsa_SidArray
);
2429 if (r
.out
.sids
== NULL
) {
2430 talloc_free(mem_ctx
);
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 */
2442 if (DEBUGLEVEL
>= 10)
2443 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight
, &r
);
2445 push
= ndr_push_init_ctx(mem_ctx
);
2447 talloc_free(mem_ctx
);
2451 status
= ndr_push_lsa_EnumAccountsWithUserRight(push
, NDR_OUT
, &r
);
2452 if (NT_STATUS_IS_ERR(status
)) {
2453 talloc_free(mem_ctx
);
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
);
2463 talloc_free(mem_ctx
);
2468 static BOOL
api_lsa_EnumAccountRights(pipes_struct
*p
)
2470 struct ndr_pull
*pull
;
2471 struct ndr_push
*push
;
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
);
2482 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2484 talloc_free(mem_ctx
);
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
);
2495 if (DEBUGLEVEL
>= 10)
2496 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights
, &r
);
2499 r
.out
.rights
= talloc_zero(mem_ctx
, struct lsa_RightSet
);
2500 if (r
.out
.rights
== NULL
) {
2501 talloc_free(mem_ctx
);
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 */
2513 if (DEBUGLEVEL
>= 10)
2514 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights
, &r
);
2516 push
= ndr_push_init_ctx(mem_ctx
);
2518 talloc_free(mem_ctx
);
2522 status
= ndr_push_lsa_EnumAccountRights(push
, NDR_OUT
, &r
);
2523 if (NT_STATUS_IS_ERR(status
)) {
2524 talloc_free(mem_ctx
);
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
);
2534 talloc_free(mem_ctx
);
2539 static BOOL
api_lsa_AddAccountRights(pipes_struct
*p
)
2541 struct ndr_pull
*pull
;
2542 struct ndr_push
*push
;
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
);
2553 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2555 talloc_free(mem_ctx
);
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
);
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 */
2577 if (DEBUGLEVEL
>= 10)
2578 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights
, &r
);
2580 push
= ndr_push_init_ctx(mem_ctx
);
2582 talloc_free(mem_ctx
);
2586 status
= ndr_push_lsa_AddAccountRights(push
, NDR_OUT
, &r
);
2587 if (NT_STATUS_IS_ERR(status
)) {
2588 talloc_free(mem_ctx
);
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
);
2598 talloc_free(mem_ctx
);
2603 static BOOL
api_lsa_RemoveAccountRights(pipes_struct
*p
)
2605 struct ndr_pull
*pull
;
2606 struct ndr_push
*push
;
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
);
2617 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2619 talloc_free(mem_ctx
);
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
);
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 */
2641 if (DEBUGLEVEL
>= 10)
2642 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights
, &r
);
2644 push
= ndr_push_init_ctx(mem_ctx
);
2646 talloc_free(mem_ctx
);
2650 status
= ndr_push_lsa_RemoveAccountRights(push
, NDR_OUT
, &r
);
2651 if (NT_STATUS_IS_ERR(status
)) {
2652 talloc_free(mem_ctx
);
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
);
2662 talloc_free(mem_ctx
);
2667 static BOOL
api_lsa_QueryTrustedDomainInfoBySid(pipes_struct
*p
)
2669 struct ndr_pull
*pull
;
2670 struct ndr_push
*push
;
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
);
2681 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2683 talloc_free(mem_ctx
);
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
);
2694 if (DEBUGLEVEL
>= 10)
2695 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &r
);
2698 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_TrustedDomainInfo
);
2699 if (r
.out
.info
== NULL
) {
2700 talloc_free(mem_ctx
);
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 */
2712 if (DEBUGLEVEL
>= 10)
2713 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid
, &r
);
2715 push
= ndr_push_init_ctx(mem_ctx
);
2717 talloc_free(mem_ctx
);
2721 status
= ndr_push_lsa_QueryTrustedDomainInfoBySid(push
, NDR_OUT
, &r
);
2722 if (NT_STATUS_IS_ERR(status
)) {
2723 talloc_free(mem_ctx
);
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
);
2733 talloc_free(mem_ctx
);
2738 static BOOL
api_lsa_SetTrustedDomainInfo(pipes_struct
*p
)
2740 struct ndr_pull
*pull
;
2741 struct ndr_push
*push
;
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
);
2752 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2754 talloc_free(mem_ctx
);
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
);
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 */
2776 if (DEBUGLEVEL
>= 10)
2777 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo
, &r
);
2779 push
= ndr_push_init_ctx(mem_ctx
);
2781 talloc_free(mem_ctx
);
2785 status
= ndr_push_lsa_SetTrustedDomainInfo(push
, NDR_OUT
, &r
);
2786 if (NT_STATUS_IS_ERR(status
)) {
2787 talloc_free(mem_ctx
);
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
);
2797 talloc_free(mem_ctx
);
2802 static BOOL
api_lsa_DeleteTrustedDomain(pipes_struct
*p
)
2804 struct ndr_pull
*pull
;
2805 struct ndr_push
*push
;
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
);
2816 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2818 talloc_free(mem_ctx
);
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
);
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 */
2840 if (DEBUGLEVEL
>= 10)
2841 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain
, &r
);
2843 push
= ndr_push_init_ctx(mem_ctx
);
2845 talloc_free(mem_ctx
);
2849 status
= ndr_push_lsa_DeleteTrustedDomain(push
, NDR_OUT
, &r
);
2850 if (NT_STATUS_IS_ERR(status
)) {
2851 talloc_free(mem_ctx
);
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
);
2861 talloc_free(mem_ctx
);
2866 static BOOL
api_lsa_StorePrivateData(pipes_struct
*p
)
2868 struct ndr_pull
*pull
;
2869 struct ndr_push
*push
;
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
);
2880 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2882 talloc_free(mem_ctx
);
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
);
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 */
2904 if (DEBUGLEVEL
>= 10)
2905 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData
, &r
);
2907 push
= ndr_push_init_ctx(mem_ctx
);
2909 talloc_free(mem_ctx
);
2913 status
= ndr_push_lsa_StorePrivateData(push
, NDR_OUT
, &r
);
2914 if (NT_STATUS_IS_ERR(status
)) {
2915 talloc_free(mem_ctx
);
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
);
2925 talloc_free(mem_ctx
);
2930 static BOOL
api_lsa_RetrievePrivateData(pipes_struct
*p
)
2932 struct ndr_pull
*pull
;
2933 struct ndr_push
*push
;
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
);
2944 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
2946 talloc_free(mem_ctx
);
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
);
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 */
2968 if (DEBUGLEVEL
>= 10)
2969 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData
, &r
);
2971 push
= ndr_push_init_ctx(mem_ctx
);
2973 talloc_free(mem_ctx
);
2977 status
= ndr_push_lsa_RetrievePrivateData(push
, NDR_OUT
, &r
);
2978 if (NT_STATUS_IS_ERR(status
)) {
2979 talloc_free(mem_ctx
);
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
);
2989 talloc_free(mem_ctx
);
2994 static BOOL
api_lsa_OpenPolicy2(pipes_struct
*p
)
2996 struct ndr_pull
*pull
;
2997 struct ndr_push
*push
;
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
);
3008 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3010 talloc_free(mem_ctx
);
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
);
3021 if (DEBUGLEVEL
>= 10)
3022 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2
, &r
);
3025 r
.out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3026 if (r
.out
.handle
== NULL
) {
3027 talloc_free(mem_ctx
);
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 */
3039 if (DEBUGLEVEL
>= 10)
3040 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2
, &r
);
3042 push
= ndr_push_init_ctx(mem_ctx
);
3044 talloc_free(mem_ctx
);
3048 status
= ndr_push_lsa_OpenPolicy2(push
, NDR_OUT
, &r
);
3049 if (NT_STATUS_IS_ERR(status
)) {
3050 talloc_free(mem_ctx
);
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
);
3060 talloc_free(mem_ctx
);
3065 static BOOL
api_lsa_GetUserName(pipes_struct
*p
)
3067 struct ndr_pull
*pull
;
3068 struct ndr_push
*push
;
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
);
3079 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3081 talloc_free(mem_ctx
);
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
);
3092 if (DEBUGLEVEL
>= 10)
3093 NDR_PRINT_IN_DEBUG(lsa_GetUserName
, &r
);
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 */
3106 if (DEBUGLEVEL
>= 10)
3107 NDR_PRINT_OUT_DEBUG(lsa_GetUserName
, &r
);
3109 push
= ndr_push_init_ctx(mem_ctx
);
3111 talloc_free(mem_ctx
);
3115 status
= ndr_push_lsa_GetUserName(push
, NDR_OUT
, &r
);
3116 if (NT_STATUS_IS_ERR(status
)) {
3117 talloc_free(mem_ctx
);
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
);
3127 talloc_free(mem_ctx
);
3132 static BOOL
api_lsa_QueryInfoPolicy2(pipes_struct
*p
)
3134 struct ndr_pull
*pull
;
3135 struct ndr_push
*push
;
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
);
3146 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3148 talloc_free(mem_ctx
);
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
);
3159 if (DEBUGLEVEL
>= 10)
3160 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2
, &r
);
3163 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_PolicyInformation
);
3164 if (r
.out
.info
== NULL
) {
3165 talloc_free(mem_ctx
);
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 */
3177 if (DEBUGLEVEL
>= 10)
3178 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2
, &r
);
3180 push
= ndr_push_init_ctx(mem_ctx
);
3182 talloc_free(mem_ctx
);
3186 status
= ndr_push_lsa_QueryInfoPolicy2(push
, NDR_OUT
, &r
);
3187 if (NT_STATUS_IS_ERR(status
)) {
3188 talloc_free(mem_ctx
);
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
);
3198 talloc_free(mem_ctx
);
3203 static BOOL
api_lsa_SetInfoPolicy2(pipes_struct
*p
)
3205 struct ndr_pull
*pull
;
3206 struct ndr_push
*push
;
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
);
3217 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3219 talloc_free(mem_ctx
);
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
);
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 */
3241 if (DEBUGLEVEL
>= 10)
3242 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2
, &r
);
3244 push
= ndr_push_init_ctx(mem_ctx
);
3246 talloc_free(mem_ctx
);
3250 status
= ndr_push_lsa_SetInfoPolicy2(push
, NDR_OUT
, &r
);
3251 if (NT_STATUS_IS_ERR(status
)) {
3252 talloc_free(mem_ctx
);
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
);
3262 talloc_free(mem_ctx
);
3267 static BOOL
api_lsa_QueryTrustedDomainInfoByName(pipes_struct
*p
)
3269 struct ndr_pull
*pull
;
3270 struct ndr_push
*push
;
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
);
3281 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3283 talloc_free(mem_ctx
);
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
);
3294 if (DEBUGLEVEL
>= 10)
3295 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName
, &r
);
3298 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_TrustedDomainInfo
);
3299 if (r
.out
.info
== NULL
) {
3300 talloc_free(mem_ctx
);
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 */
3312 if (DEBUGLEVEL
>= 10)
3313 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName
, &r
);
3315 push
= ndr_push_init_ctx(mem_ctx
);
3317 talloc_free(mem_ctx
);
3321 status
= ndr_push_lsa_QueryTrustedDomainInfoByName(push
, NDR_OUT
, &r
);
3322 if (NT_STATUS_IS_ERR(status
)) {
3323 talloc_free(mem_ctx
);
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
);
3333 talloc_free(mem_ctx
);
3338 static BOOL
api_lsa_SetTrustedDomainInfoByName(pipes_struct
*p
)
3340 struct ndr_pull
*pull
;
3341 struct ndr_push
*push
;
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
);
3352 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3354 talloc_free(mem_ctx
);
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
);
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 */
3376 if (DEBUGLEVEL
>= 10)
3377 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName
, &r
);
3379 push
= ndr_push_init_ctx(mem_ctx
);
3381 talloc_free(mem_ctx
);
3385 status
= ndr_push_lsa_SetTrustedDomainInfoByName(push
, NDR_OUT
, &r
);
3386 if (NT_STATUS_IS_ERR(status
)) {
3387 talloc_free(mem_ctx
);
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
);
3397 talloc_free(mem_ctx
);
3402 static BOOL
api_lsa_EnumTrustedDomainsEx(pipes_struct
*p
)
3404 struct ndr_pull
*pull
;
3405 struct ndr_push
*push
;
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
);
3416 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3418 talloc_free(mem_ctx
);
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
);
3429 if (DEBUGLEVEL
>= 10)
3430 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx
, &r
);
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
);
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 */
3448 if (DEBUGLEVEL
>= 10)
3449 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx
, &r
);
3451 push
= ndr_push_init_ctx(mem_ctx
);
3453 talloc_free(mem_ctx
);
3457 status
= ndr_push_lsa_EnumTrustedDomainsEx(push
, NDR_OUT
, &r
);
3458 if (NT_STATUS_IS_ERR(status
)) {
3459 talloc_free(mem_ctx
);
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
);
3469 talloc_free(mem_ctx
);
3474 static BOOL
api_lsa_CreateTrustedDomainEx(pipes_struct
*p
)
3476 struct ndr_pull
*pull
;
3477 struct ndr_push
*push
;
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
);
3488 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3490 talloc_free(mem_ctx
);
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
);
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 */
3512 if (DEBUGLEVEL
>= 10)
3513 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx
, &r
);
3515 push
= ndr_push_init_ctx(mem_ctx
);
3517 talloc_free(mem_ctx
);
3521 status
= ndr_push_lsa_CreateTrustedDomainEx(push
, NDR_OUT
, &r
);
3522 if (NT_STATUS_IS_ERR(status
)) {
3523 talloc_free(mem_ctx
);
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
);
3533 talloc_free(mem_ctx
);
3538 static BOOL
api_lsa_CloseTrustedDomainEx(pipes_struct
*p
)
3540 struct ndr_pull
*pull
;
3541 struct ndr_push
*push
;
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
);
3552 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3554 talloc_free(mem_ctx
);
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
);
3565 if (DEBUGLEVEL
>= 10)
3566 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx
, &r
);
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 */
3578 if (DEBUGLEVEL
>= 10)
3579 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx
, &r
);
3581 push
= ndr_push_init_ctx(mem_ctx
);
3583 talloc_free(mem_ctx
);
3587 status
= ndr_push_lsa_CloseTrustedDomainEx(push
, NDR_OUT
, &r
);
3588 if (NT_STATUS_IS_ERR(status
)) {
3589 talloc_free(mem_ctx
);
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
);
3599 talloc_free(mem_ctx
);
3604 static BOOL
api_lsa_QueryDomainInformationPolicy(pipes_struct
*p
)
3606 struct ndr_pull
*pull
;
3607 struct ndr_push
*push
;
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
);
3618 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3620 talloc_free(mem_ctx
);
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
);
3631 if (DEBUGLEVEL
>= 10)
3632 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy
, &r
);
3635 r
.out
.info
= talloc_zero(mem_ctx
, union lsa_DomainInformationPolicy
);
3636 if (r
.out
.info
== NULL
) {
3637 talloc_free(mem_ctx
);
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 */
3649 if (DEBUGLEVEL
>= 10)
3650 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy
, &r
);
3652 push
= ndr_push_init_ctx(mem_ctx
);
3654 talloc_free(mem_ctx
);
3658 status
= ndr_push_lsa_QueryDomainInformationPolicy(push
, NDR_OUT
, &r
);
3659 if (NT_STATUS_IS_ERR(status
)) {
3660 talloc_free(mem_ctx
);
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
);
3670 talloc_free(mem_ctx
);
3675 static BOOL
api_lsa_SetDomainInformationPolicy(pipes_struct
*p
)
3677 struct ndr_pull
*pull
;
3678 struct ndr_push
*push
;
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
);
3689 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3691 talloc_free(mem_ctx
);
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
);
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 */
3713 if (DEBUGLEVEL
>= 10)
3714 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy
, &r
);
3716 push
= ndr_push_init_ctx(mem_ctx
);
3718 talloc_free(mem_ctx
);
3722 status
= ndr_push_lsa_SetDomainInformationPolicy(push
, NDR_OUT
, &r
);
3723 if (NT_STATUS_IS_ERR(status
)) {
3724 talloc_free(mem_ctx
);
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
);
3734 talloc_free(mem_ctx
);
3739 static BOOL
api_lsa_OpenTrustedDomainByName(pipes_struct
*p
)
3741 struct ndr_pull
*pull
;
3742 struct ndr_push
*push
;
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
);
3753 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3755 talloc_free(mem_ctx
);
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
);
3766 if (DEBUGLEVEL
>= 10)
3767 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName
, &r
);
3770 r
.out
.trustdom_handle
= talloc_zero(mem_ctx
, struct policy_handle
);
3771 if (r
.out
.trustdom_handle
== NULL
) {
3772 talloc_free(mem_ctx
);
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 */
3784 if (DEBUGLEVEL
>= 10)
3785 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName
, &r
);
3787 push
= ndr_push_init_ctx(mem_ctx
);
3789 talloc_free(mem_ctx
);
3793 status
= ndr_push_lsa_OpenTrustedDomainByName(push
, NDR_OUT
, &r
);
3794 if (NT_STATUS_IS_ERR(status
)) {
3795 talloc_free(mem_ctx
);
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
);
3805 talloc_free(mem_ctx
);
3810 static BOOL
api_lsa_TestCall(pipes_struct
*p
)
3812 struct ndr_pull
*pull
;
3813 struct ndr_push
*push
;
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
);
3824 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3826 talloc_free(mem_ctx
);
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
);
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 */
3848 if (DEBUGLEVEL
>= 10)
3849 NDR_PRINT_OUT_DEBUG(lsa_TestCall
, &r
);
3851 push
= ndr_push_init_ctx(mem_ctx
);
3853 talloc_free(mem_ctx
);
3857 status
= ndr_push_lsa_TestCall(push
, NDR_OUT
, &r
);
3858 if (NT_STATUS_IS_ERR(status
)) {
3859 talloc_free(mem_ctx
);
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
);
3869 talloc_free(mem_ctx
);
3874 static BOOL
api_lsa_LookupSids2(pipes_struct
*p
)
3876 struct ndr_pull
*pull
;
3877 struct ndr_push
*push
;
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
);
3888 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3890 talloc_free(mem_ctx
);
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
);
3901 if (DEBUGLEVEL
>= 10)
3902 NDR_PRINT_IN_DEBUG(lsa_LookupSids2
, &r
);
3905 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
3906 if (r
.out
.domains
== NULL
) {
3907 talloc_free(mem_ctx
);
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 */
3921 if (DEBUGLEVEL
>= 10)
3922 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2
, &r
);
3924 push
= ndr_push_init_ctx(mem_ctx
);
3926 talloc_free(mem_ctx
);
3930 status
= ndr_push_lsa_LookupSids2(push
, NDR_OUT
, &r
);
3931 if (NT_STATUS_IS_ERR(status
)) {
3932 talloc_free(mem_ctx
);
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
);
3942 talloc_free(mem_ctx
);
3947 static BOOL
api_lsa_LookupNames2(pipes_struct
*p
)
3949 struct ndr_pull
*pull
;
3950 struct ndr_push
*push
;
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
);
3961 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
3963 talloc_free(mem_ctx
);
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
);
3974 if (DEBUGLEVEL
>= 10)
3975 NDR_PRINT_IN_DEBUG(lsa_LookupNames2
, &r
);
3978 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
3979 if (r
.out
.domains
== NULL
) {
3980 talloc_free(mem_ctx
);
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 */
3994 if (DEBUGLEVEL
>= 10)
3995 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2
, &r
);
3997 push
= ndr_push_init_ctx(mem_ctx
);
3999 talloc_free(mem_ctx
);
4003 status
= ndr_push_lsa_LookupNames2(push
, NDR_OUT
, &r
);
4004 if (NT_STATUS_IS_ERR(status
)) {
4005 talloc_free(mem_ctx
);
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
);
4015 talloc_free(mem_ctx
);
4020 static BOOL
api_lsa_CreateTrustedDomainEx2(pipes_struct
*p
)
4022 struct ndr_pull
*pull
;
4023 struct ndr_push
*push
;
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
);
4034 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4036 talloc_free(mem_ctx
);
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
);
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 */
4058 if (DEBUGLEVEL
>= 10)
4059 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2
, &r
);
4061 push
= ndr_push_init_ctx(mem_ctx
);
4063 talloc_free(mem_ctx
);
4067 status
= ndr_push_lsa_CreateTrustedDomainEx2(push
, NDR_OUT
, &r
);
4068 if (NT_STATUS_IS_ERR(status
)) {
4069 talloc_free(mem_ctx
);
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
);
4079 talloc_free(mem_ctx
);
4084 static BOOL
api_lsa_CREDRWRITE(pipes_struct
*p
)
4086 struct ndr_pull
*pull
;
4087 struct ndr_push
*push
;
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
);
4098 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4100 talloc_free(mem_ctx
);
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
);
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 */
4122 if (DEBUGLEVEL
>= 10)
4123 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE
, &r
);
4125 push
= ndr_push_init_ctx(mem_ctx
);
4127 talloc_free(mem_ctx
);
4131 status
= ndr_push_lsa_CREDRWRITE(push
, NDR_OUT
, &r
);
4132 if (NT_STATUS_IS_ERR(status
)) {
4133 talloc_free(mem_ctx
);
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
);
4143 talloc_free(mem_ctx
);
4148 static BOOL
api_lsa_CREDRREAD(pipes_struct
*p
)
4150 struct ndr_pull
*pull
;
4151 struct ndr_push
*push
;
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
);
4162 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4164 talloc_free(mem_ctx
);
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
);
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 */
4186 if (DEBUGLEVEL
>= 10)
4187 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD
, &r
);
4189 push
= ndr_push_init_ctx(mem_ctx
);
4191 talloc_free(mem_ctx
);
4195 status
= ndr_push_lsa_CREDRREAD(push
, NDR_OUT
, &r
);
4196 if (NT_STATUS_IS_ERR(status
)) {
4197 talloc_free(mem_ctx
);
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
);
4207 talloc_free(mem_ctx
);
4212 static BOOL
api_lsa_CREDRENUMERATE(pipes_struct
*p
)
4214 struct ndr_pull
*pull
;
4215 struct ndr_push
*push
;
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
);
4226 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4228 talloc_free(mem_ctx
);
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
);
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 */
4250 if (DEBUGLEVEL
>= 10)
4251 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE
, &r
);
4253 push
= ndr_push_init_ctx(mem_ctx
);
4255 talloc_free(mem_ctx
);
4259 status
= ndr_push_lsa_CREDRENUMERATE(push
, NDR_OUT
, &r
);
4260 if (NT_STATUS_IS_ERR(status
)) {
4261 talloc_free(mem_ctx
);
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
);
4271 talloc_free(mem_ctx
);
4276 static BOOL
api_lsa_CREDRWRITEDOMAINCREDENTIALS(pipes_struct
*p
)
4278 struct ndr_pull
*pull
;
4279 struct ndr_push
*push
;
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
);
4290 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4292 talloc_free(mem_ctx
);
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
);
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 */
4314 if (DEBUGLEVEL
>= 10)
4315 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS
, &r
);
4317 push
= ndr_push_init_ctx(mem_ctx
);
4319 talloc_free(mem_ctx
);
4323 status
= ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(push
, NDR_OUT
, &r
);
4324 if (NT_STATUS_IS_ERR(status
)) {
4325 talloc_free(mem_ctx
);
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
);
4335 talloc_free(mem_ctx
);
4340 static BOOL
api_lsa_CREDRREADDOMAINCREDENTIALS(pipes_struct
*p
)
4342 struct ndr_pull
*pull
;
4343 struct ndr_push
*push
;
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
);
4354 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4356 talloc_free(mem_ctx
);
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
);
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 */
4378 if (DEBUGLEVEL
>= 10)
4379 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS
, &r
);
4381 push
= ndr_push_init_ctx(mem_ctx
);
4383 talloc_free(mem_ctx
);
4387 status
= ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(push
, NDR_OUT
, &r
);
4388 if (NT_STATUS_IS_ERR(status
)) {
4389 talloc_free(mem_ctx
);
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
);
4399 talloc_free(mem_ctx
);
4404 static BOOL
api_lsa_CREDRDELETE(pipes_struct
*p
)
4406 struct ndr_pull
*pull
;
4407 struct ndr_push
*push
;
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
);
4418 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4420 talloc_free(mem_ctx
);
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
);
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 */
4442 if (DEBUGLEVEL
>= 10)
4443 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE
, &r
);
4445 push
= ndr_push_init_ctx(mem_ctx
);
4447 talloc_free(mem_ctx
);
4451 status
= ndr_push_lsa_CREDRDELETE(push
, NDR_OUT
, &r
);
4452 if (NT_STATUS_IS_ERR(status
)) {
4453 talloc_free(mem_ctx
);
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
);
4463 talloc_free(mem_ctx
);
4468 static BOOL
api_lsa_CREDRGETTARGETINFO(pipes_struct
*p
)
4470 struct ndr_pull
*pull
;
4471 struct ndr_push
*push
;
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
);
4482 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4484 talloc_free(mem_ctx
);
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
);
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 */
4506 if (DEBUGLEVEL
>= 10)
4507 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO
, &r
);
4509 push
= ndr_push_init_ctx(mem_ctx
);
4511 talloc_free(mem_ctx
);
4515 status
= ndr_push_lsa_CREDRGETTARGETINFO(push
, NDR_OUT
, &r
);
4516 if (NT_STATUS_IS_ERR(status
)) {
4517 talloc_free(mem_ctx
);
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
);
4527 talloc_free(mem_ctx
);
4532 static BOOL
api_lsa_CREDRPROFILELOADED(pipes_struct
*p
)
4534 struct ndr_pull
*pull
;
4535 struct ndr_push
*push
;
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
);
4546 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4548 talloc_free(mem_ctx
);
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
);
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 */
4570 if (DEBUGLEVEL
>= 10)
4571 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED
, &r
);
4573 push
= ndr_push_init_ctx(mem_ctx
);
4575 talloc_free(mem_ctx
);
4579 status
= ndr_push_lsa_CREDRPROFILELOADED(push
, NDR_OUT
, &r
);
4580 if (NT_STATUS_IS_ERR(status
)) {
4581 talloc_free(mem_ctx
);
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
);
4591 talloc_free(mem_ctx
);
4596 static BOOL
api_lsa_LookupNames3(pipes_struct
*p
)
4598 struct ndr_pull
*pull
;
4599 struct ndr_push
*push
;
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
);
4610 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4612 talloc_free(mem_ctx
);
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
);
4623 if (DEBUGLEVEL
>= 10)
4624 NDR_PRINT_IN_DEBUG(lsa_LookupNames3
, &r
);
4627 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
4628 if (r
.out
.domains
== NULL
) {
4629 talloc_free(mem_ctx
);
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 */
4643 if (DEBUGLEVEL
>= 10)
4644 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3
, &r
);
4646 push
= ndr_push_init_ctx(mem_ctx
);
4648 talloc_free(mem_ctx
);
4652 status
= ndr_push_lsa_LookupNames3(push
, NDR_OUT
, &r
);
4653 if (NT_STATUS_IS_ERR(status
)) {
4654 talloc_free(mem_ctx
);
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
);
4664 talloc_free(mem_ctx
);
4669 static BOOL
api_lsa_CREDRGETSESSIONTYPES(pipes_struct
*p
)
4671 struct ndr_pull
*pull
;
4672 struct ndr_push
*push
;
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
);
4683 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4685 talloc_free(mem_ctx
);
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
);
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 */
4707 if (DEBUGLEVEL
>= 10)
4708 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES
, &r
);
4710 push
= ndr_push_init_ctx(mem_ctx
);
4712 talloc_free(mem_ctx
);
4716 status
= ndr_push_lsa_CREDRGETSESSIONTYPES(push
, NDR_OUT
, &r
);
4717 if (NT_STATUS_IS_ERR(status
)) {
4718 talloc_free(mem_ctx
);
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
);
4728 talloc_free(mem_ctx
);
4733 static BOOL
api_lsa_LSARREGISTERAUDITEVENT(pipes_struct
*p
)
4735 struct ndr_pull
*pull
;
4736 struct ndr_push
*push
;
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
);
4747 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4749 talloc_free(mem_ctx
);
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
);
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 */
4771 if (DEBUGLEVEL
>= 10)
4772 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT
, &r
);
4774 push
= ndr_push_init_ctx(mem_ctx
);
4776 talloc_free(mem_ctx
);
4780 status
= ndr_push_lsa_LSARREGISTERAUDITEVENT(push
, NDR_OUT
, &r
);
4781 if (NT_STATUS_IS_ERR(status
)) {
4782 talloc_free(mem_ctx
);
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
);
4792 talloc_free(mem_ctx
);
4797 static BOOL
api_lsa_LSARGENAUDITEVENT(pipes_struct
*p
)
4799 struct ndr_pull
*pull
;
4800 struct ndr_push
*push
;
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
);
4811 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4813 talloc_free(mem_ctx
);
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
);
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 */
4835 if (DEBUGLEVEL
>= 10)
4836 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT
, &r
);
4838 push
= ndr_push_init_ctx(mem_ctx
);
4840 talloc_free(mem_ctx
);
4844 status
= ndr_push_lsa_LSARGENAUDITEVENT(push
, NDR_OUT
, &r
);
4845 if (NT_STATUS_IS_ERR(status
)) {
4846 talloc_free(mem_ctx
);
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
);
4856 talloc_free(mem_ctx
);
4861 static BOOL
api_lsa_LSARUNREGISTERAUDITEVENT(pipes_struct
*p
)
4863 struct ndr_pull
*pull
;
4864 struct ndr_push
*push
;
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
);
4875 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4877 talloc_free(mem_ctx
);
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
);
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 */
4899 if (DEBUGLEVEL
>= 10)
4900 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT
, &r
);
4902 push
= ndr_push_init_ctx(mem_ctx
);
4904 talloc_free(mem_ctx
);
4908 status
= ndr_push_lsa_LSARUNREGISTERAUDITEVENT(push
, NDR_OUT
, &r
);
4909 if (NT_STATUS_IS_ERR(status
)) {
4910 talloc_free(mem_ctx
);
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
);
4920 talloc_free(mem_ctx
);
4925 static BOOL
api_lsa_LSARQUERYFORESTTRUSTINFORMATION(pipes_struct
*p
)
4927 struct ndr_pull
*pull
;
4928 struct ndr_push
*push
;
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
);
4939 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
4941 talloc_free(mem_ctx
);
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
);
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 */
4963 if (DEBUGLEVEL
>= 10)
4964 NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION
, &r
);
4966 push
= ndr_push_init_ctx(mem_ctx
);
4968 talloc_free(mem_ctx
);
4972 status
= ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(push
, NDR_OUT
, &r
);
4973 if (NT_STATUS_IS_ERR(status
)) {
4974 talloc_free(mem_ctx
);
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
);
4984 talloc_free(mem_ctx
);
4989 static BOOL
api_lsa_LSARSETFORESTTRUSTINFORMATION(pipes_struct
*p
)
4991 struct ndr_pull
*pull
;
4992 struct ndr_push
*push
;
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
);
5003 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5005 talloc_free(mem_ctx
);
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
);
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 */
5027 if (DEBUGLEVEL
>= 10)
5028 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION
, &r
);
5030 push
= ndr_push_init_ctx(mem_ctx
);
5032 talloc_free(mem_ctx
);
5036 status
= ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(push
, NDR_OUT
, &r
);
5037 if (NT_STATUS_IS_ERR(status
)) {
5038 talloc_free(mem_ctx
);
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
);
5048 talloc_free(mem_ctx
);
5053 static BOOL
api_lsa_CREDRRENAME(pipes_struct
*p
)
5055 struct ndr_pull
*pull
;
5056 struct ndr_push
*push
;
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
);
5067 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5069 talloc_free(mem_ctx
);
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
);
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 */
5091 if (DEBUGLEVEL
>= 10)
5092 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME
, &r
);
5094 push
= ndr_push_init_ctx(mem_ctx
);
5096 talloc_free(mem_ctx
);
5100 status
= ndr_push_lsa_CREDRRENAME(push
, NDR_OUT
, &r
);
5101 if (NT_STATUS_IS_ERR(status
)) {
5102 talloc_free(mem_ctx
);
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
);
5112 talloc_free(mem_ctx
);
5117 static BOOL
api_lsa_LookupSids3(pipes_struct
*p
)
5119 struct ndr_pull
*pull
;
5120 struct ndr_push
*push
;
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
);
5131 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5133 talloc_free(mem_ctx
);
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
);
5144 if (DEBUGLEVEL
>= 10)
5145 NDR_PRINT_IN_DEBUG(lsa_LookupSids3
, &r
);
5148 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
5149 if (r
.out
.domains
== NULL
) {
5150 talloc_free(mem_ctx
);
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 */
5164 if (DEBUGLEVEL
>= 10)
5165 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3
, &r
);
5167 push
= ndr_push_init_ctx(mem_ctx
);
5169 talloc_free(mem_ctx
);
5173 status
= ndr_push_lsa_LookupSids3(push
, NDR_OUT
, &r
);
5174 if (NT_STATUS_IS_ERR(status
)) {
5175 talloc_free(mem_ctx
);
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
);
5185 talloc_free(mem_ctx
);
5190 static BOOL
api_lsa_LookupNames4(pipes_struct
*p
)
5192 struct ndr_pull
*pull
;
5193 struct ndr_push
*push
;
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
);
5204 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5206 talloc_free(mem_ctx
);
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
);
5217 if (DEBUGLEVEL
>= 10)
5218 NDR_PRINT_IN_DEBUG(lsa_LookupNames4
, &r
);
5221 r
.out
.domains
= talloc_zero(mem_ctx
, struct lsa_RefDomainList
);
5222 if (r
.out
.domains
== NULL
) {
5223 talloc_free(mem_ctx
);
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 */
5237 if (DEBUGLEVEL
>= 10)
5238 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4
, &r
);
5240 push
= ndr_push_init_ctx(mem_ctx
);
5242 talloc_free(mem_ctx
);
5246 status
= ndr_push_lsa_LookupNames4(push
, NDR_OUT
, &r
);
5247 if (NT_STATUS_IS_ERR(status
)) {
5248 talloc_free(mem_ctx
);
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
);
5258 talloc_free(mem_ctx
);
5263 static BOOL
api_lsa_LSAROPENPOLICYSCE(pipes_struct
*p
)
5265 struct ndr_pull
*pull
;
5266 struct ndr_push
*push
;
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
);
5277 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5279 talloc_free(mem_ctx
);
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
);
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 */
5301 if (DEBUGLEVEL
>= 10)
5302 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE
, &r
);
5304 push
= ndr_push_init_ctx(mem_ctx
);
5306 talloc_free(mem_ctx
);
5310 status
= ndr_push_lsa_LSAROPENPOLICYSCE(push
, NDR_OUT
, &r
);
5311 if (NT_STATUS_IS_ERR(status
)) {
5312 talloc_free(mem_ctx
);
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
);
5322 talloc_free(mem_ctx
);
5327 static BOOL
api_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct
*p
)
5329 struct ndr_pull
*pull
;
5330 struct ndr_push
*push
;
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
);
5341 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5343 talloc_free(mem_ctx
);
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
);
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 */
5365 if (DEBUGLEVEL
>= 10)
5366 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE
, &r
);
5368 push
= ndr_push_init_ctx(mem_ctx
);
5370 talloc_free(mem_ctx
);
5374 status
= ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(push
, NDR_OUT
, &r
);
5375 if (NT_STATUS_IS_ERR(status
)) {
5376 talloc_free(mem_ctx
);
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
);
5386 talloc_free(mem_ctx
);
5391 static BOOL
api_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct
*p
)
5393 struct ndr_pull
*pull
;
5394 struct ndr_push
*push
;
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
);
5405 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5407 talloc_free(mem_ctx
);
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
);
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 */
5429 if (DEBUGLEVEL
>= 10)
5430 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
, &r
);
5432 push
= ndr_push_init_ctx(mem_ctx
);
5434 talloc_free(mem_ctx
);
5438 status
= ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(push
, NDR_OUT
, &r
);
5439 if (NT_STATUS_IS_ERR(status
)) {
5440 talloc_free(mem_ctx
);
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
);
5450 talloc_free(mem_ctx
);
5455 static BOOL
api_lsa_LSARADTREPORTSECURITYEVENT(pipes_struct
*p
)
5457 struct ndr_pull
*pull
;
5458 struct ndr_push
*push
;
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
);
5469 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
5471 talloc_free(mem_ctx
);
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
);
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 */
5493 if (DEBUGLEVEL
>= 10)
5494 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT
, &r
);
5496 push
= ndr_push_init_ctx(mem_ctx
);
5498 talloc_free(mem_ctx
);
5502 status
= ndr_push_lsa_LSARADTREPORTSECURITYEVENT(push
, NDR_OUT
, &r
);
5503 if (NT_STATUS_IS_ERR(status
)) {
5504 talloc_free(mem_ctx
);
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
);
5514 talloc_free(mem_ctx
);
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
));