66a75935664f34b642f8a0516f5ff8a6de102610
[samba.git] / source4 / librpc / idl / lsa.idl
1 #include "idl_types.h"
2
3 /*
4   lsa interface definition
5 */
6
7 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
8   version(0.0),
9   endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:"),
10   pointer_default(unique),
11   helpstring("Local Server Authentication(?)"),
12   depends(security)
13 ] interface lsarpc
14 {
15         /******************/
16         /* Function: 0x00 */
17         NTSTATUS lsa_Close (
18                 [in,out,ref]     policy_handle *handle
19                 );
20         
21
22         /******************/
23         /* Function: 0x01 */
24         NTSTATUS lsa_Delete (
25                 [in,ref]     policy_handle *handle
26                 );
27
28
29         /******************/
30         /* Function: 0x02 */
31
32         typedef struct {
33                 [value(2*strlen_m(r->string))] uint16 length;
34                 [value(r->length)] uint16 size;
35                 unistr_noterm *string;
36         } lsa_String;
37
38         typedef struct {
39                 uint32 low;
40                 uint32 high;
41         } lsa_LUID;
42         
43         typedef struct {
44                 lsa_String name;
45                 lsa_LUID luid;
46         } lsa_PrivEntry;
47
48         typedef struct {
49                 uint32 count;
50                 [size_is(count)] lsa_PrivEntry *privs;
51         } lsa_PrivArray;
52
53         NTSTATUS lsa_EnumPrivs (
54                 [in,ref]     policy_handle *handle,
55                 [in,out,ref] uint32 *resume_handle,
56                 [in]         uint32 max_count,
57                 [out,ref]    lsa_PrivArray *privs
58                 );
59
60         /******************/
61         /* Function: 0x03 */
62
63         NTSTATUS lsa_QuerySecurity (
64                 [in,ref]     policy_handle *handle,
65                 [in]         uint32 sec_info,
66                 [out]        sec_desc_buf *sdbuf
67                 );
68
69
70         /******************/
71         /* Function: 0x04 */
72         NTSTATUS lsa_SetSecObj ();
73
74
75         /******************/
76         /* Function: 0x05 */
77         NTSTATUS lsa_ChangePassword ();
78
79
80         /******************/
81         /* Function: 0x06 */
82         typedef struct {
83                 uint32  len; /* ignored */
84                 uint16  impersonation_level;
85                 uint8   context_mode;
86                 uint8   effective_only;
87         } lsa_QosInfo;
88         
89         typedef struct {
90                 uint32 len; /* ignored */
91                 uint8 *root_dir;
92                 unistr *object_name;
93                 uint32 attributes;
94                 security_descriptor *sec_desc;
95                 lsa_QosInfo *sec_qos;
96         } lsa_ObjectAttribute;
97
98         /* notice the screwup with the system_name - thats why MS created
99            OpenPolicy2 */
100         NTSTATUS lsa_OpenPolicy (
101                 [in]       uint16 *system_name,
102                 [in,ref]   lsa_ObjectAttribute *attr,
103                 [in]       uint32 access_mask,
104                 [out,ref]  policy_handle *handle
105                 );
106         
107
108
109         /******************/
110         /* Function: 0x07 */
111
112         typedef struct {
113                 uint32 percent_full;
114                 uint32 log_size;
115                 NTTIME retention_time;
116                 uint8  shutdown_in_progress;
117                 NTTIME time_to_shutdown;
118                 uint32 next_audit_record;
119                 uint32 unknown;
120         } lsa_AuditLogInfo;
121
122         typedef struct {
123                 uint32 auditing_mode;
124                 [size_is(count)] uint32 *settings;
125                 uint32 count;
126         } lsa_AuditEventsInfo;
127
128         typedef struct {
129                 lsa_String name;
130                 dom_sid2 *sid;
131         } lsa_DomainInfo;
132
133         typedef struct {
134                 lsa_String name;
135         } lsa_PDAccountInfo;
136
137         typedef struct {
138                 uint16 unknown; /* an midl padding bug? */
139                 uint16 role;
140         } lsa_ServerRole;
141
142         typedef struct {
143                 lsa_String source;
144                 lsa_String account;
145         } lsa_ReplicaSourceInfo;
146
147         typedef struct {
148                 uint32 paged_pool;
149                 uint32 non_paged_pool;
150                 uint32 min_wss;
151                 uint32 max_wss;
152                 uint32 pagefile;
153                 HYPER_T unknown;
154         } lsa_DefaultQuotaInfo;
155
156         typedef struct {
157                 HYPER_T modified_id;
158                 NTTIME db_create_time;
159         } lsa_ModificationInfo;
160
161         typedef struct {
162                 uint8 shutdown_on_full;
163         } lsa_AuditFullSetInfo;
164
165         typedef struct {
166                 uint16 unknown; /* an midl padding bug? */
167                 uint8 shutdown_on_full;
168                 uint8 log_is_full;
169         } lsa_AuditFullQueryInfo;
170
171         typedef struct {
172                 lsa_String name;
173                 lsa_String dns_domain;
174                 lsa_String dns_forest;
175                 GUID domain_guid;
176                 dom_sid2 *sid;
177         } lsa_DnsDomainInfo;
178
179         typedef enum {
180                 LSA_POLICY_INFO_AUDIT_LOG=1,
181                 LSA_POLICY_INFO_AUDIT_EVENTS=2,
182                 LSA_POLICY_INFO_DOMAIN=3,
183                 LSA_POLICY_INFO_PD=4,
184                 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
185                 LSA_POLICY_INFO_ROLE=6,
186                 LSA_POLICY_INFO_REPLICA=7,
187                 LSA_POLICY_INFO_QUOTA=8,
188                 LSA_POLICY_INFO_DB=9,
189                 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
190                 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
191                 LSA_POLICY_INFO_DNS=12
192         } lsaPolicyInfo;
193
194         typedef union {
195                 [case(LSA_POLICY_INFO_AUDIT_LOG)]        lsa_AuditLogInfo       audit_log;
196                 [case(LSA_POLICY_INFO_AUDIT_EVENTS)]     lsa_AuditEventsInfo    audit_events;
197                 [case(LSA_POLICY_INFO_DOMAIN)]           lsa_DomainInfo         domain;
198                 [case(LSA_POLICY_INFO_PD)]               lsa_PDAccountInfo      pd;
199                 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)]   lsa_DomainInfo         account_domain;
200                 [case(LSA_POLICY_INFO_ROLE)]             lsa_ServerRole         role;
201                 [case(LSA_POLICY_INFO_REPLICA)]          lsa_ReplicaSourceInfo  replica;
202                 [case(LSA_POLICY_INFO_QUOTA)]            lsa_DefaultQuotaInfo   quota;
203                 [case(LSA_POLICY_INFO_DB)]               lsa_ModificationInfo   db;
204                 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)]   lsa_AuditFullSetInfo   auditfullset;
205                 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
206                 [case(LSA_POLICY_INFO_DNS)]              lsa_DnsDomainInfo      dns;
207         } lsa_PolicyInformation;
208
209         NTSTATUS lsa_QueryInfoPolicy (
210                 [in,ref]                 policy_handle *handle,
211                 [in]                     uint16 level,
212                 [out,switch_is(level)]   lsa_PolicyInformation *info
213                 );
214
215         /******************/
216         /* Function:       0x08 */
217         NTSTATUS lsa_SetInfoPolicy ();
218
219         /******************/
220         /* Function:       0x09 */
221         NTSTATUS lsa_ClearAuditLog ();
222
223         /******************/
224         /* Function: 0x0a */
225         NTSTATUS lsa_CreateAccount (
226                 [in,ref]    policy_handle *handle,
227                 [in,ref]    dom_sid2 *sid,
228                 [in]        uint32 access_mask,
229                 [out,ref]   policy_handle *acct_handle
230                 );
231
232         /******************/
233         /* Function: 0x0b */
234         typedef struct {
235                 dom_sid2 *sid;
236         } lsa_SidPtr;
237         
238         typedef [public] struct {
239                 [range(0,1000)] uint32 num_sids;
240                 [size_is(num_sids)] lsa_SidPtr *sids;
241         } lsa_SidArray;
242
243         NTSTATUS lsa_EnumAccounts (
244                 [in,ref]     policy_handle *handle,
245                 [in,out,ref] uint32 *resume_handle,
246                 [in,range(0,1000)] uint32 num_entries,
247                 [out,ref]    lsa_SidArray *sids
248                 );
249
250
251         /*************************************************/
252         /* Function: 0x0c                                */
253
254         typedef struct {
255                 lsa_String name;
256                 dom_sid2  *sid;
257         } lsa_TrustInformation;
258
259         NTSTATUS lsa_CreateTrustedDomain(
260                 [in,ref]     policy_handle *handle,
261                 [in,ref]     lsa_TrustInformation *info,
262                 [in]         uint32 access_mask,
263                 [out,ref]    policy_handle *dom_handle
264                 );
265
266
267         /******************/
268         /* Function: 0x0d */
269
270         typedef struct {
271                 lsa_String name;
272                 dom_sid2 *sid;
273         } lsa_DomainInformation;
274
275         typedef struct {
276                 uint32 count;
277                 [size_is(count)] lsa_DomainInformation *domains;
278         } lsa_DomainList;
279
280         NTSTATUS lsa_EnumTrustDom (
281                 [in,ref]     policy_handle *handle,
282                 [in,out,ref] uint32 *resume_handle,
283                 [in,range(0,1000)] uint32 num_entries,
284                 [out,ref]    lsa_DomainList *domains
285                 );
286
287
288         /******************/
289         /* Function: 0x0e */
290
291         typedef struct {
292                 uint16 sid_type;
293                 uint32 rid;
294                 uint32 sid_index;
295         } lsa_TranslatedSid;
296
297         typedef struct {
298                 [range(0,1000)] uint32 count;
299                 [size_is(count)] lsa_TranslatedSid *sids;
300         } lsa_TransSidArray;
301
302         typedef struct {
303                 [range(0,1000)] uint32 count;
304                 [size_is(count)] lsa_TrustInformation *domains;
305                 uint32 max_count;
306         } lsa_RefDomainList;
307
308         NTSTATUS lsa_LookupNames (
309                 [in,ref]     policy_handle *handle,
310                 [in,range(0,1000)] uint32 num_names,
311                 [in,ref,size_is(num_names)]  lsa_String *names,
312                 [out]        lsa_RefDomainList *domains,
313                 [in,out,ref] lsa_TransSidArray *sids,
314                 [in]         uint16 level,
315                 [in,out,ref] uint32 *count
316                 );
317
318
319         /******************/
320         /* Function: 0x0f */
321
322         typedef struct {
323                 uint16 sid_type;
324                 lsa_String name;
325                 uint32 sid_index;
326         } lsa_TranslatedName;
327
328         typedef struct {
329                 [range(0,1000)] uint32 count;
330                 [size_is(count)] lsa_TranslatedName *names;
331         } lsa_TransNameArray;
332
333         NTSTATUS lsa_LookupSids (
334                 [in,ref]     policy_handle *handle,
335                 [in,ref]     lsa_SidArray *sids,
336                 [out]        lsa_RefDomainList *domains,
337                 [in,out,ref] lsa_TransNameArray *names,
338                 [in]         uint16 level,
339                 [in,out,ref] uint32 *count
340                 );
341
342
343         /* Function:        0x10 */
344         NTSTATUS lsa_CreateSecret(
345                 [in,ref]     policy_handle *handle,
346                 [in]         lsa_String       name,
347                 [in]         uint32         access_mask,
348                 [out,ref]    policy_handle *sec_handle
349                 );
350
351
352         /*****************************************/
353         /* Function:     0x11                    */
354         NTSTATUS lsa_OpenAccount (
355                 [in,ref]     policy_handle *handle,
356                 [in,ref]     dom_sid2 *sid,
357                 [in]         uint32 access_mask,
358                 [out,ref]    policy_handle *acct_handle
359                 );
360
361
362         /****************************************/
363         /* Function:    0x12                    */
364
365         typedef struct {
366                 lsa_LUID luid;
367                 uint32 attribute;
368         } lsa_LUIDAttribute;
369         
370         typedef struct {
371                 [range(0,1000)] uint32 count;
372                 uint32 unknown;
373                 [size_is(count)] lsa_LUIDAttribute set[*];
374         } lsa_PrivilegeSet;
375         
376         NTSTATUS lsa_EnumPrivsAccount (
377                 [in,ref]     policy_handle *handle,
378                 [out]        lsa_PrivilegeSet *privs
379                 );
380
381
382         /****************************************/
383         /* Function:            0x13 */
384         NTSTATUS lsa_AddPrivilegesToAccount(
385                 [in,ref]     policy_handle *handle,
386                 [in,ref]     lsa_PrivilegeSet *privs
387                 );
388         
389
390         /****************************************/
391         /* Function:         0x14 */
392         NTSTATUS lsa_RemovePrivilegesFromAccount(
393                 [in,ref]     policy_handle *handle,
394                 [in]         uint8 remove_all,
395                 [in]         lsa_PrivilegeSet *privs
396                 );
397
398         /* Function:           0x15 */
399         NTSTATUS lsa_GetQuotasForAccount();
400         
401         /* Function:           0x16 */
402         NTSTATUS lsa_SetQuotasForAccount();
403         
404         /* Function:    0x17 */
405         NTSTATUS lsa_GetSystemAccessAccount();
406         /* Function:    0x18 */
407         NTSTATUS lsa_SetSystemAccessAccount();
408
409         /* Function:        0x19 */
410         NTSTATUS lsa_OpenTrustedDomain(
411                 [in,ref]     policy_handle *handle,
412                 [in,ref]     dom_sid2      *sid,
413                 [in]         uint32         access_mask,
414                 [out,ref]    policy_handle *trustdom_handle
415                 );
416
417         typedef [flag(NDR_PAHEX)] struct {
418                 uint32 length;
419                 uint32 size;
420                 [size_is(size),length_is(length)] uint8 *data;
421         } lsa_DATA_BUF;
422
423         typedef [flag(NDR_PAHEX)] struct {
424                 uint32 size;
425                 [size_is(size)] uint8 *data;
426         } lsa_DATA_BUF2;
427
428         typedef enum {
429                 LSA_TRUSTED_DOMAIN_INFO_NAME=1,
430                 LSA_TRUSTED_DOMAIN_INFO_2=2,
431                 LSA_TRUSTED_DOMAIN_INFO_FLAGS=3,
432                 LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
433                 LSA_TRUSTED_DOMAIN_INFO_5=5,
434                 LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
435                 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
436                 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
437                 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
438         } lsa_TrustDomInfoEnum;
439
440         typedef struct {
441                 lsa_String     netbios_name;
442         } lsa_TrustDomainInfoName;
443
444         typedef struct {
445                 uint32        flags;
446         } lsa_TrustDomainInfoFlags;
447
448         typedef struct {
449                 lsa_DATA_BUF *password;
450                 lsa_DATA_BUF *old_password;
451         } lsa_TrustDomainInfoPassword;
452
453         typedef struct {
454                 lsa_String     netbios_name;
455                 dom_sid2    *sid;
456         } lsa_TrustDomainInfo5;
457
458         typedef struct {
459                 lsa_String     domain_name;
460                 lsa_String     netbios_name;
461                 dom_sid2    *sid;
462                 uint32       unknown1;
463                 uint32       unknown2;
464                 uint32       unknown3;
465         } lsa_TrustDomainInfoInfoEx;
466
467         typedef struct {
468                 HYPER_T      unknown1;
469                 uint32       unknown2;
470                 lsa_DATA_BUF2 data;
471         } lsa_TrustDomainInfoBuffer;
472
473         typedef struct {
474                 uint32       unknown1;
475                 lsa_TrustDomainInfoBuffer *buff1;
476                 lsa_TrustDomainInfoBuffer *buff2;
477                 uint32       unknown2;
478                 lsa_TrustDomainInfoBuffer *buff3;
479                 lsa_TrustDomainInfoBuffer *buff4;
480         } lsa_TrustDomainInfoAuthInfo;
481
482         typedef struct {
483                 lsa_TrustDomainInfoInfoEx info_ex;
484                 lsa_TrustDomainInfoFlags flags;
485                 lsa_TrustDomainInfoAuthInfo  auth_info;
486         } lsa_TrustDomainInfoFullInfo;
487
488         typedef struct {
489                 lsa_TrustDomainInfoInfoEx info_ex;
490                 lsa_DATA_BUF2        data1;
491         } lsa_TrustDomainInfo11;
492
493         typedef struct {
494                 lsa_TrustDomainInfoInfoEx info_ex;
495                 lsa_DATA_BUF2        data1;
496                 lsa_TrustDomainInfoFlags flags;
497                 lsa_TrustDomainInfoAuthInfo  auth_info;
498         } lsa_TrustDomainInfoInfoAll;
499
500         typedef union {
501                 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]      lsa_TrustDomainInfoName      name;
502                 [case(LSA_TRUSTED_DOMAIN_INFO_FLAGS)]     lsa_TrustDomainInfoFlags     flags;
503                 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]  lsa_TrustDomainInfoPassword  password;
504                 [case(LSA_TRUSTED_DOMAIN_INFO_5)]         lsa_TrustDomainInfo5         info5;
505                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]   lsa_TrustDomainInfoInfoEx    info_ex;
506                 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo  auth_info;
507                 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo  full_info;
508                 [case(11)]    lsa_TrustDomainInfo11 info11;
509                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)]  lsa_TrustDomainInfoInfoAll   info_all;
510         } lsa_TrustedDomainInfo;
511
512         /* Function:       0x1a */
513         NTSTATUS lsa_QueryTrustedDomainInfo(
514                 [in,ref]     policy_handle *trustdom_handle,
515                 [in]         uint16         level, 
516                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
517                 );
518
519         /* Function:     0x1b */
520         NTSTATUS lsa_SetInformationTrustedDomain();
521
522         /* Function:          0x1c */
523         NTSTATUS lsa_OpenSecret(
524                 [in,ref]     policy_handle *handle,
525                 [in]         lsa_String       name,
526                 [in]         uint32         access_mask,
527                 [out,ref]    policy_handle *sec_handle
528                 );
529
530         /* Function:           0x1d */
531
532         NTSTATUS lsa_SetSecret(
533                 [in,ref]     policy_handle *handle,
534                 [in]         lsa_DATA_BUF     *new_val,
535                 [in]         lsa_DATA_BUF     *old_val
536                 );
537
538         typedef struct {
539                 lsa_DATA_BUF *buf;
540         } lsa_DATA_BUF_PTR;
541
542         /* Function:         0x1e */
543         NTSTATUS lsa_QuerySecret (
544                 [in,ref]     policy_handle *handle,
545                 [in,out]     lsa_DATA_BUF_PTR  *new_val,
546                 [in,out]     NTTIME            *new_mtime,
547                 [in,out]     lsa_DATA_BUF_PTR  *old_val,
548                 [in,out]     NTTIME            *old_mtime
549                 );
550
551         /* Function:     0x1f */
552         NTSTATUS lsa_LookupPrivValue(
553                 [in,ref]     policy_handle *handle,
554                 [in,ref]     lsa_String *name,
555                 [out,ref]    lsa_LUID *luid
556                 );
557
558
559         /* Function:      0x20 */
560         NTSTATUS lsa_LookupPrivName (
561                 [in,ref]     policy_handle *handle,
562                 [in,ref]     lsa_LUID *luid,
563                 [out]        lsa_String *name
564                 );
565
566
567         /*******************/
568         /* Function:  0x21 */
569         NTSTATUS lsa_LookupPrivDisplayName (
570                 [in,ref]     policy_handle *handle,
571                 [in,ref]     lsa_String *name,
572                 [out]        lsa_String *disp_name,
573                 /* see http://www.microsoft.com/globaldev/nlsweb/ for
574                    language definitions */
575                 [in,out,ref] uint16 *language_id,
576                 [in]         uint16 unknown
577                 );
578
579         /* Function:        0x22 */
580         NTSTATUS lsa_DeleteObject();
581
582         
583         /*******************/
584         /* Function:      0x23 */
585         NTSTATUS lsa_EnumAccountsWithUserRight (
586                 [in,ref]     policy_handle *handle,
587                 [in]         lsa_String *name,
588                 [out,ref]    lsa_SidArray *sids
589                 );
590
591         /* Function:      0x24 */
592         typedef struct {
593                 unistr *name;
594         } lsa_RightAttribute;
595         
596         typedef struct {
597                 uint32 count;
598                 [size_is(count)] lsa_String *names;
599         } lsa_RightSet;
600         
601         NTSTATUS lsa_EnumAccountRights (
602                 [in,ref]     policy_handle *handle,
603                 [in,ref]     dom_sid2 *sid,
604                 [out,ref]    lsa_RightSet *rights
605                 );
606
607
608         /**********************/
609         /* Function:       0x25 */
610         NTSTATUS lsa_AddAccountRights (
611                 [in,ref]     policy_handle *handle,
612                 [in,ref]     dom_sid2 *sid,
613                 [in,ref]     lsa_RightSet *rights
614                 );
615         
616         /**********************/
617         /* Function:       0x26 */
618         NTSTATUS lsa_RemoveAccountRights (
619                 [in,ref]     policy_handle *handle,
620                 [in,ref]     dom_sid2 *sid,
621                 [in]         uint32 unknown,
622                 [in,ref]     lsa_RightSet *rights
623                 );
624
625         /* Function:   0x27 */
626         NTSTATUS lsa_QueryTrustedDomainInfoBySid(
627                 [in,ref]               policy_handle         *handle,
628                 [in,ref]               dom_sid2              *dom_sid,
629                 [in]                   uint16                 level, 
630                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
631         );
632
633         /* Function:     0x28 */
634         NTSTATUS lsa_SetTrustDomainInfo();
635         /* Function:      0x29 */
636         NTSTATUS lsa_DeleteTrustDomain();
637         /* Function:       0x2a */
638         NTSTATUS lsa_StorePrivateData();
639         /* Function:        0x2b */
640         NTSTATUS lsa_RetrievePrivateData();
641
642
643         /**********************/
644         /* Function:     0x2c */
645         NTSTATUS lsa_OpenPolicy2 (
646                 [in]      unistr *system_name,
647                 [in,ref]  lsa_ObjectAttribute *attr,
648                 [in]      uint32 access_mask,
649                 [out,ref] policy_handle *handle
650                 );
651
652         /**********************/
653         /* Function:     0x2d */
654         typedef struct {
655                 lsa_String *string;
656         } lsa_StringPointer;
657
658         NTSTATUS lsa_GetUserName(
659                 [in] unistr *system_name,
660                 [in,out] lsa_String *account_name,
661                 [in,out] lsa_StringPointer *authority_name
662                 );
663
664         /**********************/
665         /* Function:          0x2e */
666
667         NTSTATUS lsa_QueryInfoPolicy2(
668                 [in,ref]                 policy_handle *handle,
669                 [in]                     uint16 level,
670                 [out,switch_is(level)]   lsa_PolicyInformation *info
671                 );
672
673         /* Function 0x2f */
674         NTSTATUS lsa_SetInfoPolicy2();
675
676         /**********************/
677         /* Function 0x30 */
678         NTSTATUS lsa_QueryTrustedDomainInfoByName(
679                 [in,ref]               policy_handle         *handle,
680                 [in]                   lsa_String             trusted_domain,
681                 [in]                   uint16                 level, 
682                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
683                 );
684
685         /* Function 0x31 */
686         NTSTATUS lsa_SetTrustedDomainInfoByName();
687
688         /* Function 0x32 */
689         NTSTATUS lsa_EnumTrustedDomainsEx();
690
691         /* Function 0x33 */
692         NTSTATUS lsa_CreateTrustedDomainEx();
693
694         /* Function 0x34 */
695         NTSTATUS lsa_CloseTrustedDomainEx();
696
697         /* Function 0x35 */
698         NTSTATUS lsa_QueryDomainInformationPolicy();
699
700         /* Function 0x36 */
701         NTSTATUS lsa_SetDomInfoPolicy();
702
703         /**********************/
704         /* Function 0x37 */
705         NTSTATUS lsa_OpenTrustedDomainByName(
706                 [in,ref]     policy_handle *handle,
707                 [in]         lsa_String     name,
708                 [in]         uint32         access_mask,
709                 [out,ref]    policy_handle *trustdom_handle
710                 );
711
712         /* Function 0x38 */
713         NTSTATUS lsa_TestCall();
714
715         /**********************/
716         /* Function 0x39 */
717
718         typedef struct {
719                 uint16 sid_type;
720                 lsa_String name;
721                 uint32 sid_index;
722                 uint32 unknown;
723         } lsa_TranslatedName2;
724
725         typedef struct {
726                 [range(0,1000)] uint32 count;
727                 [size_is(count)] lsa_TranslatedName2 *names;
728         } lsa_TransNameArray2;
729
730         NTSTATUS lsa_LookupSids2(
731                 [in,ref]     policy_handle *handle,
732                 [in,ref]     lsa_SidArray *sids,
733                 [out]        lsa_RefDomainList *domains,
734                 [in,out,ref] lsa_TransNameArray2 *names,
735                 [in]         uint16 level,
736                 [in,out,ref] uint32 *count,
737                 [in]         uint32 unknown1,
738                 [in]         uint32 unknown2
739                 );
740
741         /**********************/
742         /* Function 0x3a */
743
744         typedef struct {
745                 uint16 sid_type;
746                 uint32 rid;
747                 uint32 sid_index;
748                 uint32 unknown;
749         } lsa_TranslatedSid2;
750
751         typedef struct {
752                 [range(0,1000)] uint32 count;
753                 [size_is(count)] lsa_TranslatedSid2 *sids;
754         } lsa_TransSidArray2;
755
756         NTSTATUS lsa_LookupNames2 (
757                 [in,ref]     policy_handle *handle,
758                 [in,range(0,1000)] uint32 num_names,
759                 [in,ref,size_is(num_names)]  lsa_String *names,
760                 [out]        lsa_RefDomainList *domains,
761                 [in,out,ref] lsa_TransSidArray2 *sids,
762                 [in]         uint16 level,
763                 [in,out,ref] uint32 *count,
764                 [in]         uint32 unknown1,
765                 [in]         uint32 unknown2
766                 );
767
768         /* Function 0x3b */
769         NTSTATUS lsa_CreateTrustedDomainEx2();
770
771         /* Function 0x3c */
772         NTSTATUS lsa_CREDRWRITE();
773
774         /* Function 0x3d */
775         NTSTATUS lsa_CREDRREAD();
776
777         /* Function 0x3e */
778         NTSTATUS lsa_CREDRENUMERATE();
779
780         /* Function 0x3f */
781         NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
782
783         /* Function 0x40 */
784         NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
785
786         /* Function 0x41 */
787         NTSTATUS lsa_CREDRDELETE();
788
789         /* Function 0x42 */
790         NTSTATUS lsa_CREDRGETTARGETINFO();
791
792         /* Function 0x43 */
793         NTSTATUS lsa_CREDRPROFILELOADED();
794
795         /**********************/
796         /* Function 0x44 */
797         typedef struct {
798                 uint16 sid_type;
799                 dom_sid *sid;
800                 uint32 sid_index;
801                 uint32 unknown;
802         } lsa_TranslatedSid3;
803
804         typedef struct {
805                 [range(0,1000)] uint32 count;
806                 [size_is(count)] lsa_TranslatedSid3 *sids;
807         } lsa_TransSidArray3;
808
809         NTSTATUS lsa_LookupNames3 (
810                 [in,ref]     policy_handle *handle,
811                 [in,range(0,1000)] uint32 num_names,
812                 [in,ref,size_is(num_names)]  lsa_String *names,
813                 [out]        lsa_RefDomainList *domains,
814                 [in,out,ref] lsa_TransSidArray3 *sids,
815                 [in]         uint16 level,
816                 [in,out,ref] uint32 *count,
817                 [in]         uint32 unknown1,
818                 [in]         uint32 unknown2
819                 );
820
821         /* Function 0x45 */
822         NTSTATUS lsa_CREDRGETSESSIONTYPES();
823
824         /* Function 0x46 */
825         NTSTATUS lsa_LSARREGISTERAUDITEVENT();
826
827         /* Function 0x47 */
828         NTSTATUS lsa_LSARGENAUDITEVENT();
829
830         /* Function 0x48 */
831         NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
832
833         /* Function 0x49 */
834         NTSTATUS lsa_LSARQUERYFORESTTRUSTINFORMATION();
835
836         /* Function 0x4a */
837         NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
838
839         /* Function 0x4b */
840         NTSTATUS lsa_CREDRRENAME();
841
842         /*****************/
843         /* Function 0x4c */
844
845         NTSTATUS lsa_LookupSids3(
846                 [in,ref]     lsa_SidArray *sids,
847                 [out]        lsa_RefDomainList *domains,
848                 [in,out,ref] lsa_TransNameArray2 *names,
849                 [in]         uint16 level,
850                 [in,out,ref] uint32 *count,
851                 [in]         uint32 unknown1,
852                 [in]         uint32 unknown2
853                 );
854
855         /* Function 0x4d */
856         NTSTATUS lsa_LSARLOOKUPNAMES4();
857
858         /* Function 0x4e */
859         NTSTATUS lsa_LSAROPENPOLICYSCE();
860
861         /* Function 0x4f */
862         NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
863
864         /* Function 0x50 */
865         NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
866
867         /* Function 0x51 */
868         NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();
869
870 }