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