fix crash bug in pidl generated client code, this
[ira/wip.git] / source3 / librpc / gen_ndr / cli_lsa.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_lsa.h"
8
9 NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
10 {
11         struct lsa_Close r;
12         NTSTATUS status;
13         
14         /* In parameters */
15         r.in.handle = handle;
16         
17         if (DEBUGLEVEL >= 10)
18                 NDR_PRINT_IN_DEBUG(lsa_Close, &r);
19         
20         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CLOSE, &r);
21         
22         if (!NT_STATUS_IS_OK(status)) {
23                 return status;
24         }
25         
26         if (DEBUGLEVEL >= 10)
27                 NDR_PRINT_OUT_DEBUG(lsa_Close, &r);
28         
29         if (NT_STATUS_IS_ERR(status)) {
30                 return status;
31         }
32         
33         /* Return variables */
34         *handle = *r.out.handle;
35         
36         /* Return result */
37         return r.out.result;
38 }
39
40 NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
41 {
42         struct lsa_Delete r;
43         NTSTATUS status;
44         
45         /* In parameters */
46         r.in.handle = handle;
47         
48         if (DEBUGLEVEL >= 10)
49                 NDR_PRINT_IN_DEBUG(lsa_Delete, &r);
50         
51         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_DELETE, &r);
52         
53         if (!NT_STATUS_IS_OK(status)) {
54                 return status;
55         }
56         
57         if (DEBUGLEVEL >= 10)
58                 NDR_PRINT_OUT_DEBUG(lsa_Delete, &r);
59         
60         if (NT_STATUS_IS_ERR(status)) {
61                 return status;
62         }
63         
64         /* Return variables */
65         
66         /* Return result */
67         return r.out.result;
68 }
69
70 NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_count, struct lsa_PrivArray *privs)
71 {
72         struct lsa_EnumPrivs r;
73         NTSTATUS status;
74         
75         /* In parameters */
76         r.in.handle = handle;
77         r.in.resume_handle = resume_handle;
78         r.in.max_count = max_count;
79         
80         if (DEBUGLEVEL >= 10)
81                 NDR_PRINT_IN_DEBUG(lsa_EnumPrivs, &r);
82         
83         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMPRIVS, &r);
84         
85         if (!NT_STATUS_IS_OK(status)) {
86                 return status;
87         }
88         
89         if (DEBUGLEVEL >= 10)
90                 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, &r);
91         
92         if (NT_STATUS_IS_ERR(status)) {
93                 return status;
94         }
95         
96         /* Return variables */
97         *resume_handle = *r.out.resume_handle;
98         *privs = *r.out.privs;
99         
100         /* Return result */
101         return r.out.result;
102 }
103
104 NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct sec_desc_buf *sdbuf)
105 {
106         struct lsa_QuerySecurity r;
107         NTSTATUS status;
108         
109         /* In parameters */
110         r.in.handle = handle;
111         r.in.sec_info = sec_info;
112         
113         if (DEBUGLEVEL >= 10)
114                 NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &r);
115         
116         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYSECURITY, &r);
117         
118         if (!NT_STATUS_IS_OK(status)) {
119                 return status;
120         }
121         
122         if (DEBUGLEVEL >= 10)
123                 NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, &r);
124         
125         if (NT_STATUS_IS_ERR(status)) {
126                 return status;
127         }
128         
129         /* Return variables */
130         if (sdbuf && r.out.sdbuf) {
131                 *sdbuf = *r.out.sdbuf;
132         }
133         
134         /* Return result */
135         return r.out.result;
136 }
137
138 NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
139 {
140         struct lsa_SetSecObj r;
141         NTSTATUS status;
142         
143         /* In parameters */
144         
145         if (DEBUGLEVEL >= 10)
146                 NDR_PRINT_IN_DEBUG(lsa_SetSecObj, &r);
147         
148         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETSECOBJ, &r);
149         
150         if (!NT_STATUS_IS_OK(status)) {
151                 return status;
152         }
153         
154         if (DEBUGLEVEL >= 10)
155                 NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, &r);
156         
157         if (NT_STATUS_IS_ERR(status)) {
158                 return status;
159         }
160         
161         /* Return variables */
162         
163         /* Return result */
164         return r.out.result;
165 }
166
167 NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
168 {
169         struct lsa_ChangePassword r;
170         NTSTATUS status;
171         
172         /* In parameters */
173         
174         if (DEBUGLEVEL >= 10)
175                 NDR_PRINT_IN_DEBUG(lsa_ChangePassword, &r);
176         
177         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CHANGEPASSWORD, &r);
178         
179         if (!NT_STATUS_IS_OK(status)) {
180                 return status;
181         }
182         
183         if (DEBUGLEVEL >= 10)
184                 NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, &r);
185         
186         if (NT_STATUS_IS_ERR(status)) {
187                 return status;
188         }
189         
190         /* Return variables */
191         
192         /* Return result */
193         return r.out.result;
194 }
195
196 NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle)
197 {
198         struct lsa_OpenPolicy r;
199         NTSTATUS status;
200         
201         /* In parameters */
202         r.in.system_name = system_name;
203         r.in.attr = attr;
204         r.in.access_mask = access_mask;
205         
206         if (DEBUGLEVEL >= 10)
207                 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &r);
208         
209         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENPOLICY, &r);
210         
211         if (!NT_STATUS_IS_OK(status)) {
212                 return status;
213         }
214         
215         if (DEBUGLEVEL >= 10)
216                 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, &r);
217         
218         if (NT_STATUS_IS_ERR(status)) {
219                 return status;
220         }
221         
222         /* Return variables */
223         *handle = *r.out.handle;
224         
225         /* Return result */
226         return r.out.result;
227 }
228
229 NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info)
230 {
231         struct lsa_QueryInfoPolicy r;
232         NTSTATUS status;
233         
234         /* In parameters */
235         r.in.handle = handle;
236         r.in.level = level;
237         
238         if (DEBUGLEVEL >= 10)
239                 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &r);
240         
241         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYINFOPOLICY, &r);
242         
243         if (!NT_STATUS_IS_OK(status)) {
244                 return status;
245         }
246         
247         if (DEBUGLEVEL >= 10)
248                 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, &r);
249         
250         if (NT_STATUS_IS_ERR(status)) {
251                 return status;
252         }
253         
254         /* Return variables */
255         if (info && r.out.info) {
256                 *info = *r.out.info;
257         }
258         
259         /* Return result */
260         return r.out.result;
261 }
262
263 NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
264 {
265         struct lsa_SetInfoPolicy r;
266         NTSTATUS status;
267         
268         /* In parameters */
269         
270         if (DEBUGLEVEL >= 10)
271                 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy, &r);
272         
273         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETINFOPOLICY, &r);
274         
275         if (!NT_STATUS_IS_OK(status)) {
276                 return status;
277         }
278         
279         if (DEBUGLEVEL >= 10)
280                 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, &r);
281         
282         if (NT_STATUS_IS_ERR(status)) {
283                 return status;
284         }
285         
286         /* Return variables */
287         
288         /* Return result */
289         return r.out.result;
290 }
291
292 NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
293 {
294         struct lsa_ClearAuditLog r;
295         NTSTATUS status;
296         
297         /* In parameters */
298         
299         if (DEBUGLEVEL >= 10)
300                 NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog, &r);
301         
302         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CLEARAUDITLOG, &r);
303         
304         if (!NT_STATUS_IS_OK(status)) {
305                 return status;
306         }
307         
308         if (DEBUGLEVEL >= 10)
309                 NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, &r);
310         
311         if (NT_STATUS_IS_ERR(status)) {
312                 return status;
313         }
314         
315         /* Return variables */
316         
317         /* Return result */
318         return r.out.result;
319 }
320
321 NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle)
322 {
323         struct lsa_CreateAccount r;
324         NTSTATUS status;
325         
326         /* In parameters */
327         r.in.handle = handle;
328         r.in.sid = sid;
329         r.in.access_mask = access_mask;
330         
331         if (DEBUGLEVEL >= 10)
332                 NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &r);
333         
334         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREATEACCOUNT, &r);
335         
336         if (!NT_STATUS_IS_OK(status)) {
337                 return status;
338         }
339         
340         if (DEBUGLEVEL >= 10)
341                 NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, &r);
342         
343         if (NT_STATUS_IS_ERR(status)) {
344                 return status;
345         }
346         
347         /* Return variables */
348         *acct_handle = *r.out.acct_handle;
349         
350         /* Return result */
351         return r.out.result;
352 }
353
354 NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t num_entries, struct lsa_SidArray *sids)
355 {
356         struct lsa_EnumAccounts r;
357         NTSTATUS status;
358         
359         /* In parameters */
360         r.in.handle = handle;
361         r.in.resume_handle = resume_handle;
362         r.in.num_entries = num_entries;
363         
364         if (DEBUGLEVEL >= 10)
365                 NDR_PRINT_IN_DEBUG(lsa_EnumAccounts, &r);
366         
367         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMACCOUNTS, &r);
368         
369         if (!NT_STATUS_IS_OK(status)) {
370                 return status;
371         }
372         
373         if (DEBUGLEVEL >= 10)
374                 NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, &r);
375         
376         if (NT_STATUS_IS_ERR(status)) {
377                 return status;
378         }
379         
380         /* Return variables */
381         *resume_handle = *r.out.resume_handle;
382         *sids = *r.out.sids;
383         
384         /* Return result */
385         return r.out.result;
386 }
387
388 NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_DomainInfo *info, uint32_t access_mask, struct policy_handle *trustdom_handle)
389 {
390         struct lsa_CreateTrustedDomain r;
391         NTSTATUS status;
392         
393         /* In parameters */
394         r.in.handle = handle;
395         r.in.info = info;
396         r.in.access_mask = access_mask;
397         
398         if (DEBUGLEVEL >= 10)
399                 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &r);
400         
401         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREATETRUSTEDDOMAIN, &r);
402         
403         if (!NT_STATUS_IS_OK(status)) {
404                 return status;
405         }
406         
407         if (DEBUGLEVEL >= 10)
408                 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, &r);
409         
410         if (NT_STATUS_IS_ERR(status)) {
411                 return status;
412         }
413         
414         /* Return variables */
415         *trustdom_handle = *r.out.trustdom_handle;
416         
417         /* Return result */
418         return r.out.result;
419 }
420
421 NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_size, struct lsa_DomainList *domains)
422 {
423         struct lsa_EnumTrustDom r;
424         NTSTATUS status;
425         
426         /* In parameters */
427         r.in.handle = handle;
428         r.in.resume_handle = resume_handle;
429         r.in.max_size = max_size;
430         
431         if (DEBUGLEVEL >= 10)
432                 NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom, &r);
433         
434         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMTRUSTDOM, &r);
435         
436         if (!NT_STATUS_IS_OK(status)) {
437                 return status;
438         }
439         
440         if (DEBUGLEVEL >= 10)
441                 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, &r);
442         
443         if (NT_STATUS_IS_ERR(status)) {
444                 return status;
445         }
446         
447         /* Return variables */
448         *resume_handle = *r.out.resume_handle;
449         *domains = *r.out.domains;
450         
451         /* Return result */
452         return r.out.result;
453 }
454
455 NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray *sids, uint16_t level, uint32_t *count)
456 {
457         struct lsa_LookupNames r;
458         NTSTATUS status;
459         
460         /* In parameters */
461         r.in.handle = handle;
462         r.in.num_names = num_names;
463         r.in.names = names;
464         r.in.sids = sids;
465         r.in.level = level;
466         r.in.count = count;
467         
468         if (DEBUGLEVEL >= 10)
469                 NDR_PRINT_IN_DEBUG(lsa_LookupNames, &r);
470         
471         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPNAMES, &r);
472         
473         if (!NT_STATUS_IS_OK(status)) {
474                 return status;
475         }
476         
477         if (DEBUGLEVEL >= 10)
478                 NDR_PRINT_OUT_DEBUG(lsa_LookupNames, &r);
479         
480         if (NT_STATUS_IS_ERR(status)) {
481                 return status;
482         }
483         
484         /* Return variables */
485         if (domains && r.out.domains) {
486                 *domains = *r.out.domains;
487         }
488         *sids = *r.out.sids;
489         *count = *r.out.count;
490         
491         /* Return result */
492         return r.out.result;
493 }
494
495 NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray *names, uint16_t level, uint32_t *count)
496 {
497         struct lsa_LookupSids r;
498         NTSTATUS status;
499         
500         /* In parameters */
501         r.in.handle = handle;
502         r.in.sids = sids;
503         r.in.names = names;
504         r.in.level = level;
505         r.in.count = count;
506         
507         if (DEBUGLEVEL >= 10)
508                 NDR_PRINT_IN_DEBUG(lsa_LookupSids, &r);
509         
510         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPSIDS, &r);
511         
512         if (!NT_STATUS_IS_OK(status)) {
513                 return status;
514         }
515         
516         if (DEBUGLEVEL >= 10)
517                 NDR_PRINT_OUT_DEBUG(lsa_LookupSids, &r);
518         
519         if (NT_STATUS_IS_ERR(status)) {
520                 return status;
521         }
522         
523         /* Return variables */
524         if (domains && r.out.domains) {
525                 *domains = *r.out.domains;
526         }
527         *names = *r.out.names;
528         *count = *r.out.count;
529         
530         /* Return result */
531         return r.out.result;
532 }
533
534 NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle)
535 {
536         struct lsa_CreateSecret r;
537         NTSTATUS status;
538         
539         /* In parameters */
540         r.in.handle = handle;
541         r.in.name = name;
542         r.in.access_mask = access_mask;
543         
544         if (DEBUGLEVEL >= 10)
545                 NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &r);
546         
547         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREATESECRET, &r);
548         
549         if (!NT_STATUS_IS_OK(status)) {
550                 return status;
551         }
552         
553         if (DEBUGLEVEL >= 10)
554                 NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, &r);
555         
556         if (NT_STATUS_IS_ERR(status)) {
557                 return status;
558         }
559         
560         /* Return variables */
561         *sec_handle = *r.out.sec_handle;
562         
563         /* Return result */
564         return r.out.result;
565 }
566
567 NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle)
568 {
569         struct lsa_OpenAccount r;
570         NTSTATUS status;
571         
572         /* In parameters */
573         r.in.handle = handle;
574         r.in.sid = sid;
575         r.in.access_mask = access_mask;
576         
577         if (DEBUGLEVEL >= 10)
578                 NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &r);
579         
580         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENACCOUNT, &r);
581         
582         if (!NT_STATUS_IS_OK(status)) {
583                 return status;
584         }
585         
586         if (DEBUGLEVEL >= 10)
587                 NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, &r);
588         
589         if (NT_STATUS_IS_ERR(status)) {
590                 return status;
591         }
592         
593         /* Return variables */
594         *acct_handle = *r.out.acct_handle;
595         
596         /* Return result */
597         return r.out.result;
598 }
599
600 NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs)
601 {
602         struct lsa_EnumPrivsAccount r;
603         NTSTATUS status;
604         
605         /* In parameters */
606         r.in.handle = handle;
607         
608         if (DEBUGLEVEL >= 10)
609                 NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &r);
610         
611         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMPRIVSACCOUNT, &r);
612         
613         if (!NT_STATUS_IS_OK(status)) {
614                 return status;
615         }
616         
617         if (DEBUGLEVEL >= 10)
618                 NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, &r);
619         
620         if (NT_STATUS_IS_ERR(status)) {
621                 return status;
622         }
623         
624         /* Return variables */
625         if (privs && r.out.privs) {
626                 *privs = *r.out.privs;
627         }
628         
629         /* Return result */
630         return r.out.result;
631 }
632
633 NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs)
634 {
635         struct lsa_AddPrivilegesToAccount r;
636         NTSTATUS status;
637         
638         /* In parameters */
639         r.in.handle = handle;
640         r.in.privs = privs;
641         
642         if (DEBUGLEVEL >= 10)
643                 NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount, &r);
644         
645         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ADDPRIVILEGESTOACCOUNT, &r);
646         
647         if (!NT_STATUS_IS_OK(status)) {
648                 return status;
649         }
650         
651         if (DEBUGLEVEL >= 10)
652                 NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, &r);
653         
654         if (NT_STATUS_IS_ERR(status)) {
655                 return status;
656         }
657         
658         /* Return variables */
659         
660         /* Return result */
661         return r.out.result;
662 }
663
664 NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t remove_all, struct lsa_PrivilegeSet *privs)
665 {
666         struct lsa_RemovePrivilegesFromAccount r;
667         NTSTATUS status;
668         
669         /* In parameters */
670         r.in.handle = handle;
671         r.in.remove_all = remove_all;
672         r.in.privs = privs;
673         
674         if (DEBUGLEVEL >= 10)
675                 NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
676         
677         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT, &r);
678         
679         if (!NT_STATUS_IS_OK(status)) {
680                 return status;
681         }
682         
683         if (DEBUGLEVEL >= 10)
684                 NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, &r);
685         
686         if (NT_STATUS_IS_ERR(status)) {
687                 return status;
688         }
689         
690         /* Return variables */
691         
692         /* Return result */
693         return r.out.result;
694 }
695
696 NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
697 {
698         struct lsa_GetQuotasForAccount r;
699         NTSTATUS status;
700         
701         /* In parameters */
702         
703         if (DEBUGLEVEL >= 10)
704                 NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount, &r);
705         
706         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_GETQUOTASFORACCOUNT, &r);
707         
708         if (!NT_STATUS_IS_OK(status)) {
709                 return status;
710         }
711         
712         if (DEBUGLEVEL >= 10)
713                 NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, &r);
714         
715         if (NT_STATUS_IS_ERR(status)) {
716                 return status;
717         }
718         
719         /* Return variables */
720         
721         /* Return result */
722         return r.out.result;
723 }
724
725 NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
726 {
727         struct lsa_SetQuotasForAccount r;
728         NTSTATUS status;
729         
730         /* In parameters */
731         
732         if (DEBUGLEVEL >= 10)
733                 NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount, &r);
734         
735         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETQUOTASFORACCOUNT, &r);
736         
737         if (!NT_STATUS_IS_OK(status)) {
738                 return status;
739         }
740         
741         if (DEBUGLEVEL >= 10)
742                 NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, &r);
743         
744         if (NT_STATUS_IS_ERR(status)) {
745                 return status;
746         }
747         
748         /* Return variables */
749         
750         /* Return result */
751         return r.out.result;
752 }
753
754 NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
755 {
756         struct lsa_GetSystemAccessAccount r;
757         NTSTATUS status;
758         
759         /* In parameters */
760         
761         if (DEBUGLEVEL >= 10)
762                 NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &r);
763         
764         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_GETSYSTEMACCESSACCOUNT, &r);
765         
766         if (!NT_STATUS_IS_OK(status)) {
767                 return status;
768         }
769         
770         if (DEBUGLEVEL >= 10)
771                 NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, &r);
772         
773         if (NT_STATUS_IS_ERR(status)) {
774                 return status;
775         }
776         
777         /* Return variables */
778         
779         /* Return result */
780         return r.out.result;
781 }
782
783 NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
784 {
785         struct lsa_SetSystemAccessAccount r;
786         NTSTATUS status;
787         
788         /* In parameters */
789         
790         if (DEBUGLEVEL >= 10)
791                 NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &r);
792         
793         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETSYSTEMACCESSACCOUNT, &r);
794         
795         if (!NT_STATUS_IS_OK(status)) {
796                 return status;
797         }
798         
799         if (DEBUGLEVEL >= 10)
800                 NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, &r);
801         
802         if (NT_STATUS_IS_ERR(status)) {
803                 return status;
804         }
805         
806         /* Return variables */
807         
808         /* Return result */
809         return r.out.result;
810 }
811
812 NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *trustdom_handle)
813 {
814         struct lsa_OpenTrustedDomain r;
815         NTSTATUS status;
816         
817         /* In parameters */
818         r.in.handle = handle;
819         r.in.sid = sid;
820         r.in.access_mask = access_mask;
821         
822         if (DEBUGLEVEL >= 10)
823                 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &r);
824         
825         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENTRUSTEDDOMAIN, &r);
826         
827         if (!NT_STATUS_IS_OK(status)) {
828                 return status;
829         }
830         
831         if (DEBUGLEVEL >= 10)
832                 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, &r);
833         
834         if (NT_STATUS_IS_ERR(status)) {
835                 return status;
836         }
837         
838         /* Return variables */
839         *trustdom_handle = *r.out.trustdom_handle;
840         
841         /* Return result */
842         return r.out.result;
843 }
844
845 NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
846 {
847         struct lsa_QueryTrustedDomainInfo r;
848         NTSTATUS status;
849         
850         /* In parameters */
851         r.in.trustdom_handle = trustdom_handle;
852         r.in.level = level;
853         
854         if (DEBUGLEVEL >= 10)
855                 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &r);
856         
857         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYTRUSTEDDOMAININFO, &r);
858         
859         if (!NT_STATUS_IS_OK(status)) {
860                 return status;
861         }
862         
863         if (DEBUGLEVEL >= 10)
864                 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, &r);
865         
866         if (NT_STATUS_IS_ERR(status)) {
867                 return status;
868         }
869         
870         /* Return variables */
871         if (info && r.out.info) {
872                 *info = *r.out.info;
873         }
874         
875         /* Return result */
876         return r.out.result;
877 }
878
879 NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
880 {
881         struct lsa_SetInformationTrustedDomain r;
882         NTSTATUS status;
883         
884         /* In parameters */
885         
886         if (DEBUGLEVEL >= 10)
887                 NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &r);
888         
889         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN, &r);
890         
891         if (!NT_STATUS_IS_OK(status)) {
892                 return status;
893         }
894         
895         if (DEBUGLEVEL >= 10)
896                 NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, &r);
897         
898         if (NT_STATUS_IS_ERR(status)) {
899                 return status;
900         }
901         
902         /* Return variables */
903         
904         /* Return result */
905         return r.out.result;
906 }
907
908 NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle)
909 {
910         struct lsa_OpenSecret r;
911         NTSTATUS status;
912         
913         /* In parameters */
914         r.in.handle = handle;
915         r.in.name = name;
916         r.in.access_mask = access_mask;
917         
918         if (DEBUGLEVEL >= 10)
919                 NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &r);
920         
921         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENSECRET, &r);
922         
923         if (!NT_STATUS_IS_OK(status)) {
924                 return status;
925         }
926         
927         if (DEBUGLEVEL >= 10)
928                 NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, &r);
929         
930         if (NT_STATUS_IS_ERR(status)) {
931                 return status;
932         }
933         
934         /* Return variables */
935         *sec_handle = *r.out.sec_handle;
936         
937         /* Return result */
938         return r.out.result;
939 }
940
941 NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF *new_val, struct lsa_DATA_BUF *old_val)
942 {
943         struct lsa_SetSecret r;
944         NTSTATUS status;
945         
946         /* In parameters */
947         r.in.sec_handle = sec_handle;
948         r.in.new_val = new_val;
949         r.in.old_val = old_val;
950         
951         if (DEBUGLEVEL >= 10)
952                 NDR_PRINT_IN_DEBUG(lsa_SetSecret, &r);
953         
954         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETSECRET, &r);
955         
956         if (!NT_STATUS_IS_OK(status)) {
957                 return status;
958         }
959         
960         if (DEBUGLEVEL >= 10)
961                 NDR_PRINT_OUT_DEBUG(lsa_SetSecret, &r);
962         
963         if (NT_STATUS_IS_ERR(status)) {
964                 return status;
965         }
966         
967         /* Return variables */
968         
969         /* Return result */
970         return r.out.result;
971 }
972
973 NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF_PTR *new_val, NTTIME *new_mtime, struct lsa_DATA_BUF_PTR *old_val, NTTIME *old_mtime)
974 {
975         struct lsa_QuerySecret r;
976         NTSTATUS status;
977         
978         /* In parameters */
979         r.in.sec_handle = sec_handle;
980         r.in.new_val = new_val;
981         r.in.new_mtime = new_mtime;
982         r.in.old_val = old_val;
983         r.in.old_mtime = old_mtime;
984         
985         if (DEBUGLEVEL >= 10)
986                 NDR_PRINT_IN_DEBUG(lsa_QuerySecret, &r);
987         
988         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYSECRET, &r);
989         
990         if (!NT_STATUS_IS_OK(status)) {
991                 return status;
992         }
993         
994         if (DEBUGLEVEL >= 10)
995                 NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, &r);
996         
997         if (NT_STATUS_IS_ERR(status)) {
998                 return status;
999         }
1000         
1001         /* Return variables */
1002         if (new_val && r.out.new_val) {
1003                 *new_val = *r.out.new_val;
1004         }
1005         if (new_mtime && r.out.new_mtime) {
1006                 *new_mtime = *r.out.new_mtime;
1007         }
1008         if (old_val && r.out.old_val) {
1009                 *old_val = *r.out.old_val;
1010         }
1011         if (old_mtime && r.out.old_mtime) {
1012                 *old_mtime = *r.out.old_mtime;
1013         }
1014         
1015         /* Return result */
1016         return r.out.result;
1017 }
1018
1019 NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_LUID *luid)
1020 {
1021         struct lsa_LookupPrivValue r;
1022         NTSTATUS status;
1023         
1024         /* In parameters */
1025         r.in.handle = handle;
1026         r.in.name = name;
1027         
1028         if (DEBUGLEVEL >= 10)
1029                 NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &r);
1030         
1031         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPPRIVVALUE, &r);
1032         
1033         if (!NT_STATUS_IS_OK(status)) {
1034                 return status;
1035         }
1036         
1037         if (DEBUGLEVEL >= 10)
1038                 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, &r);
1039         
1040         if (NT_STATUS_IS_ERR(status)) {
1041                 return status;
1042         }
1043         
1044         /* Return variables */
1045         *luid = *r.out.luid;
1046         
1047         /* Return result */
1048         return r.out.result;
1049 }
1050
1051 NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_LUID *luid, struct lsa_StringLarge *name)
1052 {
1053         struct lsa_LookupPrivName r;
1054         NTSTATUS status;
1055         
1056         /* In parameters */
1057         r.in.handle = handle;
1058         r.in.luid = luid;
1059         
1060         if (DEBUGLEVEL >= 10)
1061                 NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &r);
1062         
1063         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPPRIVNAME, &r);
1064         
1065         if (!NT_STATUS_IS_OK(status)) {
1066                 return status;
1067         }
1068         
1069         if (DEBUGLEVEL >= 10)
1070                 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, &r);
1071         
1072         if (NT_STATUS_IS_ERR(status)) {
1073                 return status;
1074         }
1075         
1076         /* Return variables */
1077         if (name && r.out.name) {
1078                 *name = *r.out.name;
1079         }
1080         
1081         /* Return result */
1082         return r.out.result;
1083 }
1084
1085 NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_StringLarge *disp_name, uint16_t *language_id, uint16_t unknown)
1086 {
1087         struct lsa_LookupPrivDisplayName r;
1088         NTSTATUS status;
1089         
1090         /* In parameters */
1091         r.in.handle = handle;
1092         r.in.name = name;
1093         r.in.language_id = language_id;
1094         r.in.unknown = unknown;
1095         
1096         if (DEBUGLEVEL >= 10)
1097                 NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r);
1098         
1099         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPPRIVDISPLAYNAME, &r);
1100         
1101         if (!NT_STATUS_IS_OK(status)) {
1102                 return status;
1103         }
1104         
1105         if (DEBUGLEVEL >= 10)
1106                 NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, &r);
1107         
1108         if (NT_STATUS_IS_ERR(status)) {
1109                 return status;
1110         }
1111         
1112         /* Return variables */
1113         if (disp_name && r.out.disp_name) {
1114                 *disp_name = *r.out.disp_name;
1115         }
1116         *language_id = *r.out.language_id;
1117         
1118         /* Return result */
1119         return r.out.result;
1120 }
1121
1122 NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1123 {
1124         struct lsa_DeleteObject r;
1125         NTSTATUS status;
1126         
1127         /* In parameters */
1128         
1129         if (DEBUGLEVEL >= 10)
1130                 NDR_PRINT_IN_DEBUG(lsa_DeleteObject, &r);
1131         
1132         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_DELETEOBJECT, &r);
1133         
1134         if (!NT_STATUS_IS_OK(status)) {
1135                 return status;
1136         }
1137         
1138         if (DEBUGLEVEL >= 10)
1139                 NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, &r);
1140         
1141         if (NT_STATUS_IS_ERR(status)) {
1142                 return status;
1143         }
1144         
1145         /* Return variables */
1146         
1147         /* Return result */
1148         return r.out.result;
1149 }
1150
1151 NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_SidArray *sids)
1152 {
1153         struct lsa_EnumAccountsWithUserRight r;
1154         NTSTATUS status;
1155         
1156         /* In parameters */
1157         r.in.handle = handle;
1158         r.in.name = name;
1159         
1160         if (DEBUGLEVEL >= 10)
1161                 NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &r);
1162         
1163         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT, &r);
1164         
1165         if (!NT_STATUS_IS_OK(status)) {
1166                 return status;
1167         }
1168         
1169         if (DEBUGLEVEL >= 10)
1170                 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, &r);
1171         
1172         if (NT_STATUS_IS_ERR(status)) {
1173                 return status;
1174         }
1175         
1176         /* Return variables */
1177         *sids = *r.out.sids;
1178         
1179         /* Return result */
1180         return r.out.result;
1181 }
1182
1183 NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights)
1184 {
1185         struct lsa_EnumAccountRights r;
1186         NTSTATUS status;
1187         
1188         /* In parameters */
1189         r.in.handle = handle;
1190         r.in.sid = sid;
1191         
1192         if (DEBUGLEVEL >= 10)
1193                 NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &r);
1194         
1195         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMACCOUNTRIGHTS, &r);
1196         
1197         if (!NT_STATUS_IS_OK(status)) {
1198                 return status;
1199         }
1200         
1201         if (DEBUGLEVEL >= 10)
1202                 NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, &r);
1203         
1204         if (NT_STATUS_IS_ERR(status)) {
1205                 return status;
1206         }
1207         
1208         /* Return variables */
1209         *rights = *r.out.rights;
1210         
1211         /* Return result */
1212         return r.out.result;
1213 }
1214
1215 NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights)
1216 {
1217         struct lsa_AddAccountRights r;
1218         NTSTATUS status;
1219         
1220         /* In parameters */
1221         r.in.handle = handle;
1222         r.in.sid = sid;
1223         r.in.rights = rights;
1224         
1225         if (DEBUGLEVEL >= 10)
1226                 NDR_PRINT_IN_DEBUG(lsa_AddAccountRights, &r);
1227         
1228         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ADDACCOUNTRIGHTS, &r);
1229         
1230         if (!NT_STATUS_IS_OK(status)) {
1231                 return status;
1232         }
1233         
1234         if (DEBUGLEVEL >= 10)
1235                 NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, &r);
1236         
1237         if (NT_STATUS_IS_ERR(status)) {
1238                 return status;
1239         }
1240         
1241         /* Return variables */
1242         
1243         /* Return result */
1244         return r.out.result;
1245 }
1246
1247 NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t unknown, struct lsa_RightSet *rights)
1248 {
1249         struct lsa_RemoveAccountRights r;
1250         NTSTATUS status;
1251         
1252         /* In parameters */
1253         r.in.handle = handle;
1254         r.in.sid = sid;
1255         r.in.unknown = unknown;
1256         r.in.rights = rights;
1257         
1258         if (DEBUGLEVEL >= 10)
1259                 NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights, &r);
1260         
1261         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_REMOVEACCOUNTRIGHTS, &r);
1262         
1263         if (!NT_STATUS_IS_OK(status)) {
1264                 return status;
1265         }
1266         
1267         if (DEBUGLEVEL >= 10)
1268                 NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, &r);
1269         
1270         if (NT_STATUS_IS_ERR(status)) {
1271                 return status;
1272         }
1273         
1274         /* Return variables */
1275         
1276         /* Return result */
1277         return r.out.result;
1278 }
1279
1280 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
1281 {
1282         struct lsa_QueryTrustedDomainInfoBySid r;
1283         NTSTATUS status;
1284         
1285         /* In parameters */
1286         r.in.handle = handle;
1287         r.in.dom_sid = dom_sid;
1288         r.in.level = level;
1289         
1290         if (DEBUGLEVEL >= 10)
1291                 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
1292         
1293         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID, &r);
1294         
1295         if (!NT_STATUS_IS_OK(status)) {
1296                 return status;
1297         }
1298         
1299         if (DEBUGLEVEL >= 10)
1300                 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r);
1301         
1302         if (NT_STATUS_IS_ERR(status)) {
1303                 return status;
1304         }
1305         
1306         /* Return variables */
1307         if (info && r.out.info) {
1308                 *info = *r.out.info;
1309         }
1310         
1311         /* Return result */
1312         return r.out.result;
1313 }
1314
1315 NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1316 {
1317         struct lsa_SetTrustedDomainInfo r;
1318         NTSTATUS status;
1319         
1320         /* In parameters */
1321         
1322         if (DEBUGLEVEL >= 10)
1323                 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &r);
1324         
1325         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETTRUSTEDDOMAININFO, &r);
1326         
1327         if (!NT_STATUS_IS_OK(status)) {
1328                 return status;
1329         }
1330         
1331         if (DEBUGLEVEL >= 10)
1332                 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, &r);
1333         
1334         if (NT_STATUS_IS_ERR(status)) {
1335                 return status;
1336         }
1337         
1338         /* Return variables */
1339         
1340         /* Return result */
1341         return r.out.result;
1342 }
1343
1344 NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid)
1345 {
1346         struct lsa_DeleteTrustedDomain r;
1347         NTSTATUS status;
1348         
1349         /* In parameters */
1350         r.in.handle = handle;
1351         r.in.dom_sid = dom_sid;
1352         
1353         if (DEBUGLEVEL >= 10)
1354                 NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain, &r);
1355         
1356         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_DELETETRUSTEDDOMAIN, &r);
1357         
1358         if (!NT_STATUS_IS_OK(status)) {
1359                 return status;
1360         }
1361         
1362         if (DEBUGLEVEL >= 10)
1363                 NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, &r);
1364         
1365         if (NT_STATUS_IS_ERR(status)) {
1366                 return status;
1367         }
1368         
1369         /* Return variables */
1370         
1371         /* Return result */
1372         return r.out.result;
1373 }
1374
1375 NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1376 {
1377         struct lsa_StorePrivateData r;
1378         NTSTATUS status;
1379         
1380         /* In parameters */
1381         
1382         if (DEBUGLEVEL >= 10)
1383                 NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, &r);
1384         
1385         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_STOREPRIVATEDATA, &r);
1386         
1387         if (!NT_STATUS_IS_OK(status)) {
1388                 return status;
1389         }
1390         
1391         if (DEBUGLEVEL >= 10)
1392                 NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, &r);
1393         
1394         if (NT_STATUS_IS_ERR(status)) {
1395                 return status;
1396         }
1397         
1398         /* Return variables */
1399         
1400         /* Return result */
1401         return r.out.result;
1402 }
1403
1404 NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1405 {
1406         struct lsa_RetrievePrivateData r;
1407         NTSTATUS status;
1408         
1409         /* In parameters */
1410         
1411         if (DEBUGLEVEL >= 10)
1412                 NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, &r);
1413         
1414         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_RETRIEVEPRIVATEDATA, &r);
1415         
1416         if (!NT_STATUS_IS_OK(status)) {
1417                 return status;
1418         }
1419         
1420         if (DEBUGLEVEL >= 10)
1421                 NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, &r);
1422         
1423         if (NT_STATUS_IS_ERR(status)) {
1424                 return status;
1425         }
1426         
1427         /* Return variables */
1428         
1429         /* Return result */
1430         return r.out.result;
1431 }
1432
1433 NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle)
1434 {
1435         struct lsa_OpenPolicy2 r;
1436         NTSTATUS status;
1437         
1438         /* In parameters */
1439         r.in.system_name = system_name;
1440         r.in.attr = attr;
1441         r.in.access_mask = access_mask;
1442         
1443         if (DEBUGLEVEL >= 10)
1444                 NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &r);
1445         
1446         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENPOLICY2, &r);
1447         
1448         if (!NT_STATUS_IS_OK(status)) {
1449                 return status;
1450         }
1451         
1452         if (DEBUGLEVEL >= 10)
1453                 NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, &r);
1454         
1455         if (NT_STATUS_IS_ERR(status)) {
1456                 return status;
1457         }
1458         
1459         /* Return variables */
1460         *handle = *r.out.handle;
1461         
1462         /* Return result */
1463         return r.out.result;
1464 }
1465
1466 NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_String *account_name, struct lsa_StringPointer *authority_name)
1467 {
1468         struct lsa_GetUserName r;
1469         NTSTATUS status;
1470         
1471         /* In parameters */
1472         r.in.system_name = system_name;
1473         r.in.account_name = account_name;
1474         r.in.authority_name = authority_name;
1475         
1476         if (DEBUGLEVEL >= 10)
1477                 NDR_PRINT_IN_DEBUG(lsa_GetUserName, &r);
1478         
1479         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_GETUSERNAME, &r);
1480         
1481         if (!NT_STATUS_IS_OK(status)) {
1482                 return status;
1483         }
1484         
1485         if (DEBUGLEVEL >= 10)
1486                 NDR_PRINT_OUT_DEBUG(lsa_GetUserName, &r);
1487         
1488         if (NT_STATUS_IS_ERR(status)) {
1489                 return status;
1490         }
1491         
1492         /* Return variables */
1493         if (account_name && r.out.account_name) {
1494                 *account_name = *r.out.account_name;
1495         }
1496         if (authority_name && r.out.authority_name) {
1497                 *authority_name = *r.out.authority_name;
1498         }
1499         
1500         /* Return result */
1501         return r.out.result;
1502 }
1503
1504 NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info)
1505 {
1506         struct lsa_QueryInfoPolicy2 r;
1507         NTSTATUS status;
1508         
1509         /* In parameters */
1510         r.in.handle = handle;
1511         r.in.level = level;
1512         
1513         if (DEBUGLEVEL >= 10)
1514                 NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &r);
1515         
1516         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYINFOPOLICY2, &r);
1517         
1518         if (!NT_STATUS_IS_OK(status)) {
1519                 return status;
1520         }
1521         
1522         if (DEBUGLEVEL >= 10)
1523                 NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, &r);
1524         
1525         if (NT_STATUS_IS_ERR(status)) {
1526                 return status;
1527         }
1528         
1529         /* Return variables */
1530         if (info && r.out.info) {
1531                 *info = *r.out.info;
1532         }
1533         
1534         /* Return result */
1535         return r.out.result;
1536 }
1537
1538 NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1539 {
1540         struct lsa_SetInfoPolicy2 r;
1541         NTSTATUS status;
1542         
1543         /* In parameters */
1544         
1545         if (DEBUGLEVEL >= 10)
1546                 NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2, &r);
1547         
1548         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETINFOPOLICY2, &r);
1549         
1550         if (!NT_STATUS_IS_OK(status)) {
1551                 return status;
1552         }
1553         
1554         if (DEBUGLEVEL >= 10)
1555                 NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, &r);
1556         
1557         if (NT_STATUS_IS_ERR(status)) {
1558                 return status;
1559         }
1560         
1561         /* Return variables */
1562         
1563         /* Return result */
1564         return r.out.result;
1565 }
1566
1567 NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
1568 {
1569         struct lsa_QueryTrustedDomainInfoByName r;
1570         NTSTATUS status;
1571         
1572         /* In parameters */
1573         r.in.handle = handle;
1574         r.in.trusted_domain = trusted_domain;
1575         r.in.level = level;
1576         
1577         if (DEBUGLEVEL >= 10)
1578                 NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
1579         
1580         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME, &r);
1581         
1582         if (!NT_STATUS_IS_OK(status)) {
1583                 return status;
1584         }
1585         
1586         if (DEBUGLEVEL >= 10)
1587                 NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, &r);
1588         
1589         if (NT_STATUS_IS_ERR(status)) {
1590                 return status;
1591         }
1592         
1593         /* Return variables */
1594         if (info && r.out.info) {
1595                 *info = *r.out.info;
1596         }
1597         
1598         /* Return result */
1599         return r.out.result;
1600 }
1601
1602 NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
1603 {
1604         struct lsa_SetTrustedDomainInfoByName r;
1605         NTSTATUS status;
1606         
1607         /* In parameters */
1608         r.in.handle = handle;
1609         r.in.trusted_domain = trusted_domain;
1610         r.in.level = level;
1611         r.in.info = info;
1612         
1613         if (DEBUGLEVEL >= 10)
1614                 NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
1615         
1616         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETTRUSTEDDOMAININFOBYNAME, &r);
1617         
1618         if (!NT_STATUS_IS_OK(status)) {
1619                 return status;
1620         }
1621         
1622         if (DEBUGLEVEL >= 10)
1623                 NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, &r);
1624         
1625         if (NT_STATUS_IS_ERR(status)) {
1626                 return status;
1627         }
1628         
1629         /* Return variables */
1630         
1631         /* Return result */
1632         return r.out.result;
1633 }
1634
1635 NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, struct lsa_DomainListEx *domains, uint32_t max_size)
1636 {
1637         struct lsa_EnumTrustedDomainsEx r;
1638         NTSTATUS status;
1639         
1640         /* In parameters */
1641         r.in.handle = handle;
1642         r.in.resume_handle = resume_handle;
1643         r.in.max_size = max_size;
1644         
1645         if (DEBUGLEVEL >= 10)
1646                 NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx, &r);
1647         
1648         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_ENUMTRUSTEDDOMAINSEX, &r);
1649         
1650         if (!NT_STATUS_IS_OK(status)) {
1651                 return status;
1652         }
1653         
1654         if (DEBUGLEVEL >= 10)
1655                 NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, &r);
1656         
1657         if (NT_STATUS_IS_ERR(status)) {
1658                 return status;
1659         }
1660         
1661         /* Return variables */
1662         *resume_handle = *r.out.resume_handle;
1663         *domains = *r.out.domains;
1664         
1665         /* Return result */
1666         return r.out.result;
1667 }
1668
1669 NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1670 {
1671         struct lsa_CreateTrustedDomainEx r;
1672         NTSTATUS status;
1673         
1674         /* In parameters */
1675         
1676         if (DEBUGLEVEL >= 10)
1677                 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &r);
1678         
1679         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREATETRUSTEDDOMAINEX, &r);
1680         
1681         if (!NT_STATUS_IS_OK(status)) {
1682                 return status;
1683         }
1684         
1685         if (DEBUGLEVEL >= 10)
1686                 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, &r);
1687         
1688         if (NT_STATUS_IS_ERR(status)) {
1689                 return status;
1690         }
1691         
1692         /* Return variables */
1693         
1694         /* Return result */
1695         return r.out.result;
1696 }
1697
1698 NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
1699 {
1700         struct lsa_CloseTrustedDomainEx r;
1701         NTSTATUS status;
1702         
1703         /* In parameters */
1704         r.in.handle = handle;
1705         
1706         if (DEBUGLEVEL >= 10)
1707                 NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx, &r);
1708         
1709         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CLOSETRUSTEDDOMAINEX, &r);
1710         
1711         if (!NT_STATUS_IS_OK(status)) {
1712                 return status;
1713         }
1714         
1715         if (DEBUGLEVEL >= 10)
1716                 NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, &r);
1717         
1718         if (NT_STATUS_IS_ERR(status)) {
1719                 return status;
1720         }
1721         
1722         /* Return variables */
1723         *handle = *r.out.handle;
1724         
1725         /* Return result */
1726         return r.out.result;
1727 }
1728
1729 NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info)
1730 {
1731         struct lsa_QueryDomainInformationPolicy r;
1732         NTSTATUS status;
1733         
1734         /* In parameters */
1735         r.in.handle = handle;
1736         r.in.level = level;
1737         
1738         if (DEBUGLEVEL >= 10)
1739                 NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &r);
1740         
1741         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_QUERYDOMAININFORMATIONPOLICY, &r);
1742         
1743         if (!NT_STATUS_IS_OK(status)) {
1744                 return status;
1745         }
1746         
1747         if (DEBUGLEVEL >= 10)
1748                 NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, &r);
1749         
1750         if (NT_STATUS_IS_ERR(status)) {
1751                 return status;
1752         }
1753         
1754         /* Return variables */
1755         if (info && r.out.info) {
1756                 *info = *r.out.info;
1757         }
1758         
1759         /* Return result */
1760         return r.out.result;
1761 }
1762
1763 NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info)
1764 {
1765         struct lsa_SetDomainInformationPolicy r;
1766         NTSTATUS status;
1767         
1768         /* In parameters */
1769         r.in.handle = handle;
1770         r.in.level = level;
1771         r.in.info = info;
1772         
1773         if (DEBUGLEVEL >= 10)
1774                 NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy, &r);
1775         
1776         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_SETDOMAININFORMATIONPOLICY, &r);
1777         
1778         if (!NT_STATUS_IS_OK(status)) {
1779                 return status;
1780         }
1781         
1782         if (DEBUGLEVEL >= 10)
1783                 NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, &r);
1784         
1785         if (NT_STATUS_IS_ERR(status)) {
1786                 return status;
1787         }
1788         
1789         /* Return variables */
1790         
1791         /* Return result */
1792         return r.out.result;
1793 }
1794
1795 NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *trustdom_handle)
1796 {
1797         struct lsa_OpenTrustedDomainByName r;
1798         NTSTATUS status;
1799         
1800         /* In parameters */
1801         r.in.handle = handle;
1802         r.in.name = name;
1803         r.in.access_mask = access_mask;
1804         
1805         if (DEBUGLEVEL >= 10)
1806                 NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &r);
1807         
1808         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_OPENTRUSTEDDOMAINBYNAME, &r);
1809         
1810         if (!NT_STATUS_IS_OK(status)) {
1811                 return status;
1812         }
1813         
1814         if (DEBUGLEVEL >= 10)
1815                 NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, &r);
1816         
1817         if (NT_STATUS_IS_ERR(status)) {
1818                 return status;
1819         }
1820         
1821         /* Return variables */
1822         *trustdom_handle = *r.out.trustdom_handle;
1823         
1824         /* Return result */
1825         return r.out.result;
1826 }
1827
1828 NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1829 {
1830         struct lsa_TestCall r;
1831         NTSTATUS status;
1832         
1833         /* In parameters */
1834         
1835         if (DEBUGLEVEL >= 10)
1836                 NDR_PRINT_IN_DEBUG(lsa_TestCall, &r);
1837         
1838         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_TESTCALL, &r);
1839         
1840         if (!NT_STATUS_IS_OK(status)) {
1841                 return status;
1842         }
1843         
1844         if (DEBUGLEVEL >= 10)
1845                 NDR_PRINT_OUT_DEBUG(lsa_TestCall, &r);
1846         
1847         if (NT_STATUS_IS_ERR(status)) {
1848                 return status;
1849         }
1850         
1851         /* Return variables */
1852         
1853         /* Return result */
1854         return r.out.result;
1855 }
1856
1857 NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
1858 {
1859         struct lsa_LookupSids2 r;
1860         NTSTATUS status;
1861         
1862         /* In parameters */
1863         r.in.handle = handle;
1864         r.in.sids = sids;
1865         r.in.names = names;
1866         r.in.level = level;
1867         r.in.count = count;
1868         r.in.unknown1 = unknown1;
1869         r.in.unknown2 = unknown2;
1870         
1871         if (DEBUGLEVEL >= 10)
1872                 NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r);
1873         
1874         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPSIDS2, &r);
1875         
1876         if (!NT_STATUS_IS_OK(status)) {
1877                 return status;
1878         }
1879         
1880         if (DEBUGLEVEL >= 10)
1881                 NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, &r);
1882         
1883         if (NT_STATUS_IS_ERR(status)) {
1884                 return status;
1885         }
1886         
1887         /* Return variables */
1888         if (domains && r.out.domains) {
1889                 *domains = *r.out.domains;
1890         }
1891         *names = *r.out.names;
1892         *count = *r.out.count;
1893         
1894         /* Return result */
1895         return r.out.result;
1896 }
1897
1898 NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray2 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
1899 {
1900         struct lsa_LookupNames2 r;
1901         NTSTATUS status;
1902         
1903         /* In parameters */
1904         r.in.handle = handle;
1905         r.in.num_names = num_names;
1906         r.in.names = names;
1907         r.in.sids = sids;
1908         r.in.level = level;
1909         r.in.count = count;
1910         r.in.unknown1 = unknown1;
1911         r.in.unknown2 = unknown2;
1912         
1913         if (DEBUGLEVEL >= 10)
1914                 NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r);
1915         
1916         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPNAMES2, &r);
1917         
1918         if (!NT_STATUS_IS_OK(status)) {
1919                 return status;
1920         }
1921         
1922         if (DEBUGLEVEL >= 10)
1923                 NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, &r);
1924         
1925         if (NT_STATUS_IS_ERR(status)) {
1926                 return status;
1927         }
1928         
1929         /* Return variables */
1930         if (domains && r.out.domains) {
1931                 *domains = *r.out.domains;
1932         }
1933         *sids = *r.out.sids;
1934         *count = *r.out.count;
1935         
1936         /* Return result */
1937         return r.out.result;
1938 }
1939
1940 NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1941 {
1942         struct lsa_CreateTrustedDomainEx2 r;
1943         NTSTATUS status;
1944         
1945         /* In parameters */
1946         
1947         if (DEBUGLEVEL >= 10)
1948                 NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &r);
1949         
1950         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREATETRUSTEDDOMAINEX2, &r);
1951         
1952         if (!NT_STATUS_IS_OK(status)) {
1953                 return status;
1954         }
1955         
1956         if (DEBUGLEVEL >= 10)
1957                 NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, &r);
1958         
1959         if (NT_STATUS_IS_ERR(status)) {
1960                 return status;
1961         }
1962         
1963         /* Return variables */
1964         
1965         /* Return result */
1966         return r.out.result;
1967 }
1968
1969 NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1970 {
1971         struct lsa_CREDRWRITE r;
1972         NTSTATUS status;
1973         
1974         /* In parameters */
1975         
1976         if (DEBUGLEVEL >= 10)
1977                 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE, &r);
1978         
1979         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRWRITE, &r);
1980         
1981         if (!NT_STATUS_IS_OK(status)) {
1982                 return status;
1983         }
1984         
1985         if (DEBUGLEVEL >= 10)
1986                 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, &r);
1987         
1988         if (NT_STATUS_IS_ERR(status)) {
1989                 return status;
1990         }
1991         
1992         /* Return variables */
1993         
1994         /* Return result */
1995         return r.out.result;
1996 }
1997
1998 NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1999 {
2000         struct lsa_CREDRREAD r;
2001         NTSTATUS status;
2002         
2003         /* In parameters */
2004         
2005         if (DEBUGLEVEL >= 10)
2006                 NDR_PRINT_IN_DEBUG(lsa_CREDRREAD, &r);
2007         
2008         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRREAD, &r);
2009         
2010         if (!NT_STATUS_IS_OK(status)) {
2011                 return status;
2012         }
2013         
2014         if (DEBUGLEVEL >= 10)
2015                 NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, &r);
2016         
2017         if (NT_STATUS_IS_ERR(status)) {
2018                 return status;
2019         }
2020         
2021         /* Return variables */
2022         
2023         /* Return result */
2024         return r.out.result;
2025 }
2026
2027 NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2028 {
2029         struct lsa_CREDRENUMERATE r;
2030         NTSTATUS status;
2031         
2032         /* In parameters */
2033         
2034         if (DEBUGLEVEL >= 10)
2035                 NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE, &r);
2036         
2037         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRENUMERATE, &r);
2038         
2039         if (!NT_STATUS_IS_OK(status)) {
2040                 return status;
2041         }
2042         
2043         if (DEBUGLEVEL >= 10)
2044                 NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, &r);
2045         
2046         if (NT_STATUS_IS_ERR(status)) {
2047                 return status;
2048         }
2049         
2050         /* Return variables */
2051         
2052         /* Return result */
2053         return r.out.result;
2054 }
2055
2056 NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2057 {
2058         struct lsa_CREDRWRITEDOMAINCREDENTIALS r;
2059         NTSTATUS status;
2060         
2061         /* In parameters */
2062         
2063         if (DEBUGLEVEL >= 10)
2064                 NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
2065         
2066         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRWRITEDOMAINCREDENTIALS, &r);
2067         
2068         if (!NT_STATUS_IS_OK(status)) {
2069                 return status;
2070         }
2071         
2072         if (DEBUGLEVEL >= 10)
2073                 NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r);
2074         
2075         if (NT_STATUS_IS_ERR(status)) {
2076                 return status;
2077         }
2078         
2079         /* Return variables */
2080         
2081         /* Return result */
2082         return r.out.result;
2083 }
2084
2085 NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2086 {
2087         struct lsa_CREDRREADDOMAINCREDENTIALS r;
2088         NTSTATUS status;
2089         
2090         /* In parameters */
2091         
2092         if (DEBUGLEVEL >= 10)
2093                 NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
2094         
2095         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRREADDOMAINCREDENTIALS, &r);
2096         
2097         if (!NT_STATUS_IS_OK(status)) {
2098                 return status;
2099         }
2100         
2101         if (DEBUGLEVEL >= 10)
2102                 NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r);
2103         
2104         if (NT_STATUS_IS_ERR(status)) {
2105                 return status;
2106         }
2107         
2108         /* Return variables */
2109         
2110         /* Return result */
2111         return r.out.result;
2112 }
2113
2114 NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2115 {
2116         struct lsa_CREDRDELETE r;
2117         NTSTATUS status;
2118         
2119         /* In parameters */
2120         
2121         if (DEBUGLEVEL >= 10)
2122                 NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE, &r);
2123         
2124         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRDELETE, &r);
2125         
2126         if (!NT_STATUS_IS_OK(status)) {
2127                 return status;
2128         }
2129         
2130         if (DEBUGLEVEL >= 10)
2131                 NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, &r);
2132         
2133         if (NT_STATUS_IS_ERR(status)) {
2134                 return status;
2135         }
2136         
2137         /* Return variables */
2138         
2139         /* Return result */
2140         return r.out.result;
2141 }
2142
2143 NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2144 {
2145         struct lsa_CREDRGETTARGETINFO r;
2146         NTSTATUS status;
2147         
2148         /* In parameters */
2149         
2150         if (DEBUGLEVEL >= 10)
2151                 NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO, &r);
2152         
2153         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRGETTARGETINFO, &r);
2154         
2155         if (!NT_STATUS_IS_OK(status)) {
2156                 return status;
2157         }
2158         
2159         if (DEBUGLEVEL >= 10)
2160                 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, &r);
2161         
2162         if (NT_STATUS_IS_ERR(status)) {
2163                 return status;
2164         }
2165         
2166         /* Return variables */
2167         
2168         /* Return result */
2169         return r.out.result;
2170 }
2171
2172 NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2173 {
2174         struct lsa_CREDRPROFILELOADED r;
2175         NTSTATUS status;
2176         
2177         /* In parameters */
2178         
2179         if (DEBUGLEVEL >= 10)
2180                 NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED, &r);
2181         
2182         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRPROFILELOADED, &r);
2183         
2184         if (!NT_STATUS_IS_OK(status)) {
2185                 return status;
2186         }
2187         
2188         if (DEBUGLEVEL >= 10)
2189                 NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, &r);
2190         
2191         if (NT_STATUS_IS_ERR(status)) {
2192                 return status;
2193         }
2194         
2195         /* Return variables */
2196         
2197         /* Return result */
2198         return r.out.result;
2199 }
2200
2201 NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
2202 {
2203         struct lsa_LookupNames3 r;
2204         NTSTATUS status;
2205         
2206         /* In parameters */
2207         r.in.handle = handle;
2208         r.in.num_names = num_names;
2209         r.in.names = names;
2210         r.in.sids = sids;
2211         r.in.level = level;
2212         r.in.count = count;
2213         r.in.unknown1 = unknown1;
2214         r.in.unknown2 = unknown2;
2215         
2216         if (DEBUGLEVEL >= 10)
2217                 NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r);
2218         
2219         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPNAMES3, &r);
2220         
2221         if (!NT_STATUS_IS_OK(status)) {
2222                 return status;
2223         }
2224         
2225         if (DEBUGLEVEL >= 10)
2226                 NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, &r);
2227         
2228         if (NT_STATUS_IS_ERR(status)) {
2229                 return status;
2230         }
2231         
2232         /* Return variables */
2233         if (domains && r.out.domains) {
2234                 *domains = *r.out.domains;
2235         }
2236         *sids = *r.out.sids;
2237         *count = *r.out.count;
2238         
2239         /* Return result */
2240         return r.out.result;
2241 }
2242
2243 NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2244 {
2245         struct lsa_CREDRGETSESSIONTYPES r;
2246         NTSTATUS status;
2247         
2248         /* In parameters */
2249         
2250         if (DEBUGLEVEL >= 10)
2251                 NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
2252         
2253         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRGETSESSIONTYPES, &r);
2254         
2255         if (!NT_STATUS_IS_OK(status)) {
2256                 return status;
2257         }
2258         
2259         if (DEBUGLEVEL >= 10)
2260                 NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, &r);
2261         
2262         if (NT_STATUS_IS_ERR(status)) {
2263                 return status;
2264         }
2265         
2266         /* Return variables */
2267         
2268         /* Return result */
2269         return r.out.result;
2270 }
2271
2272 NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2273 {
2274         struct lsa_LSARREGISTERAUDITEVENT r;
2275         NTSTATUS status;
2276         
2277         /* In parameters */
2278         
2279         if (DEBUGLEVEL >= 10)
2280                 NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
2281         
2282         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARREGISTERAUDITEVENT, &r);
2283         
2284         if (!NT_STATUS_IS_OK(status)) {
2285                 return status;
2286         }
2287         
2288         if (DEBUGLEVEL >= 10)
2289                 NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r);
2290         
2291         if (NT_STATUS_IS_ERR(status)) {
2292                 return status;
2293         }
2294         
2295         /* Return variables */
2296         
2297         /* Return result */
2298         return r.out.result;
2299 }
2300
2301 NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2302 {
2303         struct lsa_LSARGENAUDITEVENT r;
2304         NTSTATUS status;
2305         
2306         /* In parameters */
2307         
2308         if (DEBUGLEVEL >= 10)
2309                 NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT, &r);
2310         
2311         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARGENAUDITEVENT, &r);
2312         
2313         if (!NT_STATUS_IS_OK(status)) {
2314                 return status;
2315         }
2316         
2317         if (DEBUGLEVEL >= 10)
2318                 NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, &r);
2319         
2320         if (NT_STATUS_IS_ERR(status)) {
2321                 return status;
2322         }
2323         
2324         /* Return variables */
2325         
2326         /* Return result */
2327         return r.out.result;
2328 }
2329
2330 NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2331 {
2332         struct lsa_LSARUNREGISTERAUDITEVENT r;
2333         NTSTATUS status;
2334         
2335         /* In parameters */
2336         
2337         if (DEBUGLEVEL >= 10)
2338                 NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
2339         
2340         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARUNREGISTERAUDITEVENT, &r);
2341         
2342         if (!NT_STATUS_IS_OK(status)) {
2343                 return status;
2344         }
2345         
2346         if (DEBUGLEVEL >= 10)
2347                 NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r);
2348         
2349         if (NT_STATUS_IS_ERR(status)) {
2350                 return status;
2351         }
2352         
2353         /* Return variables */
2354         
2355         /* Return result */
2356         return r.out.result;
2357 }
2358
2359 NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2360 {
2361         struct lsa_LSARQUERYFORESTTRUSTINFORMATION r;
2362         NTSTATUS status;
2363         
2364         /* In parameters */
2365         
2366         if (DEBUGLEVEL >= 10)
2367                 NDR_PRINT_IN_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r);
2368         
2369         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, &r);
2370         
2371         if (!NT_STATUS_IS_OK(status)) {
2372                 return status;
2373         }
2374         
2375         if (DEBUGLEVEL >= 10)
2376                 NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r);
2377         
2378         if (NT_STATUS_IS_ERR(status)) {
2379                 return status;
2380         }
2381         
2382         /* Return variables */
2383         
2384         /* Return result */
2385         return r.out.result;
2386 }
2387
2388 NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2389 {
2390         struct lsa_LSARSETFORESTTRUSTINFORMATION r;
2391         NTSTATUS status;
2392         
2393         /* In parameters */
2394         
2395         if (DEBUGLEVEL >= 10)
2396                 NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
2397         
2398         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARSETFORESTTRUSTINFORMATION, &r);
2399         
2400         if (!NT_STATUS_IS_OK(status)) {
2401                 return status;
2402         }
2403         
2404         if (DEBUGLEVEL >= 10)
2405                 NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r);
2406         
2407         if (NT_STATUS_IS_ERR(status)) {
2408                 return status;
2409         }
2410         
2411         /* Return variables */
2412         
2413         /* Return result */
2414         return r.out.result;
2415 }
2416
2417 NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2418 {
2419         struct lsa_CREDRRENAME r;
2420         NTSTATUS status;
2421         
2422         /* In parameters */
2423         
2424         if (DEBUGLEVEL >= 10)
2425                 NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME, &r);
2426         
2427         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_CREDRRENAME, &r);
2428         
2429         if (!NT_STATUS_IS_OK(status)) {
2430                 return status;
2431         }
2432         
2433         if (DEBUGLEVEL >= 10)
2434                 NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, &r);
2435         
2436         if (NT_STATUS_IS_ERR(status)) {
2437                 return status;
2438         }
2439         
2440         /* Return variables */
2441         
2442         /* Return result */
2443         return r.out.result;
2444 }
2445
2446 NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
2447 {
2448         struct lsa_LookupSids3 r;
2449         NTSTATUS status;
2450         
2451         /* In parameters */
2452         r.in.sids = sids;
2453         r.in.names = names;
2454         r.in.level = level;
2455         r.in.count = count;
2456         r.in.unknown1 = unknown1;
2457         r.in.unknown2 = unknown2;
2458         
2459         if (DEBUGLEVEL >= 10)
2460                 NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r);
2461         
2462         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPSIDS3, &r);
2463         
2464         if (!NT_STATUS_IS_OK(status)) {
2465                 return status;
2466         }
2467         
2468         if (DEBUGLEVEL >= 10)
2469                 NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, &r);
2470         
2471         if (NT_STATUS_IS_ERR(status)) {
2472                 return status;
2473         }
2474         
2475         /* Return variables */
2476         if (domains && r.out.domains) {
2477                 *domains = *r.out.domains;
2478         }
2479         *names = *r.out.names;
2480         *count = *r.out.count;
2481         
2482         /* Return result */
2483         return r.out.result;
2484 }
2485
2486 NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
2487 {
2488         struct lsa_LookupNames4 r;
2489         NTSTATUS status;
2490         
2491         /* In parameters */
2492         r.in.num_names = num_names;
2493         r.in.names = names;
2494         r.in.sids = sids;
2495         r.in.level = level;
2496         r.in.count = count;
2497         r.in.unknown1 = unknown1;
2498         r.in.unknown2 = unknown2;
2499         
2500         if (DEBUGLEVEL >= 10)
2501                 NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r);
2502         
2503         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LOOKUPNAMES4, &r);
2504         
2505         if (!NT_STATUS_IS_OK(status)) {
2506                 return status;
2507         }
2508         
2509         if (DEBUGLEVEL >= 10)
2510                 NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, &r);
2511         
2512         if (NT_STATUS_IS_ERR(status)) {
2513                 return status;
2514         }
2515         
2516         /* Return variables */
2517         if (domains && r.out.domains) {
2518                 *domains = *r.out.domains;
2519         }
2520         *sids = *r.out.sids;
2521         *count = *r.out.count;
2522         
2523         /* Return result */
2524         return r.out.result;
2525 }
2526
2527 NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2528 {
2529         struct lsa_LSAROPENPOLICYSCE r;
2530         NTSTATUS status;
2531         
2532         /* In parameters */
2533         
2534         if (DEBUGLEVEL >= 10)
2535                 NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
2536         
2537         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSAROPENPOLICYSCE, &r);
2538         
2539         if (!NT_STATUS_IS_OK(status)) {
2540                 return status;
2541         }
2542         
2543         if (DEBUGLEVEL >= 10)
2544                 NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, &r);
2545         
2546         if (NT_STATUS_IS_ERR(status)) {
2547                 return status;
2548         }
2549         
2550         /* Return variables */
2551         
2552         /* Return result */
2553         return r.out.result;
2554 }
2555
2556 NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2557 {
2558         struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r;
2559         NTSTATUS status;
2560         
2561         /* In parameters */
2562         
2563         if (DEBUGLEVEL >= 10)
2564                 NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
2565         
2566         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
2567         
2568         if (!NT_STATUS_IS_OK(status)) {
2569                 return status;
2570         }
2571         
2572         if (DEBUGLEVEL >= 10)
2573                 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r);
2574         
2575         if (NT_STATUS_IS_ERR(status)) {
2576                 return status;
2577         }
2578         
2579         /* Return variables */
2580         
2581         /* Return result */
2582         return r.out.result;
2583 }
2584
2585 NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2586 {
2587         struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r;
2588         NTSTATUS status;
2589         
2590         /* In parameters */
2591         
2592         if (DEBUGLEVEL >= 10)
2593                 NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
2594         
2595         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
2596         
2597         if (!NT_STATUS_IS_OK(status)) {
2598                 return status;
2599         }
2600         
2601         if (DEBUGLEVEL >= 10)
2602                 NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r);
2603         
2604         if (NT_STATUS_IS_ERR(status)) {
2605                 return status;
2606         }
2607         
2608         /* Return variables */
2609         
2610         /* Return result */
2611         return r.out.result;
2612 }
2613
2614 NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
2615 {
2616         struct lsa_LSARADTREPORTSECURITYEVENT r;
2617         NTSTATUS status;
2618         
2619         /* In parameters */
2620         
2621         if (DEBUGLEVEL >= 10)
2622                 NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
2623         
2624         status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, &ndr_table_lsarpc, NDR_LSA_LSARADTREPORTSECURITYEVENT, &r);
2625         
2626         if (!NT_STATUS_IS_OK(status)) {
2627                 return status;
2628         }
2629         
2630         if (DEBUGLEVEL >= 10)
2631                 NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r);
2632         
2633         if (NT_STATUS_IS_ERR(status)) {
2634                 return status;
2635         }
2636         
2637         /* Return variables */
2638         
2639         /* Return result */
2640         return r.out.result;
2641 }
2642