r4703: Add support for EnumTrustDomain, and expand the testsuite.
[samba.git] / source / 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:", "ncalrpc:"),
10   pointer_default(unique),
11   helpstring("Local Security Authority"),
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         /* NOTE: This only returns accounts that have at least
234            one privilege set 
235         */
236         /* Function: 0x0b */
237         typedef struct {
238                 dom_sid2 *sid;
239         } lsa_SidPtr;
240         
241         typedef [public] struct {
242                 [range(0,1000)] uint32 num_sids;
243                 [size_is(num_sids)] lsa_SidPtr *sids;
244         } lsa_SidArray;
245
246         NTSTATUS lsa_EnumAccounts (
247                 [in,ref]     policy_handle *handle,
248                 [in,out,ref] uint32 *resume_handle,
249                 [in,range(0,8192)] uint32 num_entries,
250                 [out,ref]    lsa_SidArray *sids
251                 );
252
253
254         /*************************************************/
255         /* Function: 0x0c                                */
256
257         typedef struct {
258                 lsa_String name;
259                 dom_sid2  *sid;
260         } lsa_TrustInformation;
261
262         NTSTATUS lsa_CreateTrustedDomain(
263                 [in,ref]     policy_handle *handle,
264                 [in,ref]     lsa_TrustInformation *info,
265                 [in]         uint32 access_mask,
266                 [out,ref]    policy_handle *trustdom_handle
267                 );
268
269
270         /******************/
271         /* Function: 0x0d */
272
273         /* w2k3 treats max_size as max_domains*60       */
274         const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
275
276         typedef struct {
277                 lsa_String name;
278                 dom_sid2 *sid;
279         } lsa_DomainInformation;
280
281         typedef struct {
282                 uint32 count;
283                 [size_is(count)] lsa_DomainInformation *domains;
284         } lsa_DomainList;
285
286         NTSTATUS lsa_EnumTrustDom (
287                 [in,ref]     policy_handle *handle,
288                 [in,out,ref] uint32 *resume_handle,
289                 [in,range(0,1000)] uint32 max_size,
290                 [out,ref]    lsa_DomainList *domains
291                 );
292
293
294         /******************/
295         /* Function: 0x0e */
296         typedef enum {
297                 SID_NAME_USE_NONE = 0,/* NOTUSED */
298                 SID_NAME_USER    = 1, /* user */
299                 SID_NAME_DOM_GRP = 2, /* domain group */
300                 SID_NAME_DOMAIN  = 3, /* domain: don't know what this is */
301                 SID_NAME_ALIAS   = 4, /* local group */
302                 SID_NAME_WKN_GRP = 5, /* well-known group */
303                 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
304                 SID_NAME_INVALID = 7, /* invalid account */
305                 SID_NAME_UNKNOWN = 8  /* oops. */
306         } lsa_SidType;
307
308         typedef struct {
309                 lsa_SidType sid_type;
310                 uint32 rid;
311                 uint32 sid_index;
312         } lsa_TranslatedSid;
313
314         typedef struct {
315                 [range(0,1000)] uint32 count;
316                 [size_is(count)] lsa_TranslatedSid *sids;
317         } lsa_TransSidArray;
318
319         typedef struct {
320                 [range(0,1000)] uint32 count;
321                 [size_is(count)] lsa_TrustInformation *domains;
322                 uint32 max_count;
323         } lsa_RefDomainList;
324
325         NTSTATUS lsa_LookupNames (
326                 [in,ref]     policy_handle *handle,
327                 [in,range(0,1000)] uint32 num_names,
328                 [in,ref,size_is(num_names)]  lsa_String *names,
329                 [out]        lsa_RefDomainList *domains,
330                 [in,out,ref] lsa_TransSidArray *sids,
331                 [in]         uint16 level,
332                 [in,out,ref] uint32 *count
333                 );
334
335
336         /******************/
337         /* Function: 0x0f */
338
339         typedef struct {
340                 lsa_SidType sid_type;
341                 lsa_String name;
342                 uint32 sid_index;
343         } lsa_TranslatedName;
344
345         typedef struct {
346                 [range(0,1000)] uint32 count;
347                 [size_is(count)] lsa_TranslatedName *names;
348         } lsa_TransNameArray;
349
350         NTSTATUS lsa_LookupSids (
351                 [in,ref]     policy_handle *handle,
352                 [in,ref]     lsa_SidArray *sids,
353                 [out]        lsa_RefDomainList *domains,
354                 [in,out,ref] lsa_TransNameArray *names,
355                 [in]         uint16 level,
356                 [in,out,ref] uint32 *count
357                 );
358
359
360         /* Function:        0x10 */
361         NTSTATUS lsa_CreateSecret(
362                 [in,ref]     policy_handle *handle,
363                 [in]         lsa_String       name,
364                 [in]         uint32         access_mask,
365                 [out,ref]    policy_handle *sec_handle
366                 );
367
368
369         /*****************************************/
370         /* Function:     0x11                    */
371         NTSTATUS lsa_OpenAccount (
372                 [in,ref]     policy_handle *handle,
373                 [in,ref]     dom_sid2 *sid,
374                 [in]         uint32 access_mask,
375                 [out,ref]    policy_handle *acct_handle
376                 );
377
378
379         /****************************************/
380         /* Function:    0x12                    */
381
382         typedef struct {
383                 lsa_LUID luid;
384                 uint32 attribute;
385         } lsa_LUIDAttribute;
386         
387         typedef struct {
388                 [range(0,1000)] uint32 count;
389                 uint32 unknown;
390                 [size_is(count)] lsa_LUIDAttribute set[*];
391         } lsa_PrivilegeSet;
392         
393         NTSTATUS lsa_EnumPrivsAccount (
394                 [in,ref]     policy_handle *handle,
395                 [out]        lsa_PrivilegeSet *privs
396                 );
397
398
399         /****************************************/
400         /* Function:            0x13 */
401         NTSTATUS lsa_AddPrivilegesToAccount(
402                 [in,ref]     policy_handle *handle,
403                 [in,ref]     lsa_PrivilegeSet *privs
404                 );
405         
406
407         /****************************************/
408         /* Function:         0x14 */
409         NTSTATUS lsa_RemovePrivilegesFromAccount(
410                 [in,ref]     policy_handle *handle,
411                 [in]         uint8 remove_all,
412                 [in]         lsa_PrivilegeSet *privs
413                 );
414
415         /* Function:           0x15 */
416         NTSTATUS lsa_GetQuotasForAccount();
417         
418         /* Function:           0x16 */
419         NTSTATUS lsa_SetQuotasForAccount();
420         
421         /* Function:    0x17 */
422         NTSTATUS lsa_GetSystemAccessAccount();
423         /* Function:    0x18 */
424         NTSTATUS lsa_SetSystemAccessAccount();
425
426         /* Function:        0x19 */
427         NTSTATUS lsa_OpenTrustedDomain(
428                 [in,ref]     policy_handle *handle,
429                 [in,ref]     dom_sid2      *sid,
430                 [in]         uint32         access_mask,
431                 [out,ref]    policy_handle *trustdom_handle
432                 );
433
434         typedef [flag(NDR_PAHEX)] struct {
435                 uint32 length;
436                 uint32 size;
437                 [size_is(size),length_is(length)] uint8 *data;
438         } lsa_DATA_BUF;
439
440         typedef [flag(NDR_PAHEX)] struct {
441                 uint32 size;
442                 [size_is(size)] uint8 *data;
443         } lsa_DATA_BUF2;
444
445         typedef enum {
446                 LSA_TRUSTED_DOMAIN_INFO_NAME=1,
447                 LSA_TRUSTED_DOMAIN_INFO_2=2,
448                 LSA_TRUSTED_DOMAIN_INFO_FLAGS=3,
449                 LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
450                 LSA_TRUSTED_DOMAIN_INFO_5=5,
451                 LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
452                 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
453                 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
454                 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
455         } lsa_TrustDomInfoEnum;
456
457         typedef struct {
458                 lsa_String     netbios_name;
459         } lsa_TrustDomainInfoName;
460
461         typedef struct {
462                 uint32        flags;
463         } lsa_TrustDomainInfoFlags;
464
465         typedef struct {
466                 lsa_DATA_BUF *password;
467                 lsa_DATA_BUF *old_password;
468         } lsa_TrustDomainInfoPassword;
469
470         typedef struct {
471                 lsa_String     netbios_name;
472                 dom_sid2    *sid;
473         } lsa_TrustDomainInfo5;
474
475         typedef struct {
476                 lsa_String     domain_name;
477                 lsa_String     netbios_name;
478                 dom_sid2    *sid;
479                 uint32       unknown1;
480                 uint32       unknown2;
481                 uint32       unknown3;
482         } lsa_TrustDomainInfoInfoEx;
483
484         typedef struct {
485                 HYPER_T      unknown1;
486                 uint32       unknown2;
487                 lsa_DATA_BUF2 data;
488         } lsa_TrustDomainInfoBuffer;
489
490         typedef struct {
491                 uint32       unknown1;
492                 lsa_TrustDomainInfoBuffer *buff1;
493                 lsa_TrustDomainInfoBuffer *buff2;
494                 uint32       unknown2;
495                 lsa_TrustDomainInfoBuffer *buff3;
496                 lsa_TrustDomainInfoBuffer *buff4;
497         } lsa_TrustDomainInfoAuthInfo;
498
499         typedef struct {
500                 lsa_TrustDomainInfoInfoEx info_ex;
501                 lsa_TrustDomainInfoFlags flags;
502                 lsa_TrustDomainInfoAuthInfo  auth_info;
503         } lsa_TrustDomainInfoFullInfo;
504
505         typedef struct {
506                 lsa_TrustDomainInfoInfoEx info_ex;
507                 lsa_DATA_BUF2        data1;
508         } lsa_TrustDomainInfo11;
509
510         typedef struct {
511                 lsa_TrustDomainInfoInfoEx info_ex;
512                 lsa_DATA_BUF2        data1;
513                 lsa_TrustDomainInfoFlags flags;
514                 lsa_TrustDomainInfoAuthInfo  auth_info;
515         } lsa_TrustDomainInfoInfoAll;
516
517         typedef union {
518                 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]      lsa_TrustDomainInfoName      name;
519                 [case(LSA_TRUSTED_DOMAIN_INFO_FLAGS)]     lsa_TrustDomainInfoFlags     flags;
520                 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]  lsa_TrustDomainInfoPassword  password;
521                 [case(LSA_TRUSTED_DOMAIN_INFO_5)]         lsa_TrustDomainInfo5         info5;
522                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]   lsa_TrustDomainInfoInfoEx    info_ex;
523                 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo  auth_info;
524                 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo  full_info;
525                 [case(11)]    lsa_TrustDomainInfo11 info11;
526                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)]  lsa_TrustDomainInfoInfoAll   info_all;
527         } lsa_TrustedDomainInfo;
528
529         /* Function:       0x1a */
530         NTSTATUS lsa_QueryTrustedDomainInfo(
531                 [in,ref]     policy_handle *trustdom_handle,
532                 [in]         uint16         level, 
533                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
534                 );
535
536         /* Function:     0x1b */
537         NTSTATUS lsa_SetInformationTrustedDomain();
538
539         /* Function:          0x1c */
540         NTSTATUS lsa_OpenSecret(
541                 [in,ref]     policy_handle    *handle,
542                 [in]         lsa_String        name,
543                 [in]         uint32            access_mask,
544                 [out,ref]    policy_handle    *sec_handle
545                 );
546
547         /* Function:           0x1d */
548
549         NTSTATUS lsa_SetSecret(
550                 [in,ref]     policy_handle    *sec_handle,
551                 [in]         lsa_DATA_BUF     *new_val,
552                 [in]         lsa_DATA_BUF     *old_val
553                 );
554
555         typedef struct {
556                 lsa_DATA_BUF *buf;
557         } lsa_DATA_BUF_PTR;
558
559         /* Function:         0x1e */
560         NTSTATUS lsa_QuerySecret (
561                 [in,ref]     policy_handle     *sec_handle,
562                 [in,out]     lsa_DATA_BUF_PTR  *new_val,
563                 [in,out]     NTTIME_hyper      *new_mtime,
564                 [in,out]     lsa_DATA_BUF_PTR  *old_val,
565                 [in,out]     NTTIME_hyper      *old_mtime
566                 );
567
568         /* Function:     0x1f */
569         NTSTATUS lsa_LookupPrivValue(
570                 [in,ref]     policy_handle *handle,
571                 [in,ref]     lsa_String *name,
572                 [out,ref]    lsa_LUID *luid
573                 );
574
575
576         /* Function:      0x20 */
577         NTSTATUS lsa_LookupPrivName (
578                 [in,ref]     policy_handle *handle,
579                 [in,ref]     lsa_LUID *luid,
580                 [out]        lsa_String *name
581                 );
582
583
584         /*******************/
585         /* Function:  0x21 */
586         NTSTATUS lsa_LookupPrivDisplayName (
587                 [in,ref]     policy_handle *handle,
588                 [in,ref]     lsa_String *name,
589                 [out]        lsa_String *disp_name,
590                 /* see http://www.microsoft.com/globaldev/nlsweb/ for
591                    language definitions */
592                 [in,out,ref] uint16 *language_id,
593                 [in]         uint16 unknown
594                 );
595
596         /* Function:        0x22 */
597         NTSTATUS lsa_DeleteObject();
598
599         
600         /*******************/
601         /* Function:      0x23 */
602         NTSTATUS lsa_EnumAccountsWithUserRight (
603                 [in,ref]     policy_handle *handle,
604                 [in]         lsa_String *name,
605                 [out,ref]    lsa_SidArray *sids
606                 );
607
608         /* Function:      0x24 */
609         typedef struct {
610                 unistr *name;
611         } lsa_RightAttribute;
612         
613         typedef struct {
614                 uint32 count;
615                 [size_is(count)] lsa_String *names;
616         } lsa_RightSet;
617         
618         NTSTATUS lsa_EnumAccountRights (
619                 [in,ref]     policy_handle *handle,
620                 [in,ref]     dom_sid2 *sid,
621                 [out,ref]    lsa_RightSet *rights
622                 );
623
624
625         /**********************/
626         /* Function:       0x25 */
627         NTSTATUS lsa_AddAccountRights (
628                 [in,ref]     policy_handle *handle,
629                 [in,ref]     dom_sid2 *sid,
630                 [in,ref]     lsa_RightSet *rights
631                 );
632         
633         /**********************/
634         /* Function:       0x26 */
635         NTSTATUS lsa_RemoveAccountRights (
636                 [in,ref]     policy_handle *handle,
637                 [in,ref]     dom_sid2 *sid,
638                 [in]         uint32 unknown,
639                 [in,ref]     lsa_RightSet *rights
640                 );
641
642         /* Function:   0x27 */
643         NTSTATUS lsa_QueryTrustedDomainInfoBySid(
644                 [in,ref]               policy_handle         *handle,
645                 [in,ref]               dom_sid2              *dom_sid,
646                 [in]                   uint16                 level, 
647                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
648         );
649
650         /* Function:     0x28 */
651         NTSTATUS lsa_SetTrustDomainInfo();
652         /* Function:      0x29 */
653         NTSTATUS lsa_DeleteTrustDomain();
654         /* Function:       0x2a */
655         NTSTATUS lsa_StorePrivateData();
656         /* Function:        0x2b */
657         NTSTATUS lsa_RetrievePrivateData();
658
659
660         /**********************/
661         /* Function:     0x2c */
662         NTSTATUS lsa_OpenPolicy2 (
663                 [in]      unistr *system_name,
664                 [in,ref]  lsa_ObjectAttribute *attr,
665                 [in]      uint32 access_mask,
666                 [out,ref] policy_handle *handle
667                 );
668
669         /**********************/
670         /* Function:     0x2d */
671         typedef struct {
672                 lsa_String *string;
673         } lsa_StringPointer;
674
675         NTSTATUS lsa_GetUserName(
676                 [in] unistr *system_name,
677                 [in,out] lsa_String *account_name,
678                 [in,out] lsa_StringPointer *authority_name
679                 );
680
681         /**********************/
682         /* Function:          0x2e */
683
684         NTSTATUS lsa_QueryInfoPolicy2(
685                 [in,ref]                 policy_handle *handle,
686                 [in]                     uint16 level,
687                 [out,switch_is(level)]   lsa_PolicyInformation *info
688                 );
689
690         /* Function 0x2f */
691         NTSTATUS lsa_SetInfoPolicy2();
692
693         /**********************/
694         /* Function 0x30 */
695         NTSTATUS lsa_QueryTrustedDomainInfoByName(
696                 [in,ref]               policy_handle         *handle,
697                 [in]                   lsa_String             trusted_domain,
698                 [in]                   uint16                 level, 
699                 [out,switch_is(level)] lsa_TrustedDomainInfo *info
700                 );
701
702         /* Function 0x31 */
703         NTSTATUS lsa_SetTrustedDomainInfoByName();
704
705         /* Function 0x32 */
706         NTSTATUS lsa_EnumTrustedDomainsEx();
707
708         /* Function 0x33 */
709         NTSTATUS lsa_CreateTrustedDomainEx();
710
711         /* Function 0x34 */
712         NTSTATUS lsa_CloseTrustedDomainEx();
713
714         /* Function 0x35 */
715         NTSTATUS lsa_QueryDomainInformationPolicy();
716
717         /* Function 0x36 */
718         NTSTATUS lsa_SetDomInfoPolicy();
719
720         /**********************/
721         /* Function 0x37 */
722         NTSTATUS lsa_OpenTrustedDomainByName(
723                 [in,ref]     policy_handle *handle,
724                 [in]         lsa_String     name,
725                 [in]         uint32         access_mask,
726                 [out,ref]    policy_handle *trustdom_handle
727                 );
728
729         /* Function 0x38 */
730         NTSTATUS lsa_TestCall();
731
732         /**********************/
733         /* Function 0x39 */
734
735         typedef struct {
736                 lsa_SidType sid_type;
737                 lsa_String name;
738                 uint32 sid_index;
739                 uint32 unknown;
740         } lsa_TranslatedName2;
741
742         typedef struct {
743                 [range(0,1000)] uint32 count;
744                 [size_is(count)] lsa_TranslatedName2 *names;
745         } lsa_TransNameArray2;
746
747         NTSTATUS lsa_LookupSids2(
748                 [in,ref]     policy_handle *handle,
749                 [in,ref]     lsa_SidArray *sids,
750                 [out]        lsa_RefDomainList *domains,
751                 [in,out,ref] lsa_TransNameArray2 *names,
752                 [in]         uint16 level,
753                 [in,out,ref] uint32 *count,
754                 [in]         uint32 unknown1,
755                 [in]         uint32 unknown2
756                 );
757
758         /**********************/
759         /* Function 0x3a */
760
761         typedef struct {
762                 lsa_SidType sid_type;
763                 uint32 rid;
764                 uint32 sid_index;
765                 uint32 unknown;
766         } lsa_TranslatedSid2;
767
768         typedef struct {
769                 [range(0,1000)] uint32 count;
770                 [size_is(count)] lsa_TranslatedSid2 *sids;
771         } lsa_TransSidArray2;
772
773         NTSTATUS lsa_LookupNames2 (
774                 [in,ref]     policy_handle *handle,
775                 [in,range(0,1000)] uint32 num_names,
776                 [in,ref,size_is(num_names)]  lsa_String *names,
777                 [out]        lsa_RefDomainList *domains,
778                 [in,out,ref] lsa_TransSidArray2 *sids,
779                 [in]         uint16 level,
780                 [in,out,ref] uint32 *count,
781                 [in]         uint32 unknown1,
782                 [in]         uint32 unknown2
783                 );
784
785         /* Function 0x3b */
786         NTSTATUS lsa_CreateTrustedDomainEx2();
787
788         /* Function 0x3c */
789         NTSTATUS lsa_CREDRWRITE();
790
791         /* Function 0x3d */
792         NTSTATUS lsa_CREDRREAD();
793
794         /* Function 0x3e */
795         NTSTATUS lsa_CREDRENUMERATE();
796
797         /* Function 0x3f */
798         NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
799
800         /* Function 0x40 */
801         NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
802
803         /* Function 0x41 */
804         NTSTATUS lsa_CREDRDELETE();
805
806         /* Function 0x42 */
807         NTSTATUS lsa_CREDRGETTARGETINFO();
808
809         /* Function 0x43 */
810         NTSTATUS lsa_CREDRPROFILELOADED();
811
812         /**********************/
813         /* Function 0x44 */
814         typedef struct {
815                 lsa_SidType sid_type;
816                 dom_sid2 *sid;
817                 uint32 sid_index;
818                 uint32 unknown;
819         } lsa_TranslatedSid3;
820
821         typedef struct {
822                 [range(0,1000)] uint32 count;
823                 [size_is(count)] lsa_TranslatedSid3 *sids;
824         } lsa_TransSidArray3;
825
826         NTSTATUS lsa_LookupNames3 (
827                 [in,ref]     policy_handle *handle,
828                 [in,range(0,1000)] uint32 num_names,
829                 [in,ref,size_is(num_names)]  lsa_String *names,
830                 [out]        lsa_RefDomainList *domains,
831                 [in,out,ref] lsa_TransSidArray3 *sids,
832                 [in]         uint16 level,
833                 [in,out,ref] uint32 *count,
834                 [in]         uint32 unknown1,
835                 [in]         uint32 unknown2
836                 );
837
838         /* Function 0x45 */
839         NTSTATUS lsa_CREDRGETSESSIONTYPES();
840
841         /* Function 0x46 */
842         NTSTATUS lsa_LSARREGISTERAUDITEVENT();
843
844         /* Function 0x47 */
845         NTSTATUS lsa_LSARGENAUDITEVENT();
846
847         /* Function 0x48 */
848         NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
849
850         /* Function 0x49 */
851         NTSTATUS lsa_LSARQUERYFORESTTRUSTINFORMATION();
852
853         /* Function 0x4a */
854         NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
855
856         /* Function 0x4b */
857         NTSTATUS lsa_CREDRRENAME();
858
859         /*****************/
860         /* Function 0x4c */
861
862         NTSTATUS lsa_LookupSids3(
863                 [in,ref]     lsa_SidArray *sids,
864                 [out]        lsa_RefDomainList *domains,
865                 [in,out,ref] lsa_TransNameArray2 *names,
866                 [in]         uint16 level,
867                 [in,out,ref] uint32 *count,
868                 [in]         uint32 unknown1,
869                 [in]         uint32 unknown2
870                 );
871
872         /* Function 0x4d */
873         NTSTATUS lsa_LSARLOOKUPNAMES4();
874
875         /* Function 0x4e */
876         NTSTATUS lsa_LSAROPENPOLICYSCE();
877
878         /* Function 0x4f */
879         NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
880
881         /* Function 0x50 */
882         NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
883
884         /* Function 0x51 */
885         NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();
886
887 }