4 lsa interface definition
7 import
"misc.idl", "security.idl";
9 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
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")
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;
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;
32 typedef [public] struct {
34 [size_is(count
)] lsa_String
*names
;
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;
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 {
52 [size_is(size
/2),length_is(length
/2)] uint16
*array
;
58 [in,out] policy_handle
*handle
64 [public] NTSTATUS lsa_Delete
(
65 [in] policy_handle
*handle
83 [size_is(count
)] lsa_PrivEntry
*privs
;
86 [public] NTSTATUS lsa_EnumPrivs
(
87 [in] policy_handle
*handle,
88 [in,out,ref] uint32
*resume_handle
,
89 [out,ref] lsa_PrivArray
*privs
,
95 NTSTATUS lsa_QuerySecurity
(
96 [in] policy_handle
*handle,
97 [in] security_secinfo sec_info
,
98 [out,ref] sec_desc_buf
**sdbuf
103 NTSTATUS lsa_SetSecObj
(
104 [in] policy_handle
*handle,
105 [in] security_secinfo sec_info
,
106 [in,ref] sec_desc_buf
*sdbuf
111 [todo
] NTSTATUS lsa_ChangePassword
();
118 LSA_SECURITY_ANONYMOUS
= 0,
119 LSA_SECURITY_IDENTIFICATION
= 1,
120 LSA_SECURITY_IMPERSONATION
= 2,
121 LSA_SECURITY_DELEGATION
= 3
122 } lsa_SecurityImpersonationLevel
;
125 uint3264 len
; /* ignored */
126 lsa_SecurityImpersonationLevel impersonation_level
;
128 uint8 effective_only
;
132 uint3264 len
; /* ignored */
134 [string,charset
(UTF16
)] uint16
*object_name
;
136 security_descriptor
*sec_desc
;
137 lsa_QosInfo
*sec_qos
;
138 } lsa_ObjectAttribute
;
140 typedef [public,bitmap32bit
] bitmap
{
141 LSA_POLICY_VIEW_LOCAL_INFORMATION
= 0x00000001,
142 LSA_POLICY_VIEW_AUDIT_INFORMATION
= 0x00000002,
143 LSA_POLICY_GET_PRIVATE_INFORMATION
= 0x00000004,
144 LSA_POLICY_TRUST_ADMIN
= 0x00000008,
145 LSA_POLICY_CREATE_ACCOUNT
= 0x00000010,
146 LSA_POLICY_CREATE_SECRET
= 0x00000020,
147 LSA_POLICY_CREATE_PRIVILEGE
= 0x00000040,
148 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS
= 0x00000080,
149 LSA_POLICY_SET_AUDIT_REQUIREMENTS
= 0x00000100,
150 LSA_POLICY_AUDIT_LOG_ADMIN
= 0x00000200,
151 LSA_POLICY_SERVER_ADMIN
= 0x00000400,
152 LSA_POLICY_LOOKUP_NAMES
= 0x00000800,
153 LSA_POLICY_NOTIFICATION
= 0x00001000
154 } lsa_PolicyAccessMask
;
156 const int LSA_POLICY_ALL_ACCESS
=
157 (STANDARD_RIGHTS_REQUIRED_ACCESS |
158 LSA_POLICY_VIEW_LOCAL_INFORMATION |
159 LSA_POLICY_VIEW_AUDIT_INFORMATION |
160 LSA_POLICY_GET_PRIVATE_INFORMATION |
161 LSA_POLICY_TRUST_ADMIN |
162 LSA_POLICY_CREATE_ACCOUNT |
163 LSA_POLICY_CREATE_SECRET |
164 LSA_POLICY_CREATE_PRIVILEGE |
165 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS |
166 LSA_POLICY_SET_AUDIT_REQUIREMENTS |
167 LSA_POLICY_AUDIT_LOG_ADMIN |
168 LSA_POLICY_SERVER_ADMIN |
169 LSA_POLICY_LOOKUP_NAMES |
170 LSA_POLICY_NOTIFICATION
);
172 const int LSA_POLICY_READ
=
173 (STANDARD_RIGHTS_READ_ACCESS |
174 LSA_POLICY_VIEW_LOCAL_INFORMATION |
175 LSA_POLICY_VIEW_AUDIT_INFORMATION |
176 LSA_POLICY_GET_PRIVATE_INFORMATION
);
178 const int LSA_POLICY_WRITE
=
179 (STANDARD_RIGHTS_READ_ACCESS |
180 LSA_POLICY_TRUST_ADMIN |
181 LSA_POLICY_CREATE_ACCOUNT |
182 LSA_POLICY_CREATE_SECRET |
183 LSA_POLICY_CREATE_PRIVILEGE |
184 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS |
185 LSA_POLICY_SET_AUDIT_REQUIREMENTS |
186 LSA_POLICY_AUDIT_LOG_ADMIN |
187 LSA_POLICY_SERVER_ADMIN
);
189 const int LSA_POLICY_EXECUTE
=
190 (STANDARD_RIGHTS_EXECUTE_ACCESS |
191 LSA_POLICY_VIEW_LOCAL_INFORMATION |
192 LSA_POLICY_LOOKUP_NAMES
);
194 typedef [public,bitmap32bit
] bitmap
{
195 LSA_ACCOUNT_VIEW
= 0x00000001,
196 LSA_ACCOUNT_ADJUST_PRIVILEGES
= 0x00000002,
197 LSA_ACCOUNT_ADJUST_QUOTAS
= 0x00000004,
198 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
= 0x00000008
199 } lsa_AccountAccessMask
;
201 const int LSA_ACCOUNT_ALL_ACCESS
=
202 (STANDARD_RIGHTS_REQUIRED_ACCESS |
204 LSA_ACCOUNT_ADJUST_PRIVILEGES |
205 LSA_ACCOUNT_ADJUST_QUOTAS |
206 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
);
208 const int LSA_ACCOUNT_READ
=
209 (STANDARD_RIGHTS_READ_ACCESS |
212 const int LSA_ACCOUNT_WRITE
=
213 (STANDARD_RIGHTS_READ_ACCESS |
214 LSA_ACCOUNT_ADJUST_PRIVILEGES |
215 LSA_ACCOUNT_ADJUST_QUOTAS |
216 LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS
);
218 const int LSA_ACCOUNT_EXECUTE
=
219 (STANDARD_RIGHTS_EXECUTE_ACCESS
);
221 typedef [public,bitmap32bit
] bitmap
{
222 LSA_SECRET_SET_VALUE
= 0x00000001,
223 LSA_SECRET_QUERY_VALUE
= 0x00000002
224 } lsa_SecretAccessMask
;
226 const int LSA_SECRET_ALL_ACCESS
=
227 (LSA_SECRET_QUERY_VALUE |
228 LSA_SECRET_SET_VALUE |
230 STANDARD_RIGHTS_READ_ACCESS |
232 SEC_STD_WRITE_OWNER
); /* 0x000F0003 */
234 const int LSA_SECRET_READ
=
235 (LSA_SECRET_QUERY_VALUE |
236 STANDARD_RIGHTS_READ_ACCESS
); /* 0x00020002 */
238 const int LSA_SECRET_WRITE
=
239 (LSA_SECRET_SET_VALUE |
240 STANDARD_RIGHTS_READ_ACCESS
); /* 0x00020001 */
242 const int LSA_SECRET_EXECUTE
=
243 (STANDARD_RIGHTS_READ_ACCESS
); /* 0x00020000 */
245 typedef [public,bitmap32bit
] bitmap
{
246 LSA_TRUSTED_QUERY_DOMAIN_NAME
= 0x00000001,
247 LSA_TRUSTED_QUERY_CONTROLLERS
= 0x00000002,
248 LSA_TRUSTED_SET_CONTROLLERS
= 0x00000004,
249 LSA_TRUSTED_QUERY_POSIX
= 0x00000008,
250 LSA_TRUSTED_SET_POSIX
= 0x00000010,
251 LSA_TRUSTED_SET_AUTH
= 0x00000020,
252 LSA_TRUSTED_QUERY_AUTH
= 0x00000040
253 } lsa_TrustedAccessMask
;
255 const int LSA_TRUSTED_DOMAIN_ALL_ACCESS
=
256 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
257 LSA_TRUSTED_QUERY_CONTROLLERS |
258 LSA_TRUSTED_SET_CONTROLLERS |
259 LSA_TRUSTED_QUERY_POSIX |
260 LSA_TRUSTED_SET_POSIX |
261 LSA_TRUSTED_SET_AUTH |
262 LSA_TRUSTED_QUERY_AUTH |
264 STANDARD_RIGHTS_READ_ACCESS |
266 SEC_STD_WRITE_OWNER
); /* 0x000F007F */
268 const int LSA_TRUSTED_DOMAIN_READ
=
269 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
270 STANDARD_RIGHTS_READ_ACCESS
); /* 0x00020001 */
272 const int LSA_TRUSTED_DOMAIN_WRITE
=
273 (LSA_TRUSTED_SET_CONTROLLERS |
274 LSA_TRUSTED_SET_POSIX |
275 LSA_TRUSTED_SET_AUTH |
276 STANDARD_RIGHTS_READ_ACCESS
); /* 0x00020034 */
278 const int LSA_TRUSTED_DOMAIN_EXECUTE
=
279 (LSA_TRUSTED_QUERY_DOMAIN_NAME |
280 LSA_TRUSTED_QUERY_POSIX |
281 STANDARD_RIGHTS_READ_ACCESS
); /* 0x0002000C */
284 /* notice the screwup with the system_name - that's why MS created
286 [public] NTSTATUS lsa_OpenPolicy
(
287 [in,unique] uint16
*system_name
,
288 [in] lsa_ObjectAttribute
*attr
,
289 [in] lsa_PolicyAccessMask access_mask
,
290 [out] policy_handle
*handle
300 uint32 maximum_log_size
;
301 hyper retention_time
;
302 uint8 shutdown_in_progress
;
303 hyper time_to_shutdown
;
304 uint32 next_audit_record
;
307 typedef [v1_enum] enum {
308 LSA_AUDIT_POLICY_NONE
=0,
309 LSA_AUDIT_POLICY_SUCCESS
=1,
310 LSA_AUDIT_POLICY_FAILURE
=2,
311 LSA_AUDIT_POLICY_ALL
=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE
),
312 LSA_AUDIT_POLICY_CLEAR
=4
313 } lsa_PolicyAuditPolicy
;
316 LSA_AUDIT_CATEGORY_SYSTEM
= 0,
317 LSA_AUDIT_CATEGORY_LOGON
= 1,
318 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS
= 2,
319 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS
= 3,
320 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING
= 4,
321 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES
= 5,
322 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT
= 6,
323 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS
= 7, /* only in win2k/2k3 */
324 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON
= 8 /* only in win2k/2k3 */
325 } lsa_PolicyAuditEventType
;
328 uint32 auditing_mode
;
329 [size_is(count
)] lsa_PolicyAuditPolicy
*settings
;
331 } lsa_AuditEventsInfo
;
334 lsa_StringLarge name
;
342 typedef [v1_enum] enum {
354 } lsa_ReplicaSourceInfo
;
358 uint32 non_paged_pool
;
363 } lsa_DefaultQuotaInfo
;
367 NTTIME_hyper db_create_time
;
368 } lsa_ModificationInfo
;
371 uint8 shutdown_on_full
;
372 } lsa_AuditFullSetInfo
;
375 uint8 shutdown_on_full
;
377 } lsa_AuditFullQueryInfo
;
379 typedef [public] struct {
380 /* it's important that we use the lsa_StringLarge here,
381 * because otherwise windows clients result with such dns hostnames
382 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
384 * w2k3-client.samba4.samba.org
386 lsa_StringLarge name
;
387 lsa_StringLarge dns_domain
;
388 lsa_StringLarge dns_forest
;
394 LSA_POLICY_INFO_AUDIT_LOG
=1,
395 LSA_POLICY_INFO_AUDIT_EVENTS
=2,
396 LSA_POLICY_INFO_DOMAIN
=3,
397 LSA_POLICY_INFO_PD
=4,
398 LSA_POLICY_INFO_ACCOUNT_DOMAIN
=5,
399 LSA_POLICY_INFO_ROLE
=6,
400 LSA_POLICY_INFO_REPLICA
=7,
401 LSA_POLICY_INFO_QUOTA
=8,
402 LSA_POLICY_INFO_MOD
=9,
403 LSA_POLICY_INFO_AUDIT_FULL_SET
=10,
404 LSA_POLICY_INFO_AUDIT_FULL_QUERY
=11,
405 LSA_POLICY_INFO_DNS
=12,
406 LSA_POLICY_INFO_DNS_INT
=13,
407 LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
=14
410 typedef [switch_type(uint16
)] union {
411 [case(LSA_POLICY_INFO_AUDIT_LOG
)] lsa_AuditLogInfo audit_log
;
412 [case(LSA_POLICY_INFO_AUDIT_EVENTS
)] lsa_AuditEventsInfo audit_events
;
413 [case(LSA_POLICY_INFO_DOMAIN
)] lsa_DomainInfo domain
;
414 [case(LSA_POLICY_INFO_PD
)] lsa_PDAccountInfo pd
;
415 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN
)] lsa_DomainInfo account_domain
;
416 [case(LSA_POLICY_INFO_ROLE
)] lsa_ServerRole role
;
417 [case(LSA_POLICY_INFO_REPLICA
)] lsa_ReplicaSourceInfo replica
;
418 [case(LSA_POLICY_INFO_QUOTA
)] lsa_DefaultQuotaInfo quota
;
419 [case(LSA_POLICY_INFO_MOD
)] lsa_ModificationInfo mod
;
420 [case(LSA_POLICY_INFO_AUDIT_FULL_SET
)] lsa_AuditFullSetInfo auditfullset
;
421 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY
)] lsa_AuditFullQueryInfo auditfullquery
;
422 [case(LSA_POLICY_INFO_DNS
)] lsa_DnsDomainInfo dns
;
423 [case(LSA_POLICY_INFO_DNS_INT
)] lsa_DnsDomainInfo dns_int
;
424 [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN
)] lsa_DomainInfo l_account_domain
;
425 } lsa_PolicyInformation
;
427 NTSTATUS lsa_QueryInfoPolicy
(
428 [in] policy_handle
*handle,
429 [in] lsa_PolicyInfo level
,
430 [out,ref,switch_is(level
)] lsa_PolicyInformation
**info
435 NTSTATUS lsa_SetInfoPolicy
(
436 [in] policy_handle
*handle,
437 [in] lsa_PolicyInfo level
,
438 [in,switch_is(level
)] lsa_PolicyInformation
*info
443 [todo
] NTSTATUS lsa_ClearAuditLog
();
447 [public] NTSTATUS lsa_CreateAccount
(
448 [in] policy_handle
*handle,
449 [in,ref] dom_sid2
*sid
,
450 [in] lsa_AccountAccessMask access_mask
,
451 [out] policy_handle
*acct_handle
455 /* NOTE: This only returns accounts that have at least
463 typedef [public] struct {
464 [range(0,20480)] uint32 num_sids
;
465 [size_is(num_sids
)] lsa_SidPtr
*sids
;
468 [public] NTSTATUS lsa_EnumAccounts
(
469 [in] policy_handle
*handle,
470 [in,out,ref] uint32
*resume_handle
,
471 [out,ref] lsa_SidArray
*sids
,
472 [in,range(0,8192)] uint32 num_entries
475 /*************************************************/
478 [public] NTSTATUS lsa_CreateTrustedDomain
(
479 [in] policy_handle
*policy_handle
,
480 [in] lsa_DomainInfo
*info
,
481 [in] lsa_TrustedAccessMask access_mask
,
482 [out] policy_handle
*trustdom_handle
489 /* w2k3 treats max_size as max_domains*60 */
490 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER
= 60;
494 [size_is(count
)] lsa_DomainInfo
*domains
;
497 NTSTATUS lsa_EnumTrustDom
(
498 [in] policy_handle
*handle,
499 [in,out,ref] uint32
*resume_handle
,
500 [out,ref] lsa_DomainList
*domains
,
507 typedef [public] enum {
508 SID_NAME_USE_NONE
= 0,/* NOTUSED */
509 SID_NAME_USER
= 1, /* user */
510 SID_NAME_DOM_GRP
= 2, /* domain group */
511 SID_NAME_DOMAIN
= 3, /* domain: don't know what this is */
512 SID_NAME_ALIAS
= 4, /* local group */
513 SID_NAME_WKN_GRP
= 5, /* well-known group */
514 SID_NAME_DELETED
= 6, /* deleted account: needed for c2 rating */
515 SID_NAME_INVALID
= 7, /* invalid account */
516 SID_NAME_UNKNOWN
= 8, /* oops. */
517 SID_NAME_COMPUTER
= 9, /* machine */
518 SID_NAME_LABEL
= 10 /* Mandatory Label */
522 lsa_SidType sid_type
;
528 [range(0,1000)] uint32 count
;
529 [size_is(count
)] lsa_TranslatedSid
*sids
;
532 const int LSA_REF_DOMAIN_LIST_MULTIPLIER
= 32;
533 typedef [public] struct {
534 [range(0,1000)] uint32 count
;
535 [size_is(count
)] lsa_DomainInfo
*domains
;
539 /* Level 1: Ask everywhere
540 * Level 2: Ask domain and trusted domains, no builtin and wkn
541 * Level 3: Only ask domain
542 * Level 4: W2k3ad: Only ask AD trusts
543 * Level 5: Only ask transitive forest trusts
547 typedef [public] enum {
548 LSA_LOOKUP_NAMES_ALL
= 1,
549 LSA_LOOKUP_NAMES_DOMAINS_ONLY
= 2,
550 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
= 3,
551 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
= 4,
552 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
= 5,
553 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
= 6,
554 LSA_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC
= 7
555 } lsa_LookupNamesLevel
;
557 [public] NTSTATUS lsa_LookupNames
(
558 [in] policy_handle
*handle,
559 [in,range(0,1000)] uint32 num_names
,
560 [in,size_is(num_names
)] lsa_String names
[],
561 [out,ref] lsa_RefDomainList
**domains
,
562 [in,out,ref] lsa_TransSidArray
*sids
,
563 [in] lsa_LookupNamesLevel level
,
564 [in,out,ref] uint32
*count
572 lsa_SidType sid_type
;
575 } lsa_TranslatedName
;
577 typedef [public] struct {
578 [range(0,20480)] uint32 count
;
579 [size_is(count
)] lsa_TranslatedName
*names
;
580 } lsa_TransNameArray
;
582 [public] NTSTATUS lsa_LookupSids
(
583 [in] policy_handle
*handle,
584 [in,ref] lsa_SidArray
*sids
,
585 [out,ref] lsa_RefDomainList
**domains
,
586 [in,out,ref] lsa_TransNameArray
*names
,
587 [in] lsa_LookupNamesLevel level
,
588 [in,out,ref] uint32
*count
593 [public] NTSTATUS lsa_CreateSecret
(
594 [in] policy_handle
*handle,
595 [in] lsa_String name
,
596 [in] lsa_SecretAccessMask access_mask
,
597 [out] policy_handle
*sec_handle
601 /*****************************************/
603 NTSTATUS lsa_OpenAccount
(
604 [in] policy_handle
*handle,
605 [in,ref] dom_sid2
*sid
,
606 [in] lsa_AccountAccessMask access_mask
,
607 [out] policy_handle
*acct_handle
611 /****************************************/
620 [range(0,1000)] uint32 count
;
622 [size_is(count
)] lsa_LUIDAttribute set
[*];
625 NTSTATUS lsa_EnumPrivsAccount
(
626 [in] policy_handle
*handle,
627 [out,ref] lsa_PrivilegeSet
**privs
631 /****************************************/
633 NTSTATUS lsa_AddPrivilegesToAccount
(
634 [in] policy_handle
*handle,
635 [in,ref] lsa_PrivilegeSet
*privs
639 /****************************************/
641 NTSTATUS lsa_RemovePrivilegesFromAccount
(
642 [in] policy_handle
*handle,
643 [in] uint8 remove_all
,
644 [in,unique] lsa_PrivilegeSet
*privs
648 [todo
] NTSTATUS lsa_GetQuotasForAccount
();
651 [todo
] NTSTATUS lsa_SetQuotasForAccount
();
654 NTSTATUS lsa_GetSystemAccessAccount
(
655 [in] policy_handle
*handle,
656 [out,ref] lsa_AccountAccessMask
*access_mask
660 NTSTATUS lsa_SetSystemAccessAccount
(
661 [in] policy_handle
*handle,
662 [in] lsa_AccountAccessMask access_mask
666 NTSTATUS lsa_OpenTrustedDomain
(
667 [in] policy_handle
*handle,
669 [in] lsa_TrustedAccessMask access_mask
,
670 [out] policy_handle
*trustdom_handle
673 typedef [flag
(NDR_PAHEX
)] struct {
676 [size_is(size
),length_is(length
)] uint8
*data
;
679 typedef [flag
(NDR_PAHEX
)] struct {
680 [range(0,65536)] uint32 size
;
681 [size_is(size
)] uint8
*data
;
685 LSA_TRUSTED_DOMAIN_INFO_NAME
= 1,
686 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
= 2,
687 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
= 3,
688 LSA_TRUSTED_DOMAIN_INFO_PASSWORD
= 4,
689 LSA_TRUSTED_DOMAIN_INFO_BASIC
= 5,
690 LSA_TRUSTED_DOMAIN_INFO_INFO_EX
= 6,
691 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
= 7,
692 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
= 8,
693 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
= 9,
694 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
= 10,
695 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
= 11,
696 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
= 12,
697 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
= 13,
698 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL_AES
= 14,
699 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL_AES
= 15
700 } lsa_TrustDomInfoEnum
;
702 typedef [public,bitmap32bit
] bitmap
{
703 LSA_TRUST_DIRECTION_INBOUND
= 0x00000001,
704 LSA_TRUST_DIRECTION_OUTBOUND
= 0x00000002
705 } lsa_TrustDirection
;
707 typedef [public,v1_enum] enum {
708 LSA_TRUST_TYPE_DOWNLEVEL
= 0x00000001,
709 LSA_TRUST_TYPE_UPLEVEL
= 0x00000002,
710 LSA_TRUST_TYPE_MIT
= 0x00000003,
711 LSA_TRUST_TYPE_DCE
= 0x00000004
714 typedef [public,bitmap32bit
] bitmap
{
715 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
716 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
717 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
718 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
719 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
720 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
721 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040,
722 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION
= 0x00000080,
723 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION
= 0x00000200,
724 LSA_TRUST_ATTRIBUTE_PIM_TRUST
= 0x00000400,
725 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION
= 0x00000800
726 } lsa_TrustAttributes
;
729 lsa_StringLarge netbios_name
;
730 } lsa_TrustDomainInfoName
;
735 [size_is(entries
)] lsa_StringLarge
*netbios_names
;
736 } lsa_TrustDomainInfoControllers
;
740 } lsa_TrustDomainInfoPosixOffset
;
743 lsa_DATA_BUF
*password
;
744 lsa_DATA_BUF
*old_password
;
745 } lsa_TrustDomainInfoPassword
;
748 lsa_String netbios_name
;
750 } lsa_TrustDomainInfoBasic
;
752 typedef [public] struct {
753 lsa_StringLarge domain_name
;
754 lsa_StringLarge netbios_name
;
756 lsa_TrustDirection trust_direction
;
757 lsa_TrustType trust_type
;
758 lsa_TrustAttributes trust_attributes
;
759 } lsa_TrustDomainInfoInfoEx
;
761 typedef [public,v1_enum] enum {
762 TRUST_AUTH_TYPE_NONE
= 0,
763 TRUST_AUTH_TYPE_NT4OWF
= 1,
764 TRUST_AUTH_TYPE_CLEAR
= 2,
765 TRUST_AUTH_TYPE_VERSION
= 3
769 NTTIME_hyper last_update_time
;
770 lsa_TrustAuthType AuthType
;
772 } lsa_TrustDomainInfoBuffer
;
774 typedef [public] struct {
775 uint32 incoming_count
;
776 lsa_TrustDomainInfoBuffer
*incoming_current_auth_info
;
777 lsa_TrustDomainInfoBuffer
*incoming_previous_auth_info
;
778 uint32 outgoing_count
;
779 lsa_TrustDomainInfoBuffer
*outgoing_current_auth_info
;
780 lsa_TrustDomainInfoBuffer
*outgoing_previous_auth_info
;
781 } lsa_TrustDomainInfoAuthInfo
;
784 lsa_TrustDomainInfoInfoEx info_ex
;
785 lsa_TrustDomainInfoPosixOffset posix_offset
;
786 lsa_TrustDomainInfoAuthInfo auth_info
;
787 } lsa_TrustDomainInfoFullInfo
;
790 lsa_DATA_BUF2 auth_blob
;
791 } lsa_TrustDomainInfoAuthInfoInternal
;
794 lsa_TrustDomainInfoInfoEx info_ex
;
795 lsa_TrustDomainInfoPosixOffset posix_offset
;
796 lsa_TrustDomainInfoAuthInfoInternal auth_info
;
797 } lsa_TrustDomainInfoFullInfoInternal
;
802 lsa_DATA_BUF2 cipher
;
803 } lsa_TrustDomainInfoAuthInfoInternalAES
;
806 lsa_TrustDomainInfoInfoEx info_ex
;
807 lsa_TrustDomainInfoPosixOffset posix_offset
;
808 lsa_TrustDomainInfoAuthInfoInternalAES auth_info
;
809 } lsa_TrustDomainInfoFullInfoInternalAES
;
812 lsa_TrustDomainInfoInfoEx info_ex
;
813 uint32 forest_trust_length
;
814 [size_is(forest_trust_length
)] uint8
*forest_trust_data
;
815 } lsa_TrustDomainInfoInfoEx2Internal
;
818 lsa_TrustDomainInfoInfoEx2Internal info
;
819 lsa_TrustDomainInfoPosixOffset posix_offset
;
820 lsa_TrustDomainInfoAuthInfo auth_info
;
821 } lsa_TrustDomainInfoFullInfo2Internal
;
824 kerb_EncTypes enc_types
;
825 } lsa_TrustDomainInfoSupportedEncTypes
;
827 typedef [switch_type(lsa_TrustDomInfoEnum
)] union {
828 [case(LSA_TRUSTED_DOMAIN_INFO_NAME
)]
829 lsa_TrustDomainInfoName name
;
830 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS
)]
831 lsa_TrustDomainInfoControllers controllers
;
832 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
)]
833 lsa_TrustDomainInfoPosixOffset posix_offset
;
834 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD
)]
835 lsa_TrustDomainInfoPassword password
;
836 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC
)]
837 lsa_TrustDomainInfoBasic info_basic
;
838 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX
)]
839 lsa_TrustDomainInfoInfoEx info_ex
;
840 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
)]
841 lsa_TrustDomainInfoAuthInfo auth_info
;
842 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
)]
843 lsa_TrustDomainInfoFullInfo full_info
;
844 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL
)]
845 lsa_TrustDomainInfoAuthInfoInternal auth_info_internal
;
846 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL
)]
847 lsa_TrustDomainInfoFullInfoInternal full_info_internal
;
848 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL
)]
849 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal
;
850 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL
)]
851 lsa_TrustDomainInfoFullInfo2Internal full_info2_internal
;
852 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES
)]
853 lsa_TrustDomainInfoSupportedEncTypes enc_types
;
854 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL_AES
)]
855 lsa_TrustDomainInfoAuthInfoInternalAES auth_info_internal_aes
;
856 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL_AES
)]
857 lsa_TrustDomainInfoFullInfoInternalAES full_info_internal_aes
;
858 } lsa_TrustedDomainInfo
;
861 NTSTATUS lsa_QueryTrustedDomainInfo
(
862 [in] policy_handle
*trustdom_handle
,
863 [in] lsa_TrustDomInfoEnum level
,
864 [out,switch_is(level
),ref] lsa_TrustedDomainInfo
**info
868 NTSTATUS lsa_SetInformationTrustedDomain
(
869 [in] policy_handle
*trustdom_handle
,
870 [in] lsa_TrustDomInfoEnum level
,
871 [in,switch_is(level
)] lsa_TrustedDomainInfo
*info
875 [public] NTSTATUS lsa_OpenSecret
(
876 [in] policy_handle
*handle,
877 [in] lsa_String name
,
878 [in] lsa_SecretAccessMask access_mask
,
879 [out] policy_handle
*sec_handle
884 [public] NTSTATUS lsa_SetSecret
(
885 [in] policy_handle
*sec_handle
,
886 [in,unique] lsa_DATA_BUF
*new_val
,
887 [in,unique] lsa_DATA_BUF
*old_val
895 [public] NTSTATUS lsa_QuerySecret
(
896 [in] policy_handle
*sec_handle
,
897 [in,out,unique] lsa_DATA_BUF_PTR
*new_val
,
898 [in,out,unique] NTTIME_hyper
*new_mtime
,
899 [in,out,unique] lsa_DATA_BUF_PTR
*old_val
,
900 [in,out,unique] NTTIME_hyper
*old_mtime
904 NTSTATUS lsa_LookupPrivValue
(
905 [in] policy_handle
*handle,
906 [in,ref] lsa_String
*name
,
907 [out,ref] lsa_LUID
*luid
912 NTSTATUS lsa_LookupPrivName
(
913 [in] policy_handle
*handle,
914 [in,ref] lsa_LUID
*luid
,
915 [out,ref] lsa_StringLarge
**name
919 /*******************/
921 NTSTATUS lsa_LookupPrivDisplayName
(
922 [in] policy_handle
*handle,
923 [in,ref] lsa_String
*name
,
924 [in] uint16 language_id
,
925 [in] uint16 language_id_sys
,
926 [out,ref] lsa_StringLarge
**disp_name
,
927 /* see http://www.microsoft.com/globaldev/nlsweb/ for
928 language definitions */
929 [out,ref] uint16
*returned_language_id
932 /*******************/
934 NTSTATUS lsa_DeleteObject
(
935 [in,out] policy_handle
*handle
938 /*******************/
940 NTSTATUS lsa_EnumAccountsWithUserRight
(
941 [in] policy_handle
*handle,
942 [in,unique] lsa_String
*name
,
943 [out] lsa_SidArray
*sids
948 [string,charset
(UTF16
)] uint16
*name
;
949 } lsa_RightAttribute
;
952 [range(0,256)] uint32 count
;
953 [size_is(count
)] lsa_StringLarge
*names
;
956 NTSTATUS lsa_EnumAccountRights
(
957 [in] policy_handle
*handle,
958 [in,ref] dom_sid2
*sid
,
959 [out,ref] lsa_RightSet
*rights
963 /**********************/
965 NTSTATUS lsa_AddAccountRights
(
966 [in] policy_handle
*handle,
967 [in,ref] dom_sid2
*sid
,
968 [in,ref] lsa_RightSet
*rights
971 /**********************/
973 NTSTATUS lsa_RemoveAccountRights
(
974 [in] policy_handle
*handle,
975 [in,ref] dom_sid2
*sid
,
976 [in] uint8 remove_all
,
977 [in,ref] lsa_RightSet
*rights
981 NTSTATUS lsa_QueryTrustedDomainInfoBySid
(
982 [in] policy_handle
*handle,
983 [in,ref] dom_sid2
*dom_sid
,
984 [in] lsa_TrustDomInfoEnum level
,
985 [out,switch_is(level
),ref] lsa_TrustedDomainInfo
**info
989 NTSTATUS lsa_SetTrustedDomainInfo
(
990 [in] policy_handle
*handle,
991 [in] dom_sid2
*dom_sid
,
992 [in] lsa_TrustDomInfoEnum level
,
993 [in,switch_is(level
)] lsa_TrustedDomainInfo
*info
997 NTSTATUS lsa_DeleteTrustedDomain
(
998 [in] policy_handle
*handle,
999 [in] dom_sid2
*dom_sid
1002 /* Function: 0x2a */
1003 NTSTATUS lsa_StorePrivateData
(
1004 [in] policy_handle
*handle,
1005 [in,ref] lsa_String
*name
,
1006 [in,unique] lsa_DATA_BUF
*val
1009 /* Function: 0x2b */
1010 NTSTATUS lsa_RetrievePrivateData
(
1011 [in] policy_handle
*handle,
1012 [in,ref] lsa_String
*name
,
1013 [in,out,ref] lsa_DATA_BUF
**val
1016 /**********************/
1017 /* Function: 0x2c */
1018 [public] NTSTATUS lsa_OpenPolicy2
(
1019 [in,unique] [string,charset
(UTF16
)] uint16
*system_name
,
1020 [in] lsa_ObjectAttribute
*attr
,
1021 [in] lsa_PolicyAccessMask access_mask
,
1022 [out] policy_handle
*handle
1025 /**********************/
1026 /* Function: 0x2d */
1027 NTSTATUS lsa_GetUserName
(
1028 [in,unique] [string,charset
(UTF16
)] uint16
*system_name
,
1029 [in,out,ref] lsa_String
**account_name
,
1030 [in,out,unique] lsa_String
**authority_name
1033 /**********************/
1034 /* Function: 0x2e */
1036 NTSTATUS lsa_QueryInfoPolicy2
(
1037 [in] policy_handle
*handle,
1038 [in] lsa_PolicyInfo level
,
1039 [out,ref,switch_is(level
)] lsa_PolicyInformation
**info
1043 NTSTATUS lsa_SetInfoPolicy2
(
1044 [in] policy_handle
*handle,
1045 [in] lsa_PolicyInfo level
,
1046 [in,switch_is(level
)] lsa_PolicyInformation
*info
1049 /**********************/
1051 NTSTATUS lsa_QueryTrustedDomainInfoByName
(
1052 [in] policy_handle
*handle,
1053 [in,ref] lsa_String
*trusted_domain
,
1054 [in] lsa_TrustDomInfoEnum level
,
1055 [out,ref,switch_is(level
)] lsa_TrustedDomainInfo
**info
1058 /**********************/
1060 [public] NTSTATUS lsa_SetTrustedDomainInfoByName
(
1061 [in] policy_handle
*handle,
1062 [in,ref] lsa_String
*trusted_domain
,
1063 [in] lsa_TrustDomInfoEnum level
,
1064 [in,ref,switch_is(level
)] lsa_TrustedDomainInfo
*info
1069 /* w2k3 treats max_size as max_domains*82 */
1070 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER
= 82;
1074 [size_is(count
)] lsa_TrustDomainInfoInfoEx
*domains
;
1077 NTSTATUS lsa_EnumTrustedDomainsEx
(
1078 [in] policy_handle
*handle,
1079 [in,out] uint32
*resume_handle
,
1080 [out] lsa_DomainListEx
*domains
,
1081 [in] uint32 max_size
1085 NTSTATUS lsa_CreateTrustedDomainEx
(
1086 [in] policy_handle
*policy_handle
,
1087 [in] lsa_TrustDomainInfoInfoEx
*info
,
1088 [in] lsa_TrustDomainInfoAuthInfo
*auth_info
,
1089 [in] lsa_TrustedAccessMask access_mask
,
1090 [out] policy_handle
*trustdom_handle
1095 NTSTATUS lsa_CloseTrustedDomainEx
(
1096 [in,out] policy_handle
*handle
1101 uint32 quality_of_service
;
1102 } lsa_DomainInfoQoS
;
1104 typedef [bitmap32bit
] bitmap
{
1105 LSA_POLICY_KERBEROS_VALIDATE_CLIENT
= 0x00000080
1106 } lsa_krbAuthenticationOptions
;
1108 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
1109 for reserved - gd */
1111 lsa_krbAuthenticationOptions authentication_options
;
1112 hyper service_tkt_lifetime
;
1113 hyper user_tkt_lifetime
;
1114 hyper user_tkt_renewaltime
;
1117 } lsa_DomainInfoKerberos
;
1121 [size_is(blob_size
)] uint8
*efs_blob
;
1122 } lsa_DomainInfoEfs
;
1125 LSA_DOMAIN_INFO_POLICY_QOS
=1,
1126 LSA_DOMAIN_INFO_POLICY_EFS
=2,
1127 LSA_DOMAIN_INFO_POLICY_KERBEROS
=3
1128 } lsa_DomainInfoEnum
;
1130 typedef [switch_type(lsa_DomainInfoEnum
)] union {
1131 [case(LSA_DOMAIN_INFO_POLICY_QOS
)] lsa_DomainInfoQoS qos_info
;
1132 [case(LSA_DOMAIN_INFO_POLICY_EFS
)] lsa_DomainInfoEfs efs_info
;
1133 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS
)] lsa_DomainInfoKerberos kerberos_info
;
1134 } lsa_DomainInformationPolicy
;
1136 NTSTATUS lsa_QueryDomainInformationPolicy
(
1137 [in] policy_handle
*handle,
1138 [in] lsa_DomainInfoEnum level
,
1139 [out,ref,switch_is(level
)] lsa_DomainInformationPolicy
**info
1143 NTSTATUS lsa_SetDomainInformationPolicy
(
1144 [in] policy_handle
*handle,
1145 [in] lsa_DomainInfoEnum level
,
1146 [in,unique,switch_is(level
)] lsa_DomainInformationPolicy
*info
1149 /**********************/
1151 NTSTATUS lsa_OpenTrustedDomainByName
(
1152 [in] policy_handle
*handle,
1153 [in] lsa_String name
,
1154 [in] lsa_TrustedAccessMask access_mask
,
1155 [out] policy_handle
*trustdom_handle
1159 [todo
] NTSTATUS lsa_TestCall
();
1161 /**********************/
1165 lsa_SidType sid_type
;
1169 } lsa_TranslatedName2
;
1172 [range(0,1000)] uint32 count
;
1173 [size_is(count
)] lsa_TranslatedName2
*names
;
1174 } lsa_TransNameArray2
;
1176 typedef [v1_enum] enum {
1177 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES
= 0x00000000,
1178 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL
= 0x80000000
1179 } lsa_LookupOptions
;
1181 typedef [v1_enum] enum {
1182 LSA_CLIENT_REVISION_1
= 0x00000001,
1183 LSA_CLIENT_REVISION_2
= 0x00000002
1184 } lsa_ClientRevision
;
1186 [public] NTSTATUS lsa_LookupSids2
(
1187 [in] policy_handle
*handle,
1188 [in,ref] lsa_SidArray
*sids
,
1189 [out,ref] lsa_RefDomainList
**domains
,
1190 [in,out,ref] lsa_TransNameArray2
*names
,
1191 [in] lsa_LookupNamesLevel level
,
1192 [in,out,ref] uint32
*count
,
1193 [in] lsa_LookupOptions lookup_options
,
1194 [in] lsa_ClientRevision client_revision
1197 /**********************/
1201 lsa_SidType sid_type
;
1205 } lsa_TranslatedSid2
;
1208 [range(0,1000)] uint32 count
;
1209 [size_is(count
)] lsa_TranslatedSid2
*sids
;
1210 } lsa_TransSidArray2
;
1212 [public] NTSTATUS lsa_LookupNames2
(
1213 [in] policy_handle
*handle,
1214 [in,range(0,1000)] uint32 num_names
,
1215 [in,size_is(num_names
)] lsa_String names
[],
1216 [out,ref] lsa_RefDomainList
**domains
,
1217 [in,out,ref] lsa_TransSidArray2
*sids
,
1218 [in] lsa_LookupNamesLevel level
,
1219 [in,out,ref] uint32
*count
,
1220 [in] lsa_LookupOptions lookup_options
,
1221 [in] lsa_ClientRevision client_revision
1225 NTSTATUS lsa_CreateTrustedDomainEx2
(
1226 [in] policy_handle
*policy_handle
,
1227 [in] lsa_TrustDomainInfoInfoEx
*info
,
1228 [in] lsa_TrustDomainInfoAuthInfoInternal
*auth_info_internal
,
1229 [in] lsa_TrustedAccessMask access_mask
,
1230 [out] policy_handle
*trustdom_handle
1234 [todo
] NTSTATUS lsa_CREDRWRITE
();
1237 [todo
] NTSTATUS lsa_CREDRREAD
();
1240 [todo
] NTSTATUS lsa_CREDRENUMERATE
();
1243 [todo
] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS
();
1246 [todo
] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS
();
1249 [todo
] NTSTATUS lsa_CREDRDELETE
();
1252 [todo
] NTSTATUS lsa_CREDRGETTARGETINFO
();
1255 [todo
] NTSTATUS lsa_CREDRPROFILELOADED
();
1257 /**********************/
1260 lsa_SidType sid_type
;
1264 } lsa_TranslatedSid3
;
1267 [range(0,1000)] uint32 count
;
1268 [size_is(count
)] lsa_TranslatedSid3
*sids
;
1269 } lsa_TransSidArray3
;
1271 [public] NTSTATUS lsa_LookupNames3
(
1272 [in] policy_handle
*handle,
1273 [in,range(0,1000)] uint32 num_names
,
1274 [in,size_is(num_names
)] lsa_String names
[],
1275 [out,ref] lsa_RefDomainList
**domains
,
1276 [in,out,ref] lsa_TransSidArray3
*sids
,
1277 [in] lsa_LookupNamesLevel level
,
1278 [in,out,ref] uint32
*count
,
1279 [in] lsa_LookupOptions lookup_options
,
1280 [in] lsa_ClientRevision client_revision
1284 [todo
] NTSTATUS lsa_CREDRGETSESSIONTYPES
();
1287 [todo
] NTSTATUS lsa_LSARREGISTERAUDITEVENT
();
1290 [todo
] NTSTATUS lsa_LSARGENAUDITEVENT
();
1293 [todo
] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT
();
1296 typedef [bitmap32bit
,public] bitmap
{
1297 /* these apply to LSA_FOREST_TRUST_TOP_LEVEL_NAME */
1298 LSA_TLN_DISABLED_NEW
= 0x00000001,
1299 LSA_TLN_DISABLED_ADMIN
= 0x00000002,
1300 LSA_TLN_DISABLED_CONFLICT
= 0x00000004,
1302 /* these apply to LSA_FOREST_TRUST_DOMAIN_INFO */
1303 LSA_SID_DISABLED_ADMIN
= 0x00000001,
1304 LSA_SID_DISABLED_CONFLICT
= 0x00000002,
1305 LSA_NB_DISABLED_ADMIN
= 0x00000004,
1306 LSA_NB_DISABLED_CONFLICT
= 0x00000008
1307 } lsa_ForestTrustRecordFlags
;
1309 const uint32 LSA_TLN_DISABLED_MASK
= (
1310 LSA_TLN_DISABLED_NEW |
1311 LSA_TLN_DISABLED_ADMIN |
1312 LSA_TLN_DISABLED_CONFLICT
);
1313 const uint32 LSA_SID_DISABLED_MASK
= (
1314 LSA_SID_DISABLED_ADMIN |
1315 LSA_SID_DISABLED_CONFLICT
);
1316 const uint32 LSA_NB_DISABLED_MASK
= (
1317 LSA_NB_DISABLED_ADMIN |
1318 LSA_NB_DISABLED_CONFLICT
);
1321 LSA_FOREST_TRUST_TOP_LEVEL_NAME
= 0,
1322 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
= 1,
1323 LSA_FOREST_TRUST_DOMAIN_INFO
= 2,
1324 LSA_FOREST_TRUST_BINARY_DATA
= 3,
1325 LSA_FOREST_TRUST_SCANNER_INFO
= 4
1326 } lsa_ForestTrustRecordType
;
1327 const uint32 LSA_FOREST_TRUST_RECORD_TYPE_LAST
=
1328 LSA_FOREST_TRUST_BINARY_DATA
;
1329 const uint32 LSA_FOREST_TRUST_RECORD2_TYPE_LAST
=
1330 LSA_FOREST_TRUST_SCANNER_INFO
;
1333 [range(0,131072)] uint3264 length
;
1334 [size_is(length
)] uint8
*data
;
1335 } lsa_ForestTrustBinaryData
;
1338 dom_sid2
*domain_sid
;
1339 lsa_StringLarge dns_domain_name
;
1340 lsa_StringLarge netbios_domain_name
;
1341 } lsa_ForestTrustDomainInfo
;
1343 typedef [switch_type(lsa_ForestTrustRecordType
)] union {
1344 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME
)] lsa_StringLarge top_level_name
;
1345 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
)] lsa_StringLarge top_level_name_ex
;
1346 [case(LSA_FOREST_TRUST_DOMAIN_INFO
)] lsa_ForestTrustDomainInfo domain_info
;
1347 [default] lsa_ForestTrustBinaryData data
;
1348 } lsa_ForestTrustData
;
1351 lsa_ForestTrustRecordFlags flags
;
1352 lsa_ForestTrustRecordType type
;
1354 [switch_is(type
)] lsa_ForestTrustData forest_trust_data
;
1355 } lsa_ForestTrustRecord
;
1357 typedef [public] struct {
1358 [range(0,4000)] uint32 count
;
1359 [size_is(count
)] lsa_ForestTrustRecord
**entries
;
1360 } lsa_ForestTrustInformation
;
1362 [public] NTSTATUS lsa_lsaRQueryForestTrustInformation
(
1363 [in] policy_handle
*handle,
1364 [in,ref] lsa_String
*trusted_domain_name
,
1365 [in] lsa_ForestTrustRecordType highest_record_type
,
1366 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1372 typedef [v1_enum] enum {
1373 LSA_FOREST_TRUST_COLLISION_TDO
= 0,
1374 LSA_FOREST_TRUST_COLLISION_XREF
= 1,
1375 LSA_FOREST_TRUST_COLLISION_OTHER
= 2
1376 } lsa_ForestTrustCollisionRecordType
;
1378 typedef [public] struct {
1380 lsa_ForestTrustCollisionRecordType type
;
1381 lsa_ForestTrustRecordFlags flags
;
1383 } lsa_ForestTrustCollisionRecord
;
1385 typedef [public] struct {
1387 [size_is(count
)] lsa_ForestTrustCollisionRecord
**entries
;
1388 } lsa_ForestTrustCollisionInfo
;
1390 [public] NTSTATUS lsa_lsaRSetForestTrustInformation
(
1391 [in] policy_handle
*handle,
1392 [in,ref] lsa_StringLarge
*trusted_domain_name
,
1393 [in] lsa_ForestTrustRecordType highest_record_type
,
1394 [in,ref] lsa_ForestTrustInformation
*forest_trust_info
,
1395 [in] boolean8 check_only
,
1396 [out,ref] lsa_ForestTrustCollisionInfo
**collision_info
1400 [todo
] NTSTATUS lsa_CREDRRENAME
();
1405 [public] NTSTATUS lsa_LookupSids3
(
1406 [in,ref] lsa_SidArray
*sids
,
1407 [out,ref] lsa_RefDomainList
**domains
,
1408 [in,out,ref] lsa_TransNameArray2
*names
,
1409 [in] lsa_LookupNamesLevel level
,
1410 [in,out,ref] uint32
*count
,
1411 [in] lsa_LookupOptions lookup_options
,
1412 [in] lsa_ClientRevision client_revision
1415 const int LSA_CLIENT_REVISION_NO_DNS
= 0x00000001;
1416 const int LSA_CLIENT_REVISION_DNS
= 0x00000002;
1418 const int LSA_LOOKUP_OPTIONS_NO_ISOLATED
= 0x80000000;
1421 NTSTATUS lsa_LookupNames4
(
1422 [in,range(0,1000)] uint32 num_names
,
1423 [in,size_is(num_names
)] lsa_String names
[],
1424 [out,ref] lsa_RefDomainList
**domains
,
1425 [in,out,ref] lsa_TransSidArray3
*sids
,
1426 [in] lsa_LookupNamesLevel level
,
1427 [in,out,ref] uint32
*count
,
1428 [in] lsa_LookupOptions lookup_options
,
1429 [in] lsa_ClientRevision client_revision
1433 [todo
] NTSTATUS lsa_LSAROPENPOLICYSCE
();
1436 [todo
] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE
();
1439 [todo
] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
();
1442 [todo
] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT
();
1444 /* Function 0x52 (82) */
1445 [todo
] void lsa_Opnum82NotUsedOnWire
(void);
1447 /* Function 0x53 (83) */
1448 [todo
] void lsa_Opnum83NotUsedOnWire
(void);
1450 /* Function 0x54 (84) */
1451 [todo
] void lsa_Opnum84NotUsedOnWire
(void);
1453 /* Function 0x55 (85) */
1454 [todo
] void lsa_Opnum85NotUsedOnWire
(void);
1456 /* Function 0x56 (86) */
1457 [todo
] void lsa_Opnum86NotUsedOnWire
(void);
1459 /* Function 0x57 (87) */
1460 [todo
] void lsa_Opnum87NotUsedOnWire
(void);
1462 /* Function 0x58 (88) */
1463 [todo
] void lsa_Opnum88NotUsedOnWire
(void);
1465 /* Function 0x59 (89) */
1466 [todo
] void lsa_Opnum89NotUsedOnWire
(void);
1468 /* Function 0x5A (90) */
1469 [todo
] void lsa_Opnum90NotUsedOnWire
(void);
1471 /* Function 0x5B (91) */
1472 [todo
] void lsa_Opnum91NotUsedOnWire
(void);
1474 /* Function 0x5C (92) */
1475 [todo
] void lsa_Opnum92NotUsedOnWire
(void);
1477 /* Function 0x5D (93) */
1478 [todo
] void lsa_Opnum93NotUsedOnWire
(void);
1480 /* Function 0x5E (94) */
1481 [todo
] void lsa_Opnum94NotUsedOnWire
(void);
1483 /* Function 0x5F (95) */
1484 [todo
] void lsa_Opnum95NotUsedOnWire
(void);
1486 /* Function 0x60 (96) */
1487 [todo
] void lsa_Opnum96NotUsedOnWire
(void);
1489 /* Function 0x61 (97) */
1490 [todo
] void lsa_Opnum97NotUsedOnWire
(void);
1492 /* Function 0x62 (98) */
1493 [todo
] void lsa_Opnum98NotUsedOnWire
(void);
1495 /* Function 0x63 (99) */
1496 [todo
] void lsa_Opnum99NotUsedOnWire
(void);
1498 /* Function 0x64 (100) */
1499 [todo
] void lsa_Opnum100NotUsedOnWire
(void);
1501 /* Function 0x65 (101) */
1502 [todo
] void lsa_Opnum101NotUsedOnWire
(void);
1504 /* Function 0x66 (102) */
1505 [todo
] void lsa_Opnum102NotUsedOnWire
(void);
1507 /* Function 0x67 (103) */
1508 [todo
] void lsa_Opnum103NotUsedOnWire
(void);
1510 /* Function 0x68 (104) */
1511 [todo
] void lsa_Opnum104NotUsedOnWire
(void);
1513 /* Function 0x69 (105) */
1514 [todo
] void lsa_Opnum105NotUsedOnWire
(void);
1516 /* Function 0x6A (106) */
1517 [todo
] void lsa_Opnum106NotUsedOnWire
(void);
1519 /* Function 0x6B (107) */
1520 [todo
] void lsa_Opnum107NotUsedOnWire
(void);
1522 /* Function 0x6C (108) */
1523 [todo
] void lsa_Opnum108NotUsedOnWire
(void);
1525 /* Function 0x6D (109) */
1526 [todo
] void lsa_Opnum109NotUsedOnWire
(void);
1528 /* Function 0x6E (110) */
1529 [todo
] void lsa_Opnum110NotUsedOnWire
(void);
1531 /* Function 0x6F (111) */
1532 [todo
] void lsa_Opnum111NotUsedOnWire
(void);
1534 /* Function 0x70 (112) */
1535 [todo
] void lsa_Opnum112NotUsedOnWire
(void);
1537 /* Function 0x71 (113) */
1538 [todo
] void lsa_Opnum113NotUsedOnWire
(void);
1540 /* Function 0x72 (114) */
1541 [todo
] void lsa_Opnum114NotUsedOnWire
(void);
1543 /* Function 0x73 (115) */
1544 [todo
] void lsa_Opnum115NotUsedOnWire
(void);
1546 /* Function 0x74 (116) */
1547 [todo
] void lsa_Opnum116NotUsedOnWire
(void);
1549 /* Function 0x75 (117) */
1550 [todo
] void lsa_Opnum117NotUsedOnWire
(void);
1552 /* Function 0x76 (118) */
1553 [todo
] void lsa_Opnum118NotUsedOnWire
(void);
1555 /* Function 0x77 (119) */
1556 [todo
] void lsa_Opnum119NotUsedOnWire
(void);
1558 /* Function 0x78 (120) */
1559 [todo
] void lsa_Opnum120NotUsedOnWire
(void);
1561 /* Function 0x79 (121) */
1562 [todo
] void lsa_Opnum121NotUsedOnWire
(void);
1564 /* Function 0x7A (122) */
1565 [todo
] void lsa_Opnum122NotUsedOnWire
(void);
1567 /* Function 0x7B (123) */
1568 [todo
] void lsa_Opnum123NotUsedOnWire
(void);
1570 /* Function 0x7C (124) */
1571 [todo
] void lsa_Opnum124NotUsedOnWire
(void);
1573 /* Function 0x7D (125) */
1574 [todo
] void lsa_Opnum125NotUsedOnWire
(void);
1576 /* Function 0x7E (126) */
1577 [todo
] void lsa_Opnum126NotUsedOnWire
(void);
1579 /* Function 0x7F (127) */
1580 [todo
] void lsa_Opnum127NotUsedOnWire
(void);
1582 /* Function 0x80 (128) */
1583 [todo
] void lsa_Opnum128NotUsedOnWire
(void);
1585 /***********************/
1586 /* Function 0x81 (129) */
1588 NTSTATUS lsa_CreateTrustedDomainEx3
(
1589 [in] policy_handle
*policy_handle
,
1590 [in] lsa_TrustDomainInfoInfoEx
*info
,
1591 [in] lsa_TrustDomainInfoAuthInfoInternalAES
*auth_info_internal
,
1592 [in] lsa_TrustedAccessMask access_mask
,
1593 [out] policy_handle
*trustdom_handle
1596 /***********************/
1597 /* Function 0x82 (130) */
1599 typedef [bitmap32bit
] bitmap
{
1600 LSA_FEATURE_TDO_AUTH_INFO_AES_CIPHER
= 0x00000001
1601 } lsa_RevisionSupportedFeature
;
1605 lsa_RevisionSupportedFeature supported_features
;
1606 } lsa_revision_info1
;
1608 typedef [switch_type(uint32
)] union {
1609 [case(1)] lsa_revision_info1 info1
;
1610 } lsa_revision_info
;
1612 [public] NTSTATUS lsa_OpenPolicy3
(
1613 [in,unique] [string,charset
(UTF16
)] uint16
*system_name
,
1614 [in] lsa_ObjectAttribute
*attr
,
1615 [in] lsa_PolicyAccessMask access_mask
,
1616 [in] uint32 in_version
,
1617 [in,ref][switch_is(in_version
)] lsa_revision_info
*in_revision_info
,
1618 [out,ref] uint32
*out_version
,
1619 [out,ref][switch_is(*out_version
)] lsa_revision_info
*out_revision_info
,
1620 [out,ref] policy_handle
*handle
1623 /* Function 0x83 (131) */
1624 [todo
] void lsa_Opnum131NotUsedOnWire
(void);
1626 /***********************/
1627 /* Function 0x84 (132) */
1628 typedef [switch_type(lsa_ForestTrustRecordType
)] union {
1629 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME
)] lsa_StringLarge top_level_name
;
1630 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
)] lsa_StringLarge top_level_name_ex
;
1631 [case(LSA_FOREST_TRUST_DOMAIN_INFO
)] lsa_ForestTrustDomainInfo domain_info
;
1632 [case(LSA_FOREST_TRUST_BINARY_DATA
)] lsa_ForestTrustBinaryData data
;
1634 * lsa_ForestTrustScannerInfo would have the same
1635 * definition as lsa_ForestTrustDomainInfo
1637 [case(LSA_FOREST_TRUST_SCANNER_INFO
)] lsa_ForestTrustDomainInfo scanner_info
;
1638 } lsa_ForestTrustData2
;
1641 lsa_ForestTrustRecordFlags flags
;
1642 lsa_ForestTrustRecordType type
;
1644 [switch_is(type
)] lsa_ForestTrustData2 forest_trust_data
;
1645 } lsa_ForestTrustRecord2
;
1647 typedef [public] struct {
1648 [range(0,4000)] uint32 count
;
1649 [size_is(count
)] lsa_ForestTrustRecord2
**entries
;
1650 } lsa_ForestTrustInformation2
;
1652 [public] NTSTATUS lsa_lsaRQueryForestTrustInformation2
(
1653 [in] policy_handle
*handle,
1654 [in,ref] lsa_String
*trusted_domain_name
,
1655 [in] lsa_ForestTrustRecordType highest_record_type
,
1656 [out,ref] lsa_ForestTrustInformation2
**forest_trust_info
1659 /***********************/
1660 /* Function 0x85 (133) */
1661 [public] NTSTATUS lsa_lsaRSetForestTrustInformation2
(
1662 [in] policy_handle
*handle,
1663 [in,ref] lsa_StringLarge
*trusted_domain_name
,
1664 [in] lsa_ForestTrustRecordType highest_record_type
,
1665 [in,ref] lsa_ForestTrustInformation2
*forest_trust_info
,
1666 [in] boolean8 check_only
,
1667 [out,ref] lsa_ForestTrustCollisionInfo
**collision_info