Make warning a bit more user-friendly.
[kai/samba.git] / source3 / librpc / idl / lsa.idl
1 #include "idl_types.h"
2
3 /*
4   lsa interface definition
5 */
6
7 import "misc.idl", "security.idl";
8
9 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
10   version(0.0),
11   endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\netlogon]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
12   pointer_default(unique),
13   helpstring("Local Security Authority")
14 ] interface lsarpc
15 {
16         typedef bitmap security_secinfo security_secinfo;
17         typedef bitmap kerb_EncTypes kerb_EncTypes;
18
19         typedef [public,noejs] struct {
20                 [value(2*strlen_m(string))] uint16 length;
21                 [value(2*strlen_m(string))] uint16 size;
22                 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
23         } lsa_String;
24
25         typedef [public] struct {
26                 [value(2*strlen_m(string))] uint16 length;
27                 [value(2*strlen_m_term(string))] uint16 size;
28                 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
29         } lsa_StringLarge;
30
31         typedef [public] struct {
32                 uint32 count;
33                 [size_is(count)] lsa_String *names;
34         } lsa_Strings;
35
36         typedef [public] struct {
37                 [value(strlen_m(string))] uint16 length;
38                 [value(strlen_m(string))] uint16 size;
39                 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
40         } lsa_AsciiString;
41
42         typedef [public] struct {
43                 [value(strlen_m(string))] uint16 length;
44                 [value(strlen_m_term(string))] uint16 size;
45                 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
46         } lsa_AsciiStringLarge;
47
48         typedef [public] struct {
49                 uint16 length;
50                 uint16 size;
51                 [size_is(size/2),length_is(length/2)] uint16 *array;
52         } lsa_BinaryString;
53
54         /******************/
55         /* Function: 0x00 */
56         NTSTATUS lsa_Close (
57                 [in,out]     policy_handle *handle
58                 );
59         
60
61         /******************/
62         /* Function: 0x01 */
63         [public] NTSTATUS lsa_Delete (
64                 [in]     policy_handle *handle
65                 );
66
67
68         /******************/
69         /* Function: 0x02 */
70         typedef struct {
71                 uint32 low;
72                 uint32 high;
73         } lsa_LUID;
74         
75         typedef struct {
76                 lsa_StringLarge name;
77                 lsa_LUID luid;
78         } lsa_PrivEntry;
79
80         typedef struct {
81                 uint32 count;
82                 [size_is(count)] lsa_PrivEntry *privs;
83         } lsa_PrivArray;
84
85         [public] NTSTATUS lsa_EnumPrivs (
86                 [in]     policy_handle *handle,
87                 [in,out,ref] uint32 *resume_handle,
88                 [out,ref] lsa_PrivArray *privs,
89                 [in]         uint32 max_count
90                 );
91
92         /******************/
93         /* Function: 0x03 */
94
95         NTSTATUS lsa_QuerySecurity (
96                 [in]     policy_handle *handle,
97                 [in]         security_secinfo sec_info,
98                 [out,ref]    sec_desc_buf **sdbuf
99                 );
100
101
102         /******************/
103         /* Function: 0x04 */
104         NTSTATUS lsa_SetSecObj(
105                 [in]            policy_handle *handle,
106                 [in]            security_secinfo sec_info,
107                 [in,ref]        sec_desc_buf *sdbuf
108                 );
109
110         /******************/
111         /* Function: 0x05 */
112         [todo] NTSTATUS lsa_ChangePassword ();
113
114
115         /******************/
116         /* Function: 0x06 */
117         typedef struct {
118                 uint32  len; /* ignored */
119                 uint16  impersonation_level;
120                 uint8   context_mode;
121                 uint8   effective_only;
122         } lsa_QosInfo;
123         
124         typedef struct {
125                 uint32 len; /* ignored */
126                 uint8 *root_dir;
127                 [string,charset(UTF16)] uint16 *object_name;
128                 uint32 attributes;
129                 security_descriptor *sec_desc;
130                 lsa_QosInfo *sec_qos;
131         } lsa_ObjectAttribute;
132
133         typedef [public,bitmap32bit] bitmap {
134                 LSA_POLICY_VIEW_LOCAL_INFORMATION       = 0x00000001,
135                 LSA_POLICY_VIEW_AUDIT_INFORMATION       = 0x00000002,
136                 LSA_POLICY_GET_PRIVATE_INFORMATION      = 0x00000004,
137                 LSA_POLICY_TRUST_ADMIN                  = 0x00000008,
138                 LSA_POLICY_CREATE_ACCOUNT               = 0x00000010,
139                 LSA_POLICY_CREATE_SECRET                = 0x00000020,
140                 LSA_POLICY_CREATE_PRIVILEGE             = 0x00000040,
141                 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS     = 0x00000080,
142                 LSA_POLICY_SET_AUDIT_REQUIREMENTS       = 0x00000100,
143                 LSA_POLICY_AUDIT_LOG_ADMIN              = 0x00000200,
144                 LSA_POLICY_SERVER_ADMIN                 = 0x00000400,
145                 LSA_POLICY_LOOKUP_NAMES                 = 0x00000800
146         } lsa_PolicyAccessMask;
147
148         /* notice the screwup with the system_name - thats why MS created
149            OpenPolicy2 */
150         [public] NTSTATUS lsa_OpenPolicy (
151                 [in,unique]       uint16 *system_name,
152                 [in]   lsa_ObjectAttribute *attr,
153                 [in]   lsa_PolicyAccessMask access_mask,
154                 [out]  policy_handle *handle
155                 );
156         
157
158
159         /******************/
160         /* Function: 0x07 */
161
162         typedef struct {
163                 uint32 percent_full;
164                 uint32 log_size;
165                 NTTIME retention_time;
166                 uint8  shutdown_in_progress;
167                 NTTIME time_to_shutdown;
168                 uint32 next_audit_record;
169                 uint32 unknown;
170         } lsa_AuditLogInfo;
171
172         typedef [v1_enum] enum {
173                 LSA_AUDIT_POLICY_NONE=0,
174                 LSA_AUDIT_POLICY_SUCCESS=1,
175                 LSA_AUDIT_POLICY_FAILURE=2,
176                 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
177                 LSA_AUDIT_POLICY_CLEAR=4
178         } lsa_PolicyAuditPolicy;
179
180         typedef enum {
181                 LSA_AUDIT_CATEGORY_SYSTEM = 0,
182                 LSA_AUDIT_CATEGORY_LOGON = 1,
183                 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
184                 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
185                 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
186                 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
187                 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
188                 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7,        /* only in win2k/2k3 */
189                 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8                    /* only in win2k/2k3 */
190         } lsa_PolicyAuditEventType;
191
192         typedef struct {
193                 uint32 auditing_mode;
194                 [size_is(count)] lsa_PolicyAuditPolicy *settings;
195                 uint32 count;
196         } lsa_AuditEventsInfo;
197
198         typedef struct {
199                 lsa_StringLarge name;
200                 dom_sid2 *sid;
201         } lsa_DomainInfo;
202
203         typedef struct {
204                 lsa_String name;
205         } lsa_PDAccountInfo;
206
207         typedef struct {
208                 uint16 unknown; /* an midl padding bug? */
209                 uint16 role;
210         } lsa_ServerRole;
211
212         typedef struct {
213                 lsa_String source;
214                 lsa_String account;
215         } lsa_ReplicaSourceInfo;
216
217         typedef struct {
218                 uint32 paged_pool;
219                 uint32 non_paged_pool;
220                 uint32 min_wss;
221                 uint32 max_wss;
222                 uint32 pagefile;
223                 hyper unknown;
224         } lsa_DefaultQuotaInfo;
225
226         typedef struct {
227                 hyper modified_id;
228                 NTTIME_hyper db_create_time;
229         } lsa_ModificationInfo;
230
231         typedef struct {
232                 uint8 shutdown_on_full;
233         } lsa_AuditFullSetInfo;
234
235         typedef struct {
236                 uint16 unknown; /* an midl padding bug? */
237                 uint8 shutdown_on_full;
238                 uint8 log_is_full;
239         } lsa_AuditFullQueryInfo;
240
241         typedef struct {
242                 /* it's important that we use the lsa_StringLarge here,
243                  * because otherwise windows clients result with such dns hostnames
244                  * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
245                  * where it should be
246                  *      w2k3-client.samba4.samba.org
247                  */
248                 lsa_StringLarge name;
249                 lsa_StringLarge dns_domain;
250                 lsa_StringLarge dns_forest;
251                 GUID domain_guid;
252                 dom_sid2 *sid;
253         } lsa_DnsDomainInfo;
254
255         typedef enum {
256                 LSA_POLICY_INFO_AUDIT_LOG=1,
257                 LSA_POLICY_INFO_AUDIT_EVENTS=2,
258                 LSA_POLICY_INFO_DOMAIN=3,
259                 LSA_POLICY_INFO_PD=4,
260                 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
261                 LSA_POLICY_INFO_ROLE=6,
262                 LSA_POLICY_INFO_REPLICA=7,
263                 LSA_POLICY_INFO_QUOTA=8,
264                 LSA_POLICY_INFO_DB=9,
265                 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
266                 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
267                 LSA_POLICY_INFO_DNS=12,
268                 LSA_POLICY_INFO_DNS_INT=13
269         } lsa_PolicyInfo;
270
271         typedef [switch_type(uint16)] union {
272                 [case(LSA_POLICY_INFO_AUDIT_LOG)]        lsa_AuditLogInfo       audit_log;
273                 [case(LSA_POLICY_INFO_AUDIT_EVENTS)]     lsa_AuditEventsInfo    audit_events;
274                 [case(LSA_POLICY_INFO_DOMAIN)]           lsa_DomainInfo         domain;
275                 [case(LSA_POLICY_INFO_PD)]               lsa_PDAccountInfo      pd;
276                 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)]   lsa_DomainInfo         account_domain;
277                 [case(LSA_POLICY_INFO_ROLE)]             lsa_ServerRole         role;
278                 [case(LSA_POLICY_INFO_REPLICA)]          lsa_ReplicaSourceInfo  replica;
279                 [case(LSA_POLICY_INFO_QUOTA)]            lsa_DefaultQuotaInfo   quota;
280                 [case(LSA_POLICY_INFO_DB)]               lsa_ModificationInfo   db;
281                 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)]   lsa_AuditFullSetInfo   auditfullset;
282                 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
283                 [case(LSA_POLICY_INFO_DNS)]              lsa_DnsDomainInfo      dns;
284                 [case(LSA_POLICY_INFO_DNS_INT)]          lsa_DnsDomainInfo      dns;
285         } lsa_PolicyInformation;
286
287         NTSTATUS lsa_QueryInfoPolicy(
288                 [in]                            policy_handle *handle,
289                 [in]                            lsa_PolicyInfo level,
290                 [out,ref,switch_is(level)]      lsa_PolicyInformation **info
291                 );
292
293         /******************/
294         /* Function:       0x08 */
295         NTSTATUS lsa_SetInfoPolicy (
296                 [in]                            policy_handle *handle,
297                 [in]                            lsa_PolicyInfo level,
298                 [in,switch_is(level)]           lsa_PolicyInformation *info
299                 );
300
301         /******************/
302         /* Function:       0x09 */
303         [todo] NTSTATUS lsa_ClearAuditLog ();
304
305         /******************/
306         /* Function: 0x0a */
307         [public] NTSTATUS lsa_CreateAccount (
308                 [in]    policy_handle *handle,
309                 [in,ref] dom_sid2 *sid,
310                 [in]    uint32 access_mask,
311                 [out]   policy_handle *acct_handle
312                 );
313
314         /******************/
315         /* NOTE: This only returns accounts that have at least
316            one privilege set 
317         */
318         /* Function: 0x0b */
319         typedef struct {
320                 dom_sid2 *sid;
321         } lsa_SidPtr;
322         
323         typedef [public] struct {
324                 [range(0,1000)] uint32 num_sids;
325                 [size_is(num_sids)] lsa_SidPtr *sids;
326         } lsa_SidArray;
327
328         [public] NTSTATUS lsa_EnumAccounts (
329                 [in]         policy_handle *handle,
330                 [in,out,ref] uint32 *resume_handle,
331                 [out,ref]    lsa_SidArray *sids,
332                 [in,range(0,8192)] uint32 num_entries
333                 );
334
335
336         /*************************************************/
337         /* Function: 0x0c                                */
338
339         [public] NTSTATUS lsa_CreateTrustedDomain(
340                 [in]         policy_handle *handle,
341                 [in]         lsa_DomainInfo *info,
342                 [in]         uint32 access_mask,
343                 [out]        policy_handle *trustdom_handle
344                 );
345
346
347         /******************/
348         /* Function: 0x0d */
349
350         /* w2k3 treats max_size as max_domains*60       */
351         const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
352
353         typedef struct {
354                 uint32 count;
355                 [size_is(count)] lsa_DomainInfo *domains;
356         } lsa_DomainList;
357
358         NTSTATUS lsa_EnumTrustDom (
359                 [in]               policy_handle *handle,
360                 [in,out,ref]       uint32 *resume_handle,
361                 [out,ref]          lsa_DomainList *domains,
362                 [in]               uint32 max_size
363                 );
364
365
366         /******************/
367         /* Function: 0x0e */
368         typedef enum {
369                 SID_NAME_USE_NONE = 0,/* NOTUSED */
370                 SID_NAME_USER     = 1, /* user */
371                 SID_NAME_DOM_GRP  = 2, /* domain group */
372                 SID_NAME_DOMAIN   = 3, /* domain: don't know what this is */
373                 SID_NAME_ALIAS    = 4, /* local group */
374                 SID_NAME_WKN_GRP  = 5, /* well-known group */
375                 SID_NAME_DELETED  = 6, /* deleted account: needed for c2 rating */
376                 SID_NAME_INVALID  = 7, /* invalid account */
377                 SID_NAME_UNKNOWN  = 8, /* oops. */
378                 SID_NAME_COMPUTER = 9  /* machine */
379         } lsa_SidType;
380
381         typedef struct {
382                 lsa_SidType sid_type;
383                 uint32 rid;
384                 uint32 sid_index;
385         } lsa_TranslatedSid;
386
387         typedef struct {
388                 [range(0,1000)] uint32 count;
389                 [size_is(count)] lsa_TranslatedSid *sids;
390         } lsa_TransSidArray;
391
392         const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
393         const int MAX_REF_DOMAINS = LSA_REF_DOMAIN_LIST_MULTIPLIER;
394
395         typedef struct {
396                 [range(0,1000)] uint32 count;
397                 [size_is(count)] lsa_DomainInfo *domains;
398                 uint32 max_size;
399         } lsa_RefDomainList;
400
401         /* Level 1: Ask everywhere
402          * Level 2: Ask domain and trusted domains, no builtin and wkn
403          * Level 3: Only ask domain
404          * Level 4: W2k3ad: Only ask AD trusts
405          * Level 5: Only ask transitive forest trusts
406          * Level 6: Like 4
407          */
408
409         typedef enum {
410                 LSA_LOOKUP_NAMES_ALL = 1,
411                 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
412                 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
413                 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
414                 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
415                 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6,
416                 LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC = 7
417         } lsa_LookupNamesLevel;
418
419         [public] NTSTATUS lsa_LookupNames (
420                 [in]         policy_handle *handle,
421                 [in,range(0,1000)] uint32 num_names,
422                 [in,size_is(num_names)]  lsa_String names[],
423                 [out,ref]    lsa_RefDomainList **domains,
424                 [in,out,ref] lsa_TransSidArray *sids,
425                 [in]         lsa_LookupNamesLevel level,
426                 [in,out,ref] uint32 *count
427                 );
428
429
430         /******************/
431         /* Function: 0x0f */
432
433         typedef struct {
434                 lsa_SidType sid_type;
435                 lsa_String name;
436                 uint32 sid_index;
437         } lsa_TranslatedName;
438
439         typedef struct {
440                 [range(0,1000)] uint32 count;
441                 [size_is(count)] lsa_TranslatedName *names;
442         } lsa_TransNameArray;
443
444         /* This number is based on Win2k and later maximum response allowed */
445         const int MAX_LOOKUP_SIDS = 0x5000; /* 20480 */
446
447         [public] NTSTATUS lsa_LookupSids (
448                 [in]         policy_handle *handle,
449                 [in,ref]     lsa_SidArray *sids,
450                 [out,ref]    lsa_RefDomainList **domains,
451                 [in,out,ref] lsa_TransNameArray *names,
452                 [in]         uint16 level,
453                 [in,out,ref] uint32 *count
454                 );
455
456
457         /* Function:        0x10 */
458         [public] NTSTATUS lsa_CreateSecret(
459                 [in]         policy_handle *handle,
460                 [in]         lsa_String       name,
461                 [in]         uint32         access_mask,
462                 [out]        policy_handle *sec_handle
463                 );
464
465
466         /*****************************************/
467         /* Function:     0x11                    */
468         NTSTATUS lsa_OpenAccount(
469                 [in]         policy_handle *handle,
470                 [in,ref]     dom_sid2 *sid,
471                 [in]         uint32 access_mask,
472                 [out]        policy_handle *acct_handle
473                 );
474
475
476         /****************************************/
477         /* Function:    0x12                    */
478
479         typedef struct {
480                 lsa_LUID luid;
481                 uint32 attribute;
482         } lsa_LUIDAttribute;
483         
484         typedef struct {
485                 [range(0,1000)] uint32 count;
486                 uint32 unknown;
487                 [size_is(count)] lsa_LUIDAttribute set[*];
488         } lsa_PrivilegeSet;
489         
490         NTSTATUS lsa_EnumPrivsAccount (
491                 [in]         policy_handle *handle,
492                 [out,ref] lsa_PrivilegeSet **privs
493                 );
494
495
496         /****************************************/
497         /* Function:            0x13 */
498         NTSTATUS lsa_AddPrivilegesToAccount(
499                 [in]         policy_handle *handle,
500                 [in,ref]     lsa_PrivilegeSet *privs
501                 );
502         
503
504         /****************************************/
505         /* Function:         0x14 */
506         NTSTATUS lsa_RemovePrivilegesFromAccount(
507                 [in]         policy_handle *handle,
508                 [in]         uint8 remove_all,
509                 [in,unique]  lsa_PrivilegeSet *privs
510                 );
511
512         /* Function:           0x15 */
513         [todo] NTSTATUS lsa_GetQuotasForAccount();
514         
515         /* Function:           0x16 */
516         [todo] NTSTATUS lsa_SetQuotasForAccount();
517         
518         /* Function:    0x17 */
519         NTSTATUS lsa_GetSystemAccessAccount(
520                 [in]    policy_handle *handle,
521                 [out,ref] uint32 *access_mask
522                 );
523
524         /* Function:    0x18 */
525         NTSTATUS lsa_SetSystemAccessAccount(
526                 [in]    policy_handle *handle,
527                 [in]    uint32 access_mask
528                 );
529
530         /* Function:        0x19 */
531         NTSTATUS lsa_OpenTrustedDomain(
532                 [in]     policy_handle *handle,
533                 [in]     dom_sid2      *sid,
534                 [in]         uint32         access_mask,
535                 [out]    policy_handle *trustdom_handle
536                 );
537
538         typedef [flag(NDR_PAHEX)] struct {
539                 uint32 length;
540                 uint32 size;
541                 [size_is(size),length_is(length)] uint8 *data;
542         } lsa_DATA_BUF;
543
544         typedef [flag(NDR_PAHEX)] struct {
545                 [range(0,65536)] uint32 size;
546                 [size_is(size)] uint8 *data;
547         } lsa_DATA_BUF2;
548
549         typedef enum {
550                 LSA_TRUSTED_DOMAIN_INFO_NAME                  = 1,
551                 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS           = 2,
552                 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET          = 3,
553                 LSA_TRUSTED_DOMAIN_INFO_PASSWORD              = 4,
554                 LSA_TRUSTED_DOMAIN_INFO_BASIC                 = 5,
555                 LSA_TRUSTED_DOMAIN_INFO_INFO_EX               = 6,
556                 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO             = 7,
557                 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO             = 8,
558                 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL    = 9,
559                 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL    = 10,
560                 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL     = 11,
561                 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL  = 12,
562                 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
563         } lsa_TrustDomInfoEnum;
564
565         typedef [public,bitmap32bit] bitmap {
566                 LSA_TRUST_DIRECTION_INBOUND  = 0x00000001,
567                 LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
568         } lsa_TrustDirection;
569
570         typedef [v1_enum] enum {
571                 LSA_TRUST_TYPE_DOWNLEVEL  = 0x00000001,
572                 LSA_TRUST_TYPE_UPLEVEL    = 0x00000002,
573                 LSA_TRUST_TYPE_MIT        = 0x00000003
574         } lsa_TrustType;
575
576         typedef [public,bitmap32bit] bitmap {
577                 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE      = 0x00000001,
578                 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY        = 0x00000002,
579                 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN  = 0x00000004,
580                 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE   = 0x00000008,
581                 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION  = 0x00000010,
582                 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST       = 0x00000020,
583                 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL   = 0x00000040,
584                 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080
585         } lsa_TrustAttributes;
586
587         typedef struct {
588                 lsa_StringLarge  netbios_name;
589         } lsa_TrustDomainInfoName;
590
591
592         typedef struct {
593                 uint32 entries;
594                 [size_is(entries)] lsa_StringLarge  *netbios_names;
595         } lsa_TrustDomainInfoControllers;
596
597         typedef struct {
598                 uint32         posix_offset;
599         } lsa_TrustDomainInfoPosixOffset;
600
601         typedef struct {
602                 lsa_DATA_BUF  *password;
603                 lsa_DATA_BUF  *old_password;
604         } lsa_TrustDomainInfoPassword;
605
606         typedef struct {
607                 lsa_String     netbios_name;
608                 dom_sid2      *sid;
609         } lsa_TrustDomainInfoBasic;
610
611         typedef struct {
612                 lsa_StringLarge     domain_name;
613                 lsa_StringLarge     netbios_name;
614                 dom_sid2           *sid;
615                 lsa_TrustDirection  trust_direction;
616                 lsa_TrustType       trust_type;
617                 lsa_TrustAttributes trust_attributes;
618         } lsa_TrustDomainInfoInfoEx;
619
620         typedef [public,v1_enum] enum {
621                 TRUST_AUTH_TYPE_NONE = 0,
622                 TRUST_AUTH_TYPE_NT4OWF = 1,
623                 TRUST_AUTH_TYPE_CLEAR = 2,
624                 TRUST_AUTH_TYPE_VERSION = 3
625         } lsa_TrustAuthType;
626
627         typedef struct {
628                 NTTIME_hyper   last_update_time;
629                 lsa_TrustAuthType AuthType;
630                 lsa_DATA_BUF2  data;
631         } lsa_TrustDomainInfoBuffer;
632
633         typedef struct {
634                 uint32 incoming_count;
635                 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
636                 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
637                 uint32 outgoing_count;
638                 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
639                 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
640         } lsa_TrustDomainInfoAuthInfo;
641
642         typedef struct {
643                 lsa_TrustDomainInfoInfoEx      info_ex;
644                 lsa_TrustDomainInfoPosixOffset posix_offset;
645                 lsa_TrustDomainInfoAuthInfo    auth_info;
646         } lsa_TrustDomainInfoFullInfo;
647
648         typedef struct {
649                 lsa_DATA_BUF2                          auth_blob;
650         } lsa_TrustDomainInfoAuthInfoInternal;
651
652         typedef struct {
653                 lsa_TrustDomainInfoInfoEx              info_ex;
654                 lsa_TrustDomainInfoPosixOffset         posix_offset;
655                 lsa_TrustDomainInfoAuthInfoInternal    auth_info;
656         } lsa_TrustDomainInfoFullInfoInternal;
657
658         typedef struct {
659                 lsa_TrustDomainInfoInfoEx      info_ex;
660                 uint32 forest_trust_length;
661                 [size_is(forest_trust_length)] uint8 *forest_trust_data;
662         } lsa_TrustDomainInfoInfoEx2Internal;
663
664         typedef struct {
665                 lsa_TrustDomainInfoInfoEx2Internal     info;
666                 lsa_TrustDomainInfoPosixOffset posix_offset;
667                 lsa_TrustDomainInfoAuthInfo    auth_info;
668         } lsa_TrustDomainInfoFullInfo2Internal;
669
670         typedef struct {
671                 kerb_EncTypes enc_types;
672         } lsa_TrustDomainInfoSupportedEncTypes;
673
674         typedef [switch_type(lsa_TrustDomInfoEnum)] union {
675                 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
676                         lsa_TrustDomainInfoName              name;
677                 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
678                         lsa_TrustDomainInfoControllers   controllers;
679                 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
680                         lsa_TrustDomainInfoPosixOffset       posix_offset;
681                 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
682                         lsa_TrustDomainInfoPassword          password;
683                 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
684                         lsa_TrustDomainInfoBasic             info_basic;
685                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
686                         lsa_TrustDomainInfoInfoEx            info_ex;
687                 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
688                         lsa_TrustDomainInfoAuthInfo          auth_info;
689                 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
690                         lsa_TrustDomainInfoFullInfo          full_info;
691                 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
692                         lsa_TrustDomainInfoAuthInfoInternal  auth_info_internal;
693                 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
694                         lsa_TrustDomainInfoFullInfoInternal  full_info_internal;
695                 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
696                         lsa_TrustDomainInfoInfoEx2Internal   info_ex2_internal;
697                 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
698                         lsa_TrustDomainInfoFullInfo2Internal     full_info2_internal;
699                 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
700                         lsa_TrustDomainInfoSupportedEncTypes enc_types;
701         } lsa_TrustedDomainInfo;
702
703         /* Function:       0x1a */
704         NTSTATUS lsa_QueryTrustedDomainInfo(
705                 [in]     policy_handle                   *trustdom_handle,
706                 [in]     lsa_TrustDomInfoEnum             level,
707                 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
708                 );
709
710         /* Function:     0x1b */
711         NTSTATUS lsa_SetInformationTrustedDomain(
712                 [in]                  policy_handle         *trustdom_handle,
713                 [in]                  lsa_TrustDomInfoEnum   level,
714                 [in,switch_is(level)] lsa_TrustedDomainInfo *info
715                 );
716
717         /* Function:          0x1c */
718         [public] NTSTATUS lsa_OpenSecret(
719                 [in]     policy_handle    *handle,
720                 [in]         lsa_String        name,
721                 [in]         uint32            access_mask,
722                 [out]    policy_handle    *sec_handle
723                 );
724
725         /* Function:           0x1d */
726
727         [public] NTSTATUS lsa_SetSecret(
728                 [in]     policy_handle    *sec_handle,
729                 [in,unique]         lsa_DATA_BUF     *new_val,
730                 [in,unique]         lsa_DATA_BUF     *old_val
731                 );
732
733         typedef struct {
734                 lsa_DATA_BUF *buf;
735         } lsa_DATA_BUF_PTR;
736
737         /* Function:         0x1e */
738         [public] NTSTATUS lsa_QuerySecret (
739                 [in]     policy_handle     *sec_handle,
740                 [in,out,unique]     lsa_DATA_BUF_PTR  *new_val,
741                 [in,out,unique]     NTTIME_hyper      *new_mtime,
742                 [in,out,unique]     lsa_DATA_BUF_PTR  *old_val,
743                 [in,out,unique]     NTTIME_hyper      *old_mtime
744                 );
745
746         /* Function:     0x1f */
747         NTSTATUS lsa_LookupPrivValue(
748                 [in]     policy_handle *handle,
749                 [in,ref] lsa_String *name,
750                 [out,ref] lsa_LUID *luid
751                 );
752
753
754         /* Function:      0x20 */
755         NTSTATUS lsa_LookupPrivName (
756                 [in]     policy_handle *handle,
757                 [in,ref] lsa_LUID *luid,
758                 [out,ref] lsa_StringLarge **name
759                 );
760
761
762         /*******************/
763         /* Function:  0x21 */
764         NTSTATUS lsa_LookupPrivDisplayName (
765                 [in] policy_handle *handle,
766                 [in,ref] lsa_String *name,
767                 [in] uint16 language_id,
768                 [in] uint16 language_id_sys,
769                 [out,ref] lsa_StringLarge **disp_name,
770                 /* see http://www.microsoft.com/globaldev/nlsweb/ for
771                    language definitions */
772                 [out,ref] uint16 *returned_language_id
773                 );
774
775         /* Function:        0x22 */
776         NTSTATUS lsa_DeleteObject (
777                 [in,out]     policy_handle *handle
778                 );
779
780
781         /*******************/
782         /* Function:      0x23 */
783         NTSTATUS lsa_EnumAccountsWithUserRight (
784                 [in]     policy_handle *handle,
785                 [in,unique]         lsa_String *name,
786                 [out]    lsa_SidArray *sids
787                 );
788
789         /* Function:      0x24 */
790         typedef struct {
791                 [string,charset(UTF16)] uint16 *name;
792         } lsa_RightAttribute;
793         
794         typedef struct {
795                 [range(0,256)] uint32 count;
796                 [size_is(count)] lsa_StringLarge *names;
797         } lsa_RightSet;
798         
799         NTSTATUS lsa_EnumAccountRights (
800                 [in]     policy_handle *handle,
801                 [in,ref] dom_sid2 *sid,
802                 [out,ref] lsa_RightSet *rights
803                 );
804
805
806         /**********************/
807         /* Function:       0x25 */
808         NTSTATUS lsa_AddAccountRights (
809                 [in]     policy_handle *handle,
810                 [in,ref] dom_sid2 *sid,
811                 [in,ref] lsa_RightSet *rights
812                 );
813
814         /**********************/
815         /* Function:       0x26 */
816         NTSTATUS lsa_RemoveAccountRights (
817                 [in]     policy_handle *handle,
818                 [in,ref] dom_sid2 *sid,
819                 [in]     uint8 remove_all,
820                 [in,ref] lsa_RightSet *rights
821                 );
822
823         /* Function:   0x27 */
824         NTSTATUS lsa_QueryTrustedDomainInfoBySid(
825                 [in]               policy_handle         *handle,
826                 [in,ref]           dom_sid2              *dom_sid,
827                 [in]               lsa_TrustDomInfoEnum  level,
828                 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
829         );
830
831         /* Function:     0x28 */
832         NTSTATUS lsa_SetTrustedDomainInfo(
833                 [in]               policy_handle         *handle,
834                 [in]               dom_sid2              *dom_sid,
835                 [in]                   lsa_TrustDomInfoEnum  level,
836                 [in,switch_is(level)] lsa_TrustedDomainInfo *info
837         );
838
839         /* Function:      0x29 */
840         NTSTATUS lsa_DeleteTrustedDomain(
841                 [in]               policy_handle         *handle,
842                 [in]               dom_sid2              *dom_sid
843         );
844
845         /* Function:       0x2a */
846         [todo] NTSTATUS lsa_StorePrivateData();
847         /* Function:        0x2b */
848         [todo] NTSTATUS lsa_RetrievePrivateData();
849
850
851         /**********************/
852         /* Function:     0x2c */
853         [public] NTSTATUS lsa_OpenPolicy2 (
854                 [in,unique]      [string,charset(UTF16)] uint16 *system_name,
855                 [in]  lsa_ObjectAttribute *attr,
856                 [in]  lsa_PolicyAccessMask access_mask,
857                 [out] policy_handle *handle
858                 );
859
860         /**********************/
861         /* Function:     0x2d */
862         NTSTATUS lsa_GetUserName(
863                 [in,unique] [string,charset(UTF16)] uint16 *system_name,
864                 [in,out,ref] lsa_String **account_name,
865                 [in,out,unique] lsa_String **authority_name
866                 );
867
868         /**********************/
869         /* Function:          0x2e */
870
871         NTSTATUS lsa_QueryInfoPolicy2(
872                 [in]                         policy_handle *handle,
873                 [in]                         lsa_PolicyInfo level,
874                 [out,ref,switch_is(level)]   lsa_PolicyInformation **info
875                 );
876
877         /* Function 0x2f */
878         NTSTATUS lsa_SetInfoPolicy2(
879                 [in]                            policy_handle *handle,
880                 [in]                            lsa_PolicyInfo level,
881                 [in,switch_is(level)]           lsa_PolicyInformation *info
882                 );
883
884         /**********************/
885         /* Function 0x30 */
886         NTSTATUS lsa_QueryTrustedDomainInfoByName(
887                 [in]                   policy_handle          *handle,
888                 [in,ref]               lsa_String             *trusted_domain,
889                 [in]                   lsa_TrustDomInfoEnum   level,
890                 [out,ref,switch_is(level)] lsa_TrustedDomainInfo **info
891                 );
892
893         /**********************/
894         /* Function 0x31 */
895         NTSTATUS lsa_SetTrustedDomainInfoByName(
896                 [in]                   policy_handle         *handle,
897                 [in]                   lsa_String             trusted_domain,
898                 [in]                   lsa_TrustDomInfoEnum   level, 
899                 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
900                 );
901
902         /* Function 0x32 */
903
904         /* w2k3 treats max_size as max_domains*82       */
905         const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
906
907         typedef struct {
908                 uint32 count;
909                 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
910         } lsa_DomainListEx;
911
912         NTSTATUS lsa_EnumTrustedDomainsEx (
913                 [in]               policy_handle *handle,
914                 [in,out]           uint32 *resume_handle,
915                 [out]              lsa_DomainListEx *domains,
916                 [in]               uint32 max_size
917                 );
918
919         /* Function 0x33 */
920         NTSTATUS lsa_CreateTrustedDomainEx(
921                 [in]  policy_handle               *policy_handle,
922                 [in]  lsa_TrustDomainInfoInfoEx   *info,
923                 [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
924                 [in]  uint32 access_mask,
925                 [out] policy_handle               *trustdom_handle
926                 );
927
928
929         /* Function 0x34 */
930         NTSTATUS lsa_CloseTrustedDomainEx(
931                 [in,out]                   policy_handle         *handle
932         );
933
934         /* Function 0x35 */
935
936         /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000 
937            for unknown6 - gd */
938         typedef struct {
939                 uint32 enforce_restrictions;
940                 hyper service_tkt_lifetime;
941                 hyper user_tkt_lifetime;
942                 hyper user_tkt_renewaltime;
943                 hyper clock_skew;
944                 hyper unknown6;
945         } lsa_DomainInfoKerberos;
946
947         typedef struct {
948                 uint32 blob_size;
949                 [size_is(blob_size)] uint8 *efs_blob;
950         } lsa_DomainInfoEfs;
951
952         typedef enum {
953                 LSA_DOMAIN_INFO_POLICY_EFS=2,
954                 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
955         } lsa_DomainInfoEnum;
956
957         typedef [switch_type(uint16)] union {
958                 [case(LSA_DOMAIN_INFO_POLICY_EFS)]      lsa_DomainInfoEfs       efs_info;
959                 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos  kerberos_info;
960         } lsa_DomainInformationPolicy;
961
962         NTSTATUS lsa_QueryDomainInformationPolicy(
963                 [in]            policy_handle *handle,
964                 [in]            uint16 level,
965                 [out,ref,switch_is(level)]      lsa_DomainInformationPolicy **info
966                 );
967
968         /* Function 0x36 */
969         NTSTATUS lsa_SetDomainInformationPolicy(
970                 [in]            policy_handle *handle,
971                 [in]                    uint16 level,
972                 [in,unique,switch_is(level)]    lsa_DomainInformationPolicy *info
973                 );
974
975         /**********************/
976         /* Function 0x37 */
977         NTSTATUS lsa_OpenTrustedDomainByName(
978                 [in]     policy_handle *handle,
979                 [in]         lsa_String     name,
980                 [in]         uint32         access_mask,
981                 [out]    policy_handle *trustdom_handle
982                 );
983
984         /* Function 0x38 */
985         [todo] NTSTATUS lsa_TestCall();
986
987         /**********************/
988         /* Function 0x39 */
989
990         typedef struct {
991                 lsa_SidType sid_type;
992                 lsa_String name;
993                 uint32 sid_index;
994                 uint32 unknown;
995         } lsa_TranslatedName2;
996
997         typedef struct {
998                 [range(0,1000)] uint32 count;
999                 [size_is(count)] lsa_TranslatedName2 *names;
1000         } lsa_TransNameArray2;
1001
1002         [public] NTSTATUS lsa_LookupSids2(
1003                 [in]     policy_handle *handle,
1004                 [in,ref] lsa_SidArray *sids,
1005                 [out,ref]    lsa_RefDomainList **domains,
1006                 [in,out,ref] lsa_TransNameArray2 *names,
1007                 [in]         uint16 level,
1008                 [in,out,ref] uint32 *count,
1009                 [in]         uint32 unknown1,
1010                 [in]         uint32 unknown2
1011                 );
1012
1013         /**********************/
1014         /* Function 0x3a */
1015
1016         typedef struct {
1017                 lsa_SidType sid_type;
1018                 uint32 rid;
1019                 uint32 sid_index;
1020                 uint32 unknown;
1021         } lsa_TranslatedSid2;
1022
1023         typedef struct {
1024                 [range(0,1000)] uint32 count;
1025                 [size_is(count)] lsa_TranslatedSid2 *sids;
1026         } lsa_TransSidArray2;
1027
1028         [public] NTSTATUS lsa_LookupNames2 (
1029                 [in]     policy_handle *handle,
1030                 [in,range(0,1000)] uint32 num_names,
1031                 [in,size_is(num_names)]  lsa_String names[],
1032                 [out,ref]    lsa_RefDomainList **domains,
1033                 [in,out,ref] lsa_TransSidArray2 *sids,
1034                 [in]         lsa_LookupNamesLevel level,
1035                 [in,out,ref] uint32 *count,
1036                 [in]         uint32 lookup_options,
1037                 [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
1038                 );
1039
1040         /* Function 0x3b */
1041         NTSTATUS lsa_CreateTrustedDomainEx2(
1042                 [in]  policy_handle               *policy_handle,
1043                 [in]  lsa_TrustDomainInfoInfoEx   *info,
1044                 [in]  lsa_TrustDomainInfoAuthInfoInternal *auth_info,
1045                 [in]  uint32                       access_mask,
1046                 [out] policy_handle               *trustdom_handle
1047                 );
1048
1049         /* Function 0x3c */
1050         [todo] NTSTATUS lsa_CREDRWRITE();
1051
1052         /* Function 0x3d */
1053         [todo] NTSTATUS lsa_CREDRREAD();
1054
1055         /* Function 0x3e */
1056         [todo] NTSTATUS lsa_CREDRENUMERATE();
1057
1058         /* Function 0x3f */
1059         [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
1060
1061         /* Function 0x40 */
1062         [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
1063
1064         /* Function 0x41 */
1065         [todo] NTSTATUS lsa_CREDRDELETE();
1066
1067         /* Function 0x42 */
1068         [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
1069
1070         /* Function 0x43 */
1071         [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1072
1073         /**********************/
1074         /* Function 0x44 */
1075         typedef struct {
1076                 lsa_SidType sid_type;
1077                 dom_sid2 *sid;
1078                 uint32 sid_index;
1079                 uint32 flags;
1080         } lsa_TranslatedSid3;
1081
1082         typedef struct {
1083                 [range(0,1000)] uint32 count;
1084                 [size_is(count)] lsa_TranslatedSid3 *sids;
1085         } lsa_TransSidArray3;
1086
1087         [public] NTSTATUS lsa_LookupNames3 (
1088                 [in]     policy_handle *handle,
1089                 [in,range(0,1000)] uint32 num_names,
1090                 [in,size_is(num_names)]  lsa_String names[],
1091                 [out,ref]    lsa_RefDomainList **domains,
1092                 [in,out,ref] lsa_TransSidArray3 *sids,
1093                 [in]         lsa_LookupNamesLevel level,
1094                 [in,out,ref] uint32 *count,
1095                 [in]         uint32 lookup_options,
1096                 [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
1097                 );
1098
1099         /* Function 0x45 */
1100         [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1101
1102         /* Function 0x46 */
1103         [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1104
1105         /* Function 0x47 */
1106         [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1107
1108         /* Function 0x48 */
1109         [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1110
1111         /* Function 0x49 */
1112         typedef struct {
1113                 [range(0,131072)] uint32 length;
1114                 [size_is(length)] uint8 *data;
1115         } lsa_ForestTrustBinaryData;
1116
1117         typedef struct {
1118                 dom_sid2 *domain_sid;
1119                 lsa_StringLarge dns_domain_name;
1120                 lsa_StringLarge netbios_domain_name;
1121         } lsa_ForestTrustDomainInfo;
1122
1123         typedef [switch_type(uint32)] union {
1124                 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1125                 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1126                 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1127                 [default] lsa_ForestTrustBinaryData data;
1128         } lsa_ForestTrustData;
1129
1130         typedef [v1_enum] enum {
1131                 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1132                 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1133                 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1134                 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1135         } lsa_ForestTrustRecordType;
1136
1137         typedef struct {
1138                 uint32 flags;
1139                 lsa_ForestTrustRecordType level;
1140                 hyper unknown;
1141                 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1142         } lsa_ForestTrustRecord;
1143
1144         typedef [public] struct {
1145                 [range(0,4000)] uint32 count;
1146                 [size_is(count)] lsa_ForestTrustRecord **entries;
1147         } lsa_ForestTrustInformation;
1148
1149         NTSTATUS lsa_lsaRQueryForestTrustInformation(
1150                 [in] policy_handle *handle,
1151                 [in,ref] lsa_String *trusted_domain_name,
1152                 [in] uint16 unknown, /* level ? */
1153                 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1154                 );
1155
1156         /* Function 0x4a */
1157         [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1158
1159         /* Function 0x4b */
1160         [todo] NTSTATUS lsa_CREDRRENAME();
1161
1162         /*****************/
1163         /* Function 0x4c */
1164
1165         [public] NTSTATUS lsa_LookupSids3(
1166                 [in,ref]     lsa_SidArray *sids,
1167                 [out,ref]    lsa_RefDomainList **domains,
1168                 [in,out,ref] lsa_TransNameArray2 *names,
1169                 [in]         uint16 level,
1170                 [in,out,ref] uint32 *count,
1171                 [in]         uint32 unknown1,
1172                 [in]         uint32 unknown2
1173                 );
1174
1175         const int LSA_CLIENT_REVISION_NO_DNS     = 0x00000001;
1176         const int LSA_CLIENT_REVISION_DNS        = 0x00000002;
1177
1178         const int LSA_LOOKUP_OPTIONS_NO_ISOLATED = 0x80000000;
1179
1180         /* Function 0x4d */
1181         NTSTATUS lsa_LookupNames4(
1182                 [in,range(0,1000)] uint32 num_names,
1183                 [in,size_is(num_names)]  lsa_String names[],
1184                 [out,ref]    lsa_RefDomainList **domains,
1185                 [in,out,ref] lsa_TransSidArray3 *sids,
1186                 [in]         lsa_LookupNamesLevel level,
1187                 [in,out,ref] uint32 *count,
1188                 [in]         uint32 lookup_options,
1189                 [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
1190                 );
1191
1192         /* Function 0x4e */
1193         [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1194
1195         /* Function 0x4f */
1196         [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1197
1198         /* Function 0x50 */
1199         [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1200
1201         /* Function 0x51 */
1202         [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();
1203
1204 }