libreplace: also use AC_LIBREPLACE_NETWORK_CHECKS for the standalone build
[Samba.git] / source / librpc / gen_ndr / cli_lsa.c
blob4e81f7094cf9fba66fcded841f00160b62f1e482
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_lsa.h"
9 NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 struct policy_handle *handle /* [in,out] [ref] */)
13 struct lsa_Close r;
14 NTSTATUS status;
16 /* In parameters */
17 r.in.handle = handle;
19 if (DEBUGLEVEL >= 10) {
20 NDR_PRINT_IN_DEBUG(lsa_Close, &r);
23 status = cli_do_rpc_ndr(cli,
24 mem_ctx,
25 PI_LSARPC,
26 &ndr_table_lsarpc,
27 NDR_LSA_CLOSE,
28 &r);
30 if (!NT_STATUS_IS_OK(status)) {
31 return status;
34 if (DEBUGLEVEL >= 10) {
35 NDR_PRINT_OUT_DEBUG(lsa_Close, &r);
38 if (NT_STATUS_IS_ERR(status)) {
39 return status;
42 /* Return variables */
43 *handle = *r.out.handle;
45 /* Return result */
46 return r.out.result;
49 NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli,
50 TALLOC_CTX *mem_ctx,
51 struct policy_handle *handle /* [in] [ref] */)
53 struct lsa_Delete r;
54 NTSTATUS status;
56 /* In parameters */
57 r.in.handle = handle;
59 if (DEBUGLEVEL >= 10) {
60 NDR_PRINT_IN_DEBUG(lsa_Delete, &r);
63 status = cli_do_rpc_ndr(cli,
64 mem_ctx,
65 PI_LSARPC,
66 &ndr_table_lsarpc,
67 NDR_LSA_DELETE,
68 &r);
70 if (!NT_STATUS_IS_OK(status)) {
71 return status;
74 if (DEBUGLEVEL >= 10) {
75 NDR_PRINT_OUT_DEBUG(lsa_Delete, &r);
78 if (NT_STATUS_IS_ERR(status)) {
79 return status;
82 /* Return variables */
84 /* Return result */
85 return r.out.result;
88 NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli,
89 TALLOC_CTX *mem_ctx,
90 struct policy_handle *handle /* [in] [ref] */,
91 uint32_t *resume_handle /* [in,out] [ref] */,
92 struct lsa_PrivArray *privs /* [out] [ref] */,
93 uint32_t max_count /* [in] */)
95 struct lsa_EnumPrivs r;
96 NTSTATUS status;
98 /* In parameters */
99 r.in.handle = handle;
100 r.in.resume_handle = resume_handle;
101 r.in.max_count = max_count;
103 if (DEBUGLEVEL >= 10) {
104 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs, &r);
107 status = cli_do_rpc_ndr(cli,
108 mem_ctx,
109 PI_LSARPC,
110 &ndr_table_lsarpc,
111 NDR_LSA_ENUMPRIVS,
112 &r);
114 if (!NT_STATUS_IS_OK(status)) {
115 return status;
118 if (DEBUGLEVEL >= 10) {
119 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, &r);
122 if (NT_STATUS_IS_ERR(status)) {
123 return status;
126 /* Return variables */
127 *resume_handle = *r.out.resume_handle;
128 *privs = *r.out.privs;
130 /* Return result */
131 return r.out.result;
134 NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli,
135 TALLOC_CTX *mem_ctx,
136 struct policy_handle *handle /* [in] [ref] */,
137 uint32_t sec_info /* [in] */,
138 struct sec_desc_buf **sdbuf /* [out] [ref] */)
140 struct lsa_QuerySecurity r;
141 NTSTATUS status;
143 /* In parameters */
144 r.in.handle = handle;
145 r.in.sec_info = sec_info;
147 if (DEBUGLEVEL >= 10) {
148 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &r);
151 status = cli_do_rpc_ndr(cli,
152 mem_ctx,
153 PI_LSARPC,
154 &ndr_table_lsarpc,
155 NDR_LSA_QUERYSECURITY,
156 &r);
158 if (!NT_STATUS_IS_OK(status)) {
159 return status;
162 if (DEBUGLEVEL >= 10) {
163 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, &r);
166 if (NT_STATUS_IS_ERR(status)) {
167 return status;
170 /* Return variables */
171 *sdbuf = *r.out.sdbuf;
173 /* Return result */
174 return r.out.result;
177 NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli,
178 TALLOC_CTX *mem_ctx,
179 struct policy_handle *handle /* [in] [ref] */,
180 uint32_t sec_info /* [in] */,
181 struct sec_desc_buf *sdbuf /* [in] [ref] */)
183 struct lsa_SetSecObj r;
184 NTSTATUS status;
186 /* In parameters */
187 r.in.handle = handle;
188 r.in.sec_info = sec_info;
189 r.in.sdbuf = sdbuf;
191 if (DEBUGLEVEL >= 10) {
192 NDR_PRINT_IN_DEBUG(lsa_SetSecObj, &r);
195 status = cli_do_rpc_ndr(cli,
196 mem_ctx,
197 PI_LSARPC,
198 &ndr_table_lsarpc,
199 NDR_LSA_SETSECOBJ,
200 &r);
202 if (!NT_STATUS_IS_OK(status)) {
203 return status;
206 if (DEBUGLEVEL >= 10) {
207 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, &r);
210 if (NT_STATUS_IS_ERR(status)) {
211 return status;
214 /* Return variables */
216 /* Return result */
217 return r.out.result;
220 NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli,
221 TALLOC_CTX *mem_ctx)
223 struct lsa_ChangePassword r;
224 NTSTATUS status;
226 /* In parameters */
228 if (DEBUGLEVEL >= 10) {
229 NDR_PRINT_IN_DEBUG(lsa_ChangePassword, &r);
232 status = cli_do_rpc_ndr(cli,
233 mem_ctx,
234 PI_LSARPC,
235 &ndr_table_lsarpc,
236 NDR_LSA_CHANGEPASSWORD,
237 &r);
239 if (!NT_STATUS_IS_OK(status)) {
240 return status;
243 if (DEBUGLEVEL >= 10) {
244 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, &r);
247 if (NT_STATUS_IS_ERR(status)) {
248 return status;
251 /* Return variables */
253 /* Return result */
254 return r.out.result;
257 NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli,
258 TALLOC_CTX *mem_ctx,
259 uint16_t *system_name /* [in] [unique] */,
260 struct lsa_ObjectAttribute *attr /* [in] [ref] */,
261 uint32_t access_mask /* [in] */,
262 struct policy_handle *handle /* [out] [ref] */)
264 struct lsa_OpenPolicy r;
265 NTSTATUS status;
267 /* In parameters */
268 r.in.system_name = system_name;
269 r.in.attr = attr;
270 r.in.access_mask = access_mask;
272 if (DEBUGLEVEL >= 10) {
273 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &r);
276 status = cli_do_rpc_ndr(cli,
277 mem_ctx,
278 PI_LSARPC,
279 &ndr_table_lsarpc,
280 NDR_LSA_OPENPOLICY,
281 &r);
283 if (!NT_STATUS_IS_OK(status)) {
284 return status;
287 if (DEBUGLEVEL >= 10) {
288 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, &r);
291 if (NT_STATUS_IS_ERR(status)) {
292 return status;
295 /* Return variables */
296 *handle = *r.out.handle;
298 /* Return result */
299 return r.out.result;
302 NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli,
303 TALLOC_CTX *mem_ctx,
304 struct policy_handle *handle /* [in] [ref] */,
305 enum lsa_PolicyInfo level /* [in] */,
306 union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */)
308 struct lsa_QueryInfoPolicy r;
309 NTSTATUS status;
311 /* In parameters */
312 r.in.handle = handle;
313 r.in.level = level;
315 if (DEBUGLEVEL >= 10) {
316 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &r);
319 status = cli_do_rpc_ndr(cli,
320 mem_ctx,
321 PI_LSARPC,
322 &ndr_table_lsarpc,
323 NDR_LSA_QUERYINFOPOLICY,
324 &r);
326 if (!NT_STATUS_IS_OK(status)) {
327 return status;
330 if (DEBUGLEVEL >= 10) {
331 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, &r);
334 if (NT_STATUS_IS_ERR(status)) {
335 return status;
338 /* Return variables */
339 *info = *r.out.info;
341 /* Return result */
342 return r.out.result;
345 NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli,
346 TALLOC_CTX *mem_ctx,
347 struct policy_handle *handle /* [in] [ref] */,
348 enum lsa_PolicyInfo level /* [in] */,
349 union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */)
351 struct lsa_SetInfoPolicy r;
352 NTSTATUS status;
354 /* In parameters */
355 r.in.handle = handle;
356 r.in.level = level;
357 r.in.info = info;
359 if (DEBUGLEVEL >= 10) {
360 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy, &r);
363 status = cli_do_rpc_ndr(cli,
364 mem_ctx,
365 PI_LSARPC,
366 &ndr_table_lsarpc,
367 NDR_LSA_SETINFOPOLICY,
368 &r);
370 if (!NT_STATUS_IS_OK(status)) {
371 return status;
374 if (DEBUGLEVEL >= 10) {
375 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, &r);
378 if (NT_STATUS_IS_ERR(status)) {
379 return status;
382 /* Return variables */
384 /* Return result */
385 return r.out.result;
388 NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli,
389 TALLOC_CTX *mem_ctx)
391 struct lsa_ClearAuditLog r;
392 NTSTATUS status;
394 /* In parameters */
396 if (DEBUGLEVEL >= 10) {
397 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog, &r);
400 status = cli_do_rpc_ndr(cli,
401 mem_ctx,
402 PI_LSARPC,
403 &ndr_table_lsarpc,
404 NDR_LSA_CLEARAUDITLOG,
405 &r);
407 if (!NT_STATUS_IS_OK(status)) {
408 return status;
411 if (DEBUGLEVEL >= 10) {
412 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, &r);
415 if (NT_STATUS_IS_ERR(status)) {
416 return status;
419 /* Return variables */
421 /* Return result */
422 return r.out.result;
425 NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli,
426 TALLOC_CTX *mem_ctx,
427 struct policy_handle *handle /* [in] [ref] */,
428 struct dom_sid2 *sid /* [in] [ref] */,
429 uint32_t access_mask /* [in] */,
430 struct policy_handle *acct_handle /* [out] [ref] */)
432 struct lsa_CreateAccount r;
433 NTSTATUS status;
435 /* In parameters */
436 r.in.handle = handle;
437 r.in.sid = sid;
438 r.in.access_mask = access_mask;
440 if (DEBUGLEVEL >= 10) {
441 NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &r);
444 status = cli_do_rpc_ndr(cli,
445 mem_ctx,
446 PI_LSARPC,
447 &ndr_table_lsarpc,
448 NDR_LSA_CREATEACCOUNT,
449 &r);
451 if (!NT_STATUS_IS_OK(status)) {
452 return status;
455 if (DEBUGLEVEL >= 10) {
456 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, &r);
459 if (NT_STATUS_IS_ERR(status)) {
460 return status;
463 /* Return variables */
464 *acct_handle = *r.out.acct_handle;
466 /* Return result */
467 return r.out.result;
470 NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
471 TALLOC_CTX *mem_ctx,
472 struct policy_handle *handle /* [in] [ref] */,
473 uint32_t *resume_handle /* [in,out] [ref] */,
474 struct lsa_SidArray *sids /* [out] [ref] */,
475 uint32_t num_entries /* [in] [range(0,8192)] */)
477 struct lsa_EnumAccounts r;
478 NTSTATUS status;
480 /* In parameters */
481 r.in.handle = handle;
482 r.in.resume_handle = resume_handle;
483 r.in.num_entries = num_entries;
485 if (DEBUGLEVEL >= 10) {
486 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts, &r);
489 status = cli_do_rpc_ndr(cli,
490 mem_ctx,
491 PI_LSARPC,
492 &ndr_table_lsarpc,
493 NDR_LSA_ENUMACCOUNTS,
494 &r);
496 if (!NT_STATUS_IS_OK(status)) {
497 return status;
500 if (DEBUGLEVEL >= 10) {
501 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, &r);
504 if (NT_STATUS_IS_ERR(status)) {
505 return status;
508 /* Return variables */
509 *resume_handle = *r.out.resume_handle;
510 *sids = *r.out.sids;
512 /* Return result */
513 return r.out.result;
516 NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
517 TALLOC_CTX *mem_ctx,
518 struct policy_handle *handle /* [in] [ref] */,
519 struct lsa_DomainInfo *info /* [in] [ref] */,
520 uint32_t access_mask /* [in] */,
521 struct policy_handle *trustdom_handle /* [out] [ref] */)
523 struct lsa_CreateTrustedDomain r;
524 NTSTATUS status;
526 /* In parameters */
527 r.in.handle = handle;
528 r.in.info = info;
529 r.in.access_mask = access_mask;
531 if (DEBUGLEVEL >= 10) {
532 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &r);
535 status = cli_do_rpc_ndr(cli,
536 mem_ctx,
537 PI_LSARPC,
538 &ndr_table_lsarpc,
539 NDR_LSA_CREATETRUSTEDDOMAIN,
540 &r);
542 if (!NT_STATUS_IS_OK(status)) {
543 return status;
546 if (DEBUGLEVEL >= 10) {
547 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, &r);
550 if (NT_STATUS_IS_ERR(status)) {
551 return status;
554 /* Return variables */
555 *trustdom_handle = *r.out.trustdom_handle;
557 /* Return result */
558 return r.out.result;
561 NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli,
562 TALLOC_CTX *mem_ctx,
563 struct policy_handle *handle /* [in] [ref] */,
564 uint32_t *resume_handle /* [in,out] [ref] */,
565 struct lsa_DomainList *domains /* [out] [ref] */,
566 uint32_t max_size /* [in] */)
568 struct lsa_EnumTrustDom r;
569 NTSTATUS status;
571 /* In parameters */
572 r.in.handle = handle;
573 r.in.resume_handle = resume_handle;
574 r.in.max_size = max_size;
576 if (DEBUGLEVEL >= 10) {
577 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom, &r);
580 status = cli_do_rpc_ndr(cli,
581 mem_ctx,
582 PI_LSARPC,
583 &ndr_table_lsarpc,
584 NDR_LSA_ENUMTRUSTDOM,
585 &r);
587 if (!NT_STATUS_IS_OK(status)) {
588 return status;
591 if (DEBUGLEVEL >= 10) {
592 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, &r);
595 if (NT_STATUS_IS_ERR(status)) {
596 return status;
599 /* Return variables */
600 *resume_handle = *r.out.resume_handle;
601 *domains = *r.out.domains;
603 /* Return result */
604 return r.out.result;
607 NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli,
608 TALLOC_CTX *mem_ctx,
609 struct policy_handle *handle /* [in] [ref] */,
610 uint32_t num_names /* [in] [range(0,1000)] */,
611 struct lsa_String *names /* [in] [size_is(num_names)] */,
612 struct lsa_RefDomainList **domains /* [out] [ref] */,
613 struct lsa_TransSidArray *sids /* [in,out] [ref] */,
614 enum lsa_LookupNamesLevel level /* [in] */,
615 uint32_t *count /* [in,out] [ref] */)
617 struct lsa_LookupNames r;
618 NTSTATUS status;
620 /* In parameters */
621 r.in.handle = handle;
622 r.in.num_names = num_names;
623 r.in.names = names;
624 r.in.sids = sids;
625 r.in.level = level;
626 r.in.count = count;
628 if (DEBUGLEVEL >= 10) {
629 NDR_PRINT_IN_DEBUG(lsa_LookupNames, &r);
632 status = cli_do_rpc_ndr(cli,
633 mem_ctx,
634 PI_LSARPC,
635 &ndr_table_lsarpc,
636 NDR_LSA_LOOKUPNAMES,
637 &r);
639 if (!NT_STATUS_IS_OK(status)) {
640 return status;
643 if (DEBUGLEVEL >= 10) {
644 NDR_PRINT_OUT_DEBUG(lsa_LookupNames, &r);
647 if (NT_STATUS_IS_ERR(status)) {
648 return status;
651 /* Return variables */
652 *domains = *r.out.domains;
653 *sids = *r.out.sids;
654 *count = *r.out.count;
656 /* Return result */
657 return r.out.result;
660 NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli,
661 TALLOC_CTX *mem_ctx,
662 struct policy_handle *handle /* [in] [ref] */,
663 struct lsa_SidArray *sids /* [in] [ref] */,
664 struct lsa_RefDomainList **domains /* [out] [ref] */,
665 struct lsa_TransNameArray *names /* [in,out] [ref] */,
666 uint16_t level /* [in] */,
667 uint32_t *count /* [in,out] [ref] */)
669 struct lsa_LookupSids r;
670 NTSTATUS status;
672 /* In parameters */
673 r.in.handle = handle;
674 r.in.sids = sids;
675 r.in.names = names;
676 r.in.level = level;
677 r.in.count = count;
679 if (DEBUGLEVEL >= 10) {
680 NDR_PRINT_IN_DEBUG(lsa_LookupSids, &r);
683 status = cli_do_rpc_ndr(cli,
684 mem_ctx,
685 PI_LSARPC,
686 &ndr_table_lsarpc,
687 NDR_LSA_LOOKUPSIDS,
688 &r);
690 if (!NT_STATUS_IS_OK(status)) {
691 return status;
694 if (DEBUGLEVEL >= 10) {
695 NDR_PRINT_OUT_DEBUG(lsa_LookupSids, &r);
698 if (NT_STATUS_IS_ERR(status)) {
699 return status;
702 /* Return variables */
703 *domains = *r.out.domains;
704 *names = *r.out.names;
705 *count = *r.out.count;
707 /* Return result */
708 return r.out.result;
711 NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli,
712 TALLOC_CTX *mem_ctx,
713 struct policy_handle *handle /* [in] [ref] */,
714 struct lsa_String name /* [in] */,
715 uint32_t access_mask /* [in] */,
716 struct policy_handle *sec_handle /* [out] [ref] */)
718 struct lsa_CreateSecret r;
719 NTSTATUS status;
721 /* In parameters */
722 r.in.handle = handle;
723 r.in.name = name;
724 r.in.access_mask = access_mask;
726 if (DEBUGLEVEL >= 10) {
727 NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &r);
730 status = cli_do_rpc_ndr(cli,
731 mem_ctx,
732 PI_LSARPC,
733 &ndr_table_lsarpc,
734 NDR_LSA_CREATESECRET,
735 &r);
737 if (!NT_STATUS_IS_OK(status)) {
738 return status;
741 if (DEBUGLEVEL >= 10) {
742 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, &r);
745 if (NT_STATUS_IS_ERR(status)) {
746 return status;
749 /* Return variables */
750 *sec_handle = *r.out.sec_handle;
752 /* Return result */
753 return r.out.result;
756 NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
757 TALLOC_CTX *mem_ctx,
758 struct policy_handle *handle /* [in] [ref] */,
759 struct dom_sid2 *sid /* [in] [ref] */,
760 uint32_t access_mask /* [in] */,
761 struct policy_handle *acct_handle /* [out] [ref] */)
763 struct lsa_OpenAccount r;
764 NTSTATUS status;
766 /* In parameters */
767 r.in.handle = handle;
768 r.in.sid = sid;
769 r.in.access_mask = access_mask;
771 if (DEBUGLEVEL >= 10) {
772 NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &r);
775 status = cli_do_rpc_ndr(cli,
776 mem_ctx,
777 PI_LSARPC,
778 &ndr_table_lsarpc,
779 NDR_LSA_OPENACCOUNT,
780 &r);
782 if (!NT_STATUS_IS_OK(status)) {
783 return status;
786 if (DEBUGLEVEL >= 10) {
787 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, &r);
790 if (NT_STATUS_IS_ERR(status)) {
791 return status;
794 /* Return variables */
795 *acct_handle = *r.out.acct_handle;
797 /* Return result */
798 return r.out.result;
801 NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
802 TALLOC_CTX *mem_ctx,
803 struct policy_handle *handle /* [in] [ref] */,
804 struct lsa_PrivilegeSet **privs /* [out] [ref] */)
806 struct lsa_EnumPrivsAccount r;
807 NTSTATUS status;
809 /* In parameters */
810 r.in.handle = handle;
812 if (DEBUGLEVEL >= 10) {
813 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &r);
816 status = cli_do_rpc_ndr(cli,
817 mem_ctx,
818 PI_LSARPC,
819 &ndr_table_lsarpc,
820 NDR_LSA_ENUMPRIVSACCOUNT,
821 &r);
823 if (!NT_STATUS_IS_OK(status)) {
824 return status;
827 if (DEBUGLEVEL >= 10) {
828 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, &r);
831 if (NT_STATUS_IS_ERR(status)) {
832 return status;
835 /* Return variables */
836 *privs = *r.out.privs;
838 /* Return result */
839 return r.out.result;
842 NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli,
843 TALLOC_CTX *mem_ctx,
844 struct policy_handle *handle /* [in] [ref] */,
845 struct lsa_PrivilegeSet *privs /* [in] [ref] */)
847 struct lsa_AddPrivilegesToAccount r;
848 NTSTATUS status;
850 /* In parameters */
851 r.in.handle = handle;
852 r.in.privs = privs;
854 if (DEBUGLEVEL >= 10) {
855 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount, &r);
858 status = cli_do_rpc_ndr(cli,
859 mem_ctx,
860 PI_LSARPC,
861 &ndr_table_lsarpc,
862 NDR_LSA_ADDPRIVILEGESTOACCOUNT,
863 &r);
865 if (!NT_STATUS_IS_OK(status)) {
866 return status;
869 if (DEBUGLEVEL >= 10) {
870 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, &r);
873 if (NT_STATUS_IS_ERR(status)) {
874 return status;
877 /* Return variables */
879 /* Return result */
880 return r.out.result;
883 NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli,
884 TALLOC_CTX *mem_ctx,
885 struct policy_handle *handle /* [in] [ref] */,
886 uint8_t remove_all /* [in] */,
887 struct lsa_PrivilegeSet *privs /* [in] [unique] */)
889 struct lsa_RemovePrivilegesFromAccount r;
890 NTSTATUS status;
892 /* In parameters */
893 r.in.handle = handle;
894 r.in.remove_all = remove_all;
895 r.in.privs = privs;
897 if (DEBUGLEVEL >= 10) {
898 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
901 status = cli_do_rpc_ndr(cli,
902 mem_ctx,
903 PI_LSARPC,
904 &ndr_table_lsarpc,
905 NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT,
906 &r);
908 if (!NT_STATUS_IS_OK(status)) {
909 return status;
912 if (DEBUGLEVEL >= 10) {
913 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
916 if (NT_STATUS_IS_ERR(status)) {
917 return status;
920 /* Return variables */
922 /* Return result */
923 return r.out.result;
926 NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli,
927 TALLOC_CTX *mem_ctx)
929 struct lsa_GetQuotasForAccount r;
930 NTSTATUS status;
932 /* In parameters */
934 if (DEBUGLEVEL >= 10) {
935 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount, &r);
938 status = cli_do_rpc_ndr(cli,
939 mem_ctx,
940 PI_LSARPC,
941 &ndr_table_lsarpc,
942 NDR_LSA_GETQUOTASFORACCOUNT,
943 &r);
945 if (!NT_STATUS_IS_OK(status)) {
946 return status;
949 if (DEBUGLEVEL >= 10) {
950 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, &r);
953 if (NT_STATUS_IS_ERR(status)) {
954 return status;
957 /* Return variables */
959 /* Return result */
960 return r.out.result;
963 NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli,
964 TALLOC_CTX *mem_ctx)
966 struct lsa_SetQuotasForAccount r;
967 NTSTATUS status;
969 /* In parameters */
971 if (DEBUGLEVEL >= 10) {
972 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount, &r);
975 status = cli_do_rpc_ndr(cli,
976 mem_ctx,
977 PI_LSARPC,
978 &ndr_table_lsarpc,
979 NDR_LSA_SETQUOTASFORACCOUNT,
980 &r);
982 if (!NT_STATUS_IS_OK(status)) {
983 return status;
986 if (DEBUGLEVEL >= 10) {
987 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, &r);
990 if (NT_STATUS_IS_ERR(status)) {
991 return status;
994 /* Return variables */
996 /* Return result */
997 return r.out.result;
1000 NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli,
1001 TALLOC_CTX *mem_ctx,
1002 struct policy_handle *handle /* [in] [ref] */,
1003 uint32_t *access_mask /* [out] [ref] */)
1005 struct lsa_GetSystemAccessAccount r;
1006 NTSTATUS status;
1008 /* In parameters */
1009 r.in.handle = handle;
1011 if (DEBUGLEVEL >= 10) {
1012 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &r);
1015 status = cli_do_rpc_ndr(cli,
1016 mem_ctx,
1017 PI_LSARPC,
1018 &ndr_table_lsarpc,
1019 NDR_LSA_GETSYSTEMACCESSACCOUNT,
1020 &r);
1022 if (!NT_STATUS_IS_OK(status)) {
1023 return status;
1026 if (DEBUGLEVEL >= 10) {
1027 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, &r);
1030 if (NT_STATUS_IS_ERR(status)) {
1031 return status;
1034 /* Return variables */
1035 *access_mask = *r.out.access_mask;
1037 /* Return result */
1038 return r.out.result;
1041 NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli,
1042 TALLOC_CTX *mem_ctx,
1043 struct policy_handle *handle /* [in] [ref] */,
1044 uint32_t access_mask /* [in] */)
1046 struct lsa_SetSystemAccessAccount r;
1047 NTSTATUS status;
1049 /* In parameters */
1050 r.in.handle = handle;
1051 r.in.access_mask = access_mask;
1053 if (DEBUGLEVEL >= 10) {
1054 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &r);
1057 status = cli_do_rpc_ndr(cli,
1058 mem_ctx,
1059 PI_LSARPC,
1060 &ndr_table_lsarpc,
1061 NDR_LSA_SETSYSTEMACCESSACCOUNT,
1062 &r);
1064 if (!NT_STATUS_IS_OK(status)) {
1065 return status;
1068 if (DEBUGLEVEL >= 10) {
1069 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, &r);
1072 if (NT_STATUS_IS_ERR(status)) {
1073 return status;
1076 /* Return variables */
1078 /* Return result */
1079 return r.out.result;
1082 NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli,
1083 TALLOC_CTX *mem_ctx,
1084 struct policy_handle *handle /* [in] [ref] */,
1085 struct dom_sid2 *sid /* [in] [ref] */,
1086 uint32_t access_mask /* [in] */,
1087 struct policy_handle *trustdom_handle /* [out] [ref] */)
1089 struct lsa_OpenTrustedDomain r;
1090 NTSTATUS status;
1092 /* In parameters */
1093 r.in.handle = handle;
1094 r.in.sid = sid;
1095 r.in.access_mask = access_mask;
1097 if (DEBUGLEVEL >= 10) {
1098 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &r);
1101 status = cli_do_rpc_ndr(cli,
1102 mem_ctx,
1103 PI_LSARPC,
1104 &ndr_table_lsarpc,
1105 NDR_LSA_OPENTRUSTEDDOMAIN,
1106 &r);
1108 if (!NT_STATUS_IS_OK(status)) {
1109 return status;
1112 if (DEBUGLEVEL >= 10) {
1113 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, &r);
1116 if (NT_STATUS_IS_ERR(status)) {
1117 return status;
1120 /* Return variables */
1121 *trustdom_handle = *r.out.trustdom_handle;
1123 /* Return result */
1124 return r.out.result;
1127 NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli,
1128 TALLOC_CTX *mem_ctx,
1129 struct policy_handle *trustdom_handle /* [in] [ref] */,
1130 enum lsa_TrustDomInfoEnum level /* [in] */,
1131 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
1133 struct lsa_QueryTrustedDomainInfo r;
1134 NTSTATUS status;
1136 /* In parameters */
1137 r.in.trustdom_handle = trustdom_handle;
1138 r.in.level = level;
1140 if (DEBUGLEVEL >= 10) {
1141 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &r);
1144 status = cli_do_rpc_ndr(cli,
1145 mem_ctx,
1146 PI_LSARPC,
1147 &ndr_table_lsarpc,
1148 NDR_LSA_QUERYTRUSTEDDOMAININFO,
1149 &r);
1151 if (!NT_STATUS_IS_OK(status)) {
1152 return status;
1155 if (DEBUGLEVEL >= 10) {
1156 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, &r);
1159 if (NT_STATUS_IS_ERR(status)) {
1160 return status;
1163 /* Return variables */
1164 *info = *r.out.info;
1166 /* Return result */
1167 return r.out.result;
1170 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli,
1171 TALLOC_CTX *mem_ctx)
1173 struct lsa_SetInformationTrustedDomain r;
1174 NTSTATUS status;
1176 /* In parameters */
1178 if (DEBUGLEVEL >= 10) {
1179 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &r);
1182 status = cli_do_rpc_ndr(cli,
1183 mem_ctx,
1184 PI_LSARPC,
1185 &ndr_table_lsarpc,
1186 NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN,
1187 &r);
1189 if (!NT_STATUS_IS_OK(status)) {
1190 return status;
1193 if (DEBUGLEVEL >= 10) {
1194 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, &r);
1197 if (NT_STATUS_IS_ERR(status)) {
1198 return status;
1201 /* Return variables */
1203 /* Return result */
1204 return r.out.result;
1207 NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli,
1208 TALLOC_CTX *mem_ctx,
1209 struct policy_handle *handle /* [in] [ref] */,
1210 struct lsa_String name /* [in] */,
1211 uint32_t access_mask /* [in] */,
1212 struct policy_handle *sec_handle /* [out] [ref] */)
1214 struct lsa_OpenSecret r;
1215 NTSTATUS status;
1217 /* In parameters */
1218 r.in.handle = handle;
1219 r.in.name = name;
1220 r.in.access_mask = access_mask;
1222 if (DEBUGLEVEL >= 10) {
1223 NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &r);
1226 status = cli_do_rpc_ndr(cli,
1227 mem_ctx,
1228 PI_LSARPC,
1229 &ndr_table_lsarpc,
1230 NDR_LSA_OPENSECRET,
1231 &r);
1233 if (!NT_STATUS_IS_OK(status)) {
1234 return status;
1237 if (DEBUGLEVEL >= 10) {
1238 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, &r);
1241 if (NT_STATUS_IS_ERR(status)) {
1242 return status;
1245 /* Return variables */
1246 *sec_handle = *r.out.sec_handle;
1248 /* Return result */
1249 return r.out.result;
1252 NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli,
1253 TALLOC_CTX *mem_ctx,
1254 struct policy_handle *sec_handle /* [in] [ref] */,
1255 struct lsa_DATA_BUF *new_val /* [in] [unique] */,
1256 struct lsa_DATA_BUF *old_val /* [in] [unique] */)
1258 struct lsa_SetSecret r;
1259 NTSTATUS status;
1261 /* In parameters */
1262 r.in.sec_handle = sec_handle;
1263 r.in.new_val = new_val;
1264 r.in.old_val = old_val;
1266 if (DEBUGLEVEL >= 10) {
1267 NDR_PRINT_IN_DEBUG(lsa_SetSecret, &r);
1270 status = cli_do_rpc_ndr(cli,
1271 mem_ctx,
1272 PI_LSARPC,
1273 &ndr_table_lsarpc,
1274 NDR_LSA_SETSECRET,
1275 &r);
1277 if (!NT_STATUS_IS_OK(status)) {
1278 return status;
1281 if (DEBUGLEVEL >= 10) {
1282 NDR_PRINT_OUT_DEBUG(lsa_SetSecret, &r);
1285 if (NT_STATUS_IS_ERR(status)) {
1286 return status;
1289 /* Return variables */
1291 /* Return result */
1292 return r.out.result;
1295 NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli,
1296 TALLOC_CTX *mem_ctx,
1297 struct policy_handle *sec_handle /* [in] [ref] */,
1298 struct lsa_DATA_BUF_PTR *new_val /* [in,out] [unique] */,
1299 NTTIME *new_mtime /* [in,out] [unique] */,
1300 struct lsa_DATA_BUF_PTR *old_val /* [in,out] [unique] */,
1301 NTTIME *old_mtime /* [in,out] [unique] */)
1303 struct lsa_QuerySecret r;
1304 NTSTATUS status;
1306 /* In parameters */
1307 r.in.sec_handle = sec_handle;
1308 r.in.new_val = new_val;
1309 r.in.new_mtime = new_mtime;
1310 r.in.old_val = old_val;
1311 r.in.old_mtime = old_mtime;
1313 if (DEBUGLEVEL >= 10) {
1314 NDR_PRINT_IN_DEBUG(lsa_QuerySecret, &r);
1317 status = cli_do_rpc_ndr(cli,
1318 mem_ctx,
1319 PI_LSARPC,
1320 &ndr_table_lsarpc,
1321 NDR_LSA_QUERYSECRET,
1322 &r);
1324 if (!NT_STATUS_IS_OK(status)) {
1325 return status;
1328 if (DEBUGLEVEL >= 10) {
1329 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, &r);
1332 if (NT_STATUS_IS_ERR(status)) {
1333 return status;
1336 /* Return variables */
1337 if (new_val && r.out.new_val) {
1338 *new_val = *r.out.new_val;
1340 if (new_mtime && r.out.new_mtime) {
1341 *new_mtime = *r.out.new_mtime;
1343 if (old_val && r.out.old_val) {
1344 *old_val = *r.out.old_val;
1346 if (old_mtime && r.out.old_mtime) {
1347 *old_mtime = *r.out.old_mtime;
1350 /* Return result */
1351 return r.out.result;
1354 NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli,
1355 TALLOC_CTX *mem_ctx,
1356 struct policy_handle *handle /* [in] [ref] */,
1357 struct lsa_String *name /* [in] [ref] */,
1358 struct lsa_LUID *luid /* [out] [ref] */)
1360 struct lsa_LookupPrivValue r;
1361 NTSTATUS status;
1363 /* In parameters */
1364 r.in.handle = handle;
1365 r.in.name = name;
1367 if (DEBUGLEVEL >= 10) {
1368 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &r);
1371 status = cli_do_rpc_ndr(cli,
1372 mem_ctx,
1373 PI_LSARPC,
1374 &ndr_table_lsarpc,
1375 NDR_LSA_LOOKUPPRIVVALUE,
1376 &r);
1378 if (!NT_STATUS_IS_OK(status)) {
1379 return status;
1382 if (DEBUGLEVEL >= 10) {
1383 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, &r);
1386 if (NT_STATUS_IS_ERR(status)) {
1387 return status;
1390 /* Return variables */
1391 *luid = *r.out.luid;
1393 /* Return result */
1394 return r.out.result;
1397 NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli,
1398 TALLOC_CTX *mem_ctx,
1399 struct policy_handle *handle /* [in] [ref] */,
1400 struct lsa_LUID *luid /* [in] [ref] */,
1401 struct lsa_StringLarge **name /* [out] [ref] */)
1403 struct lsa_LookupPrivName r;
1404 NTSTATUS status;
1406 /* In parameters */
1407 r.in.handle = handle;
1408 r.in.luid = luid;
1410 if (DEBUGLEVEL >= 10) {
1411 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &r);
1414 status = cli_do_rpc_ndr(cli,
1415 mem_ctx,
1416 PI_LSARPC,
1417 &ndr_table_lsarpc,
1418 NDR_LSA_LOOKUPPRIVNAME,
1419 &r);
1421 if (!NT_STATUS_IS_OK(status)) {
1422 return status;
1425 if (DEBUGLEVEL >= 10) {
1426 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, &r);
1429 if (NT_STATUS_IS_ERR(status)) {
1430 return status;
1433 /* Return variables */
1434 *name = *r.out.name;
1436 /* Return result */
1437 return r.out.result;
1440 NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli,
1441 TALLOC_CTX *mem_ctx,
1442 struct policy_handle *handle /* [in] [ref] */,
1443 struct lsa_String *name /* [in] [ref] */,
1444 uint16_t language_id /* [in] */,
1445 uint16_t language_id_sys /* [in] */,
1446 struct lsa_StringLarge **disp_name /* [out] [ref] */,
1447 uint16_t *returned_language_id /* [out] [ref] */)
1449 struct lsa_LookupPrivDisplayName r;
1450 NTSTATUS status;
1452 /* In parameters */
1453 r.in.handle = handle;
1454 r.in.name = name;
1455 r.in.language_id = language_id;
1456 r.in.language_id_sys = language_id_sys;
1458 if (DEBUGLEVEL >= 10) {
1459 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r);
1462 status = cli_do_rpc_ndr(cli,
1463 mem_ctx,
1464 PI_LSARPC,
1465 &ndr_table_lsarpc,
1466 NDR_LSA_LOOKUPPRIVDISPLAYNAME,
1467 &r);
1469 if (!NT_STATUS_IS_OK(status)) {
1470 return status;
1473 if (DEBUGLEVEL >= 10) {
1474 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, &r);
1477 if (NT_STATUS_IS_ERR(status)) {
1478 return status;
1481 /* Return variables */
1482 *disp_name = *r.out.disp_name;
1483 *returned_language_id = *r.out.returned_language_id;
1485 /* Return result */
1486 return r.out.result;
1489 NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli,
1490 TALLOC_CTX *mem_ctx,
1491 struct policy_handle *handle /* [in,out] [ref] */)
1493 struct lsa_DeleteObject r;
1494 NTSTATUS status;
1496 /* In parameters */
1497 r.in.handle = handle;
1499 if (DEBUGLEVEL >= 10) {
1500 NDR_PRINT_IN_DEBUG(lsa_DeleteObject, &r);
1503 status = cli_do_rpc_ndr(cli,
1504 mem_ctx,
1505 PI_LSARPC,
1506 &ndr_table_lsarpc,
1507 NDR_LSA_DELETEOBJECT,
1508 &r);
1510 if (!NT_STATUS_IS_OK(status)) {
1511 return status;
1514 if (DEBUGLEVEL >= 10) {
1515 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, &r);
1518 if (NT_STATUS_IS_ERR(status)) {
1519 return status;
1522 /* Return variables */
1523 *handle = *r.out.handle;
1525 /* Return result */
1526 return r.out.result;
1529 NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli,
1530 TALLOC_CTX *mem_ctx,
1531 struct policy_handle *handle /* [in] [ref] */,
1532 struct lsa_String *name /* [in] [unique] */,
1533 struct lsa_SidArray *sids /* [out] [ref] */)
1535 struct lsa_EnumAccountsWithUserRight r;
1536 NTSTATUS status;
1538 /* In parameters */
1539 r.in.handle = handle;
1540 r.in.name = name;
1542 if (DEBUGLEVEL >= 10) {
1543 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &r);
1546 status = cli_do_rpc_ndr(cli,
1547 mem_ctx,
1548 PI_LSARPC,
1549 &ndr_table_lsarpc,
1550 NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT,
1551 &r);
1553 if (!NT_STATUS_IS_OK(status)) {
1554 return status;
1557 if (DEBUGLEVEL >= 10) {
1558 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, &r);
1561 if (NT_STATUS_IS_ERR(status)) {
1562 return status;
1565 /* Return variables */
1566 *sids = *r.out.sids;
1568 /* Return result */
1569 return r.out.result;
1572 NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli,
1573 TALLOC_CTX *mem_ctx,
1574 struct policy_handle *handle /* [in] [ref] */,
1575 struct dom_sid2 *sid /* [in] [ref] */,
1576 struct lsa_RightSet *rights /* [out] [ref] */)
1578 struct lsa_EnumAccountRights r;
1579 NTSTATUS status;
1581 /* In parameters */
1582 r.in.handle = handle;
1583 r.in.sid = sid;
1585 if (DEBUGLEVEL >= 10) {
1586 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &r);
1589 status = cli_do_rpc_ndr(cli,
1590 mem_ctx,
1591 PI_LSARPC,
1592 &ndr_table_lsarpc,
1593 NDR_LSA_ENUMACCOUNTRIGHTS,
1594 &r);
1596 if (!NT_STATUS_IS_OK(status)) {
1597 return status;
1600 if (DEBUGLEVEL >= 10) {
1601 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, &r);
1604 if (NT_STATUS_IS_ERR(status)) {
1605 return status;
1608 /* Return variables */
1609 *rights = *r.out.rights;
1611 /* Return result */
1612 return r.out.result;
1615 NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli,
1616 TALLOC_CTX *mem_ctx,
1617 struct policy_handle *handle /* [in] [ref] */,
1618 struct dom_sid2 *sid /* [in] [ref] */,
1619 struct lsa_RightSet *rights /* [in] [ref] */)
1621 struct lsa_AddAccountRights r;
1622 NTSTATUS status;
1624 /* In parameters */
1625 r.in.handle = handle;
1626 r.in.sid = sid;
1627 r.in.rights = rights;
1629 if (DEBUGLEVEL >= 10) {
1630 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights, &r);
1633 status = cli_do_rpc_ndr(cli,
1634 mem_ctx,
1635 PI_LSARPC,
1636 &ndr_table_lsarpc,
1637 NDR_LSA_ADDACCOUNTRIGHTS,
1638 &r);
1640 if (!NT_STATUS_IS_OK(status)) {
1641 return status;
1644 if (DEBUGLEVEL >= 10) {
1645 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, &r);
1648 if (NT_STATUS_IS_ERR(status)) {
1649 return status;
1652 /* Return variables */
1654 /* Return result */
1655 return r.out.result;
1658 NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli,
1659 TALLOC_CTX *mem_ctx,
1660 struct policy_handle *handle /* [in] [ref] */,
1661 struct dom_sid2 *sid /* [in] [ref] */,
1662 uint8_t remove_all /* [in] */,
1663 struct lsa_RightSet *rights /* [in] [ref] */)
1665 struct lsa_RemoveAccountRights r;
1666 NTSTATUS status;
1668 /* In parameters */
1669 r.in.handle = handle;
1670 r.in.sid = sid;
1671 r.in.remove_all = remove_all;
1672 r.in.rights = rights;
1674 if (DEBUGLEVEL >= 10) {
1675 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights, &r);
1678 status = cli_do_rpc_ndr(cli,
1679 mem_ctx,
1680 PI_LSARPC,
1681 &ndr_table_lsarpc,
1682 NDR_LSA_REMOVEACCOUNTRIGHTS,
1683 &r);
1685 if (!NT_STATUS_IS_OK(status)) {
1686 return status;
1689 if (DEBUGLEVEL >= 10) {
1690 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, &r);
1693 if (NT_STATUS_IS_ERR(status)) {
1694 return status;
1697 /* Return variables */
1699 /* Return result */
1700 return r.out.result;
1703 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli,
1704 TALLOC_CTX *mem_ctx,
1705 struct policy_handle *handle /* [in] [ref] */,
1706 struct dom_sid2 *dom_sid /* [in] [ref] */,
1707 enum lsa_TrustDomInfoEnum level /* [in] */,
1708 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
1710 struct lsa_QueryTrustedDomainInfoBySid r;
1711 NTSTATUS status;
1713 /* In parameters */
1714 r.in.handle = handle;
1715 r.in.dom_sid = dom_sid;
1716 r.in.level = level;
1718 if (DEBUGLEVEL >= 10) {
1719 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
1722 status = cli_do_rpc_ndr(cli,
1723 mem_ctx,
1724 PI_LSARPC,
1725 &ndr_table_lsarpc,
1726 NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID,
1727 &r);
1729 if (!NT_STATUS_IS_OK(status)) {
1730 return status;
1733 if (DEBUGLEVEL >= 10) {
1734 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
1737 if (NT_STATUS_IS_ERR(status)) {
1738 return status;
1741 /* Return variables */
1742 *info = *r.out.info;
1744 /* Return result */
1745 return r.out.result;
1748 NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli,
1749 TALLOC_CTX *mem_ctx)
1751 struct lsa_SetTrustedDomainInfo r;
1752 NTSTATUS status;
1754 /* In parameters */
1756 if (DEBUGLEVEL >= 10) {
1757 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &r);
1760 status = cli_do_rpc_ndr(cli,
1761 mem_ctx,
1762 PI_LSARPC,
1763 &ndr_table_lsarpc,
1764 NDR_LSA_SETTRUSTEDDOMAININFO,
1765 &r);
1767 if (!NT_STATUS_IS_OK(status)) {
1768 return status;
1771 if (DEBUGLEVEL >= 10) {
1772 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, &r);
1775 if (NT_STATUS_IS_ERR(status)) {
1776 return status;
1779 /* Return variables */
1781 /* Return result */
1782 return r.out.result;
1785 NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli,
1786 TALLOC_CTX *mem_ctx,
1787 struct policy_handle *handle /* [in] [ref] */,
1788 struct dom_sid2 *dom_sid /* [in] [ref] */)
1790 struct lsa_DeleteTrustedDomain r;
1791 NTSTATUS status;
1793 /* In parameters */
1794 r.in.handle = handle;
1795 r.in.dom_sid = dom_sid;
1797 if (DEBUGLEVEL >= 10) {
1798 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain, &r);
1801 status = cli_do_rpc_ndr(cli,
1802 mem_ctx,
1803 PI_LSARPC,
1804 &ndr_table_lsarpc,
1805 NDR_LSA_DELETETRUSTEDDOMAIN,
1806 &r);
1808 if (!NT_STATUS_IS_OK(status)) {
1809 return status;
1812 if (DEBUGLEVEL >= 10) {
1813 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, &r);
1816 if (NT_STATUS_IS_ERR(status)) {
1817 return status;
1820 /* Return variables */
1822 /* Return result */
1823 return r.out.result;
1826 NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli,
1827 TALLOC_CTX *mem_ctx)
1829 struct lsa_StorePrivateData r;
1830 NTSTATUS status;
1832 /* In parameters */
1834 if (DEBUGLEVEL >= 10) {
1835 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, &r);
1838 status = cli_do_rpc_ndr(cli,
1839 mem_ctx,
1840 PI_LSARPC,
1841 &ndr_table_lsarpc,
1842 NDR_LSA_STOREPRIVATEDATA,
1843 &r);
1845 if (!NT_STATUS_IS_OK(status)) {
1846 return status;
1849 if (DEBUGLEVEL >= 10) {
1850 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, &r);
1853 if (NT_STATUS_IS_ERR(status)) {
1854 return status;
1857 /* Return variables */
1859 /* Return result */
1860 return r.out.result;
1863 NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli,
1864 TALLOC_CTX *mem_ctx)
1866 struct lsa_RetrievePrivateData r;
1867 NTSTATUS status;
1869 /* In parameters */
1871 if (DEBUGLEVEL >= 10) {
1872 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, &r);
1875 status = cli_do_rpc_ndr(cli,
1876 mem_ctx,
1877 PI_LSARPC,
1878 &ndr_table_lsarpc,
1879 NDR_LSA_RETRIEVEPRIVATEDATA,
1880 &r);
1882 if (!NT_STATUS_IS_OK(status)) {
1883 return status;
1886 if (DEBUGLEVEL >= 10) {
1887 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, &r);
1890 if (NT_STATUS_IS_ERR(status)) {
1891 return status;
1894 /* Return variables */
1896 /* Return result */
1897 return r.out.result;
1900 NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli,
1901 TALLOC_CTX *mem_ctx,
1902 const char *system_name /* [in] [unique,charset(UTF16)] */,
1903 struct lsa_ObjectAttribute *attr /* [in] [ref] */,
1904 uint32_t access_mask /* [in] */,
1905 struct policy_handle *handle /* [out] [ref] */)
1907 struct lsa_OpenPolicy2 r;
1908 NTSTATUS status;
1910 /* In parameters */
1911 r.in.system_name = system_name;
1912 r.in.attr = attr;
1913 r.in.access_mask = access_mask;
1915 if (DEBUGLEVEL >= 10) {
1916 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &r);
1919 status = cli_do_rpc_ndr(cli,
1920 mem_ctx,
1921 PI_LSARPC,
1922 &ndr_table_lsarpc,
1923 NDR_LSA_OPENPOLICY2,
1924 &r);
1926 if (!NT_STATUS_IS_OK(status)) {
1927 return status;
1930 if (DEBUGLEVEL >= 10) {
1931 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, &r);
1934 if (NT_STATUS_IS_ERR(status)) {
1935 return status;
1938 /* Return variables */
1939 *handle = *r.out.handle;
1941 /* Return result */
1942 return r.out.result;
1945 NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli,
1946 TALLOC_CTX *mem_ctx,
1947 const char *system_name /* [in] [unique,charset(UTF16)] */,
1948 struct lsa_String **account_name /* [in,out] [ref] */,
1949 struct lsa_String **authority_name /* [in,out] [unique] */)
1951 struct lsa_GetUserName r;
1952 NTSTATUS status;
1954 /* In parameters */
1955 r.in.system_name = system_name;
1956 r.in.account_name = account_name;
1957 r.in.authority_name = authority_name;
1959 if (DEBUGLEVEL >= 10) {
1960 NDR_PRINT_IN_DEBUG(lsa_GetUserName, &r);
1963 status = cli_do_rpc_ndr(cli,
1964 mem_ctx,
1965 PI_LSARPC,
1966 &ndr_table_lsarpc,
1967 NDR_LSA_GETUSERNAME,
1968 &r);
1970 if (!NT_STATUS_IS_OK(status)) {
1971 return status;
1974 if (DEBUGLEVEL >= 10) {
1975 NDR_PRINT_OUT_DEBUG(lsa_GetUserName, &r);
1978 if (NT_STATUS_IS_ERR(status)) {
1979 return status;
1982 /* Return variables */
1983 *account_name = *r.out.account_name;
1984 if (authority_name && r.out.authority_name) {
1985 *authority_name = *r.out.authority_name;
1988 /* Return result */
1989 return r.out.result;
1992 NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli,
1993 TALLOC_CTX *mem_ctx,
1994 struct policy_handle *handle /* [in] [ref] */,
1995 enum lsa_PolicyInfo level /* [in] */,
1996 union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */)
1998 struct lsa_QueryInfoPolicy2 r;
1999 NTSTATUS status;
2001 /* In parameters */
2002 r.in.handle = handle;
2003 r.in.level = level;
2005 if (DEBUGLEVEL >= 10) {
2006 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &r);
2009 status = cli_do_rpc_ndr(cli,
2010 mem_ctx,
2011 PI_LSARPC,
2012 &ndr_table_lsarpc,
2013 NDR_LSA_QUERYINFOPOLICY2,
2014 &r);
2016 if (!NT_STATUS_IS_OK(status)) {
2017 return status;
2020 if (DEBUGLEVEL >= 10) {
2021 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, &r);
2024 if (NT_STATUS_IS_ERR(status)) {
2025 return status;
2028 /* Return variables */
2029 *info = *r.out.info;
2031 /* Return result */
2032 return r.out.result;
2035 NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
2036 TALLOC_CTX *mem_ctx,
2037 struct policy_handle *handle /* [in] [ref] */,
2038 enum lsa_PolicyInfo level /* [in] */,
2039 union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */)
2041 struct lsa_SetInfoPolicy2 r;
2042 NTSTATUS status;
2044 /* In parameters */
2045 r.in.handle = handle;
2046 r.in.level = level;
2047 r.in.info = info;
2049 if (DEBUGLEVEL >= 10) {
2050 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2, &r);
2053 status = cli_do_rpc_ndr(cli,
2054 mem_ctx,
2055 PI_LSARPC,
2056 &ndr_table_lsarpc,
2057 NDR_LSA_SETINFOPOLICY2,
2058 &r);
2060 if (!NT_STATUS_IS_OK(status)) {
2061 return status;
2064 if (DEBUGLEVEL >= 10) {
2065 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, &r);
2068 if (NT_STATUS_IS_ERR(status)) {
2069 return status;
2072 /* Return variables */
2074 /* Return result */
2075 return r.out.result;
2078 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
2079 TALLOC_CTX *mem_ctx,
2080 struct policy_handle *handle /* [in] [ref] */,
2081 struct lsa_String *trusted_domain /* [in] [ref] */,
2082 enum lsa_TrustDomInfoEnum level /* [in] */,
2083 union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */)
2085 struct lsa_QueryTrustedDomainInfoByName r;
2086 NTSTATUS status;
2088 /* In parameters */
2089 r.in.handle = handle;
2090 r.in.trusted_domain = trusted_domain;
2091 r.in.level = level;
2093 if (DEBUGLEVEL >= 10) {
2094 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
2097 status = cli_do_rpc_ndr(cli,
2098 mem_ctx,
2099 PI_LSARPC,
2100 &ndr_table_lsarpc,
2101 NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME,
2102 &r);
2104 if (!NT_STATUS_IS_OK(status)) {
2105 return status;
2108 if (DEBUGLEVEL >= 10) {
2109 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
2112 if (NT_STATUS_IS_ERR(status)) {
2113 return status;
2116 /* Return variables */
2117 *info = *r.out.info;
2119 /* Return result */
2120 return r.out.result;
2123 NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli,
2124 TALLOC_CTX *mem_ctx,
2125 struct policy_handle *handle /* [in] [ref] */,
2126 struct lsa_String trusted_domain /* [in] */,
2127 enum lsa_TrustDomInfoEnum level /* [in] */,
2128 union lsa_TrustedDomainInfo *info /* [in] [unique,switch_is(level)] */)
2130 struct lsa_SetTrustedDomainInfoByName r;
2131 NTSTATUS status;
2133 /* In parameters */
2134 r.in.handle = handle;
2135 r.in.trusted_domain = trusted_domain;
2136 r.in.level = level;
2137 r.in.info = info;
2139 if (DEBUGLEVEL >= 10) {
2140 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
2143 status = cli_do_rpc_ndr(cli,
2144 mem_ctx,
2145 PI_LSARPC,
2146 &ndr_table_lsarpc,
2147 NDR_LSA_SETTRUSTEDDOMAININFOBYNAME,
2148 &r);
2150 if (!NT_STATUS_IS_OK(status)) {
2151 return status;
2154 if (DEBUGLEVEL >= 10) {
2155 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
2158 if (NT_STATUS_IS_ERR(status)) {
2159 return status;
2162 /* Return variables */
2164 /* Return result */
2165 return r.out.result;
2168 NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli,
2169 TALLOC_CTX *mem_ctx,
2170 struct policy_handle *handle /* [in] [ref] */,
2171 uint32_t *resume_handle /* [in,out] [ref] */,
2172 struct lsa_DomainListEx *domains /* [out] [ref] */,
2173 uint32_t max_size /* [in] */)
2175 struct lsa_EnumTrustedDomainsEx r;
2176 NTSTATUS status;
2178 /* In parameters */
2179 r.in.handle = handle;
2180 r.in.resume_handle = resume_handle;
2181 r.in.max_size = max_size;
2183 if (DEBUGLEVEL >= 10) {
2184 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx, &r);
2187 status = cli_do_rpc_ndr(cli,
2188 mem_ctx,
2189 PI_LSARPC,
2190 &ndr_table_lsarpc,
2191 NDR_LSA_ENUMTRUSTEDDOMAINSEX,
2192 &r);
2194 if (!NT_STATUS_IS_OK(status)) {
2195 return status;
2198 if (DEBUGLEVEL >= 10) {
2199 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, &r);
2202 if (NT_STATUS_IS_ERR(status)) {
2203 return status;
2206 /* Return variables */
2207 *resume_handle = *r.out.resume_handle;
2208 *domains = *r.out.domains;
2210 /* Return result */
2211 return r.out.result;
2214 NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli,
2215 TALLOC_CTX *mem_ctx)
2217 struct lsa_CreateTrustedDomainEx r;
2218 NTSTATUS status;
2220 /* In parameters */
2222 if (DEBUGLEVEL >= 10) {
2223 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &r);
2226 status = cli_do_rpc_ndr(cli,
2227 mem_ctx,
2228 PI_LSARPC,
2229 &ndr_table_lsarpc,
2230 NDR_LSA_CREATETRUSTEDDOMAINEX,
2231 &r);
2233 if (!NT_STATUS_IS_OK(status)) {
2234 return status;
2237 if (DEBUGLEVEL >= 10) {
2238 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, &r);
2241 if (NT_STATUS_IS_ERR(status)) {
2242 return status;
2245 /* Return variables */
2247 /* Return result */
2248 return r.out.result;
2251 NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli,
2252 TALLOC_CTX *mem_ctx,
2253 struct policy_handle *handle /* [in,out] [ref] */)
2255 struct lsa_CloseTrustedDomainEx r;
2256 NTSTATUS status;
2258 /* In parameters */
2259 r.in.handle = handle;
2261 if (DEBUGLEVEL >= 10) {
2262 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx, &r);
2265 status = cli_do_rpc_ndr(cli,
2266 mem_ctx,
2267 PI_LSARPC,
2268 &ndr_table_lsarpc,
2269 NDR_LSA_CLOSETRUSTEDDOMAINEX,
2270 &r);
2272 if (!NT_STATUS_IS_OK(status)) {
2273 return status;
2276 if (DEBUGLEVEL >= 10) {
2277 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, &r);
2280 if (NT_STATUS_IS_ERR(status)) {
2281 return status;
2284 /* Return variables */
2285 *handle = *r.out.handle;
2287 /* Return result */
2288 return r.out.result;
2291 NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli,
2292 TALLOC_CTX *mem_ctx,
2293 struct policy_handle *handle /* [in] [ref] */,
2294 uint16_t level /* [in] */,
2295 union lsa_DomainInformationPolicy **info /* [out] [ref,switch_is(level)] */)
2297 struct lsa_QueryDomainInformationPolicy r;
2298 NTSTATUS status;
2300 /* In parameters */
2301 r.in.handle = handle;
2302 r.in.level = level;
2304 if (DEBUGLEVEL >= 10) {
2305 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &r);
2308 status = cli_do_rpc_ndr(cli,
2309 mem_ctx,
2310 PI_LSARPC,
2311 &ndr_table_lsarpc,
2312 NDR_LSA_QUERYDOMAININFORMATIONPOLICY,
2313 &r);
2315 if (!NT_STATUS_IS_OK(status)) {
2316 return status;
2319 if (DEBUGLEVEL >= 10) {
2320 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, &r);
2323 if (NT_STATUS_IS_ERR(status)) {
2324 return status;
2327 /* Return variables */
2328 *info = *r.out.info;
2330 /* Return result */
2331 return r.out.result;
2334 NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli,
2335 TALLOC_CTX *mem_ctx,
2336 struct policy_handle *handle /* [in] [ref] */,
2337 uint16_t level /* [in] */,
2338 union lsa_DomainInformationPolicy *info /* [in] [unique,switch_is(level)] */)
2340 struct lsa_SetDomainInformationPolicy r;
2341 NTSTATUS status;
2343 /* In parameters */
2344 r.in.handle = handle;
2345 r.in.level = level;
2346 r.in.info = info;
2348 if (DEBUGLEVEL >= 10) {
2349 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy, &r);
2352 status = cli_do_rpc_ndr(cli,
2353 mem_ctx,
2354 PI_LSARPC,
2355 &ndr_table_lsarpc,
2356 NDR_LSA_SETDOMAININFORMATIONPOLICY,
2357 &r);
2359 if (!NT_STATUS_IS_OK(status)) {
2360 return status;
2363 if (DEBUGLEVEL >= 10) {
2364 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, &r);
2367 if (NT_STATUS_IS_ERR(status)) {
2368 return status;
2371 /* Return variables */
2373 /* Return result */
2374 return r.out.result;
2377 NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli,
2378 TALLOC_CTX *mem_ctx,
2379 struct policy_handle *handle /* [in] [ref] */,
2380 struct lsa_String name /* [in] */,
2381 uint32_t access_mask /* [in] */,
2382 struct policy_handle *trustdom_handle /* [out] [ref] */)
2384 struct lsa_OpenTrustedDomainByName r;
2385 NTSTATUS status;
2387 /* In parameters */
2388 r.in.handle = handle;
2389 r.in.name = name;
2390 r.in.access_mask = access_mask;
2392 if (DEBUGLEVEL >= 10) {
2393 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &r);
2396 status = cli_do_rpc_ndr(cli,
2397 mem_ctx,
2398 PI_LSARPC,
2399 &ndr_table_lsarpc,
2400 NDR_LSA_OPENTRUSTEDDOMAINBYNAME,
2401 &r);
2403 if (!NT_STATUS_IS_OK(status)) {
2404 return status;
2407 if (DEBUGLEVEL >= 10) {
2408 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, &r);
2411 if (NT_STATUS_IS_ERR(status)) {
2412 return status;
2415 /* Return variables */
2416 *trustdom_handle = *r.out.trustdom_handle;
2418 /* Return result */
2419 return r.out.result;
2422 NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli,
2423 TALLOC_CTX *mem_ctx)
2425 struct lsa_TestCall r;
2426 NTSTATUS status;
2428 /* In parameters */
2430 if (DEBUGLEVEL >= 10) {
2431 NDR_PRINT_IN_DEBUG(lsa_TestCall, &r);
2434 status = cli_do_rpc_ndr(cli,
2435 mem_ctx,
2436 PI_LSARPC,
2437 &ndr_table_lsarpc,
2438 NDR_LSA_TESTCALL,
2439 &r);
2441 if (!NT_STATUS_IS_OK(status)) {
2442 return status;
2445 if (DEBUGLEVEL >= 10) {
2446 NDR_PRINT_OUT_DEBUG(lsa_TestCall, &r);
2449 if (NT_STATUS_IS_ERR(status)) {
2450 return status;
2453 /* Return variables */
2455 /* Return result */
2456 return r.out.result;
2459 NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli,
2460 TALLOC_CTX *mem_ctx,
2461 struct policy_handle *handle /* [in] [ref] */,
2462 struct lsa_SidArray *sids /* [in] [ref] */,
2463 struct lsa_RefDomainList **domains /* [out] [ref] */,
2464 struct lsa_TransNameArray2 *names /* [in,out] [ref] */,
2465 uint16_t level /* [in] */,
2466 uint32_t *count /* [in,out] [ref] */,
2467 uint32_t unknown1 /* [in] */,
2468 uint32_t unknown2 /* [in] */)
2470 struct lsa_LookupSids2 r;
2471 NTSTATUS status;
2473 /* In parameters */
2474 r.in.handle = handle;
2475 r.in.sids = sids;
2476 r.in.names = names;
2477 r.in.level = level;
2478 r.in.count = count;
2479 r.in.unknown1 = unknown1;
2480 r.in.unknown2 = unknown2;
2482 if (DEBUGLEVEL >= 10) {
2483 NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r);
2486 status = cli_do_rpc_ndr(cli,
2487 mem_ctx,
2488 PI_LSARPC,
2489 &ndr_table_lsarpc,
2490 NDR_LSA_LOOKUPSIDS2,
2491 &r);
2493 if (!NT_STATUS_IS_OK(status)) {
2494 return status;
2497 if (DEBUGLEVEL >= 10) {
2498 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, &r);
2501 if (NT_STATUS_IS_ERR(status)) {
2502 return status;
2505 /* Return variables */
2506 *domains = *r.out.domains;
2507 *names = *r.out.names;
2508 *count = *r.out.count;
2510 /* Return result */
2511 return r.out.result;
2514 NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli,
2515 TALLOC_CTX *mem_ctx,
2516 struct policy_handle *handle /* [in] [ref] */,
2517 uint32_t num_names /* [in] [range(0,1000)] */,
2518 struct lsa_String *names /* [in] [size_is(num_names)] */,
2519 struct lsa_RefDomainList **domains /* [out] [ref] */,
2520 struct lsa_TransSidArray2 *sids /* [in,out] [ref] */,
2521 enum lsa_LookupNamesLevel level /* [in] */,
2522 uint32_t *count /* [in,out] [ref] */,
2523 uint32_t unknown1 /* [in] */,
2524 uint32_t unknown2 /* [in] */)
2526 struct lsa_LookupNames2 r;
2527 NTSTATUS status;
2529 /* In parameters */
2530 r.in.handle = handle;
2531 r.in.num_names = num_names;
2532 r.in.names = names;
2533 r.in.sids = sids;
2534 r.in.level = level;
2535 r.in.count = count;
2536 r.in.unknown1 = unknown1;
2537 r.in.unknown2 = unknown2;
2539 if (DEBUGLEVEL >= 10) {
2540 NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r);
2543 status = cli_do_rpc_ndr(cli,
2544 mem_ctx,
2545 PI_LSARPC,
2546 &ndr_table_lsarpc,
2547 NDR_LSA_LOOKUPNAMES2,
2548 &r);
2550 if (!NT_STATUS_IS_OK(status)) {
2551 return status;
2554 if (DEBUGLEVEL >= 10) {
2555 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, &r);
2558 if (NT_STATUS_IS_ERR(status)) {
2559 return status;
2562 /* Return variables */
2563 *domains = *r.out.domains;
2564 *sids = *r.out.sids;
2565 *count = *r.out.count;
2567 /* Return result */
2568 return r.out.result;
2571 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli,
2572 TALLOC_CTX *mem_ctx)
2574 struct lsa_CreateTrustedDomainEx2 r;
2575 NTSTATUS status;
2577 /* In parameters */
2579 if (DEBUGLEVEL >= 10) {
2580 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &r);
2583 status = cli_do_rpc_ndr(cli,
2584 mem_ctx,
2585 PI_LSARPC,
2586 &ndr_table_lsarpc,
2587 NDR_LSA_CREATETRUSTEDDOMAINEX2,
2588 &r);
2590 if (!NT_STATUS_IS_OK(status)) {
2591 return status;
2594 if (DEBUGLEVEL >= 10) {
2595 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, &r);
2598 if (NT_STATUS_IS_ERR(status)) {
2599 return status;
2602 /* Return variables */
2604 /* Return result */
2605 return r.out.result;
2608 NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli,
2609 TALLOC_CTX *mem_ctx)
2611 struct lsa_CREDRWRITE r;
2612 NTSTATUS status;
2614 /* In parameters */
2616 if (DEBUGLEVEL >= 10) {
2617 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE, &r);
2620 status = cli_do_rpc_ndr(cli,
2621 mem_ctx,
2622 PI_LSARPC,
2623 &ndr_table_lsarpc,
2624 NDR_LSA_CREDRWRITE,
2625 &r);
2627 if (!NT_STATUS_IS_OK(status)) {
2628 return status;
2631 if (DEBUGLEVEL >= 10) {
2632 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, &r);
2635 if (NT_STATUS_IS_ERR(status)) {
2636 return status;
2639 /* Return variables */
2641 /* Return result */
2642 return r.out.result;
2645 NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli,
2646 TALLOC_CTX *mem_ctx)
2648 struct lsa_CREDRREAD r;
2649 NTSTATUS status;
2651 /* In parameters */
2653 if (DEBUGLEVEL >= 10) {
2654 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD, &r);
2657 status = cli_do_rpc_ndr(cli,
2658 mem_ctx,
2659 PI_LSARPC,
2660 &ndr_table_lsarpc,
2661 NDR_LSA_CREDRREAD,
2662 &r);
2664 if (!NT_STATUS_IS_OK(status)) {
2665 return status;
2668 if (DEBUGLEVEL >= 10) {
2669 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, &r);
2672 if (NT_STATUS_IS_ERR(status)) {
2673 return status;
2676 /* Return variables */
2678 /* Return result */
2679 return r.out.result;
2682 NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli,
2683 TALLOC_CTX *mem_ctx)
2685 struct lsa_CREDRENUMERATE r;
2686 NTSTATUS status;
2688 /* In parameters */
2690 if (DEBUGLEVEL >= 10) {
2691 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE, &r);
2694 status = cli_do_rpc_ndr(cli,
2695 mem_ctx,
2696 PI_LSARPC,
2697 &ndr_table_lsarpc,
2698 NDR_LSA_CREDRENUMERATE,
2699 &r);
2701 if (!NT_STATUS_IS_OK(status)) {
2702 return status;
2705 if (DEBUGLEVEL >= 10) {
2706 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, &r);
2709 if (NT_STATUS_IS_ERR(status)) {
2710 return status;
2713 /* Return variables */
2715 /* Return result */
2716 return r.out.result;
2719 NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli,
2720 TALLOC_CTX *mem_ctx)
2722 struct lsa_CREDRWRITEDOMAINCREDENTIALS r;
2723 NTSTATUS status;
2725 /* In parameters */
2727 if (DEBUGLEVEL >= 10) {
2728 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
2731 status = cli_do_rpc_ndr(cli,
2732 mem_ctx,
2733 PI_LSARPC,
2734 &ndr_table_lsarpc,
2735 NDR_LSA_CREDRWRITEDOMAINCREDENTIALS,
2736 &r);
2738 if (!NT_STATUS_IS_OK(status)) {
2739 return status;
2742 if (DEBUGLEVEL >= 10) {
2743 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
2746 if (NT_STATUS_IS_ERR(status)) {
2747 return status;
2750 /* Return variables */
2752 /* Return result */
2753 return r.out.result;
2756 NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli,
2757 TALLOC_CTX *mem_ctx)
2759 struct lsa_CREDRREADDOMAINCREDENTIALS r;
2760 NTSTATUS status;
2762 /* In parameters */
2764 if (DEBUGLEVEL >= 10) {
2765 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
2768 status = cli_do_rpc_ndr(cli,
2769 mem_ctx,
2770 PI_LSARPC,
2771 &ndr_table_lsarpc,
2772 NDR_LSA_CREDRREADDOMAINCREDENTIALS,
2773 &r);
2775 if (!NT_STATUS_IS_OK(status)) {
2776 return status;
2779 if (DEBUGLEVEL >= 10) {
2780 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
2783 if (NT_STATUS_IS_ERR(status)) {
2784 return status;
2787 /* Return variables */
2789 /* Return result */
2790 return r.out.result;
2793 NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli,
2794 TALLOC_CTX *mem_ctx)
2796 struct lsa_CREDRDELETE r;
2797 NTSTATUS status;
2799 /* In parameters */
2801 if (DEBUGLEVEL >= 10) {
2802 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE, &r);
2805 status = cli_do_rpc_ndr(cli,
2806 mem_ctx,
2807 PI_LSARPC,
2808 &ndr_table_lsarpc,
2809 NDR_LSA_CREDRDELETE,
2810 &r);
2812 if (!NT_STATUS_IS_OK(status)) {
2813 return status;
2816 if (DEBUGLEVEL >= 10) {
2817 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, &r);
2820 if (NT_STATUS_IS_ERR(status)) {
2821 return status;
2824 /* Return variables */
2826 /* Return result */
2827 return r.out.result;
2830 NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli,
2831 TALLOC_CTX *mem_ctx)
2833 struct lsa_CREDRGETTARGETINFO r;
2834 NTSTATUS status;
2836 /* In parameters */
2838 if (DEBUGLEVEL >= 10) {
2839 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO, &r);
2842 status = cli_do_rpc_ndr(cli,
2843 mem_ctx,
2844 PI_LSARPC,
2845 &ndr_table_lsarpc,
2846 NDR_LSA_CREDRGETTARGETINFO,
2847 &r);
2849 if (!NT_STATUS_IS_OK(status)) {
2850 return status;
2853 if (DEBUGLEVEL >= 10) {
2854 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, &r);
2857 if (NT_STATUS_IS_ERR(status)) {
2858 return status;
2861 /* Return variables */
2863 /* Return result */
2864 return r.out.result;
2867 NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli,
2868 TALLOC_CTX *mem_ctx)
2870 struct lsa_CREDRPROFILELOADED r;
2871 NTSTATUS status;
2873 /* In parameters */
2875 if (DEBUGLEVEL >= 10) {
2876 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED, &r);
2879 status = cli_do_rpc_ndr(cli,
2880 mem_ctx,
2881 PI_LSARPC,
2882 &ndr_table_lsarpc,
2883 NDR_LSA_CREDRPROFILELOADED,
2884 &r);
2886 if (!NT_STATUS_IS_OK(status)) {
2887 return status;
2890 if (DEBUGLEVEL >= 10) {
2891 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, &r);
2894 if (NT_STATUS_IS_ERR(status)) {
2895 return status;
2898 /* Return variables */
2900 /* Return result */
2901 return r.out.result;
2904 NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli,
2905 TALLOC_CTX *mem_ctx,
2906 struct policy_handle *handle /* [in] [ref] */,
2907 uint32_t num_names /* [in] [range(0,1000)] */,
2908 struct lsa_String *names /* [in] [size_is(num_names)] */,
2909 struct lsa_RefDomainList **domains /* [out] [ref] */,
2910 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
2911 enum lsa_LookupNamesLevel level /* [in] */,
2912 uint32_t *count /* [in,out] [ref] */,
2913 uint32_t unknown1 /* [in] */,
2914 uint32_t unknown2 /* [in] */)
2916 struct lsa_LookupNames3 r;
2917 NTSTATUS status;
2919 /* In parameters */
2920 r.in.handle = handle;
2921 r.in.num_names = num_names;
2922 r.in.names = names;
2923 r.in.sids = sids;
2924 r.in.level = level;
2925 r.in.count = count;
2926 r.in.unknown1 = unknown1;
2927 r.in.unknown2 = unknown2;
2929 if (DEBUGLEVEL >= 10) {
2930 NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r);
2933 status = cli_do_rpc_ndr(cli,
2934 mem_ctx,
2935 PI_LSARPC,
2936 &ndr_table_lsarpc,
2937 NDR_LSA_LOOKUPNAMES3,
2938 &r);
2940 if (!NT_STATUS_IS_OK(status)) {
2941 return status;
2944 if (DEBUGLEVEL >= 10) {
2945 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, &r);
2948 if (NT_STATUS_IS_ERR(status)) {
2949 return status;
2952 /* Return variables */
2953 *domains = *r.out.domains;
2954 *sids = *r.out.sids;
2955 *count = *r.out.count;
2957 /* Return result */
2958 return r.out.result;
2961 NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli,
2962 TALLOC_CTX *mem_ctx)
2964 struct lsa_CREDRGETSESSIONTYPES r;
2965 NTSTATUS status;
2967 /* In parameters */
2969 if (DEBUGLEVEL >= 10) {
2970 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
2973 status = cli_do_rpc_ndr(cli,
2974 mem_ctx,
2975 PI_LSARPC,
2976 &ndr_table_lsarpc,
2977 NDR_LSA_CREDRGETSESSIONTYPES,
2978 &r);
2980 if (!NT_STATUS_IS_OK(status)) {
2981 return status;
2984 if (DEBUGLEVEL >= 10) {
2985 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
2988 if (NT_STATUS_IS_ERR(status)) {
2989 return status;
2992 /* Return variables */
2994 /* Return result */
2995 return r.out.result;
2998 NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli,
2999 TALLOC_CTX *mem_ctx)
3001 struct lsa_LSARREGISTERAUDITEVENT r;
3002 NTSTATUS status;
3004 /* In parameters */
3006 if (DEBUGLEVEL >= 10) {
3007 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
3010 status = cli_do_rpc_ndr(cli,
3011 mem_ctx,
3012 PI_LSARPC,
3013 &ndr_table_lsarpc,
3014 NDR_LSA_LSARREGISTERAUDITEVENT,
3015 &r);
3017 if (!NT_STATUS_IS_OK(status)) {
3018 return status;
3021 if (DEBUGLEVEL >= 10) {
3022 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
3025 if (NT_STATUS_IS_ERR(status)) {
3026 return status;
3029 /* Return variables */
3031 /* Return result */
3032 return r.out.result;
3035 NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli,
3036 TALLOC_CTX *mem_ctx)
3038 struct lsa_LSARGENAUDITEVENT r;
3039 NTSTATUS status;
3041 /* In parameters */
3043 if (DEBUGLEVEL >= 10) {
3044 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT, &r);
3047 status = cli_do_rpc_ndr(cli,
3048 mem_ctx,
3049 PI_LSARPC,
3050 &ndr_table_lsarpc,
3051 NDR_LSA_LSARGENAUDITEVENT,
3052 &r);
3054 if (!NT_STATUS_IS_OK(status)) {
3055 return status;
3058 if (DEBUGLEVEL >= 10) {
3059 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, &r);
3062 if (NT_STATUS_IS_ERR(status)) {
3063 return status;
3066 /* Return variables */
3068 /* Return result */
3069 return r.out.result;
3072 NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli,
3073 TALLOC_CTX *mem_ctx)
3075 struct lsa_LSARUNREGISTERAUDITEVENT r;
3076 NTSTATUS status;
3078 /* In parameters */
3080 if (DEBUGLEVEL >= 10) {
3081 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
3084 status = cli_do_rpc_ndr(cli,
3085 mem_ctx,
3086 PI_LSARPC,
3087 &ndr_table_lsarpc,
3088 NDR_LSA_LSARUNREGISTERAUDITEVENT,
3089 &r);
3091 if (!NT_STATUS_IS_OK(status)) {
3092 return status;
3095 if (DEBUGLEVEL >= 10) {
3096 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
3099 if (NT_STATUS_IS_ERR(status)) {
3100 return status;
3103 /* Return variables */
3105 /* Return result */
3106 return r.out.result;
3109 NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli,
3110 TALLOC_CTX *mem_ctx,
3111 struct policy_handle *handle /* [in] [ref] */,
3112 struct lsa_String *trusted_domain_name /* [in] [ref] */,
3113 uint16_t unknown /* [in] */,
3114 struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */)
3116 struct lsa_lsaRQueryForestTrustInformation r;
3117 NTSTATUS status;
3119 /* In parameters */
3120 r.in.handle = handle;
3121 r.in.trusted_domain_name = trusted_domain_name;
3122 r.in.unknown = unknown;
3124 if (DEBUGLEVEL >= 10) {
3125 NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation, &r);
3128 status = cli_do_rpc_ndr(cli,
3129 mem_ctx,
3130 PI_LSARPC,
3131 &ndr_table_lsarpc,
3132 NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION,
3133 &r);
3135 if (!NT_STATUS_IS_OK(status)) {
3136 return status;
3139 if (DEBUGLEVEL >= 10) {
3140 NDR_PRINT_OUT_DEBUG(lsa_lsaRQueryForestTrustInformation, &r);
3143 if (NT_STATUS_IS_ERR(status)) {
3144 return status;
3147 /* Return variables */
3148 *forest_trust_info = *r.out.forest_trust_info;
3150 /* Return result */
3151 return r.out.result;
3154 NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli,
3155 TALLOC_CTX *mem_ctx)
3157 struct lsa_LSARSETFORESTTRUSTINFORMATION r;
3158 NTSTATUS status;
3160 /* In parameters */
3162 if (DEBUGLEVEL >= 10) {
3163 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
3166 status = cli_do_rpc_ndr(cli,
3167 mem_ctx,
3168 PI_LSARPC,
3169 &ndr_table_lsarpc,
3170 NDR_LSA_LSARSETFORESTTRUSTINFORMATION,
3171 &r);
3173 if (!NT_STATUS_IS_OK(status)) {
3174 return status;
3177 if (DEBUGLEVEL >= 10) {
3178 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
3181 if (NT_STATUS_IS_ERR(status)) {
3182 return status;
3185 /* Return variables */
3187 /* Return result */
3188 return r.out.result;
3191 NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli,
3192 TALLOC_CTX *mem_ctx)
3194 struct lsa_CREDRRENAME r;
3195 NTSTATUS status;
3197 /* In parameters */
3199 if (DEBUGLEVEL >= 10) {
3200 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME, &r);
3203 status = cli_do_rpc_ndr(cli,
3204 mem_ctx,
3205 PI_LSARPC,
3206 &ndr_table_lsarpc,
3207 NDR_LSA_CREDRRENAME,
3208 &r);
3210 if (!NT_STATUS_IS_OK(status)) {
3211 return status;
3214 if (DEBUGLEVEL >= 10) {
3215 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, &r);
3218 if (NT_STATUS_IS_ERR(status)) {
3219 return status;
3222 /* Return variables */
3224 /* Return result */
3225 return r.out.result;
3228 NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli,
3229 TALLOC_CTX *mem_ctx,
3230 struct lsa_SidArray *sids /* [in] [ref] */,
3231 struct lsa_RefDomainList **domains /* [out] [ref] */,
3232 struct lsa_TransNameArray2 *names /* [in,out] [ref] */,
3233 uint16_t level /* [in] */,
3234 uint32_t *count /* [in,out] [ref] */,
3235 uint32_t unknown1 /* [in] */,
3236 uint32_t unknown2 /* [in] */)
3238 struct lsa_LookupSids3 r;
3239 NTSTATUS status;
3241 /* In parameters */
3242 r.in.sids = sids;
3243 r.in.names = names;
3244 r.in.level = level;
3245 r.in.count = count;
3246 r.in.unknown1 = unknown1;
3247 r.in.unknown2 = unknown2;
3249 if (DEBUGLEVEL >= 10) {
3250 NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r);
3253 status = cli_do_rpc_ndr(cli,
3254 mem_ctx,
3255 PI_LSARPC,
3256 &ndr_table_lsarpc,
3257 NDR_LSA_LOOKUPSIDS3,
3258 &r);
3260 if (!NT_STATUS_IS_OK(status)) {
3261 return status;
3264 if (DEBUGLEVEL >= 10) {
3265 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, &r);
3268 if (NT_STATUS_IS_ERR(status)) {
3269 return status;
3272 /* Return variables */
3273 *domains = *r.out.domains;
3274 *names = *r.out.names;
3275 *count = *r.out.count;
3277 /* Return result */
3278 return r.out.result;
3281 NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli,
3282 TALLOC_CTX *mem_ctx,
3283 uint32_t num_names /* [in] [range(0,1000)] */,
3284 struct lsa_String *names /* [in] [size_is(num_names)] */,
3285 struct lsa_RefDomainList **domains /* [out] [ref] */,
3286 struct lsa_TransSidArray3 *sids /* [in,out] [ref] */,
3287 enum lsa_LookupNamesLevel level /* [in] */,
3288 uint32_t *count /* [in,out] [ref] */,
3289 uint32_t unknown1 /* [in] */,
3290 uint32_t unknown2 /* [in] */)
3292 struct lsa_LookupNames4 r;
3293 NTSTATUS status;
3295 /* In parameters */
3296 r.in.num_names = num_names;
3297 r.in.names = names;
3298 r.in.sids = sids;
3299 r.in.level = level;
3300 r.in.count = count;
3301 r.in.unknown1 = unknown1;
3302 r.in.unknown2 = unknown2;
3304 if (DEBUGLEVEL >= 10) {
3305 NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r);
3308 status = cli_do_rpc_ndr(cli,
3309 mem_ctx,
3310 PI_LSARPC,
3311 &ndr_table_lsarpc,
3312 NDR_LSA_LOOKUPNAMES4,
3313 &r);
3315 if (!NT_STATUS_IS_OK(status)) {
3316 return status;
3319 if (DEBUGLEVEL >= 10) {
3320 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, &r);
3323 if (NT_STATUS_IS_ERR(status)) {
3324 return status;
3327 /* Return variables */
3328 *domains = *r.out.domains;
3329 *sids = *r.out.sids;
3330 *count = *r.out.count;
3332 /* Return result */
3333 return r.out.result;
3336 NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli,
3337 TALLOC_CTX *mem_ctx)
3339 struct lsa_LSAROPENPOLICYSCE r;
3340 NTSTATUS status;
3342 /* In parameters */
3344 if (DEBUGLEVEL >= 10) {
3345 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
3348 status = cli_do_rpc_ndr(cli,
3349 mem_ctx,
3350 PI_LSARPC,
3351 &ndr_table_lsarpc,
3352 NDR_LSA_LSAROPENPOLICYSCE,
3353 &r);
3355 if (!NT_STATUS_IS_OK(status)) {
3356 return status;
3359 if (DEBUGLEVEL >= 10) {
3360 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
3363 if (NT_STATUS_IS_ERR(status)) {
3364 return status;
3367 /* Return variables */
3369 /* Return result */
3370 return r.out.result;
3373 NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli,
3374 TALLOC_CTX *mem_ctx)
3376 struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r;
3377 NTSTATUS status;
3379 /* In parameters */
3381 if (DEBUGLEVEL >= 10) {
3382 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
3385 status = cli_do_rpc_ndr(cli,
3386 mem_ctx,
3387 PI_LSARPC,
3388 &ndr_table_lsarpc,
3389 NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE,
3390 &r);
3392 if (!NT_STATUS_IS_OK(status)) {
3393 return status;
3396 if (DEBUGLEVEL >= 10) {
3397 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
3400 if (NT_STATUS_IS_ERR(status)) {
3401 return status;
3404 /* Return variables */
3406 /* Return result */
3407 return r.out.result;
3410 NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli,
3411 TALLOC_CTX *mem_ctx)
3413 struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r;
3414 NTSTATUS status;
3416 /* In parameters */
3418 if (DEBUGLEVEL >= 10) {
3419 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
3422 status = cli_do_rpc_ndr(cli,
3423 mem_ctx,
3424 PI_LSARPC,
3425 &ndr_table_lsarpc,
3426 NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE,
3427 &r);
3429 if (!NT_STATUS_IS_OK(status)) {
3430 return status;
3433 if (DEBUGLEVEL >= 10) {
3434 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
3437 if (NT_STATUS_IS_ERR(status)) {
3438 return status;
3441 /* Return variables */
3443 /* Return result */
3444 return r.out.result;
3447 NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli,
3448 TALLOC_CTX *mem_ctx)
3450 struct lsa_LSARADTREPORTSECURITYEVENT r;
3451 NTSTATUS status;
3453 /* In parameters */
3455 if (DEBUGLEVEL >= 10) {
3456 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
3459 status = cli_do_rpc_ndr(cli,
3460 mem_ctx,
3461 PI_LSARPC,
3462 &ndr_table_lsarpc,
3463 NDR_LSA_LSARADTREPORTSECURITYEVENT,
3464 &r);
3466 if (!NT_STATUS_IS_OK(status)) {
3467 return status;
3470 if (DEBUGLEVEL >= 10) {
3471 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
3474 if (NT_STATUS_IS_ERR(status)) {
3475 return status;
3478 /* Return variables */
3480 /* Return result */
3481 return r.out.result;