4 lsa interface definition
9 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
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")
16 typedef bitmap security_secinfo security_secinfo
;
18 typedef [public,noejs
] struct {
19 [value
(2*strlen_m
(string))] uint16 length
;
20 [value
(2*strlen_m
(string))] uint16 size
;
21 [charset
(UTF16
),size_is(size
/2),length_is(length
/2)] uint16
*string;
24 typedef [public] struct {
25 [value
(2*strlen_m
(string))] uint16 length
;
26 [value
(2*(strlen_m
(string)+1))] uint16 size
;
27 [charset
(UTF16
),size_is(size
/2),length_is(length
/2)] uint16
*string;
30 typedef [public] struct {
32 [size_is(count
)] lsa_String
*names
;
35 typedef [public] struct {
36 [value
(strlen_m
(string))] uint16 length
;
37 [value
(strlen_m
(string))] uint16 size
;
38 ascstr_noterm
*string;
44 [in,out] policy_handle
*handle
50 [public] NTSTATUS lsa_Delete
(
51 [in] policy_handle
*handle
69 [size_is(count
)] lsa_PrivEntry
*privs
;
72 [public] NTSTATUS lsa_EnumPrivs
(
73 [in] policy_handle
*handle,
74 [in,out,ref] uint32
*resume_handle
,
75 [out,ref] lsa_PrivArray
*privs
,
82 NTSTATUS lsa_QuerySecurity
(
83 [in] policy_handle
*handle,
84 [in] security_secinfo sec_info
,
85 [out,ref] sec_desc_buf
**sdbuf
91 NTSTATUS lsa_SetSecObj
(
92 [in] policy_handle
*handle,
93 [in] security_secinfo sec_info
,
94 [in,ref] sec_desc_buf
*sdbuf
99 NTSTATUS lsa_ChangePassword
();
105 uint32 len
; /* ignored */
106 uint16 impersonation_level
;
108 uint8 effective_only
;
112 uint32 len
; /* ignored */
114 [string,charset
(UTF16
)] uint16
*object_name
;
116 security_descriptor
*sec_desc
;
117 lsa_QosInfo
*sec_qos
;
118 } lsa_ObjectAttribute
;
120 typedef [public,bitmap32bit
] bitmap
{
121 LSA_POLICY_VIEW_LOCAL_INFORMATION
= 0x00000001,
122 LSA_POLICY_VIEW_AUDIT_INFORMATION
= 0x00000002,
123 LSA_POLICY_GET_PRIVATE_INFORMATION
= 0x00000004,
124 LSA_POLICY_TRUST_ADMIN
= 0x00000008,
125 LSA_POLICY_CREATE_ACCOUNT
= 0x00000010,
126 LSA_POLICY_CREATE_SECRET
= 0x00000020,
127 LSA_POLICY_CREATE_PRIVILEGE
= 0x00000040,
128 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS
= 0x00000080,
129 LSA_POLICY_SET_AUDIT_REQUIREMENTS
= 0x00000100,
130 LSA_POLICY_AUDIT_LOG_ADMIN
= 0x00000200,
131 LSA_POLICY_SERVER_ADMIN
= 0x00000400,
132 LSA_POLICY_LOOKUP_NAMES
= 0x00000800
133 } lsa_PolicyAccessMask
;
135 /* notice the screwup with the system_name - thats why MS created
137 [public] NTSTATUS lsa_OpenPolicy
(
138 [in,unique] uint16
*system_name
,
139 [in] lsa_ObjectAttribute
*attr
,
140 [in] lsa_PolicyAccessMask access_mask
,
141 [out] policy_handle
*handle
152 NTTIME retention_time
;
153 uint8 shutdown_in_progress
;
154 NTTIME time_to_shutdown
;
155 uint32 next_audit_record
;
159 typedef [v1_enum] enum {
160 LSA_AUDIT_POLICY_NONE
=0,
161 LSA_AUDIT_POLICY_SUCCESS
=1,
162 LSA_AUDIT_POLICY_FAILURE
=2,
163 LSA_AUDIT_POLICY_ALL
=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE
),
164 LSA_AUDIT_POLICY_CLEAR
=4
165 } lsa_PolicyAuditPolicy
;
168 LSA_AUDIT_CATEGORY_SYSTEM
= 0,
169 LSA_AUDIT_CATEGORY_LOGON
= 1,
170 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS
= 2,
171 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS
= 3,
172 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING
= 4,
173 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES
= 5,
174 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT
= 6,
175 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS
= 7, /* only in win2k/2k3 */
176 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON
= 8 /* only in win2k/2k3 */
177 } lsa_PolicyAuditEventType
;
180 uint32 auditing_mode
;
181 [size_is(count
)] lsa_PolicyAuditPolicy
*settings
;
183 } lsa_AuditEventsInfo
;
186 lsa_StringLarge name
;
195 uint16 unknown
; /* an midl padding bug? */
202 } lsa_ReplicaSourceInfo
;
206 uint32 non_paged_pool
;
211 } lsa_DefaultQuotaInfo
;
215 NTTIME db_create_time
;
216 } lsa_ModificationInfo
;
219 uint8 shutdown_on_full
;
220 } lsa_AuditFullSetInfo
;
223 uint16 unknown
; /* an midl padding bug? */
224 uint8 shutdown_on_full
;
226 } lsa_AuditFullQueryInfo
;
229 /* it's important that we use the lsa_StringLarge here,
230 * because otherwise windows clients result with such dns hostnames
231 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
233 * w2k3-client.samba4.samba.org
235 lsa_StringLarge name
;
236 lsa_StringLarge dns_domain
;
237 lsa_StringLarge dns_forest
;
243 LSA_POLICY_INFO_AUDIT_LOG
=1,
244 LSA_POLICY_INFO_AUDIT_EVENTS
=2,
245 LSA_POLICY_INFO_DOMAIN
=3,
246 LSA_POLICY_INFO_PD
=4,
247 LSA_POLICY_INFO_ACCOUNT_DOMAIN
=5,
248 LSA_POLICY_INFO_ROLE
=6,
249 LSA_POLICY_INFO_REPLICA
=7,
250 LSA_POLICY_INFO_QUOTA
=8,
251 LSA_POLICY_INFO_DB
=9,
252 LSA_POLICY_INFO_AUDIT_FULL_SET
=10,
253 LSA_POLICY_INFO_AUDIT_FULL_QUERY
=11,
254 LSA_POLICY_INFO_DNS
=12
257 typedef [switch_type(uint16
)] union {
258 [case(LSA_POLICY_INFO_AUDIT_LOG
)] lsa_AuditLogInfo audit_log
;
259 [case(LSA_POLICY_INFO_AUDIT_EVENTS
)] lsa_AuditEventsInfo audit_events
;
260 [case(LSA_POLICY_INFO_DOMAIN
)] lsa_DomainInfo domain
;
261 [case(LSA_POLICY_INFO_PD
)] lsa_PDAccountInfo pd
;
262 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN
)] lsa_DomainInfo account_domain
;
263 [case(LSA_POLICY_INFO_ROLE
)] lsa_ServerRole role
;
264 [case(LSA_POLICY_INFO_REPLICA
)] lsa_ReplicaSourceInfo replica
;
265 [case(LSA_POLICY_INFO_QUOTA
)] lsa_DefaultQuotaInfo quota
;
266 [case(LSA_POLICY_INFO_DB
)] lsa_ModificationInfo db
;
267 [case(LSA_POLICY_INFO_AUDIT_FULL_SET
)] lsa_AuditFullSetInfo auditfullset
;
268 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY
)] lsa_AuditFullQueryInfo auditfullquery
;
269 [case(LSA_POLICY_INFO_DNS
)] lsa_DnsDomainInfo dns
;
270 } lsa_PolicyInformation
;
272 NTSTATUS lsa_QueryInfoPolicy
(
273 [in] policy_handle
*handle,
274 [in] lsa_PolicyInfo level
,
275 [out,ref,switch_is(level
)] lsa_PolicyInformation
**info
280 NTSTATUS lsa_SetInfoPolicy
(
281 [in] policy_handle
*handle,
282 [in] lsa_PolicyInfo level
,
283 [in,switch_is(level
)] lsa_PolicyInformation
*info
288 NTSTATUS lsa_ClearAuditLog
();
292 [public] NTSTATUS lsa_CreateAccount
(
293 [in] policy_handle
*handle,
294 [in,ref] dom_sid2
*sid
,
295 [in] uint32 access_mask
,
296 [out] policy_handle
*acct_handle
300 /* NOTE: This only returns accounts that have at least
308 typedef [public] struct {
309 [range(0,1000)] uint32 num_sids
;
310 [size_is(num_sids
)] lsa_SidPtr
*sids
;
313 [public] NTSTATUS lsa_EnumAccounts
(
314 [in] policy_handle
*handle,
315 [in,out,ref] uint32
*resume_handle
,
316 [out,ref] lsa_SidArray
*sids
,
317 [in,range(0,8192)] uint32 num_entries
321 /*************************************************/
324 [public] NTSTATUS lsa_CreateTrustedDomain
(
325 [in] policy_handle
*handle,
326 [in] lsa_DomainInfo
*info
,
327 [in] uint32 access_mask
,
328 [out] policy_handle
*trustdom_handle
335 /* w2k3 treats max_size as max_domains*60 */
336 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER
= 60;
340 [size_is(count
)] lsa_DomainInfo
*domains
;
343 NTSTATUS lsa_EnumTrustDom
(
344 [in] policy_handle
*handle,
345 [in,out,ref] uint32
*resume_handle
,
346 [out,ref] lsa_DomainList
*domains
,
354 SID_NAME_USE_NONE
= 0,/* NOTUSED */
355 SID_NAME_USER
= 1, /* user */
356 SID_NAME_DOM_GRP
= 2, /* domain group */
357 SID_NAME_DOMAIN
= 3, /* domain: don't know what this is */
358 SID_NAME_ALIAS
= 4, /* local group */
359 SID_NAME_WKN_GRP
= 5, /* well-known group */
360 SID_NAME_DELETED
= 6, /* deleted account: needed for c2 rating */
361 SID_NAME_INVALID
= 7, /* invalid account */
362 SID_NAME_UNKNOWN
= 8, /* oops. */
363 SID_NAME_COMPUTER
= 9 /* machine */
367 lsa_SidType sid_type
;
373 [range(0,1000)] uint32 count
;
374 [size_is(count
)] lsa_TranslatedSid
*sids
;
377 const int LSA_REF_DOMAIN_LIST_MULTIPLIER
= 32;
379 [range(0,1000)] uint32 count
;
380 [size_is(count
)] lsa_DomainInfo
*domains
;
384 /* Level 1: Ask everywhere
385 * Level 2: Ask domain and trusted domains, no builtin and wkn
386 * Level 3: Only ask domain
387 * Level 4: W2k3ad: Only ask AD trusts
388 * Level 5: Only ask transitive forest trusts
393 LSA_LOOKUP_NAMES_ALL
= 1,
394 LSA_LOOKUP_NAMES_DOMAINS_ONLY
= 2,
395 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY
= 3,
396 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY
= 4,
397 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY
= 5,
398 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2
= 6
399 } lsa_LookupNamesLevel
;
401 [public] NTSTATUS lsa_LookupNames
(
402 [in] policy_handle
*handle,
403 [in,range(0,1000)] uint32 num_names
,
404 [in,size_is(num_names
)] lsa_String names
[],
405 [out,ref] lsa_RefDomainList
**domains
,
406 [in,out,ref] lsa_TransSidArray
*sids
,
407 [in] lsa_LookupNamesLevel level
,
408 [in,out,ref] uint32
*count
416 lsa_SidType sid_type
;
419 } lsa_TranslatedName
;
422 [range(0,1000)] uint32 count
;
423 [size_is(count
)] lsa_TranslatedName
*names
;
424 } lsa_TransNameArray
;
426 [public] NTSTATUS lsa_LookupSids
(
427 [in] policy_handle
*handle,
428 [in,ref] lsa_SidArray
*sids
,
429 [out,ref] lsa_RefDomainList
**domains
,
430 [in,out,ref] lsa_TransNameArray
*names
,
432 [in,out,ref] uint32
*count
437 [public] NTSTATUS lsa_CreateSecret
(
438 [in] policy_handle
*handle,
439 [in] lsa_String name
,
440 [in] uint32 access_mask
,
441 [out] policy_handle
*sec_handle
445 /*****************************************/
447 NTSTATUS lsa_OpenAccount
(
448 [in] policy_handle
*handle,
449 [in,ref] dom_sid2
*sid
,
450 [in] uint32 access_mask
,
451 [out] policy_handle
*acct_handle
455 /****************************************/
464 [range(0,1000)] uint32 count
;
466 [size_is(count
)] lsa_LUIDAttribute set
[*];
469 NTSTATUS lsa_EnumPrivsAccount
(
470 [in] policy_handle
*handle,
471 [out,ref] lsa_PrivilegeSet
**privs
475 /****************************************/
477 NTSTATUS lsa_AddPrivilegesToAccount
(
478 [in] policy_handle
*handle,
479 [in,ref] lsa_PrivilegeSet
*privs
483 /****************************************/
485 NTSTATUS lsa_RemovePrivilegesFromAccount
(
486 [in] policy_handle
*handle,
487 [in] uint8 remove_all
,
488 [in,unique] lsa_PrivilegeSet
*privs
492 NTSTATUS lsa_GetQuotasForAccount
();
495 NTSTATUS lsa_SetQuotasForAccount
();
498 NTSTATUS lsa_GetSystemAccessAccount
(
499 [in] policy_handle
*handle,
500 [out,ref] uint32
*access_mask
504 NTSTATUS lsa_SetSystemAccessAccount
(
505 [in] policy_handle
*handle,
506 [in] uint32 access_mask
510 NTSTATUS lsa_OpenTrustedDomain
(
511 [in] policy_handle
*handle,
513 [in] uint32 access_mask
,
514 [out] policy_handle
*trustdom_handle
517 typedef [flag
(NDR_PAHEX
)] struct {
520 [size_is(size
),length_is(length
)] uint8
*data
;
523 typedef [flag
(NDR_PAHEX
)] struct {
524 [range(0,65536)] uint32 size
;
525 [size_is(size
)] uint8
*data
;
529 LSA_TRUSTED_DOMAIN_INFO_NAME
= 1,
530 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO
= 2,
531 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
= 3,
532 LSA_TRUSTED_DOMAIN_INFO_PASSWORD
= 4,
533 LSA_TRUSTED_DOMAIN_INFO_BASIC
= 5,
534 LSA_TRUSTED_DOMAIN_INFO_INFO_EX
= 6,
535 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
= 7,
536 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
= 8,
537 LSA_TRUSTED_DOMAIN_INFO_11
= 11,
538 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL
= 12
539 } lsa_TrustDomInfoEnum
;
542 lsa_StringLarge netbios_name
;
543 } lsa_TrustDomainInfoName
;
547 } lsa_TrustDomainInfoPosixOffset
;
550 lsa_DATA_BUF
*password
;
551 lsa_DATA_BUF
*old_password
;
552 } lsa_TrustDomainInfoPassword
;
555 lsa_String netbios_name
;
557 } lsa_TrustDomainInfoBasic
;
560 lsa_StringLarge domain_name
;
561 lsa_StringLarge netbios_name
;
563 uint32 trust_direction
;
565 uint32 trust_attributes
;
566 } lsa_TrustDomainInfoInfoEx
;
569 NTTIME_hyper last_update_time
;
572 } lsa_TrustDomainInfoBuffer
;
575 uint32 incoming_count
;
576 lsa_TrustDomainInfoBuffer
*incoming_current_auth_info
;
577 lsa_TrustDomainInfoBuffer
*incoming_previous_auth_info
;
578 uint32 outgoing_count
;
579 lsa_TrustDomainInfoBuffer
*outgoing_current_auth_info
;
580 lsa_TrustDomainInfoBuffer
*outgoing_previous_auth_info
;
581 } lsa_TrustDomainInfoAuthInfo
;
584 lsa_TrustDomainInfoInfoEx info_ex
;
585 lsa_TrustDomainInfoPosixOffset posix_offset
;
586 lsa_TrustDomainInfoAuthInfo auth_info
;
587 } lsa_TrustDomainInfoFullInfo
;
590 lsa_TrustDomainInfoInfoEx info_ex
;
592 } lsa_TrustDomainInfo11
;
595 lsa_TrustDomainInfoInfoEx info_ex
;
597 lsa_TrustDomainInfoPosixOffset posix_offset
;
598 lsa_TrustDomainInfoAuthInfo auth_info
;
599 } lsa_TrustDomainInfoInfoAll
;
601 typedef [switch_type(lsa_TrustDomInfoEnum
)] union {
602 [case(LSA_TRUSTED_DOMAIN_INFO_NAME
)] lsa_TrustDomainInfoName name
;
603 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET
)] lsa_TrustDomainInfoPosixOffset posix_offset
;
604 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD
)] lsa_TrustDomainInfoPassword password
;
605 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC
)] lsa_TrustDomainInfoBasic info_basic
;
606 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX
)] lsa_TrustDomainInfoInfoEx info_ex
;
607 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO
)] lsa_TrustDomainInfoAuthInfo auth_info
;
608 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO
)] lsa_TrustDomainInfoFullInfo full_info
;
609 [case(LSA_TRUSTED_DOMAIN_INFO_11
)] lsa_TrustDomainInfo11 info11
;
610 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL
)] lsa_TrustDomainInfoInfoAll info_all
;
611 } lsa_TrustedDomainInfo
;
614 NTSTATUS lsa_QueryTrustedDomainInfo
(
615 [in] policy_handle
*trustdom_handle
,
616 [in] lsa_TrustDomInfoEnum level
,
617 [out,switch_is(level
),unique] lsa_TrustedDomainInfo
*info
621 NTSTATUS lsa_SetInformationTrustedDomain
();
624 [public] NTSTATUS lsa_OpenSecret
(
625 [in] policy_handle
*handle,
626 [in] lsa_String name
,
627 [in] uint32 access_mask
,
628 [out] policy_handle
*sec_handle
633 [public] NTSTATUS lsa_SetSecret
(
634 [in] policy_handle
*sec_handle
,
635 [in,unique] lsa_DATA_BUF
*new_val
,
636 [in,unique] lsa_DATA_BUF
*old_val
644 [public] NTSTATUS lsa_QuerySecret
(
645 [in] policy_handle
*sec_handle
,
646 [in,out,unique] lsa_DATA_BUF_PTR
*new_val
,
647 [in,out,unique] NTTIME_hyper
*new_mtime
,
648 [in,out,unique] lsa_DATA_BUF_PTR
*old_val
,
649 [in,out,unique] NTTIME_hyper
*old_mtime
653 NTSTATUS lsa_LookupPrivValue
(
654 [in] policy_handle
*handle,
655 [in,ref] lsa_String
*name
,
656 [out,ref] lsa_LUID
*luid
661 NTSTATUS lsa_LookupPrivName
(
662 [in] policy_handle
*handle,
664 [out,unique] lsa_StringLarge
*name
668 /*******************/
670 NTSTATUS lsa_LookupPrivDisplayName
(
671 [in] policy_handle
*handle,
672 [in,ref] lsa_String
*name
,
673 [in] uint16 language_id
,
674 [in] uint16 language_id_sys
,
675 [out,ref] lsa_StringLarge
**disp_name
,
676 /* see http://www.microsoft.com/globaldev/nlsweb/ for
677 language definitions */
678 [out,ref] uint16
*returned_language_id
682 NTSTATUS lsa_DeleteObject
(
683 [in,out] policy_handle
*handle
686 /*******************/
688 NTSTATUS lsa_EnumAccountsWithUserRight
(
689 [in] policy_handle
*handle,
690 [in,unique] lsa_String
*name
,
691 [out] lsa_SidArray
*sids
696 [string,charset
(UTF16
)] uint16
*name
;
697 } lsa_RightAttribute
;
700 [range(0,256)] uint32 count
;
701 [size_is(count
)] lsa_StringLarge
*names
;
704 NTSTATUS lsa_EnumAccountRights
(
705 [in] policy_handle
*handle,
706 [in,ref] dom_sid2
*sid
,
707 [out,ref] lsa_RightSet
*rights
711 /**********************/
713 NTSTATUS lsa_AddAccountRights
(
714 [in] policy_handle
*handle,
715 [in,ref] dom_sid2
*sid
,
716 [in,ref] lsa_RightSet
*rights
719 /**********************/
721 NTSTATUS lsa_RemoveAccountRights
(
722 [in] policy_handle
*handle,
723 [in,ref] dom_sid2
*sid
,
724 [in] uint8 remove_all
,
725 [in,ref] lsa_RightSet
*rights
729 NTSTATUS lsa_QueryTrustedDomainInfoBySid
(
730 [in] policy_handle
*handle,
731 [in] dom_sid2
*dom_sid
,
732 [in] lsa_TrustDomInfoEnum level
,
733 [out,switch_is(level
),unique] lsa_TrustedDomainInfo
*info
737 NTSTATUS lsa_SetTrustedDomainInfo
();
739 NTSTATUS lsa_DeleteTrustedDomain
(
740 [in] policy_handle
*handle,
741 [in] dom_sid2
*dom_sid
745 NTSTATUS lsa_StorePrivateData
();
747 NTSTATUS lsa_RetrievePrivateData
();
750 /**********************/
752 [public] NTSTATUS lsa_OpenPolicy2
(
753 [in,unique] [string,charset
(UTF16
)] uint16
*system_name
,
754 [in] lsa_ObjectAttribute
*attr
,
755 [in] lsa_PolicyAccessMask access_mask
,
756 [out] policy_handle
*handle
759 /**********************/
761 NTSTATUS lsa_GetUserName
(
762 [in,unique] [string,charset
(UTF16
)] uint16
*system_name
,
763 [in,out,ref] lsa_String
**account_name
,
764 [in,out,unique] lsa_String
**authority_name
767 /**********************/
770 NTSTATUS lsa_QueryInfoPolicy2
(
771 [in] policy_handle
*handle,
772 [in] lsa_PolicyInfo level
,
773 [out,ref,switch_is(level
)] lsa_PolicyInformation
**info
777 NTSTATUS lsa_SetInfoPolicy2
(
778 [in] policy_handle
*handle,
779 [in] lsa_PolicyInfo level
,
780 [in,switch_is(level
)] lsa_PolicyInformation
*info
783 /**********************/
785 NTSTATUS lsa_QueryTrustedDomainInfoByName
(
786 [in] policy_handle
*handle,
787 [in,ref] lsa_String
*trusted_domain
,
788 [in] lsa_TrustDomInfoEnum level
,
789 [out,ref,switch_is(level
)] lsa_TrustedDomainInfo
*info
792 /**********************/
794 NTSTATUS lsa_SetTrustedDomainInfoByName
(
795 [in] policy_handle
*handle,
796 [in] lsa_String trusted_domain
,
797 [in] lsa_TrustDomInfoEnum level
,
798 [in,unique,switch_is(level
)] lsa_TrustedDomainInfo
*info
803 /* w2k3 treats max_size as max_domains*82 */
804 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER
= 82;
808 [size_is(count
)] lsa_TrustDomainInfoInfoEx
*domains
;
811 NTSTATUS lsa_EnumTrustedDomainsEx
(
812 [in] policy_handle
*handle,
813 [in,out] uint32
*resume_handle
,
814 [out] lsa_DomainListEx
*domains
,
820 NTSTATUS lsa_CreateTrustedDomainEx
();
823 NTSTATUS lsa_CloseTrustedDomainEx
(
824 [in,out] policy_handle
*handle
829 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
832 uint32 enforce_restrictions
;
833 hyper service_tkt_lifetime
;
834 hyper user_tkt_lifetime
;
835 hyper user_tkt_renewaltime
;
838 } lsa_DomainInfoKerberos
;
842 [size_is(blob_size
)] uint8
*efs_blob
;
846 LSA_DOMAIN_INFO_POLICY_EFS
=2,
847 LSA_DOMAIN_INFO_POLICY_KERBEROS
=3
848 } lsa_DomainInfoEnum
;
850 typedef [switch_type(uint16
)] union {
851 [case(LSA_DOMAIN_INFO_POLICY_EFS
)] lsa_DomainInfoEfs efs_info
;
852 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS
)] lsa_DomainInfoKerberos kerberos_info
;
853 } lsa_DomainInformationPolicy
;
855 NTSTATUS lsa_QueryDomainInformationPolicy
(
856 [in] policy_handle
*handle,
858 [out,unique,switch_is(level
)] lsa_DomainInformationPolicy
*info
862 NTSTATUS lsa_SetDomainInformationPolicy
(
863 [in] policy_handle
*handle,
865 [in,unique,switch_is(level
)] lsa_DomainInformationPolicy
*info
868 /**********************/
870 NTSTATUS lsa_OpenTrustedDomainByName
(
871 [in] policy_handle
*handle,
872 [in] lsa_String name
,
873 [in] uint32 access_mask
,
874 [out] policy_handle
*trustdom_handle
878 NTSTATUS lsa_TestCall
();
880 /**********************/
884 lsa_SidType sid_type
;
888 } lsa_TranslatedName2
;
891 [range(0,1000)] uint32 count
;
892 [size_is(count
)] lsa_TranslatedName2
*names
;
893 } lsa_TransNameArray2
;
895 [public] NTSTATUS lsa_LookupSids2
(
896 [in] policy_handle
*handle,
897 [in,ref] lsa_SidArray
*sids
,
898 [out,ref] lsa_RefDomainList
**domains
,
899 [in,out,ref] lsa_TransNameArray2
*names
,
901 [in,out,ref] uint32
*count
,
902 [in] uint32 unknown1
,
906 /**********************/
910 lsa_SidType sid_type
;
914 } lsa_TranslatedSid2
;
917 [range(0,1000)] uint32 count
;
918 [size_is(count
)] lsa_TranslatedSid2
*sids
;
919 } lsa_TransSidArray2
;
921 [public] NTSTATUS lsa_LookupNames2
(
922 [in] policy_handle
*handle,
923 [in,range(0,1000)] uint32 num_names
,
924 [in,size_is(num_names
)] lsa_String names
[],
925 [out,ref] lsa_RefDomainList
**domains
,
926 [in,out,ref] lsa_TransSidArray2
*sids
,
927 [in] lsa_LookupNamesLevel level
,
928 [in,out,ref] uint32
*count
,
929 [in] uint32 unknown1
,
934 NTSTATUS lsa_CreateTrustedDomainEx2
();
937 NTSTATUS lsa_CREDRWRITE
();
940 NTSTATUS lsa_CREDRREAD
();
943 NTSTATUS lsa_CREDRENUMERATE
();
946 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS
();
949 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS
();
952 NTSTATUS lsa_CREDRDELETE
();
955 NTSTATUS lsa_CREDRGETTARGETINFO
();
958 NTSTATUS lsa_CREDRPROFILELOADED
();
960 /**********************/
963 lsa_SidType sid_type
;
967 } lsa_TranslatedSid3
;
970 [range(0,1000)] uint32 count
;
971 [size_is(count
)] lsa_TranslatedSid3
*sids
;
972 } lsa_TransSidArray3
;
974 [public] NTSTATUS lsa_LookupNames3
(
975 [in] policy_handle
*handle,
976 [in,range(0,1000)] uint32 num_names
,
977 [in,size_is(num_names
)] lsa_String names
[],
978 [out,ref] lsa_RefDomainList
**domains
,
979 [in,out,ref] lsa_TransSidArray3
*sids
,
980 [in] lsa_LookupNamesLevel level
,
981 [in,out,ref] uint32
*count
,
982 [in] uint32 unknown1
,
987 NTSTATUS lsa_CREDRGETSESSIONTYPES
();
990 NTSTATUS lsa_LSARREGISTERAUDITEVENT
();
993 NTSTATUS lsa_LSARGENAUDITEVENT
();
996 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT
();
1000 [range(0,131072)] uint32 length
;
1001 [size_is(length
)] uint8
*data
;
1002 } lsa_ForestTrustBinaryData
;
1005 dom_sid2
*domain_sid
;
1006 lsa_StringLarge dns_domain_name
;
1007 lsa_StringLarge netbios_domain_name
;
1008 } lsa_ForestTrustDomainInfo
;
1010 typedef [switch_type(uint32
)] union {
1011 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME
)] lsa_String top_level_name
;
1012 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
)] lsa_StringLarge top_level_name_ex
;
1013 [case(LSA_FOREST_TRUST_DOMAIN_INFO
)] lsa_ForestTrustDomainInfo domain_info
;
1014 [default] lsa_ForestTrustBinaryData data
;
1015 } lsa_ForestTrustData
;
1017 typedef [v1_enum] enum {
1018 LSA_FOREST_TRUST_TOP_LEVEL_NAME
= 0,
1019 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX
= 1,
1020 LSA_FOREST_TRUST_DOMAIN_INFO
= 2,
1021 LSA_FOREST_TRUST_RECORD_TYPE_LAST
= 3
1022 } lsa_ForestTrustRecordType
;
1026 lsa_ForestTrustRecordType level
;
1028 [switch_is(level
)] lsa_ForestTrustData forest_trust_data
;
1029 } lsa_ForestTrustRecord
;
1031 typedef [public] struct {
1032 [range(0,4000)] uint32 count
;
1033 [size_is(count
)] lsa_ForestTrustRecord
**entries
;
1034 } lsa_ForestTrustInformation
;
1036 NTSTATUS lsa_lsaRQueryForestTrustInformation
(
1037 [in] policy_handle
*handle,
1038 [in,ref] lsa_String
*trusted_domain_name
,
1039 [in] uint16 unknown
, /* level ? */
1040 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1044 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION
();
1047 NTSTATUS lsa_CREDRRENAME
();
1052 [public] NTSTATUS lsa_LookupSids3
(
1053 [in,ref] lsa_SidArray
*sids
,
1054 [out,ref] lsa_RefDomainList
**domains
,
1055 [in,out,ref] lsa_TransNameArray2
*names
,
1057 [in,out,ref] uint32
*count
,
1058 [in] uint32 unknown1
,
1059 [in] uint32 unknown2
1063 NTSTATUS lsa_LookupNames4
(
1064 [in,range(0,1000)] uint32 num_names
,
1065 [in,size_is(num_names
)] lsa_String names
[],
1066 [out,ref] lsa_RefDomainList
**domains
,
1067 [in,out,ref] lsa_TransSidArray3
*sids
,
1068 [in] lsa_LookupNamesLevel level
,
1069 [in,out,ref] uint32
*count
,
1070 [in] uint32 unknown1
,
1071 [in] uint32 unknown2
1075 NTSTATUS lsa_LSAROPENPOLICYSCE
();
1078 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE
();
1081 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE
();
1084 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT
();