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_term(string))] 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 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
41 typedef [public] struct {
42 [value(strlen_m(string))] uint16 length;
43 [value(strlen_m_term(string))] uint16 size;
44 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
45 } lsa_AsciiStringLarge;
47 typedef [public] struct {
50 [size_is(size/2),length_is(length/2)] uint16 *array;
56 [in,out] policy_handle *handle
62 [public] NTSTATUS lsa_Delete (
63 [in] policy_handle *handle
81 [size_is(count)] lsa_PrivEntry *privs;
84 [public] NTSTATUS lsa_EnumPrivs (
85 [in] policy_handle *handle,
86 [in,out,ref] uint32 *resume_handle,
87 [out,ref] lsa_PrivArray *privs,
94 NTSTATUS lsa_QuerySecurity (
95 [in] policy_handle *handle,
96 [in] security_secinfo sec_info,
97 [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 NTSTATUS lsa_ChangePassword ();
117 uint32 len; /* ignored */
118 uint16 impersonation_level;
120 uint8 effective_only;
124 uint32 len; /* ignored */
126 [string,charset(UTF16)] uint16 *object_name;
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_PolicyAccessMask;
147 /* notice the screwup with the system_name - thats why MS created
149 [public] NTSTATUS lsa_OpenPolicy (
150 [in,unique] uint16 *system_name,
151 [in] lsa_ObjectAttribute *attr,
152 [in] lsa_PolicyAccessMask access_mask,
153 [out] policy_handle *handle
164 NTTIME retention_time;
165 uint8 shutdown_in_progress;
166 NTTIME time_to_shutdown;
167 uint32 next_audit_record;
171 typedef [v1_enum] enum {
172 LSA_AUDIT_POLICY_NONE=0,
173 LSA_AUDIT_POLICY_SUCCESS=1,
174 LSA_AUDIT_POLICY_FAILURE=2,
175 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
176 LSA_AUDIT_POLICY_CLEAR=4
177 } lsa_PolicyAuditPolicy;
180 LSA_AUDIT_CATEGORY_SYSTEM = 0,
181 LSA_AUDIT_CATEGORY_LOGON = 1,
182 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
183 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
184 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
185 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
186 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
187 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
188 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
189 } lsa_PolicyAuditEventType;
192 uint32 auditing_mode;
193 [size_is(count)] lsa_PolicyAuditPolicy *settings;
195 } lsa_AuditEventsInfo;
198 lsa_StringLarge name;
207 uint16 unknown; /* an midl padding bug? */
214 } lsa_ReplicaSourceInfo;
218 uint32 non_paged_pool;
223 } lsa_DefaultQuotaInfo;
227 NTTIME db_create_time;
228 } lsa_ModificationInfo;
231 uint8 shutdown_on_full;
232 } lsa_AuditFullSetInfo;
235 uint16 unknown; /* an midl padding bug? */
236 uint8 shutdown_on_full;
238 } lsa_AuditFullQueryInfo;
241 /* it's important that we use the lsa_StringLarge here,
242 * because otherwise windows clients result with such dns hostnames
243 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
245 * w2k3-client.samba4.samba.org
247 lsa_StringLarge name;
248 lsa_StringLarge dns_domain;
249 lsa_StringLarge dns_forest;
255 LSA_POLICY_INFO_AUDIT_LOG=1,
256 LSA_POLICY_INFO_AUDIT_EVENTS=2,
257 LSA_POLICY_INFO_DOMAIN=3,
258 LSA_POLICY_INFO_PD=4,
259 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
260 LSA_POLICY_INFO_ROLE=6,
261 LSA_POLICY_INFO_REPLICA=7,
262 LSA_POLICY_INFO_QUOTA=8,
263 LSA_POLICY_INFO_DB=9,
264 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
265 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
266 LSA_POLICY_INFO_DNS=12
269 typedef [switch_type(uint16)] union {
270 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
271 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
272 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
273 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
274 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
275 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
276 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
277 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
278 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
279 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
280 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
281 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
282 } lsa_PolicyInformation;
284 NTSTATUS lsa_QueryInfoPolicy(
285 [in] policy_handle *handle,
286 [in] lsa_PolicyInfo level,
287 [out,ref,switch_is(level)] lsa_PolicyInformation **info
292 NTSTATUS lsa_SetInfoPolicy (
293 [in] policy_handle *handle,
294 [in] lsa_PolicyInfo level,
295 [in,switch_is(level)] lsa_PolicyInformation *info
300 NTSTATUS lsa_ClearAuditLog ();
304 [public] NTSTATUS lsa_CreateAccount (
305 [in] policy_handle *handle,
306 [in,ref] dom_sid2 *sid,
307 [in] uint32 access_mask,
308 [out] policy_handle *acct_handle
312 /* NOTE: This only returns accounts that have at least
320 typedef [public] struct {
321 [range(0,1000)] uint32 num_sids;
322 [size_is(num_sids)] lsa_SidPtr *sids;
325 [public] NTSTATUS lsa_EnumAccounts (
326 [in] policy_handle *handle,
327 [in,out,ref] uint32 *resume_handle,
328 [out,ref] lsa_SidArray *sids,
329 [in,range(0,8192)] uint32 num_entries
333 /*************************************************/
336 [public] NTSTATUS lsa_CreateTrustedDomain(
337 [in] policy_handle *handle,
338 [in] lsa_DomainInfo *info,
339 [in] uint32 access_mask,
340 [out] policy_handle *trustdom_handle
347 /* w2k3 treats max_size as max_domains*60 */
348 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
352 [size_is(count)] lsa_DomainInfo *domains;
355 NTSTATUS lsa_EnumTrustDom (
356 [in] policy_handle *handle,
357 [in,out,ref] uint32 *resume_handle,
358 [out,ref] lsa_DomainList *domains,
366 SID_NAME_USE_NONE = 0,/* NOTUSED */
367 SID_NAME_USER = 1, /* user */
368 SID_NAME_DOM_GRP = 2, /* domain group */
369 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
370 SID_NAME_ALIAS = 4, /* local group */
371 SID_NAME_WKN_GRP = 5, /* well-known group */
372 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
373 SID_NAME_INVALID = 7, /* invalid account */
374 SID_NAME_UNKNOWN = 8, /* oops. */
375 SID_NAME_COMPUTER = 9 /* machine */
379 lsa_SidType sid_type;
385 [range(0,1000)] uint32 count;
386 [size_is(count)] lsa_TranslatedSid *sids;
389 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
390 const int MAX_REF_DOMAINS = LSA_REF_DOMAIN_LIST_MULTIPLIER;
393 [range(0,1000)] uint32 count;
394 [size_is(count)] lsa_DomainInfo *domains;
398 /* Level 1: Ask everywhere
399 * Level 2: Ask domain and trusted domains, no builtin and wkn
400 * Level 3: Only ask domain
401 * Level 4: W2k3ad: Only ask AD trusts
402 * Level 5: Only ask transitive forest trusts
407 LSA_LOOKUP_NAMES_ALL = 1,
408 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
409 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
410 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
411 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
412 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6
413 } lsa_LookupNamesLevel;
415 [public] NTSTATUS lsa_LookupNames (
416 [in] policy_handle *handle,
417 [in,range(0,1000)] uint32 num_names,
418 [in,size_is(num_names)] lsa_String names[],
419 [out,ref] lsa_RefDomainList **domains,
420 [in,out,ref] lsa_TransSidArray *sids,
421 [in] lsa_LookupNamesLevel level,
422 [in,out,ref] uint32 *count
430 lsa_SidType sid_type;
433 } lsa_TranslatedName;
436 [range(0,1000)] uint32 count;
437 [size_is(count)] lsa_TranslatedName *names;
438 } lsa_TransNameArray;
440 /* This number is based on Win2k and later maximum response allowed */
441 const int MAX_LOOKUP_SIDS = 0x5000; /* 20480 */
443 [public] NTSTATUS lsa_LookupSids (
444 [in] policy_handle *handle,
445 [in,ref] lsa_SidArray *sids,
446 [out,ref] lsa_RefDomainList **domains,
447 [in,out,ref] lsa_TransNameArray *names,
449 [in,out,ref] uint32 *count
454 [public] NTSTATUS lsa_CreateSecret(
455 [in] policy_handle *handle,
456 [in] lsa_String name,
457 [in] uint32 access_mask,
458 [out] policy_handle *sec_handle
462 /*****************************************/
464 NTSTATUS lsa_OpenAccount(
465 [in] policy_handle *handle,
466 [in,ref] dom_sid2 *sid,
467 [in] uint32 access_mask,
468 [out] policy_handle *acct_handle
472 /****************************************/
481 [range(0,1000)] uint32 count;
483 [size_is(count)] lsa_LUIDAttribute set[*];
486 NTSTATUS lsa_EnumPrivsAccount (
487 [in] policy_handle *handle,
488 [out,ref] lsa_PrivilegeSet **privs
492 /****************************************/
494 NTSTATUS lsa_AddPrivilegesToAccount(
495 [in] policy_handle *handle,
496 [in,ref] lsa_PrivilegeSet *privs
500 /****************************************/
502 NTSTATUS lsa_RemovePrivilegesFromAccount(
503 [in] policy_handle *handle,
504 [in] uint8 remove_all,
505 [in,unique] lsa_PrivilegeSet *privs
509 NTSTATUS lsa_GetQuotasForAccount();
512 NTSTATUS lsa_SetQuotasForAccount();
515 NTSTATUS lsa_GetSystemAccessAccount(
516 [in] policy_handle *handle,
517 [out,ref] uint32 *access_mask
521 NTSTATUS lsa_SetSystemAccessAccount(
522 [in] policy_handle *handle,
523 [in] uint32 access_mask
527 NTSTATUS lsa_OpenTrustedDomain(
528 [in] policy_handle *handle,
530 [in] uint32 access_mask,
531 [out] policy_handle *trustdom_handle
534 typedef [flag(NDR_PAHEX)] struct {
537 [size_is(size),length_is(length)] uint8 *data;
540 typedef [flag(NDR_PAHEX)] struct {
541 [range(0,65536)] uint32 size;
542 [size_is(size)] uint8 *data;
546 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
547 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO = 2,
548 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
549 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
550 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
551 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
552 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
553 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
554 LSA_TRUSTED_DOMAIN_INFO_11 = 11,
555 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL = 12
556 } lsa_TrustDomInfoEnum;
559 lsa_StringLarge netbios_name;
560 } lsa_TrustDomainInfoName;
564 } lsa_TrustDomainInfoPosixOffset;
567 lsa_DATA_BUF *password;
568 lsa_DATA_BUF *old_password;
569 } lsa_TrustDomainInfoPassword;
572 lsa_String netbios_name;
574 } lsa_TrustDomainInfoBasic;
577 lsa_StringLarge domain_name;
578 lsa_StringLarge netbios_name;
580 uint32 trust_direction;
582 uint32 trust_attributes;
583 } lsa_TrustDomainInfoInfoEx;
586 NTTIME_hyper last_update_time;
589 } lsa_TrustDomainInfoBuffer;
592 uint32 incoming_count;
593 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
594 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
595 uint32 outgoing_count;
596 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
597 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
598 } lsa_TrustDomainInfoAuthInfo;
601 lsa_TrustDomainInfoInfoEx info_ex;
602 lsa_TrustDomainInfoPosixOffset posix_offset;
603 lsa_TrustDomainInfoAuthInfo auth_info;
604 } lsa_TrustDomainInfoFullInfo;
607 lsa_TrustDomainInfoInfoEx info_ex;
609 } lsa_TrustDomainInfo11;
612 lsa_TrustDomainInfoInfoEx info_ex;
614 lsa_TrustDomainInfoPosixOffset posix_offset;
615 lsa_TrustDomainInfoAuthInfo auth_info;
616 } lsa_TrustDomainInfoInfoAll;
618 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
619 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name;
620 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] lsa_TrustDomainInfoPosixOffset posix_offset;
621 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password;
622 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] lsa_TrustDomainInfoBasic info_basic;
623 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex;
624 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info;
625 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info;
626 [case(LSA_TRUSTED_DOMAIN_INFO_11)] lsa_TrustDomainInfo11 info11;
627 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all;
628 } lsa_TrustedDomainInfo;
631 NTSTATUS lsa_QueryTrustedDomainInfo(
632 [in] policy_handle *trustdom_handle,
633 [in] lsa_TrustDomInfoEnum level,
634 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
638 NTSTATUS lsa_SetInformationTrustedDomain();
641 [public] NTSTATUS lsa_OpenSecret(
642 [in] policy_handle *handle,
643 [in] lsa_String name,
644 [in] uint32 access_mask,
645 [out] policy_handle *sec_handle
650 [public] NTSTATUS lsa_SetSecret(
651 [in] policy_handle *sec_handle,
652 [in,unique] lsa_DATA_BUF *new_val,
653 [in,unique] lsa_DATA_BUF *old_val
661 [public] NTSTATUS lsa_QuerySecret (
662 [in] policy_handle *sec_handle,
663 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
664 [in,out,unique] NTTIME_hyper *new_mtime,
665 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
666 [in,out,unique] NTTIME_hyper *old_mtime
670 NTSTATUS lsa_LookupPrivValue(
671 [in] policy_handle *handle,
672 [in,ref] lsa_String *name,
673 [out,ref] lsa_LUID *luid
678 NTSTATUS lsa_LookupPrivName (
679 [in] policy_handle *handle,
680 [in,ref] lsa_LUID *luid,
681 [out,ref] lsa_StringLarge **name
685 /*******************/
687 NTSTATUS lsa_LookupPrivDisplayName (
688 [in] policy_handle *handle,
689 [in,ref] lsa_String *name,
690 [in] uint16 language_id,
691 [in] uint16 language_id_sys,
692 [out,ref] lsa_StringLarge **disp_name,
693 /* see http://www.microsoft.com/globaldev/nlsweb/ for
694 language definitions */
695 [out,ref] uint16 *returned_language_id
699 NTSTATUS lsa_DeleteObject(
700 [in,out] policy_handle *handle
703 /*******************/
705 NTSTATUS lsa_EnumAccountsWithUserRight (
706 [in] policy_handle *handle,
707 [in,unique] lsa_String *name,
708 [out] lsa_SidArray *sids
713 [string,charset(UTF16)] uint16 *name;
714 } lsa_RightAttribute;
717 [range(0,256)] uint32 count;
718 [size_is(count)] lsa_StringLarge *names;
721 NTSTATUS lsa_EnumAccountRights (
722 [in] policy_handle *handle,
723 [in,ref] dom_sid2 *sid,
724 [out,ref] lsa_RightSet *rights
728 /**********************/
730 NTSTATUS lsa_AddAccountRights (
731 [in] policy_handle *handle,
732 [in,ref] dom_sid2 *sid,
733 [in,ref] lsa_RightSet *rights
736 /**********************/
738 NTSTATUS lsa_RemoveAccountRights (
739 [in] policy_handle *handle,
740 [in,ref] dom_sid2 *sid,
741 [in] uint8 remove_all,
742 [in,ref] lsa_RightSet *rights
746 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
747 [in] policy_handle *handle,
748 [in,ref] dom_sid2 *dom_sid,
749 [in] lsa_TrustDomInfoEnum level,
750 [out,switch_is(level),ref] lsa_TrustedDomainInfo **info
754 NTSTATUS lsa_SetTrustedDomainInfo();
756 NTSTATUS lsa_DeleteTrustedDomain(
757 [in] policy_handle *handle,
758 [in] dom_sid2 *dom_sid
762 NTSTATUS lsa_StorePrivateData();
764 NTSTATUS lsa_RetrievePrivateData();
767 /**********************/
769 [public] NTSTATUS lsa_OpenPolicy2 (
770 [in,unique] [string,charset(UTF16)] uint16 *system_name,
771 [in] lsa_ObjectAttribute *attr,
772 [in] lsa_PolicyAccessMask access_mask,
773 [out] policy_handle *handle
776 /**********************/
778 NTSTATUS lsa_GetUserName(
779 [in,unique] [string,charset(UTF16)] uint16 *system_name,
780 [in,out,ref] lsa_String **account_name,
781 [in,out,unique] lsa_String **authority_name
784 /**********************/
787 NTSTATUS lsa_QueryInfoPolicy2(
788 [in] policy_handle *handle,
789 [in] lsa_PolicyInfo level,
790 [out,ref,switch_is(level)] lsa_PolicyInformation **info
794 NTSTATUS lsa_SetInfoPolicy2(
795 [in] policy_handle *handle,
796 [in] lsa_PolicyInfo level,
797 [in,switch_is(level)] lsa_PolicyInformation *info
800 /**********************/
802 NTSTATUS lsa_QueryTrustedDomainInfoByName(
803 [in] policy_handle *handle,
804 [in,ref] lsa_String *trusted_domain,
805 [in] lsa_TrustDomInfoEnum level,
806 [out,ref,switch_is(level)] lsa_TrustedDomainInfo **info
809 /**********************/
811 NTSTATUS lsa_SetTrustedDomainInfoByName(
812 [in] policy_handle *handle,
813 [in] lsa_String trusted_domain,
814 [in] lsa_TrustDomInfoEnum level,
815 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
820 /* w2k3 treats max_size as max_domains*82 */
821 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
825 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
828 NTSTATUS lsa_EnumTrustedDomainsEx (
829 [in] policy_handle *handle,
830 [in,out] uint32 *resume_handle,
831 [out] lsa_DomainListEx *domains,
837 NTSTATUS lsa_CreateTrustedDomainEx();
840 NTSTATUS lsa_CloseTrustedDomainEx(
841 [in,out] policy_handle *handle
846 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
849 uint32 enforce_restrictions;
850 hyper service_tkt_lifetime;
851 hyper user_tkt_lifetime;
852 hyper user_tkt_renewaltime;
855 } lsa_DomainInfoKerberos;
859 [size_is(blob_size)] uint8 *efs_blob;
863 LSA_DOMAIN_INFO_POLICY_EFS=2,
864 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
865 } lsa_DomainInfoEnum;
867 typedef [switch_type(uint16)] union {
868 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
869 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
870 } lsa_DomainInformationPolicy;
872 NTSTATUS lsa_QueryDomainInformationPolicy(
873 [in] policy_handle *handle,
875 [out,ref,switch_is(level)] lsa_DomainInformationPolicy **info
879 NTSTATUS lsa_SetDomainInformationPolicy(
880 [in] policy_handle *handle,
882 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
885 /**********************/
887 NTSTATUS lsa_OpenTrustedDomainByName(
888 [in] policy_handle *handle,
889 [in] lsa_String name,
890 [in] uint32 access_mask,
891 [out] policy_handle *trustdom_handle
895 NTSTATUS lsa_TestCall();
897 /**********************/
901 lsa_SidType sid_type;
905 } lsa_TranslatedName2;
908 [range(0,1000)] uint32 count;
909 [size_is(count)] lsa_TranslatedName2 *names;
910 } lsa_TransNameArray2;
912 [public] NTSTATUS lsa_LookupSids2(
913 [in] policy_handle *handle,
914 [in,ref] lsa_SidArray *sids,
915 [out,ref] lsa_RefDomainList **domains,
916 [in,out,ref] lsa_TransNameArray2 *names,
918 [in,out,ref] uint32 *count,
919 [in] uint32 unknown1,
923 /**********************/
927 lsa_SidType sid_type;
931 } lsa_TranslatedSid2;
934 [range(0,1000)] uint32 count;
935 [size_is(count)] lsa_TranslatedSid2 *sids;
936 } lsa_TransSidArray2;
938 [public] NTSTATUS lsa_LookupNames2 (
939 [in] policy_handle *handle,
940 [in,range(0,1000)] uint32 num_names,
941 [in,size_is(num_names)] lsa_String names[],
942 [out,ref] lsa_RefDomainList **domains,
943 [in,out,ref] lsa_TransSidArray2 *sids,
944 [in] lsa_LookupNamesLevel level,
945 [in,out,ref] uint32 *count,
946 [in] uint32 unknown1,
951 NTSTATUS lsa_CreateTrustedDomainEx2();
954 NTSTATUS lsa_CREDRWRITE();
957 NTSTATUS lsa_CREDRREAD();
960 NTSTATUS lsa_CREDRENUMERATE();
963 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
966 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
969 NTSTATUS lsa_CREDRDELETE();
972 NTSTATUS lsa_CREDRGETTARGETINFO();
975 NTSTATUS lsa_CREDRPROFILELOADED();
977 /**********************/
980 lsa_SidType sid_type;
984 } lsa_TranslatedSid3;
987 [range(0,1000)] uint32 count;
988 [size_is(count)] lsa_TranslatedSid3 *sids;
989 } lsa_TransSidArray3;
991 [public] NTSTATUS lsa_LookupNames3 (
992 [in] policy_handle *handle,
993 [in,range(0,1000)] uint32 num_names,
994 [in,size_is(num_names)] lsa_String names[],
995 [out,ref] lsa_RefDomainList **domains,
996 [in,out,ref] lsa_TransSidArray3 *sids,
997 [in] lsa_LookupNamesLevel level,
998 [in,out,ref] uint32 *count,
999 [in] uint32 unknown1,
1000 [in] uint32 unknown2
1004 NTSTATUS lsa_CREDRGETSESSIONTYPES();
1007 NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1010 NTSTATUS lsa_LSARGENAUDITEVENT();
1013 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1017 [range(0,131072)] uint32 length;
1018 [size_is(length)] uint8 *data;
1019 } lsa_ForestTrustBinaryData;
1022 dom_sid2 *domain_sid;
1023 lsa_StringLarge dns_domain_name;
1024 lsa_StringLarge netbios_domain_name;
1025 } lsa_ForestTrustDomainInfo;
1027 typedef [switch_type(uint32)] union {
1028 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1029 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1030 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1031 [default] lsa_ForestTrustBinaryData data;
1032 } lsa_ForestTrustData;
1034 typedef [v1_enum] enum {
1035 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1036 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1037 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1038 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1039 } lsa_ForestTrustRecordType;
1043 lsa_ForestTrustRecordType level;
1045 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1046 } lsa_ForestTrustRecord;
1048 typedef [public] struct {
1049 [range(0,4000)] uint32 count;
1050 [size_is(count)] lsa_ForestTrustRecord **entries;
1051 } lsa_ForestTrustInformation;
1053 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1054 [in] policy_handle *handle,
1055 [in,ref] lsa_String *trusted_domain_name,
1056 [in] uint16 unknown, /* level ? */
1057 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1061 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1064 NTSTATUS lsa_CREDRRENAME();
1069 [public] NTSTATUS lsa_LookupSids3(
1070 [in,ref] lsa_SidArray *sids,
1071 [out,ref] lsa_RefDomainList **domains,
1072 [in,out,ref] lsa_TransNameArray2 *names,
1074 [in,out,ref] uint32 *count,
1075 [in] uint32 unknown1,
1076 [in] uint32 unknown2
1080 NTSTATUS lsa_LookupNames4(
1081 [in,range(0,1000)] uint32 num_names,
1082 [in,size_is(num_names)] lsa_String names[],
1083 [out,ref] lsa_RefDomainList **domains,
1084 [in,out,ref] lsa_TransSidArray3 *sids,
1085 [in] lsa_LookupNamesLevel level,
1086 [in,out,ref] uint32 *count,
1087 [in] uint32 unknown1,
1088 [in] uint32 unknown2
1092 NTSTATUS lsa_LSAROPENPOLICYSCE();
1095 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1098 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1101 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();