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\\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;
17 typedef bitmap kerb_EncTypes kerb_EncTypes;
19 typedef [public,noejs] struct {
20 [value(2*strlen_m(string))] uint16 length;
21 [value(2*strlen_m(string))] uint16 size;
22 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
25 typedef [public] struct {
26 [value(2*strlen_m(string))] uint16 length;
27 [value(2*strlen_m_term(string))] uint16 size;
28 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
31 typedef [public] struct {
33 [size_is(count)] lsa_String *names;
36 typedef [public] struct {
37 [value(strlen_m(string))] uint16 length;
38 [value(strlen_m(string))] uint16 size;
39 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
42 typedef [public] struct {
43 [value(strlen_m(string))] uint16 length;
44 [value(strlen_m_term(string))] uint16 size;
45 [charset(DOS),size_is(size),length_is(length)] uint8 *string;
46 } lsa_AsciiStringLarge;
51 [in,out] policy_handle *handle
57 [public] NTSTATUS lsa_Delete (
58 [in] policy_handle *handle
76 [size_is(count)] lsa_PrivEntry *privs;
79 [public] NTSTATUS lsa_EnumPrivs (
80 [in] policy_handle *handle,
81 [in,out] uint32 *resume_handle,
82 [in] uint32 max_count,
83 [out] lsa_PrivArray *privs
89 NTSTATUS lsa_QuerySecurity (
90 [in] policy_handle *handle,
91 [in] security_secinfo sec_info,
92 [out,unique] sec_desc_buf *sdbuf
98 [todo] NTSTATUS lsa_SetSecObj ();
103 [todo] NTSTATUS lsa_ChangePassword ();
109 uint32 len; /* ignored */
110 uint16 impersonation_level;
112 uint8 effective_only;
116 uint32 len; /* ignored */
118 [string,charset(UTF16)] uint16 *object_name;
120 security_descriptor *sec_desc;
121 lsa_QosInfo *sec_qos;
122 } lsa_ObjectAttribute;
124 /* notice the screwup with the system_name - thats why MS created
126 [public] NTSTATUS lsa_OpenPolicy (
127 [in,unique] uint16 *system_name,
128 [in] lsa_ObjectAttribute *attr,
129 [in] uint32 access_mask,
130 [out] policy_handle *handle
141 NTTIME retention_time;
142 uint8 shutdown_in_progress;
143 NTTIME time_to_shutdown;
144 uint32 next_audit_record;
148 typedef [v1_enum] enum {
149 LSA_AUDIT_POLICY_NONE=0,
150 LSA_AUDIT_POLICY_SUCCESS=1,
151 LSA_AUDIT_POLICY_FAILURE=2,
152 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
153 LSA_AUDIT_POLICY_CLEAR=4
154 } lsa_PolicyAuditPolicy;
157 LSA_AUDIT_CATEGORY_SYSTEM = 0,
158 LSA_AUDIT_CATEGORY_LOGON = 1,
159 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
160 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
161 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
162 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
163 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
164 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
165 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
166 } lsa_PolicyAuditEventType;
169 uint32 auditing_mode;
170 [size_is(count)] lsa_PolicyAuditPolicy *settings;
172 } lsa_AuditEventsInfo;
175 lsa_StringLarge name;
184 uint16 unknown; /* an midl padding bug? */
191 } lsa_ReplicaSourceInfo;
195 uint32 non_paged_pool;
200 } lsa_DefaultQuotaInfo;
204 NTTIME db_create_time;
205 } lsa_ModificationInfo;
208 uint8 shutdown_on_full;
209 } lsa_AuditFullSetInfo;
212 uint16 unknown; /* an midl padding bug? */
213 uint8 shutdown_on_full;
215 } lsa_AuditFullQueryInfo;
218 /* it's important that we use the lsa_StringLarge here,
219 * because otherwise windows clients result with such dns hostnames
220 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
222 * w2k3-client.samba4.samba.org
224 lsa_StringLarge name;
225 lsa_StringLarge dns_domain;
226 lsa_StringLarge dns_forest;
232 LSA_POLICY_INFO_AUDIT_LOG=1,
233 LSA_POLICY_INFO_AUDIT_EVENTS=2,
234 LSA_POLICY_INFO_DOMAIN=3,
235 LSA_POLICY_INFO_PD=4,
236 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
237 LSA_POLICY_INFO_ROLE=6,
238 LSA_POLICY_INFO_REPLICA=7,
239 LSA_POLICY_INFO_QUOTA=8,
240 LSA_POLICY_INFO_DB=9,
241 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
242 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
243 LSA_POLICY_INFO_DNS=12
246 typedef [switch_type(uint16)] union {
247 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
248 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
249 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
250 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
251 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
252 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
253 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
254 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
255 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
256 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
257 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
258 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
259 } lsa_PolicyInformation;
261 NTSTATUS lsa_QueryInfoPolicy (
262 [in] policy_handle *handle,
263 [in] lsa_PolicyInfo level,
264 [out,unique,switch_is(level)] lsa_PolicyInformation *info
269 NTSTATUS lsa_SetInfoPolicy (
270 [in] policy_handle *handle,
271 [in] lsa_PolicyInfo level,
272 [in,switch_is(level)] lsa_PolicyInformation *info
277 [todo] NTSTATUS lsa_ClearAuditLog ();
281 [public] NTSTATUS lsa_CreateAccount (
282 [in] policy_handle *handle,
284 [in] uint32 access_mask,
285 [out] policy_handle *acct_handle
289 /* NOTE: This only returns accounts that have at least
297 typedef [public] struct {
298 [range(0,1000)] uint32 num_sids;
299 [size_is(num_sids)] lsa_SidPtr *sids;
302 [public] NTSTATUS lsa_EnumAccounts (
303 [in] policy_handle *handle,
304 [in,out] uint32 *resume_handle,
305 [in,range(0,8192)] uint32 num_entries,
306 [out] lsa_SidArray *sids
310 /*************************************************/
313 [public] NTSTATUS lsa_CreateTrustedDomain(
314 [in] policy_handle *handle,
315 [in] lsa_DomainInfo *info,
316 [in] uint32 access_mask,
317 [out] policy_handle *trustdom_handle
324 /* w2k3 treats max_size as max_domains*60 */
325 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
329 [size_is(count)] lsa_DomainInfo *domains;
332 NTSTATUS lsa_EnumTrustDom (
333 [in] policy_handle *handle,
334 [in,out] uint32 *resume_handle,
335 [in] uint32 max_size,
336 [out] lsa_DomainList *domains
342 typedef [public] enum {
343 SID_NAME_USE_NONE = 0,/* NOTUSED */
344 SID_NAME_USER = 1, /* user */
345 SID_NAME_DOM_GRP = 2, /* domain group */
346 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
347 SID_NAME_ALIAS = 4, /* local group */
348 SID_NAME_WKN_GRP = 5, /* well-known group */
349 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
350 SID_NAME_INVALID = 7, /* invalid account */
351 SID_NAME_UNKNOWN = 8, /* oops. */
352 SID_NAME_COMPUTER = 9 /* machine */
356 lsa_SidType sid_type;
362 [range(0,1000)] uint32 count;
363 [size_is(count)] lsa_TranslatedSid *sids;
366 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
368 [range(0,1000)] uint32 count;
369 [size_is(count)] lsa_DomainInfo *domains;
373 /* Level 1: Ask everywhere
374 * Level 2: Ask domain and trusted domains, no builtin and wkn
375 * Level 3: Only ask domain
376 * Level 4: W2k3ad: Only ask AD trusts
377 * Level 5: Only ask transitive forest trusts
382 LSA_LOOKUP_NAMES_ALL = 1,
383 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
384 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
385 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
386 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
387 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6
388 } lsa_LookupNamesLevel;
390 [public] NTSTATUS lsa_LookupNames (
391 [in] policy_handle *handle,
392 [in,range(0,1000)] uint32 num_names,
393 [in,size_is(num_names)] lsa_String names[],
394 [out,unique] lsa_RefDomainList *domains,
395 [in,out] lsa_TransSidArray *sids,
396 [in] lsa_LookupNamesLevel level,
397 [in,out] uint32 *count
405 lsa_SidType sid_type;
408 } lsa_TranslatedName;
411 [range(0,1000)] uint32 count;
412 [size_is(count)] lsa_TranslatedName *names;
413 } lsa_TransNameArray;
415 [public] NTSTATUS lsa_LookupSids (
416 [in] policy_handle *handle,
417 [in] lsa_SidArray *sids,
418 [out,unique] lsa_RefDomainList *domains,
419 [in,out] lsa_TransNameArray *names,
421 [in,out] uint32 *count
426 [public] NTSTATUS lsa_CreateSecret(
427 [in] policy_handle *handle,
428 [in] lsa_String name,
429 [in] uint32 access_mask,
430 [out] policy_handle *sec_handle
434 /*****************************************/
436 NTSTATUS lsa_OpenAccount (
437 [in] policy_handle *handle,
439 [in] uint32 access_mask,
440 [out] policy_handle *acct_handle
444 /****************************************/
453 [range(0,1000)] uint32 count;
455 [size_is(count)] lsa_LUIDAttribute set[*];
458 NTSTATUS lsa_EnumPrivsAccount (
459 [in] policy_handle *handle,
460 [out,unique] lsa_PrivilegeSet *privs
464 /****************************************/
466 NTSTATUS lsa_AddPrivilegesToAccount(
467 [in] policy_handle *handle,
468 [in] lsa_PrivilegeSet *privs
472 /****************************************/
474 NTSTATUS lsa_RemovePrivilegesFromAccount(
475 [in] policy_handle *handle,
476 [in] uint8 remove_all,
477 [in,unique] lsa_PrivilegeSet *privs
481 [todo] NTSTATUS lsa_GetQuotasForAccount();
484 [todo] NTSTATUS lsa_SetQuotasForAccount();
487 [todo] NTSTATUS lsa_GetSystemAccessAccount();
489 [todo] NTSTATUS lsa_SetSystemAccessAccount();
492 NTSTATUS lsa_OpenTrustedDomain(
493 [in] policy_handle *handle,
495 [in] uint32 access_mask,
496 [out] policy_handle *trustdom_handle
499 typedef [flag(NDR_PAHEX)] struct {
502 [size_is(size),length_is(length)] uint8 *data;
505 typedef [flag(NDR_PAHEX)] struct {
506 [range(0,65536)] uint32 size;
507 [size_is(size)] uint8 *data;
511 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
512 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS = 2,
513 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
514 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
515 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
516 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
517 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
518 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
519 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL = 9,
520 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL = 10,
521 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL = 11,
522 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL = 12,
523 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
524 } lsa_TrustDomInfoEnum;
526 typedef [public,bitmap32bit] bitmap {
527 LSA_TRUST_DIRECTION_INBOUND = 0x00000001,
528 LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
529 } lsa_TrustDirection;
531 typedef [v1_enum] enum {
532 LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001,
533 LSA_TRUST_TYPE_UPLEVEL = 0x00000002,
534 LSA_TRUST_TYPE_MIT = 0x00000003
537 typedef [public,bitmap32bit] bitmap {
538 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
539 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
540 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
541 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
542 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
543 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
544 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040,
545 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080
546 } lsa_TrustAttributes;
549 lsa_StringLarge netbios_name;
550 } lsa_TrustDomainInfoName;
555 [size_is(entries)] lsa_StringLarge *netbios_names;
556 } lsa_TrustDomainInfoControllers;
560 } lsa_TrustDomainInfoPosixOffset;
563 lsa_DATA_BUF *password;
564 lsa_DATA_BUF *old_password;
565 } lsa_TrustDomainInfoPassword;
568 lsa_String netbios_name;
570 } lsa_TrustDomainInfoBasic;
573 lsa_StringLarge domain_name;
574 lsa_StringLarge netbios_name;
576 lsa_TrustDirection trust_direction;
577 lsa_TrustType trust_type;
578 lsa_TrustAttributes trust_attributes;
579 } lsa_TrustDomainInfoInfoEx;
581 typedef [public,v1_enum] enum {
582 TRUST_AUTH_TYPE_NONE = 0,
583 TRUST_AUTH_TYPE_NT4OWF = 1,
584 TRUST_AUTH_TYPE_CLEAR = 2,
585 TRUST_AUTH_TYPE_VERSION = 3
589 NTTIME_hyper last_update_time;
590 lsa_TrustAuthType AuthType;
592 } lsa_TrustDomainInfoBuffer;
595 uint32 incoming_count;
596 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
597 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
598 uint32 outgoing_count;
599 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
600 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
601 } lsa_TrustDomainInfoAuthInfo;
604 lsa_TrustDomainInfoInfoEx info_ex;
605 lsa_TrustDomainInfoPosixOffset posix_offset;
606 lsa_TrustDomainInfoAuthInfo auth_info;
607 } lsa_TrustDomainInfoFullInfo;
610 lsa_DATA_BUF2 auth_blob;
611 } lsa_TrustDomainInfoAuthInfoInternal;
614 lsa_TrustDomainInfoInfoEx info_ex;
615 lsa_TrustDomainInfoPosixOffset posix_offset;
616 lsa_TrustDomainInfoAuthInfoInternal auth_info;
617 } lsa_TrustDomainInfoFullInfoInternal;
620 lsa_TrustDomainInfoInfoEx info_ex;
621 uint32 forest_trust_length;
622 [size_is(forest_trust_length)] uint8 *forest_trust_data;
623 } lsa_TrustDomainInfoInfoEx2Internal;
626 lsa_TrustDomainInfoInfoEx2Internal info;
627 lsa_TrustDomainInfoPosixOffset posix_offset;
628 lsa_TrustDomainInfoAuthInfo auth_info;
629 } lsa_TrustDomainInfoInfo2Internal;
632 kerb_EncTypes enc_types;
633 } lsa_TrustDomainInfoSupportedEncTypes;
635 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
636 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
637 lsa_TrustDomainInfoName name;
638 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
639 lsa_TrustDomainInfoControllers controllers;
640 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
641 lsa_TrustDomainInfoPosixOffset posix_offset;
642 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
643 lsa_TrustDomainInfoPassword password;
644 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
645 lsa_TrustDomainInfoBasic info_basic;
646 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
647 lsa_TrustDomainInfoInfoEx info_ex;
648 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
649 lsa_TrustDomainInfoAuthInfo auth_info;
650 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
651 lsa_TrustDomainInfoFullInfo full_info;
652 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
653 lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;
654 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
655 lsa_TrustDomainInfoFullInfoInternal full_info_internal;
656 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
657 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;
658 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
659 lsa_TrustDomainInfoInfo2Internal info2_internal;
660 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
661 lsa_TrustDomainInfoSupportedEncTypes enc_types;
662 } lsa_TrustedDomainInfo;
665 NTSTATUS lsa_QueryTrustedDomainInfo(
666 [in] policy_handle *trustdom_handle,
667 [in] lsa_TrustDomInfoEnum level,
668 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
672 NTSTATUS lsa_SetInformationTrustedDomain(
673 [in] policy_handle *trustdom_handle,
674 [in] lsa_TrustDomInfoEnum level,
675 [in,switch_is(level)] lsa_TrustedDomainInfo *info
679 [public] NTSTATUS lsa_OpenSecret(
680 [in] policy_handle *handle,
681 [in] lsa_String name,
682 [in] uint32 access_mask,
683 [out] policy_handle *sec_handle
688 [public] NTSTATUS lsa_SetSecret(
689 [in] policy_handle *sec_handle,
690 [in,unique] lsa_DATA_BUF *new_val,
691 [in,unique] lsa_DATA_BUF *old_val
699 [public] NTSTATUS lsa_QuerySecret (
700 [in] policy_handle *sec_handle,
701 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
702 [in,out,unique] NTTIME_hyper *new_mtime,
703 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
704 [in,out,unique] NTTIME_hyper *old_mtime
708 NTSTATUS lsa_LookupPrivValue(
709 [in] policy_handle *handle,
710 [in] lsa_String *name,
716 NTSTATUS lsa_LookupPrivName (
717 [in] policy_handle *handle,
719 [out,unique] lsa_StringLarge *name
723 /*******************/
725 NTSTATUS lsa_LookupPrivDisplayName (
726 [in] policy_handle *handle,
727 [in] lsa_String *name,
728 [out,unique] lsa_StringLarge *disp_name,
729 /* see http://www.microsoft.com/globaldev/nlsweb/ for
730 language definitions */
731 [in,out] uint16 *language_id,
735 /*******************/
737 NTSTATUS lsa_DeleteObject (
738 [in,out] policy_handle *handle
743 /*******************/
745 NTSTATUS lsa_EnumAccountsWithUserRight (
746 [in] policy_handle *handle,
747 [in,unique] lsa_String *name,
748 [out] lsa_SidArray *sids
753 [string,charset(UTF16)] uint16 *name;
754 } lsa_RightAttribute;
758 [size_is(count)] lsa_StringLarge *names;
761 NTSTATUS lsa_EnumAccountRights (
762 [in] policy_handle *handle,
764 [out] lsa_RightSet *rights
768 /**********************/
770 NTSTATUS lsa_AddAccountRights (
771 [in] policy_handle *handle,
773 [in] lsa_RightSet *rights
776 /**********************/
778 NTSTATUS lsa_RemoveAccountRights (
779 [in] policy_handle *handle,
782 [in] lsa_RightSet *rights
786 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
787 [in] policy_handle *handle,
788 [in] dom_sid2 *dom_sid,
789 [in] lsa_TrustDomInfoEnum level,
790 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
794 NTSTATUS lsa_SetTrustedDomainInfo(
795 [in] policy_handle *handle,
796 [in] dom_sid2 *dom_sid,
797 [in] lsa_TrustDomInfoEnum level,
798 [in,switch_is(level)] lsa_TrustedDomainInfo *info
801 NTSTATUS lsa_DeleteTrustedDomain(
802 [in] policy_handle *handle,
803 [in] dom_sid2 *dom_sid
807 [todo] NTSTATUS lsa_StorePrivateData();
809 [todo] NTSTATUS lsa_RetrievePrivateData();
812 /**********************/
814 [public] NTSTATUS lsa_OpenPolicy2 (
815 [in,unique] [string,charset(UTF16)] uint16 *system_name,
816 [in] lsa_ObjectAttribute *attr,
817 [in] uint32 access_mask,
818 [out] policy_handle *handle
821 /**********************/
827 NTSTATUS lsa_GetUserName(
828 [in,unique] [string,charset(UTF16)] uint16 *system_name,
829 [in,out,unique] lsa_String *account_name,
830 [in,out,unique] lsa_StringPointer *authority_name
833 /**********************/
836 NTSTATUS lsa_QueryInfoPolicy2(
837 [in] policy_handle *handle,
838 [in] lsa_PolicyInfo level,
839 [out,unique,switch_is(level)] lsa_PolicyInformation *info
843 NTSTATUS lsa_SetInfoPolicy2(
844 [in] policy_handle *handle,
845 [in] lsa_PolicyInfo level,
846 [in,switch_is(level)] lsa_PolicyInformation *info
849 /**********************/
851 NTSTATUS lsa_QueryTrustedDomainInfoByName(
852 [in] policy_handle *handle,
853 [in] lsa_String trusted_domain,
854 [in] lsa_TrustDomInfoEnum level,
855 [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
858 /**********************/
860 NTSTATUS lsa_SetTrustedDomainInfoByName(
861 [in] policy_handle *handle,
862 [in] lsa_String trusted_domain,
863 [in] lsa_TrustDomInfoEnum level,
864 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
869 /* w2k3 treats max_size as max_domains*82 */
870 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
874 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
877 NTSTATUS lsa_EnumTrustedDomainsEx (
878 [in] policy_handle *handle,
879 [in,out] uint32 *resume_handle,
880 [out] lsa_DomainListEx *domains,
885 NTSTATUS lsa_CreateTrustedDomainEx(
886 [in] policy_handle *policy_handle,
887 [in] lsa_TrustDomainInfoInfoEx *info,
888 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
889 [in] uint32 access_mask,
890 [out] policy_handle *trustdom_handle
895 NTSTATUS lsa_CloseTrustedDomainEx(
896 [in,out] policy_handle *handle
901 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
904 uint32 enforce_restrictions;
905 hyper service_tkt_lifetime;
906 hyper user_tkt_lifetime;
907 hyper user_tkt_renewaltime;
910 } lsa_DomainInfoKerberos;
914 [size_is(blob_size)] uint8 *efs_blob;
918 LSA_DOMAIN_INFO_POLICY_EFS=2,
919 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
920 } lsa_DomainInfoEnum;
922 typedef [switch_type(uint16)] union {
923 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
924 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
925 } lsa_DomainInformationPolicy;
927 NTSTATUS lsa_QueryDomainInformationPolicy(
928 [in] policy_handle *handle,
930 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
934 NTSTATUS lsa_SetDomainInformationPolicy(
935 [in] policy_handle *handle,
937 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
940 /**********************/
942 NTSTATUS lsa_OpenTrustedDomainByName(
943 [in] policy_handle *handle,
944 [in] lsa_String name,
945 [in] uint32 access_mask,
946 [out] policy_handle *trustdom_handle
950 [todo] NTSTATUS lsa_TestCall();
952 /**********************/
956 lsa_SidType sid_type;
960 } lsa_TranslatedName2;
963 [range(0,1000)] uint32 count;
964 [size_is(count)] lsa_TranslatedName2 *names;
965 } lsa_TransNameArray2;
967 [public] NTSTATUS lsa_LookupSids2(
968 [in] policy_handle *handle,
969 [in] lsa_SidArray *sids,
970 [out,unique] lsa_RefDomainList *domains,
971 [in,out] lsa_TransNameArray2 *names,
973 [in,out] uint32 *count,
974 [in] uint32 unknown1,
978 /**********************/
982 lsa_SidType sid_type;
986 } lsa_TranslatedSid2;
989 [range(0,1000)] uint32 count;
990 [size_is(count)] lsa_TranslatedSid2 *sids;
991 } lsa_TransSidArray2;
993 [public] NTSTATUS lsa_LookupNames2 (
994 [in] policy_handle *handle,
995 [in,range(0,1000)] uint32 num_names,
996 [in,size_is(num_names)] lsa_String names[],
997 [out,unique] lsa_RefDomainList *domains,
998 [in,out] lsa_TransSidArray2 *sids,
999 [in] lsa_LookupNamesLevel level,
1000 [in,out] uint32 *count,
1001 [in] uint32 unknown1,
1002 [in] uint32 unknown2
1006 NTSTATUS lsa_CreateTrustedDomainEx2(
1007 [in] policy_handle *policy_handle,
1008 [in] lsa_TrustDomainInfoInfoEx *info,
1009 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
1010 [in] uint32 access_mask,
1011 [out] policy_handle *trustdom_handle
1015 [todo] NTSTATUS lsa_CREDRWRITE();
1018 [todo] NTSTATUS lsa_CREDRREAD();
1021 [todo] NTSTATUS lsa_CREDRENUMERATE();
1024 [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
1027 [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
1030 [todo] NTSTATUS lsa_CREDRDELETE();
1033 [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
1036 [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1038 /**********************/
1041 lsa_SidType sid_type;
1045 } lsa_TranslatedSid3;
1048 [range(0,1000)] uint32 count;
1049 [size_is(count)] lsa_TranslatedSid3 *sids;
1050 } lsa_TransSidArray3;
1052 [public] NTSTATUS lsa_LookupNames3 (
1053 [in] policy_handle *handle,
1054 [in,range(0,1000)] uint32 num_names,
1055 [in,size_is(num_names)] lsa_String names[],
1056 [out,unique] lsa_RefDomainList *domains,
1057 [in,out] lsa_TransSidArray3 *sids,
1058 [in] lsa_LookupNamesLevel level,
1059 [in,out] uint32 *count,
1060 [in] uint32 unknown1,
1061 [in] uint32 unknown2
1065 [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1068 [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1071 [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1074 [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1078 [range(0,131072)] uint32 length;
1079 [size_is(length)] uint8 *data;
1080 } lsa_ForestTrustBinaryData;
1083 dom_sid2 *domain_sid;
1084 lsa_StringLarge dns_domain_name;
1085 lsa_StringLarge netbios_domain_name;
1086 } lsa_ForestTrustDomainInfo;
1088 typedef [switch_type(uint32)] union {
1089 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1090 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1091 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1092 [default] lsa_ForestTrustBinaryData data;
1093 } lsa_ForestTrustData;
1095 typedef [v1_enum] enum {
1096 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1097 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1098 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1099 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1100 } lsa_ForestTrustRecordType;
1104 lsa_ForestTrustRecordType level;
1106 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1107 } lsa_ForestTrustRecord;
1109 typedef [public] struct {
1110 [range(0,4000)] uint32 count;
1111 [size_is(count)] lsa_ForestTrustRecord **entries;
1112 } lsa_ForestTrustInformation;
1114 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1115 [in] policy_handle *handle,
1116 [in,ref] lsa_String *trusted_domain_name,
1117 [in] uint16 unknown, /* level ? */
1118 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1122 [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1125 [todo] NTSTATUS lsa_CREDRRENAME();
1130 [public] NTSTATUS lsa_LookupSids3(
1131 [in] lsa_SidArray *sids,
1132 [out,unique] lsa_RefDomainList *domains,
1133 [in,out] lsa_TransNameArray2 *names,
1135 [in,out] uint32 *count,
1136 [in] uint32 unknown1,
1137 [in] uint32 unknown2
1141 NTSTATUS lsa_LookupNames4(
1142 [in,range(0,1000)] uint32 num_names,
1143 [in,size_is(num_names)] lsa_String names[],
1144 [out,unique] lsa_RefDomainList *domains,
1145 [in,out] lsa_TransSidArray3 *sids,
1146 [in] lsa_LookupNamesLevel level,
1147 [in,out] uint32 *count,
1148 [in] uint32 unknown1,
1149 [in] uint32 unknown2
1153 [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1156 [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1159 [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1162 [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();