WHATSNEW: Add release notes for Samba 4.15.0rc6.
[Samba.git] / librpc / idl / lsa.idl
blob39ed3be8262c3384532b6afecd1002073c5ce17a
1 #include "idl_types.h"
3 /*
4 lsa interface definition
5 */
7 import "misc.idl", "security.idl";
9 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
10 version(0.0),
11 endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
12 pyhelper("librpc/ndr/py_lsa.c"),
13 pointer_default(unique),
14 helpstring("Local Security Authority")
15 ] interface lsarpc
17 typedef bitmap security_secinfo security_secinfo;
18 typedef bitmap kerb_EncTypes kerb_EncTypes;
20 typedef [public] struct {
21 [value(2*strlen_m(string))] uint16 length;
22 [value(2*strlen_m(string))] uint16 size;
23 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
24 } lsa_String;
26 typedef [public] struct {
27 [value(2*strlen_m(string))] uint16 length;
28 [value(2*strlen_m_term(string))] uint16 size;
29 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
30 } lsa_StringLarge;
32 typedef [public] struct {
33 uint32 count;
34 [size_is(count)] lsa_String *names;
35 } lsa_Strings;
37 typedef [public] struct {
38 [value(strlen_m(string))] uint16 length;
39 [value(strlen_m(string))] uint16 size;
40 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
41 } lsa_AsciiString;
43 typedef [public] struct {
44 [value(strlen_m(string))] uint16 length;
45 [value(strlen_m_term(string))] uint16 size;
46 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
47 } lsa_AsciiStringLarge;
49 typedef [public] struct {
50 uint16 length;
51 uint16 size;
52 [size_is(size/2),length_is(length/2)] uint16 *array;
53 } lsa_BinaryString;
55 /******************/
56 /* Function: 0x00 */
57 NTSTATUS lsa_Close (
58 [in,out] policy_handle *handle
62 /******************/
63 /* Function: 0x01 */
64 [public] NTSTATUS lsa_Delete (
65 [in] policy_handle *handle
69 /******************/
70 /* Function: 0x02 */
71 typedef struct {
72 uint32 low;
73 uint32 high;
74 } lsa_LUID;
76 typedef struct {
77 lsa_StringLarge name;
78 lsa_LUID luid;
79 } lsa_PrivEntry;
81 typedef struct {
82 uint32 count;
83 [size_is(count)] lsa_PrivEntry *privs;
84 } lsa_PrivArray;
86 [public] NTSTATUS lsa_EnumPrivs (
87 [in] policy_handle *handle,
88 [in,out,ref] uint32 *resume_handle,
89 [out,ref] lsa_PrivArray *privs,
90 [in] uint32 max_count
93 /******************/
94 /* Function: 0x03 */
95 NTSTATUS lsa_QuerySecurity (
96 [in] policy_handle *handle,
97 [in] security_secinfo sec_info,
98 [out,ref] sec_desc_buf **sdbuf
101 /******************/
102 /* Function: 0x04 */
103 NTSTATUS lsa_SetSecObj(
104 [in] policy_handle *handle,
105 [in] security_secinfo sec_info,
106 [in,ref] sec_desc_buf *sdbuf
109 /******************/
110 /* Function: 0x05 */
111 [todo] NTSTATUS lsa_ChangePassword ();
114 /******************/
115 /* Function: 0x06 */
116 typedef struct {
117 uint3264 len; /* ignored */
118 uint16 impersonation_level;
119 uint8 context_mode;
120 uint8 effective_only;
121 } lsa_QosInfo;
123 typedef struct {
124 uint3264 len; /* ignored */
125 uint8 *root_dir;
126 [string,charset(UTF16)] uint16 *object_name;
127 uint32 attributes;
128 security_descriptor *sec_desc;
129 lsa_QosInfo *sec_qos;
130 } lsa_ObjectAttribute;
132 typedef [public,bitmap32bit] bitmap {
133 LSA_POLICY_VIEW_LOCAL_INFORMATION = 0x00000001,
134 LSA_POLICY_VIEW_AUDIT_INFORMATION = 0x00000002,
135 LSA_POLICY_GET_PRIVATE_INFORMATION = 0x00000004,
136 LSA_POLICY_TRUST_ADMIN = 0x00000008,
137 LSA_POLICY_CREATE_ACCOUNT = 0x00000010,
138 LSA_POLICY_CREATE_SECRET = 0x00000020,
139 LSA_POLICY_CREATE_PRIVILEGE = 0x00000040,
140 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS = 0x00000080,
141 LSA_POLICY_SET_AUDIT_REQUIREMENTS = 0x00000100,
142 LSA_POLICY_AUDIT_LOG_ADMIN = 0x00000200,
143 LSA_POLICY_SERVER_ADMIN = 0x00000400,
144 LSA_POLICY_LOOKUP_NAMES = 0x00000800,
145 LSA_POLICY_NOTIFICATION = 0x00001000
146 } lsa_PolicyAccessMask;
148 const int LSA_POLICY_ALL_ACCESS =
149 (STANDARD_RIGHTS_REQUIRED_ACCESS |
150 LSA_POLICY_VIEW_LOCAL_INFORMATION |
151 LSA_POLICY_VIEW_AUDIT_INFORMATION |
152 LSA_POLICY_GET_PRIVATE_INFORMATION |
153 LSA_POLICY_TRUST_ADMIN |
154 LSA_POLICY_CREATE_ACCOUNT |
155 LSA_POLICY_CREATE_SECRET |
156 LSA_POLICY_CREATE_PRIVILEGE |
157 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS |
158 LSA_POLICY_SET_AUDIT_REQUIREMENTS |
159 LSA_POLICY_AUDIT_LOG_ADMIN |
160 LSA_POLICY_SERVER_ADMIN |
161 LSA_POLICY_LOOKUP_NAMES |
162 LSA_POLICY_NOTIFICATION);
164 const int LSA_POLICY_READ =
165 (STANDARD_RIGHTS_READ_ACCESS |
166 LSA_POLICY_VIEW_LOCAL_INFORMATION |
167 LSA_POLICY_VIEW_AUDIT_INFORMATION |
168 LSA_POLICY_GET_PRIVATE_INFORMATION);
170 const int LSA_POLICY_WRITE =
171 (STANDARD_RIGHTS_READ_ACCESS |
172 LSA_POLICY_TRUST_ADMIN |
173 LSA_POLICY_CREATE_ACCOUNT |
174 LSA_POLICY_CREATE_SECRET |
175 LSA_POLICY_CREATE_PRIVILEGE |
176 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS |
177 LSA_POLICY_SET_AUDIT_REQUIREMENTS |
178 LSA_POLICY_AUDIT_LOG_ADMIN |
179 LSA_POLICY_SERVER_ADMIN);
181 const int LSA_POLICY_EXECUTE =
182 (STANDARD_RIGHTS_EXECUTE_ACCESS |
183 LSA_POLICY_VIEW_LOCAL_INFORMATION |
184 LSA_POLICY_LOOKUP_NAMES);
186 typedef [public,bitmap32bit] bitmap {
187 LSA_ACCOUNT_VIEW = 0x00000001,
188 LSA_ACCOUNT_ADJUST_PRIVILEGES = 0x00000002,
189 LSA_ACCOUNT_ADJUST_QUOTAS = 0x00000004,
190 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS = 0x00000008
191 } lsa_AccountAccessMask;
193 const int LSA_ACCOUNT_ALL_ACCESS =
194 (STANDARD_RIGHTS_REQUIRED_ACCESS |
195 LSA_ACCOUNT_VIEW |
196 LSA_ACCOUNT_ADJUST_PRIVILEGES |
197 LSA_ACCOUNT_ADJUST_QUOTAS |
198 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS);
200 const int LSA_ACCOUNT_READ =
201 (STANDARD_RIGHTS_READ_ACCESS |
202 LSA_ACCOUNT_VIEW);
204 const int LSA_ACCOUNT_WRITE =
205 (STANDARD_RIGHTS_READ_ACCESS |
206 LSA_ACCOUNT_ADJUST_PRIVILEGES |
207 LSA_ACCOUNT_ADJUST_QUOTAS |
208 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS);
210 const int LSA_ACCOUNT_EXECUTE =
211 (STANDARD_RIGHTS_EXECUTE_ACCESS);
213 typedef [public,bitmap32bit] bitmap {
214 LSA_SECRET_SET_VALUE = 0x00000001,
215 LSA_SECRET_QUERY_VALUE = 0x00000002
216 } lsa_SecretAccessMask;
218 const int LSA_SECRET_ALL_ACCESS =
219 (LSA_SECRET_QUERY_VALUE |
220 LSA_SECRET_SET_VALUE |
221 SEC_STD_DELETE |
222 STANDARD_RIGHTS_READ_ACCESS |
223 SEC_STD_WRITE_DAC |
224 SEC_STD_WRITE_OWNER); /* 0x000F0003 */
226 const int LSA_SECRET_READ =
227 (LSA_SECRET_QUERY_VALUE |
228 STANDARD_RIGHTS_READ_ACCESS); /* 0x00020002 */
230 const int LSA_SECRET_WRITE =
231 (LSA_SECRET_SET_VALUE |
232 STANDARD_RIGHTS_READ_ACCESS); /* 0x00020001 */
234 const int LSA_SECRET_EXECUTE =
235 (STANDARD_RIGHTS_READ_ACCESS); /* 0x00020000 */
237 typedef [public,bitmap32bit] bitmap {
238 LSA_TRUSTED_QUERY_DOMAIN_NAME = 0x00000001,
239 LSA_TRUSTED_QUERY_CONTROLLERS = 0x00000002,
240 LSA_TRUSTED_SET_CONTROLLERS = 0x00000004,
241 LSA_TRUSTED_QUERY_POSIX = 0x00000008,
242 LSA_TRUSTED_SET_POSIX = 0x00000010,
243 LSA_TRUSTED_SET_AUTH = 0x00000020,
244 LSA_TRUSTED_QUERY_AUTH = 0x00000040
245 } lsa_TrustedAccessMask;
247 const int LSA_TRUSTED_DOMAIN_ALL_ACCESS =
248 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
249 LSA_TRUSTED_QUERY_CONTROLLERS |
250 LSA_TRUSTED_SET_CONTROLLERS |
251 LSA_TRUSTED_QUERY_POSIX |
252 LSA_TRUSTED_SET_POSIX |
253 LSA_TRUSTED_SET_AUTH |
254 LSA_TRUSTED_QUERY_AUTH |
255 SEC_STD_DELETE |
256 STANDARD_RIGHTS_READ_ACCESS |
257 SEC_STD_WRITE_DAC |
258 SEC_STD_WRITE_OWNER); /* 0x000F007F */
260 const int LSA_TRUSTED_DOMAIN_READ =
261 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
262 STANDARD_RIGHTS_READ_ACCESS); /* 0x00020001 */
264 const int LSA_TRUSTED_DOMAIN_WRITE =
265 (LSA_TRUSTED_SET_CONTROLLERS |
266 LSA_TRUSTED_SET_POSIX |
267 LSA_TRUSTED_SET_AUTH |
268 STANDARD_RIGHTS_READ_ACCESS); /* 0x00020034 */
270 const int LSA_TRUSTED_DOMAIN_EXECUTE =
271 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
272 LSA_TRUSTED_QUERY_POSIX |
273 STANDARD_RIGHTS_READ_ACCESS); /* 0x0002000C */
276 /* notice the screwup with the system_name - thats why MS created
277 OpenPolicy2 */
278 [public] NTSTATUS lsa_OpenPolicy (
279 [in,unique] uint16 *system_name,
280 [in] lsa_ObjectAttribute *attr,
281 [in] lsa_PolicyAccessMask access_mask,
282 [out] policy_handle *handle
287 /******************/
288 /* Function: 0x07 */
290 typedef struct {
291 uint32 percent_full;
292 uint32 maximum_log_size;
293 hyper retention_time;
294 uint8 shutdown_in_progress;
295 hyper time_to_shutdown;
296 uint32 next_audit_record;
297 } lsa_AuditLogInfo;
299 typedef [v1_enum] enum {
300 LSA_AUDIT_POLICY_NONE=0,
301 LSA_AUDIT_POLICY_SUCCESS=1,
302 LSA_AUDIT_POLICY_FAILURE=2,
303 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
304 LSA_AUDIT_POLICY_CLEAR=4
305 } lsa_PolicyAuditPolicy;
307 typedef enum {
308 LSA_AUDIT_CATEGORY_SYSTEM = 0,
309 LSA_AUDIT_CATEGORY_LOGON = 1,
310 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
311 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
312 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
313 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
314 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
315 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
316 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
317 } lsa_PolicyAuditEventType;
319 typedef struct {
320 uint32 auditing_mode;
321 [size_is(count)] lsa_PolicyAuditPolicy *settings;
322 uint32 count;
323 } lsa_AuditEventsInfo;
325 typedef struct {
326 lsa_StringLarge name;
327 dom_sid2 *sid;
328 } lsa_DomainInfo;
330 typedef struct {
331 lsa_String name;
332 } lsa_PDAccountInfo;
334 typedef [v1_enum] enum {
335 LSA_ROLE_BACKUP=2,
336 LSA_ROLE_PRIMARY=3
337 } lsa_Role;
339 typedef struct {
340 lsa_Role role;
341 } lsa_ServerRole;
343 typedef struct {
344 lsa_String source;
345 lsa_String account;
346 } lsa_ReplicaSourceInfo;
348 typedef struct {
349 uint32 paged_pool;
350 uint32 non_paged_pool;
351 uint32 min_wss;
352 uint32 max_wss;
353 uint32 pagefile;
354 hyper unknown;
355 } lsa_DefaultQuotaInfo;
357 typedef struct {
358 hyper modified_id;
359 NTTIME_hyper db_create_time;
360 } lsa_ModificationInfo;
362 typedef struct {
363 uint8 shutdown_on_full;
364 } lsa_AuditFullSetInfo;
366 typedef struct {
367 uint8 shutdown_on_full;
368 uint8 log_is_full;
369 } lsa_AuditFullQueryInfo;
371 typedef [public] struct {
372 /* it's important that we use the lsa_StringLarge here,
373 * because otherwise windows clients result with such dns hostnames
374 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
375 * where it should be
376 * w2k3-client.samba4.samba.org
378 lsa_StringLarge name;
379 lsa_StringLarge dns_domain;
380 lsa_StringLarge dns_forest;
381 GUID domain_guid;
382 dom_sid2 *sid;
383 } lsa_DnsDomainInfo;
385 typedef enum {
386 LSA_POLICY_INFO_AUDIT_LOG=1,
387 LSA_POLICY_INFO_AUDIT_EVENTS=2,
388 LSA_POLICY_INFO_DOMAIN=3,
389 LSA_POLICY_INFO_PD=4,
390 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
391 LSA_POLICY_INFO_ROLE=6,
392 LSA_POLICY_INFO_REPLICA=7,
393 LSA_POLICY_INFO_QUOTA=8,
394 LSA_POLICY_INFO_MOD=9,
395 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
396 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
397 LSA_POLICY_INFO_DNS=12,
398 LSA_POLICY_INFO_DNS_INT=13,
399 LSA_POLICY_INFO_L_ACCOUNT_DOMAIN=14
400 } lsa_PolicyInfo;
402 typedef [switch_type(uint16)] union {
403 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
404 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
405 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
406 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
407 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
408 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
409 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
410 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
411 [case(LSA_POLICY_INFO_MOD)] lsa_ModificationInfo mod;
412 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
413 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
414 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
415 [case(LSA_POLICY_INFO_DNS_INT)] lsa_DnsDomainInfo dns;
416 [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] lsa_DomainInfo l_account_domain;
417 } lsa_PolicyInformation;
419 NTSTATUS lsa_QueryInfoPolicy(
420 [in] policy_handle *handle,
421 [in] lsa_PolicyInfo level,
422 [out,ref,switch_is(level)] lsa_PolicyInformation **info
425 /******************/
426 /* Function: 0x08 */
427 NTSTATUS lsa_SetInfoPolicy (
428 [in] policy_handle *handle,
429 [in] lsa_PolicyInfo level,
430 [in,switch_is(level)] lsa_PolicyInformation *info
433 /******************/
434 /* Function: 0x09 */
435 [todo] NTSTATUS lsa_ClearAuditLog ();
437 /******************/
438 /* Function: 0x0a */
439 [public] NTSTATUS lsa_CreateAccount (
440 [in] policy_handle *handle,
441 [in,ref] dom_sid2 *sid,
442 [in] lsa_AccountAccessMask access_mask,
443 [out] policy_handle *acct_handle
446 /******************/
447 /* NOTE: This only returns accounts that have at least
448 one privilege set
450 /* Function: 0x0b */
451 typedef struct {
452 dom_sid2 *sid;
453 } lsa_SidPtr;
455 typedef [public] struct {
456 [range(0,20480)] uint32 num_sids;
457 [size_is(num_sids)] lsa_SidPtr *sids;
458 } lsa_SidArray;
460 [public] NTSTATUS lsa_EnumAccounts(
461 [in] policy_handle *handle,
462 [in,out,ref] uint32 *resume_handle,
463 [out,ref] lsa_SidArray *sids,
464 [in,range(0,8192)] uint32 num_entries
467 /*************************************************/
468 /* Function: 0x0c */
470 [public] NTSTATUS lsa_CreateTrustedDomain(
471 [in] policy_handle *policy_handle,
472 [in] lsa_DomainInfo *info,
473 [in] lsa_TrustedAccessMask access_mask,
474 [out] policy_handle *trustdom_handle
478 /******************/
479 /* Function: 0x0d */
481 /* w2k3 treats max_size as max_domains*60 */
482 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
484 typedef struct {
485 uint32 count;
486 [size_is(count)] lsa_DomainInfo *domains;
487 } lsa_DomainList;
489 NTSTATUS lsa_EnumTrustDom(
490 [in] policy_handle *handle,
491 [in,out,ref] uint32 *resume_handle,
492 [out,ref] lsa_DomainList *domains,
493 [in] uint32 max_size
497 /******************/
498 /* Function: 0x0e */
499 typedef [public] enum {
500 SID_NAME_USE_NONE = 0,/* NOTUSED */
501 SID_NAME_USER = 1, /* user */
502 SID_NAME_DOM_GRP = 2, /* domain group */
503 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
504 SID_NAME_ALIAS = 4, /* local group */
505 SID_NAME_WKN_GRP = 5, /* well-known group */
506 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
507 SID_NAME_INVALID = 7, /* invalid account */
508 SID_NAME_UNKNOWN = 8, /* oops. */
509 SID_NAME_COMPUTER = 9, /* machine */
510 SID_NAME_LABEL = 10 /* Mandatory Label */
511 } lsa_SidType;
513 typedef struct {
514 lsa_SidType sid_type;
515 uint32 rid;
516 uint32 sid_index;
517 } lsa_TranslatedSid;
519 typedef struct {
520 [range(0,1000)] uint32 count;
521 [size_is(count)] lsa_TranslatedSid *sids;
522 } lsa_TransSidArray;
524 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
525 typedef [public] struct {
526 [range(0,1000)] uint32 count;
527 [size_is(count)] lsa_DomainInfo *domains;
528 uint32 max_size;
529 } lsa_RefDomainList;
531 /* Level 1: Ask everywhere
532 * Level 2: Ask domain and trusted domains, no builtin and wkn
533 * Level 3: Only ask domain
534 * Level 4: W2k3ad: Only ask AD trusts
535 * Level 5: Only ask transitive forest trusts
536 * Level 6: Like 4
539 typedef [public] enum {
540 LSA_LOOKUP_NAMES_ALL = 1,
541 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
542 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
543 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
544 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
545 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6,
546 LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC = 7
547 } lsa_LookupNamesLevel;
549 [public] NTSTATUS lsa_LookupNames (
550 [in] policy_handle *handle,
551 [in,range(0,1000)] uint32 num_names,
552 [in,size_is(num_names)] lsa_String names[],
553 [out,ref] lsa_RefDomainList **domains,
554 [in,out,ref] lsa_TransSidArray *sids,
555 [in] lsa_LookupNamesLevel level,
556 [in,out,ref] uint32 *count
560 /******************/
561 /* Function: 0x0f */
563 typedef struct {
564 lsa_SidType sid_type;
565 lsa_String name;
566 uint32 sid_index;
567 } lsa_TranslatedName;
569 typedef [public] struct {
570 [range(0,20480)] uint32 count;
571 [size_is(count)] lsa_TranslatedName *names;
572 } lsa_TransNameArray;
574 [public] NTSTATUS lsa_LookupSids(
575 [in] policy_handle *handle,
576 [in,ref] lsa_SidArray *sids,
577 [out,ref] lsa_RefDomainList **domains,
578 [in,out,ref] lsa_TransNameArray *names,
579 [in] lsa_LookupNamesLevel level,
580 [in,out,ref] uint32 *count
584 /* Function: 0x10 */
585 [public] NTSTATUS lsa_CreateSecret(
586 [in] policy_handle *handle,
587 [in] lsa_String name,
588 [in] lsa_SecretAccessMask access_mask,
589 [out] policy_handle *sec_handle
593 /*****************************************/
594 /* Function: 0x11 */
595 NTSTATUS lsa_OpenAccount(
596 [in] policy_handle *handle,
597 [in,ref] dom_sid2 *sid,
598 [in] lsa_AccountAccessMask access_mask,
599 [out] policy_handle *acct_handle
603 /****************************************/
604 /* Function: 0x12 */
606 typedef struct {
607 lsa_LUID luid;
608 uint32 attribute;
609 } lsa_LUIDAttribute;
611 typedef struct {
612 [range(0,1000)] uint32 count;
613 uint32 unknown;
614 [size_is(count)] lsa_LUIDAttribute set[*];
615 } lsa_PrivilegeSet;
617 NTSTATUS lsa_EnumPrivsAccount(
618 [in] policy_handle *handle,
619 [out,ref] lsa_PrivilegeSet **privs
623 /****************************************/
624 /* Function: 0x13 */
625 NTSTATUS lsa_AddPrivilegesToAccount(
626 [in] policy_handle *handle,
627 [in,ref] lsa_PrivilegeSet *privs
631 /****************************************/
632 /* Function: 0x14 */
633 NTSTATUS lsa_RemovePrivilegesFromAccount(
634 [in] policy_handle *handle,
635 [in] uint8 remove_all,
636 [in,unique] lsa_PrivilegeSet *privs
639 /* Function: 0x15 */
640 [todo] NTSTATUS lsa_GetQuotasForAccount();
642 /* Function: 0x16 */
643 [todo] NTSTATUS lsa_SetQuotasForAccount();
645 /* Function: 0x17 */
646 NTSTATUS lsa_GetSystemAccessAccount(
647 [in] policy_handle *handle,
648 [out,ref] lsa_AccountAccessMask *access_mask
651 /* Function: 0x18 */
652 NTSTATUS lsa_SetSystemAccessAccount(
653 [in] policy_handle *handle,
654 [in] lsa_AccountAccessMask access_mask
657 /* Function: 0x19 */
658 NTSTATUS lsa_OpenTrustedDomain(
659 [in] policy_handle *handle,
660 [in] dom_sid2 *sid,
661 [in] lsa_TrustedAccessMask access_mask,
662 [out] policy_handle *trustdom_handle
665 typedef [flag(NDR_PAHEX)] struct {
666 uint3264 length;
667 uint3264 size;
668 [size_is(size),length_is(length)] uint8 *data;
669 } lsa_DATA_BUF;
671 typedef [flag(NDR_PAHEX)] struct {
672 [range(0,65536)] uint32 size;
673 [size_is(size)] uint8 *data;
674 } lsa_DATA_BUF2;
676 typedef enum {
677 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
678 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS = 2,
679 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
680 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
681 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
682 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
683 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
684 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
685 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL = 9,
686 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL = 10,
687 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL = 11,
688 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL = 12,
689 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES = 13
690 } lsa_TrustDomInfoEnum;
692 typedef [public,bitmap32bit] bitmap {
693 LSA_TRUST_DIRECTION_INBOUND = 0x00000001,
694 LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
695 } lsa_TrustDirection;
697 typedef [public,v1_enum] enum {
698 LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001,
699 LSA_TRUST_TYPE_UPLEVEL = 0x00000002,
700 LSA_TRUST_TYPE_MIT = 0x00000003,
701 LSA_TRUST_TYPE_DCE = 0x00000004
702 } lsa_TrustType;
704 typedef [public,bitmap32bit] bitmap {
705 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
706 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
707 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
708 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
709 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
710 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
711 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040,
712 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080,
713 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION = 0x00000200,
714 LSA_TRUST_ATTRIBUTE_PIM_TRUST = 0x00000400,
715 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION = 0x00000800
716 } lsa_TrustAttributes;
718 typedef struct {
719 lsa_StringLarge netbios_name;
720 } lsa_TrustDomainInfoName;
723 typedef struct {
724 uint32 entries;
725 [size_is(entries)] lsa_StringLarge *netbios_names;
726 } lsa_TrustDomainInfoControllers;
728 typedef struct {
729 uint32 posix_offset;
730 } lsa_TrustDomainInfoPosixOffset;
732 typedef struct {
733 lsa_DATA_BUF *password;
734 lsa_DATA_BUF *old_password;
735 } lsa_TrustDomainInfoPassword;
737 typedef struct {
738 lsa_String netbios_name;
739 dom_sid2 *sid;
740 } lsa_TrustDomainInfoBasic;
742 typedef [public] struct {
743 lsa_StringLarge domain_name;
744 lsa_StringLarge netbios_name;
745 dom_sid2 *sid;
746 lsa_TrustDirection trust_direction;
747 lsa_TrustType trust_type;
748 lsa_TrustAttributes trust_attributes;
749 } lsa_TrustDomainInfoInfoEx;
751 typedef [public,v1_enum] enum {
752 TRUST_AUTH_TYPE_NONE = 0,
753 TRUST_AUTH_TYPE_NT4OWF = 1,
754 TRUST_AUTH_TYPE_CLEAR = 2,
755 TRUST_AUTH_TYPE_VERSION = 3
756 } lsa_TrustAuthType;
758 typedef struct {
759 NTTIME_hyper last_update_time;
760 lsa_TrustAuthType AuthType;
761 lsa_DATA_BUF2 data;
762 } lsa_TrustDomainInfoBuffer;
764 typedef [public] struct {
765 uint32 incoming_count;
766 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
767 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
768 uint32 outgoing_count;
769 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
770 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
771 } lsa_TrustDomainInfoAuthInfo;
773 typedef struct {
774 lsa_TrustDomainInfoInfoEx info_ex;
775 lsa_TrustDomainInfoPosixOffset posix_offset;
776 lsa_TrustDomainInfoAuthInfo auth_info;
777 } lsa_TrustDomainInfoFullInfo;
779 typedef struct {
780 lsa_DATA_BUF2 auth_blob;
781 } lsa_TrustDomainInfoAuthInfoInternal;
783 typedef struct {
784 lsa_TrustDomainInfoInfoEx info_ex;
785 lsa_TrustDomainInfoPosixOffset posix_offset;
786 lsa_TrustDomainInfoAuthInfoInternal auth_info;
787 } lsa_TrustDomainInfoFullInfoInternal;
789 typedef struct {
790 lsa_TrustDomainInfoInfoEx info_ex;
791 uint32 forest_trust_length;
792 [size_is(forest_trust_length)] uint8 *forest_trust_data;
793 } lsa_TrustDomainInfoInfoEx2Internal;
795 typedef struct {
796 lsa_TrustDomainInfoInfoEx2Internal info;
797 lsa_TrustDomainInfoPosixOffset posix_offset;
798 lsa_TrustDomainInfoAuthInfo auth_info;
799 } lsa_TrustDomainInfoFullInfo2Internal;
801 typedef struct {
802 kerb_EncTypes enc_types;
803 } lsa_TrustDomainInfoSupportedEncTypes;
805 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
806 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
807 lsa_TrustDomainInfoName name;
808 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
809 lsa_TrustDomainInfoControllers controllers;
810 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
811 lsa_TrustDomainInfoPosixOffset posix_offset;
812 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
813 lsa_TrustDomainInfoPassword password;
814 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
815 lsa_TrustDomainInfoBasic info_basic;
816 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
817 lsa_TrustDomainInfoInfoEx info_ex;
818 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
819 lsa_TrustDomainInfoAuthInfo auth_info;
820 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
821 lsa_TrustDomainInfoFullInfo full_info;
822 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
823 lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;
824 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
825 lsa_TrustDomainInfoFullInfoInternal full_info_internal;
826 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
827 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;
828 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
829 lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;
830 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES)]
831 lsa_TrustDomainInfoSupportedEncTypes enc_types;
832 } lsa_TrustedDomainInfo;
834 /* Function: 0x1a */
835 NTSTATUS lsa_QueryTrustedDomainInfo(
836 [in] policy_handle *trustdom_handle,
837 [in] lsa_TrustDomInfoEnum level,
838 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
841 /* Function: 0x1b */
842 NTSTATUS lsa_SetInformationTrustedDomain(
843 [in] policy_handle *trustdom_handle,
844 [in] lsa_TrustDomInfoEnum level,
845 [in,switch_is(level)] lsa_TrustedDomainInfo *info
848 /* Function: 0x1c */
849 [public] NTSTATUS lsa_OpenSecret(
850 [in] policy_handle *handle,
851 [in] lsa_String name,
852 [in] lsa_SecretAccessMask access_mask,
853 [out] policy_handle *sec_handle
856 /* Function: 0x1d */
858 [public] NTSTATUS lsa_SetSecret(
859 [in] policy_handle *sec_handle,
860 [in,unique] lsa_DATA_BUF *new_val,
861 [in,unique] lsa_DATA_BUF *old_val
864 typedef struct {
865 lsa_DATA_BUF *buf;
866 } lsa_DATA_BUF_PTR;
868 /* Function: 0x1e */
869 [public] NTSTATUS lsa_QuerySecret (
870 [in] policy_handle *sec_handle,
871 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
872 [in,out,unique] NTTIME_hyper *new_mtime,
873 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
874 [in,out,unique] NTTIME_hyper *old_mtime
877 /* Function: 0x1f */
878 NTSTATUS lsa_LookupPrivValue(
879 [in] policy_handle *handle,
880 [in,ref] lsa_String *name,
881 [out,ref] lsa_LUID *luid
885 /* Function: 0x20 */
886 NTSTATUS lsa_LookupPrivName(
887 [in] policy_handle *handle,
888 [in,ref] lsa_LUID *luid,
889 [out,ref] lsa_StringLarge **name
893 /*******************/
894 /* Function: 0x21 */
895 NTSTATUS lsa_LookupPrivDisplayName(
896 [in] policy_handle *handle,
897 [in,ref] lsa_String *name,
898 [in] uint16 language_id,
899 [in] uint16 language_id_sys,
900 [out,ref] lsa_StringLarge **disp_name,
901 /* see http://www.microsoft.com/globaldev/nlsweb/ for
902 language definitions */
903 [out,ref] uint16 *returned_language_id
906 /*******************/
907 /* Function: 0x22 */
908 NTSTATUS lsa_DeleteObject (
909 [in,out] policy_handle *handle
912 /*******************/
913 /* Function: 0x23 */
914 NTSTATUS lsa_EnumAccountsWithUserRight (
915 [in] policy_handle *handle,
916 [in,unique] lsa_String *name,
917 [out] lsa_SidArray *sids
920 /* Function: 0x24 */
921 typedef struct {
922 [string,charset(UTF16)] uint16 *name;
923 } lsa_RightAttribute;
925 typedef struct {
926 [range(0,256)] uint32 count;
927 [size_is(count)] lsa_StringLarge *names;
928 } lsa_RightSet;
930 NTSTATUS lsa_EnumAccountRights (
931 [in] policy_handle *handle,
932 [in,ref] dom_sid2 *sid,
933 [out,ref] lsa_RightSet *rights
937 /**********************/
938 /* Function: 0x25 */
939 NTSTATUS lsa_AddAccountRights (
940 [in] policy_handle *handle,
941 [in,ref] dom_sid2 *sid,
942 [in,ref] lsa_RightSet *rights
945 /**********************/
946 /* Function: 0x26 */
947 NTSTATUS lsa_RemoveAccountRights (
948 [in] policy_handle *handle,
949 [in,ref] dom_sid2 *sid,
950 [in] uint8 remove_all,
951 [in,ref] lsa_RightSet *rights
954 /* Function: 0x27 */
955 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
956 [in] policy_handle *handle,
957 [in,ref] dom_sid2 *dom_sid,
958 [in] lsa_TrustDomInfoEnum level,
959 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
962 /* Function: 0x28 */
963 NTSTATUS lsa_SetTrustedDomainInfo(
964 [in] policy_handle *handle,
965 [in] dom_sid2 *dom_sid,
966 [in] lsa_TrustDomInfoEnum level,
967 [in,switch_is(level)] lsa_TrustedDomainInfo *info
970 /* Function: 0x29 */
971 NTSTATUS lsa_DeleteTrustedDomain(
972 [in] policy_handle *handle,
973 [in] dom_sid2 *dom_sid
976 /* Function: 0x2a */
977 NTSTATUS lsa_StorePrivateData(
978 [in] policy_handle *handle,
979 [in,ref] lsa_String *name,
980 [in,unique] lsa_DATA_BUF *val
983 /* Function: 0x2b */
984 NTSTATUS lsa_RetrievePrivateData(
985 [in] policy_handle *handle,
986 [in,ref] lsa_String *name,
987 [in,out,ref] lsa_DATA_BUF **val
990 /**********************/
991 /* Function: 0x2c */
992 [public] NTSTATUS lsa_OpenPolicy2 (
993 [in,unique] [string,charset(UTF16)] uint16 *system_name,
994 [in] lsa_ObjectAttribute *attr,
995 [in] lsa_PolicyAccessMask access_mask,
996 [out] policy_handle *handle
999 /**********************/
1000 /* Function: 0x2d */
1001 NTSTATUS lsa_GetUserName(
1002 [in,unique] [string,charset(UTF16)] uint16 *system_name,
1003 [in,out,ref] lsa_String **account_name,
1004 [in,out,unique] lsa_String **authority_name
1007 /**********************/
1008 /* Function: 0x2e */
1010 NTSTATUS lsa_QueryInfoPolicy2(
1011 [in] policy_handle *handle,
1012 [in] lsa_PolicyInfo level,
1013 [out,ref,switch_is(level)] lsa_PolicyInformation **info
1016 /* Function 0x2f */
1017 NTSTATUS lsa_SetInfoPolicy2(
1018 [in] policy_handle *handle,
1019 [in] lsa_PolicyInfo level,
1020 [in,switch_is(level)] lsa_PolicyInformation *info
1023 /**********************/
1024 /* Function 0x30 */
1025 NTSTATUS lsa_QueryTrustedDomainInfoByName(
1026 [in] policy_handle *handle,
1027 [in,ref] lsa_String *trusted_domain,
1028 [in] lsa_TrustDomInfoEnum level,
1029 [out,ref,switch_is(level)] lsa_TrustedDomainInfo **info
1032 /**********************/
1033 /* Function 0x31 */
1034 [public] NTSTATUS lsa_SetTrustedDomainInfoByName(
1035 [in] policy_handle *handle,
1036 [in,ref] lsa_String *trusted_domain,
1037 [in] lsa_TrustDomInfoEnum level,
1038 [in,ref,switch_is(level)] lsa_TrustedDomainInfo *info
1041 /* Function 0x32 */
1043 /* w2k3 treats max_size as max_domains*82 */
1044 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
1046 typedef struct {
1047 uint32 count;
1048 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
1049 } lsa_DomainListEx;
1051 NTSTATUS lsa_EnumTrustedDomainsEx (
1052 [in] policy_handle *handle,
1053 [in,out] uint32 *resume_handle,
1054 [out] lsa_DomainListEx *domains,
1055 [in] uint32 max_size
1058 /* Function 0x33 */
1059 NTSTATUS lsa_CreateTrustedDomainEx(
1060 [in] policy_handle *policy_handle,
1061 [in] lsa_TrustDomainInfoInfoEx *info,
1062 [in] lsa_TrustDomainInfoAuthInfo *auth_info,
1063 [in] lsa_TrustedAccessMask access_mask,
1064 [out] policy_handle *trustdom_handle
1068 /* Function 0x34 */
1069 NTSTATUS lsa_CloseTrustedDomainEx(
1070 [in,out] policy_handle *handle
1073 /* Function 0x35 */
1074 typedef [bitmap32bit] bitmap {
1075 LSA_POLICY_KERBEROS_VALIDATE_CLIENT = 0x00000080
1076 } lsa_krbAuthenticationOptions;
1078 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
1079 for reserved - gd */
1080 typedef struct {
1081 lsa_krbAuthenticationOptions authentication_options;
1082 hyper service_tkt_lifetime;
1083 hyper user_tkt_lifetime;
1084 hyper user_tkt_renewaltime;
1085 hyper clock_skew;
1086 hyper reserved;
1087 } lsa_DomainInfoKerberos;
1089 typedef struct {
1090 uint32 blob_size;
1091 [size_is(blob_size)] uint8 *efs_blob;
1092 } lsa_DomainInfoEfs;
1094 typedef enum {
1095 LSA_DOMAIN_INFO_POLICY_EFS=2,
1096 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
1097 } lsa_DomainInfoEnum;
1099 typedef [switch_type(uint16)] union {
1100 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
1101 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
1102 } lsa_DomainInformationPolicy;
1104 NTSTATUS lsa_QueryDomainInformationPolicy(
1105 [in] policy_handle *handle,
1106 [in] uint16 level,
1107 [out,ref,switch_is(level)] lsa_DomainInformationPolicy **info
1110 /* Function 0x36 */
1111 NTSTATUS lsa_SetDomainInformationPolicy(
1112 [in] policy_handle *handle,
1113 [in] uint16 level,
1114 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
1117 /**********************/
1118 /* Function 0x37 */
1119 NTSTATUS lsa_OpenTrustedDomainByName(
1120 [in] policy_handle *handle,
1121 [in] lsa_String name,
1122 [in] lsa_TrustedAccessMask access_mask,
1123 [out] policy_handle *trustdom_handle
1126 /* Function 0x38 */
1127 [todo] NTSTATUS lsa_TestCall();
1129 /**********************/
1130 /* Function 0x39 */
1132 typedef struct {
1133 lsa_SidType sid_type;
1134 lsa_String name;
1135 uint32 sid_index;
1136 uint32 unknown;
1137 } lsa_TranslatedName2;
1139 typedef struct {
1140 [range(0,1000)] uint32 count;
1141 [size_is(count)] lsa_TranslatedName2 *names;
1142 } lsa_TransNameArray2;
1144 typedef [v1_enum] enum {
1145 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES = 0x00000000,
1146 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL = 0x80000000
1147 } lsa_LookupOptions;
1149 typedef [v1_enum] enum {
1150 LSA_CLIENT_REVISION_1 = 0x00000001,
1151 LSA_CLIENT_REVISION_2 = 0x00000002
1152 } lsa_ClientRevision;
1154 [public] NTSTATUS lsa_LookupSids2(
1155 [in] policy_handle *handle,
1156 [in,ref] lsa_SidArray *sids,
1157 [out,ref] lsa_RefDomainList **domains,
1158 [in,out,ref] lsa_TransNameArray2 *names,
1159 [in] lsa_LookupNamesLevel level,
1160 [in,out,ref] uint32 *count,
1161 [in] lsa_LookupOptions lookup_options,
1162 [in] lsa_ClientRevision client_revision
1165 /**********************/
1166 /* Function 0x3a */
1168 typedef struct {
1169 lsa_SidType sid_type;
1170 uint32 rid;
1171 uint32 sid_index;
1172 uint32 unknown;
1173 } lsa_TranslatedSid2;
1175 typedef struct {
1176 [range(0,1000)] uint32 count;
1177 [size_is(count)] lsa_TranslatedSid2 *sids;
1178 } lsa_TransSidArray2;
1180 [public] NTSTATUS lsa_LookupNames2 (
1181 [in] policy_handle *handle,
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_TransSidArray2 *sids,
1186 [in] lsa_LookupNamesLevel level,
1187 [in,out,ref] uint32 *count,
1188 [in] lsa_LookupOptions lookup_options,
1189 [in] lsa_ClientRevision client_revision
1192 /* Function 0x3b */
1193 NTSTATUS lsa_CreateTrustedDomainEx2(
1194 [in] policy_handle *policy_handle,
1195 [in] lsa_TrustDomainInfoInfoEx *info,
1196 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info_internal,
1197 [in] lsa_TrustedAccessMask access_mask,
1198 [out] policy_handle *trustdom_handle
1201 /* Function 0x3c */
1202 [todo] NTSTATUS lsa_CREDRWRITE();
1204 /* Function 0x3d */
1205 [todo] NTSTATUS lsa_CREDRREAD();
1207 /* Function 0x3e */
1208 [todo] NTSTATUS lsa_CREDRENUMERATE();
1210 /* Function 0x3f */
1211 [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
1213 /* Function 0x40 */
1214 [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
1216 /* Function 0x41 */
1217 [todo] NTSTATUS lsa_CREDRDELETE();
1219 /* Function 0x42 */
1220 [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
1222 /* Function 0x43 */
1223 [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1225 /**********************/
1226 /* Function 0x44 */
1227 typedef struct {
1228 lsa_SidType sid_type;
1229 dom_sid2 *sid;
1230 uint32 sid_index;
1231 uint32 flags;
1232 } lsa_TranslatedSid3;
1234 typedef struct {
1235 [range(0,1000)] uint32 count;
1236 [size_is(count)] lsa_TranslatedSid3 *sids;
1237 } lsa_TransSidArray3;
1239 [public] NTSTATUS lsa_LookupNames3 (
1240 [in] policy_handle *handle,
1241 [in,range(0,1000)] uint32 num_names,
1242 [in,size_is(num_names)] lsa_String names[],
1243 [out,ref] lsa_RefDomainList **domains,
1244 [in,out,ref] lsa_TransSidArray3 *sids,
1245 [in] lsa_LookupNamesLevel level,
1246 [in,out,ref] uint32 *count,
1247 [in] lsa_LookupOptions lookup_options,
1248 [in] lsa_ClientRevision client_revision
1251 /* Function 0x45 */
1252 [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1254 /* Function 0x46 */
1255 [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1257 /* Function 0x47 */
1258 [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1260 /* Function 0x48 */
1261 [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1263 /* Function 0x49 */
1264 typedef [bitmap32bit,public] bitmap {
1265 /* these apply to LSA_FOREST_TRUST_TOP_LEVEL_NAME */
1266 LSA_TLN_DISABLED_NEW = 0x00000001,
1267 LSA_TLN_DISABLED_ADMIN = 0x00000002,
1268 LSA_TLN_DISABLED_CONFLICT = 0x00000004,
1270 /* these apply to LSA_FOREST_TRUST_DOMAIN_INFO */
1271 LSA_SID_DISABLED_ADMIN = 0x00000001,
1272 LSA_SID_DISABLED_CONFLICT = 0x00000002,
1273 LSA_NB_DISABLED_ADMIN = 0x00000004,
1274 LSA_NB_DISABLED_CONFLICT = 0x00000008
1275 } lsa_ForestTrustRecordFlags;
1277 const uint32 LSA_TLN_DISABLED_MASK = (
1278 LSA_TLN_DISABLED_NEW |
1279 LSA_TLN_DISABLED_ADMIN |
1280 LSA_TLN_DISABLED_CONFLICT);
1281 const uint32 LSA_SID_DISABLED_MASK = (
1282 LSA_SID_DISABLED_ADMIN |
1283 LSA_SID_DISABLED_CONFLICT);
1284 const uint32 LSA_NB_DISABLED_MASK = (
1285 LSA_NB_DISABLED_ADMIN |
1286 LSA_NB_DISABLED_CONFLICT);
1288 typedef enum {
1289 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1290 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1291 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1292 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1293 } lsa_ForestTrustRecordType;
1295 typedef struct {
1296 [range(0,131072)] uint3264 length;
1297 [size_is(length)] uint8 *data;
1298 } lsa_ForestTrustBinaryData;
1300 typedef struct {
1301 dom_sid2 *domain_sid;
1302 lsa_StringLarge dns_domain_name;
1303 lsa_StringLarge netbios_domain_name;
1304 } lsa_ForestTrustDomainInfo;
1306 typedef [switch_type(lsa_ForestTrustRecordType)] union {
1307 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_StringLarge top_level_name;
1308 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1309 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1310 [default] lsa_ForestTrustBinaryData data;
1311 } lsa_ForestTrustData;
1313 typedef struct {
1314 lsa_ForestTrustRecordFlags flags;
1315 lsa_ForestTrustRecordType type;
1316 NTTIME_hyper time;
1317 [switch_is(type)] lsa_ForestTrustData forest_trust_data;
1318 } lsa_ForestTrustRecord;
1320 typedef [public] struct {
1321 [range(0,4000)] uint32 count;
1322 [size_is(count)] lsa_ForestTrustRecord **entries;
1323 } lsa_ForestTrustInformation;
1325 [public] NTSTATUS lsa_lsaRQueryForestTrustInformation(
1326 [in] policy_handle *handle,
1327 [in,ref] lsa_String *trusted_domain_name,
1328 [in] lsa_ForestTrustRecordType highest_record_type,
1329 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1332 /*****************
1333 * Function 0x4a */
1335 typedef [v1_enum] enum {
1336 LSA_FOREST_TRUST_COLLISION_TDO = 0,
1337 LSA_FOREST_TRUST_COLLISION_XREF = 1,
1338 LSA_FOREST_TRUST_COLLISION_OTHER = 2
1339 } lsa_ForestTrustCollisionRecordType;
1341 typedef [public] struct {
1342 uint32 index;
1343 lsa_ForestTrustCollisionRecordType type;
1344 lsa_ForestTrustRecordFlags flags;
1345 lsa_String name;
1346 } lsa_ForestTrustCollisionRecord;
1348 typedef [public] struct {
1349 uint32 count;
1350 [size_is(count)] lsa_ForestTrustCollisionRecord **entries;
1351 } lsa_ForestTrustCollisionInfo;
1353 [public] NTSTATUS lsa_lsaRSetForestTrustInformation(
1354 [in] policy_handle *handle,
1355 [in,ref] lsa_StringLarge *trusted_domain_name,
1356 [in] lsa_ForestTrustRecordType highest_record_type,
1357 [in,ref] lsa_ForestTrustInformation *forest_trust_info,
1358 [in] boolean8 check_only,
1359 [out,ref] lsa_ForestTrustCollisionInfo **collision_info
1362 /* Function 0x4b */
1363 [todo] NTSTATUS lsa_CREDRRENAME();
1365 /*****************/
1366 /* Function 0x4c */
1368 [public] NTSTATUS lsa_LookupSids3(
1369 [in,ref] lsa_SidArray *sids,
1370 [out,ref] lsa_RefDomainList **domains,
1371 [in,out,ref] lsa_TransNameArray2 *names,
1372 [in] lsa_LookupNamesLevel level,
1373 [in,out,ref] uint32 *count,
1374 [in] lsa_LookupOptions lookup_options,
1375 [in] lsa_ClientRevision client_revision
1378 const int LSA_CLIENT_REVISION_NO_DNS = 0x00000001;
1379 const int LSA_CLIENT_REVISION_DNS = 0x00000002;
1381 const int LSA_LOOKUP_OPTIONS_NO_ISOLATED = 0x80000000;
1383 /* Function 0x4d */
1384 NTSTATUS lsa_LookupNames4(
1385 [in,range(0,1000)] uint32 num_names,
1386 [in,size_is(num_names)] lsa_String names[],
1387 [out,ref] lsa_RefDomainList **domains,
1388 [in,out,ref] lsa_TransSidArray3 *sids,
1389 [in] lsa_LookupNamesLevel level,
1390 [in,out,ref] uint32 *count,
1391 [in] lsa_LookupOptions lookup_options,
1392 [in] lsa_ClientRevision client_revision
1395 /* Function 0x4e */
1396 [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1398 /* Function 0x4f */
1399 [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1401 /* Function 0x50 */
1402 [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1404 /* Function 0x51 */
1405 [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();