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 NTSTATUS lsa_SetSecObj(
99 [in] policy_handle *handle,
100 [in] security_secinfo sec_info,
101 [in,ref] sec_desc_buf *sdbuf
106 [todo] NTSTATUS lsa_ChangePassword ();
112 uint32 len; /* ignored */
113 uint16 impersonation_level;
115 uint8 effective_only;
119 uint32 len; /* ignored */
121 [string,charset(UTF16)] uint16 *object_name;
123 security_descriptor *sec_desc;
124 lsa_QosInfo *sec_qos;
125 } lsa_ObjectAttribute;
127 /* notice the screwup with the system_name - thats why MS created
129 [public] NTSTATUS lsa_OpenPolicy (
130 [in,unique] uint16 *system_name,
131 [in] lsa_ObjectAttribute *attr,
132 [in] uint32 access_mask,
133 [out] policy_handle *handle
144 NTTIME retention_time;
145 uint8 shutdown_in_progress;
146 NTTIME time_to_shutdown;
147 uint32 next_audit_record;
151 typedef [v1_enum] enum {
152 LSA_AUDIT_POLICY_NONE=0,
153 LSA_AUDIT_POLICY_SUCCESS=1,
154 LSA_AUDIT_POLICY_FAILURE=2,
155 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
156 LSA_AUDIT_POLICY_CLEAR=4
157 } lsa_PolicyAuditPolicy;
160 LSA_AUDIT_CATEGORY_SYSTEM = 0,
161 LSA_AUDIT_CATEGORY_LOGON = 1,
162 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
163 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
164 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
165 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
166 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
167 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
168 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
169 } lsa_PolicyAuditEventType;
172 uint32 auditing_mode;
173 [size_is(count)] lsa_PolicyAuditPolicy *settings;
175 } lsa_AuditEventsInfo;
178 lsa_StringLarge name;
187 uint16 unknown; /* an midl padding bug? */
194 } lsa_ReplicaSourceInfo;
198 uint32 non_paged_pool;
203 } lsa_DefaultQuotaInfo;
207 NTTIME db_create_time;
208 } lsa_ModificationInfo;
211 uint8 shutdown_on_full;
212 } lsa_AuditFullSetInfo;
215 uint16 unknown; /* an midl padding bug? */
216 uint8 shutdown_on_full;
218 } lsa_AuditFullQueryInfo;
221 /* it's important that we use the lsa_StringLarge here,
222 * because otherwise windows clients result with such dns hostnames
223 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
225 * w2k3-client.samba4.samba.org
227 lsa_StringLarge name;
228 lsa_StringLarge dns_domain;
229 lsa_StringLarge dns_forest;
235 LSA_POLICY_INFO_AUDIT_LOG=1,
236 LSA_POLICY_INFO_AUDIT_EVENTS=2,
237 LSA_POLICY_INFO_DOMAIN=3,
238 LSA_POLICY_INFO_PD=4,
239 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
240 LSA_POLICY_INFO_ROLE=6,
241 LSA_POLICY_INFO_REPLICA=7,
242 LSA_POLICY_INFO_QUOTA=8,
243 LSA_POLICY_INFO_DB=9,
244 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
245 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
246 LSA_POLICY_INFO_DNS=12
249 typedef [switch_type(uint16)] union {
250 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
251 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
252 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
253 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
254 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
255 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
256 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
257 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
258 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
259 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
260 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
261 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
262 } lsa_PolicyInformation;
264 NTSTATUS lsa_QueryInfoPolicy (
265 [in] policy_handle *handle,
266 [in] lsa_PolicyInfo level,
267 [out,unique,switch_is(level)] lsa_PolicyInformation *info
272 NTSTATUS lsa_SetInfoPolicy (
273 [in] policy_handle *handle,
274 [in] lsa_PolicyInfo level,
275 [in,switch_is(level)] lsa_PolicyInformation *info
280 [todo] NTSTATUS lsa_ClearAuditLog ();
284 [public] NTSTATUS lsa_CreateAccount (
285 [in] policy_handle *handle,
287 [in] uint32 access_mask,
288 [out] policy_handle *acct_handle
292 /* NOTE: This only returns accounts that have at least
300 typedef [public] struct {
301 [range(0,1000)] uint32 num_sids;
302 [size_is(num_sids)] lsa_SidPtr *sids;
305 [public] NTSTATUS lsa_EnumAccounts (
306 [in] policy_handle *handle,
307 [in,out] uint32 *resume_handle,
308 [in,range(0,8192)] uint32 num_entries,
309 [out] lsa_SidArray *sids
313 /*************************************************/
316 [public] NTSTATUS lsa_CreateTrustedDomain(
317 [in] policy_handle *policy_handle,
318 [in] lsa_DomainInfo *info,
319 [in] uint32 access_mask,
320 [out] policy_handle *trustdom_handle
327 /* w2k3 treats max_size as max_domains*60 */
328 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
332 [size_is(count)] lsa_DomainInfo *domains;
335 NTSTATUS lsa_EnumTrustDom (
336 [in] policy_handle *handle,
337 [in,out] uint32 *resume_handle,
338 [in] uint32 max_size,
339 [out] lsa_DomainList *domains
345 typedef [public] enum {
346 SID_NAME_USE_NONE = 0,/* NOTUSED */
347 SID_NAME_USER = 1, /* user */
348 SID_NAME_DOM_GRP = 2, /* domain group */
349 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
350 SID_NAME_ALIAS = 4, /* local group */
351 SID_NAME_WKN_GRP = 5, /* well-known group */
352 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
353 SID_NAME_INVALID = 7, /* invalid account */
354 SID_NAME_UNKNOWN = 8, /* oops. */
355 SID_NAME_COMPUTER = 9 /* machine */
359 lsa_SidType sid_type;
365 [range(0,1000)] uint32 count;
366 [size_is(count)] lsa_TranslatedSid *sids;
369 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
371 [range(0,1000)] uint32 count;
372 [size_is(count)] lsa_DomainInfo *domains;
376 /* Level 1: Ask everywhere
377 * Level 2: Ask domain and trusted domains, no builtin and wkn
378 * Level 3: Only ask domain
379 * Level 4: W2k3ad: Only ask AD trusts
380 * Level 5: Only ask transitive forest trusts
385 LSA_LOOKUP_NAMES_ALL = 1,
386 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
387 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
388 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
389 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
390 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6
391 } lsa_LookupNamesLevel;
393 [public] NTSTATUS lsa_LookupNames (
394 [in] policy_handle *handle,
395 [in,range(0,1000)] uint32 num_names,
396 [in,size_is(num_names)] lsa_String names[],
397 [out,unique] lsa_RefDomainList *domains,
398 [in,out] lsa_TransSidArray *sids,
399 [in] lsa_LookupNamesLevel level,
400 [in,out] uint32 *count
408 lsa_SidType sid_type;
411 } lsa_TranslatedName;
414 [range(0,1000)] uint32 count;
415 [size_is(count)] lsa_TranslatedName *names;
416 } lsa_TransNameArray;
418 [public] NTSTATUS lsa_LookupSids (
419 [in] policy_handle *handle,
420 [in] lsa_SidArray *sids,
421 [out,unique] lsa_RefDomainList *domains,
422 [in,out] lsa_TransNameArray *names,
424 [in,out] uint32 *count
429 [public] NTSTATUS lsa_CreateSecret(
430 [in] policy_handle *handle,
431 [in] lsa_String name,
432 [in] uint32 access_mask,
433 [out] policy_handle *sec_handle
437 /*****************************************/
439 NTSTATUS lsa_OpenAccount (
440 [in] policy_handle *handle,
442 [in] uint32 access_mask,
443 [out] policy_handle *acct_handle
447 /****************************************/
456 [range(0,1000)] uint32 count;
458 [size_is(count)] lsa_LUIDAttribute set[*];
461 NTSTATUS lsa_EnumPrivsAccount (
462 [in] policy_handle *handle,
463 [out,unique] lsa_PrivilegeSet *privs
467 /****************************************/
469 NTSTATUS lsa_AddPrivilegesToAccount(
470 [in] policy_handle *handle,
471 [in] lsa_PrivilegeSet *privs
475 /****************************************/
477 NTSTATUS lsa_RemovePrivilegesFromAccount(
478 [in] policy_handle *handle,
479 [in] uint8 remove_all,
480 [in,unique] lsa_PrivilegeSet *privs
484 [todo] NTSTATUS lsa_GetQuotasForAccount();
487 [todo] NTSTATUS lsa_SetQuotasForAccount();
490 NTSTATUS lsa_GetSystemAccessAccount(
491 [in] policy_handle *handle,
492 [out,ref] uint32 *access_mask
496 NTSTATUS lsa_SetSystemAccessAccount(
497 [in] policy_handle *handle,
498 [in] uint32 access_mask
502 NTSTATUS lsa_OpenTrustedDomain(
503 [in] policy_handle *handle,
505 [in] uint32 access_mask,
506 [out] policy_handle *trustdom_handle
509 typedef [flag(NDR_PAHEX)] struct {
512 [size_is(size),length_is(length)] uint8 *data;
515 typedef [flag(NDR_PAHEX)] struct {
516 [range(0,65536)] uint32 size;
517 [size_is(size)] uint8 *data;
521 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
522 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS = 2,
523 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
524 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
525 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
526 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
527 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
528 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
529 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL = 9,
530 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL = 10,
531 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL = 11,
532 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL = 12,
533 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
534 } lsa_TrustDomInfoEnum;
536 typedef [public,bitmap32bit] bitmap {
537 LSA_TRUST_DIRECTION_INBOUND = 0x00000001,
538 LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
539 } lsa_TrustDirection;
541 typedef [v1_enum] enum {
542 LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001,
543 LSA_TRUST_TYPE_UPLEVEL = 0x00000002,
544 LSA_TRUST_TYPE_MIT = 0x00000003
547 typedef [public,bitmap32bit] bitmap {
548 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
549 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
550 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
551 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
552 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
553 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
554 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040,
555 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080
556 } lsa_TrustAttributes;
559 lsa_StringLarge netbios_name;
560 } lsa_TrustDomainInfoName;
565 [size_is(entries)] lsa_StringLarge *netbios_names;
566 } lsa_TrustDomainInfoControllers;
570 } lsa_TrustDomainInfoPosixOffset;
573 lsa_DATA_BUF *password;
574 lsa_DATA_BUF *old_password;
575 } lsa_TrustDomainInfoPassword;
578 lsa_String netbios_name;
580 } lsa_TrustDomainInfoBasic;
583 lsa_StringLarge domain_name;
584 lsa_StringLarge netbios_name;
586 lsa_TrustDirection trust_direction;
587 lsa_TrustType trust_type;
588 lsa_TrustAttributes trust_attributes;
589 } lsa_TrustDomainInfoInfoEx;
591 typedef [public,v1_enum] enum {
592 TRUST_AUTH_TYPE_NONE = 0,
593 TRUST_AUTH_TYPE_NT4OWF = 1,
594 TRUST_AUTH_TYPE_CLEAR = 2,
595 TRUST_AUTH_TYPE_VERSION = 3
599 NTTIME_hyper last_update_time;
600 lsa_TrustAuthType AuthType;
602 } lsa_TrustDomainInfoBuffer;
605 uint32 incoming_count;
606 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
607 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
608 uint32 outgoing_count;
609 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
610 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
611 } lsa_TrustDomainInfoAuthInfo;
614 lsa_TrustDomainInfoInfoEx info_ex;
615 lsa_TrustDomainInfoPosixOffset posix_offset;
616 lsa_TrustDomainInfoAuthInfo auth_info;
617 } lsa_TrustDomainInfoFullInfo;
620 lsa_DATA_BUF2 auth_blob;
621 } lsa_TrustDomainInfoAuthInfoInternal;
624 lsa_TrustDomainInfoInfoEx info_ex;
625 lsa_TrustDomainInfoPosixOffset posix_offset;
626 lsa_TrustDomainInfoAuthInfoInternal auth_info;
627 } lsa_TrustDomainInfoFullInfoInternal;
630 lsa_TrustDomainInfoInfoEx info_ex;
631 uint32 forest_trust_length;
632 [size_is(forest_trust_length)] uint8 *forest_trust_data;
633 } lsa_TrustDomainInfoInfoEx2Internal;
636 lsa_TrustDomainInfoInfoEx2Internal info;
637 lsa_TrustDomainInfoPosixOffset posix_offset;
638 lsa_TrustDomainInfoAuthInfo auth_info;
639 } lsa_TrustDomainInfoFullInfo2Internal;
642 kerb_EncTypes enc_types;
643 } lsa_TrustDomainInfoSupportedEncTypes;
645 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
646 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
647 lsa_TrustDomainInfoName name;
648 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
649 lsa_TrustDomainInfoControllers controllers;
650 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
651 lsa_TrustDomainInfoPosixOffset posix_offset;
652 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
653 lsa_TrustDomainInfoPassword password;
654 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
655 lsa_TrustDomainInfoBasic info_basic;
656 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
657 lsa_TrustDomainInfoInfoEx info_ex;
658 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
659 lsa_TrustDomainInfoAuthInfo auth_info;
660 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
661 lsa_TrustDomainInfoFullInfo full_info;
662 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
663 lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;
664 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
665 lsa_TrustDomainInfoFullInfoInternal full_info_internal;
666 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
667 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;
668 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
669 lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;
670 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
671 lsa_TrustDomainInfoSupportedEncTypes enc_types;
672 } lsa_TrustedDomainInfo;
675 NTSTATUS lsa_QueryTrustedDomainInfo(
676 [in] policy_handle *trustdom_handle,
677 [in] lsa_TrustDomInfoEnum level,
678 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
682 NTSTATUS lsa_SetInformationTrustedDomain(
683 [in] policy_handle *trustdom_handle,
684 [in] lsa_TrustDomInfoEnum level,
685 [in,switch_is(level)] lsa_TrustedDomainInfo *info
689 [public] NTSTATUS lsa_OpenSecret(
690 [in] policy_handle *handle,
691 [in] lsa_String name,
692 [in] uint32 access_mask,
693 [out] policy_handle *sec_handle
698 [public] NTSTATUS lsa_SetSecret(
699 [in] policy_handle *sec_handle,
700 [in,unique] lsa_DATA_BUF *new_val,
701 [in,unique] lsa_DATA_BUF *old_val
709 [public] NTSTATUS lsa_QuerySecret (
710 [in] policy_handle *sec_handle,
711 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
712 [in,out,unique] NTTIME_hyper *new_mtime,
713 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
714 [in,out,unique] NTTIME_hyper *old_mtime
718 NTSTATUS lsa_LookupPrivValue(
719 [in] policy_handle *handle,
720 [in] lsa_String *name,
726 NTSTATUS lsa_LookupPrivName (
727 [in] policy_handle *handle,
729 [out,unique] lsa_StringLarge *name
733 /*******************/
735 NTSTATUS lsa_LookupPrivDisplayName (
736 [in] policy_handle *handle,
737 [in] lsa_String *name,
738 [out,unique] lsa_StringLarge *disp_name,
739 /* see http://www.microsoft.com/globaldev/nlsweb/ for
740 language definitions */
741 [in,out] uint16 *language_id,
745 /*******************/
747 NTSTATUS lsa_DeleteObject (
748 [in,out] policy_handle *handle
753 /*******************/
755 NTSTATUS lsa_EnumAccountsWithUserRight (
756 [in] policy_handle *handle,
757 [in,unique] lsa_String *name,
758 [out] lsa_SidArray *sids
763 [string,charset(UTF16)] uint16 *name;
764 } lsa_RightAttribute;
768 [size_is(count)] lsa_StringLarge *names;
771 NTSTATUS lsa_EnumAccountRights (
772 [in] policy_handle *handle,
774 [out] lsa_RightSet *rights
778 /**********************/
780 NTSTATUS lsa_AddAccountRights (
781 [in] policy_handle *handle,
783 [in] lsa_RightSet *rights
786 /**********************/
788 NTSTATUS lsa_RemoveAccountRights (
789 [in] policy_handle *handle,
792 [in] lsa_RightSet *rights
796 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
797 [in] policy_handle *handle,
798 [in] dom_sid2 *dom_sid,
799 [in] lsa_TrustDomInfoEnum level,
800 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
804 NTSTATUS lsa_SetTrustedDomainInfo(
805 [in] policy_handle *handle,
806 [in] dom_sid2 *dom_sid,
807 [in] lsa_TrustDomInfoEnum level,
808 [in,switch_is(level)] lsa_TrustedDomainInfo *info
811 NTSTATUS lsa_DeleteTrustedDomain(
812 [in] policy_handle *handle,
813 [in] dom_sid2 *dom_sid
817 [todo] NTSTATUS lsa_StorePrivateData();
819 [todo] NTSTATUS lsa_RetrievePrivateData();
822 /**********************/
824 [public] NTSTATUS lsa_OpenPolicy2 (
825 [in,unique] [string,charset(UTF16)] uint16 *system_name,
826 [in] lsa_ObjectAttribute *attr,
827 [in] uint32 access_mask,
828 [out] policy_handle *handle
831 /**********************/
837 NTSTATUS lsa_GetUserName(
838 [in,unique] [string,charset(UTF16)] uint16 *system_name,
839 [in,out,unique] lsa_String *account_name,
840 [in,out,unique] lsa_StringPointer *authority_name
843 /**********************/
846 NTSTATUS lsa_QueryInfoPolicy2(
847 [in] policy_handle *handle,
848 [in] lsa_PolicyInfo level,
849 [out,unique,switch_is(level)] lsa_PolicyInformation *info
853 NTSTATUS lsa_SetInfoPolicy2(
854 [in] policy_handle *handle,
855 [in] lsa_PolicyInfo level,
856 [in,switch_is(level)] lsa_PolicyInformation *info
859 /**********************/
861 NTSTATUS lsa_QueryTrustedDomainInfoByName(
862 [in] policy_handle *handle,
863 [in] lsa_String trusted_domain,
864 [in] lsa_TrustDomInfoEnum level,
865 [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
868 /**********************/
870 NTSTATUS lsa_SetTrustedDomainInfoByName(
871 [in] policy_handle *handle,
872 [in] lsa_String trusted_domain,
873 [in] lsa_TrustDomInfoEnum level,
874 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
879 /* w2k3 treats max_size as max_domains*82 */
880 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
884 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
887 NTSTATUS lsa_EnumTrustedDomainsEx (
888 [in] policy_handle *handle,
889 [in,out] uint32 *resume_handle,
890 [out] lsa_DomainListEx *domains,
895 NTSTATUS lsa_CreateTrustedDomainEx(
896 [in] policy_handle *policy_handle,
897 [in] lsa_TrustDomainInfoInfoEx *info,
898 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
899 [in] uint32 access_mask,
900 [out] policy_handle *trustdom_handle
905 NTSTATUS lsa_CloseTrustedDomainEx(
906 [in,out] policy_handle *handle
911 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
914 uint32 enforce_restrictions;
915 hyper service_tkt_lifetime;
916 hyper user_tkt_lifetime;
917 hyper user_tkt_renewaltime;
920 } lsa_DomainInfoKerberos;
924 [size_is(blob_size)] uint8 *efs_blob;
928 LSA_DOMAIN_INFO_POLICY_EFS=2,
929 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
930 } lsa_DomainInfoEnum;
932 typedef [switch_type(uint16)] union {
933 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
934 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
935 } lsa_DomainInformationPolicy;
937 NTSTATUS lsa_QueryDomainInformationPolicy(
938 [in] policy_handle *handle,
940 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
944 NTSTATUS lsa_SetDomainInformationPolicy(
945 [in] policy_handle *handle,
947 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
950 /**********************/
952 NTSTATUS lsa_OpenTrustedDomainByName(
953 [in] policy_handle *handle,
954 [in] lsa_String name,
955 [in] uint32 access_mask,
956 [out] policy_handle *trustdom_handle
960 [todo] NTSTATUS lsa_TestCall();
962 /**********************/
966 lsa_SidType sid_type;
970 } lsa_TranslatedName2;
973 [range(0,1000)] uint32 count;
974 [size_is(count)] lsa_TranslatedName2 *names;
975 } lsa_TransNameArray2;
977 [public] NTSTATUS lsa_LookupSids2(
978 [in] policy_handle *handle,
979 [in] lsa_SidArray *sids,
980 [out,unique] lsa_RefDomainList *domains,
981 [in,out] lsa_TransNameArray2 *names,
983 [in,out] uint32 *count,
984 [in] uint32 unknown1,
988 /**********************/
992 lsa_SidType sid_type;
996 } lsa_TranslatedSid2;
999 [range(0,1000)] uint32 count;
1000 [size_is(count)] lsa_TranslatedSid2 *sids;
1001 } lsa_TransSidArray2;
1003 [public] NTSTATUS lsa_LookupNames2 (
1004 [in] policy_handle *handle,
1005 [in,range(0,1000)] uint32 num_names,
1006 [in,size_is(num_names)] lsa_String names[],
1007 [out,unique] lsa_RefDomainList *domains,
1008 [in,out] lsa_TransSidArray2 *sids,
1009 [in] lsa_LookupNamesLevel level,
1010 [in,out] uint32 *count,
1011 [in] uint32 unknown1,
1012 [in] uint32 unknown2
1016 NTSTATUS lsa_CreateTrustedDomainEx2(
1017 [in] policy_handle *policy_handle,
1018 [in] lsa_TrustDomainInfoInfoEx *info,
1019 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
1020 [in] uint32 access_mask,
1021 [out] policy_handle *trustdom_handle
1025 [todo] NTSTATUS lsa_CREDRWRITE();
1028 [todo] NTSTATUS lsa_CREDRREAD();
1031 [todo] NTSTATUS lsa_CREDRENUMERATE();
1034 [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
1037 [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
1040 [todo] NTSTATUS lsa_CREDRDELETE();
1043 [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
1046 [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1048 /**********************/
1051 lsa_SidType sid_type;
1055 } lsa_TranslatedSid3;
1058 [range(0,1000)] uint32 count;
1059 [size_is(count)] lsa_TranslatedSid3 *sids;
1060 } lsa_TransSidArray3;
1062 [public] NTSTATUS lsa_LookupNames3 (
1063 [in] policy_handle *handle,
1064 [in,range(0,1000)] uint32 num_names,
1065 [in,size_is(num_names)] lsa_String names[],
1066 [out,unique] lsa_RefDomainList *domains,
1067 [in,out] lsa_TransSidArray3 *sids,
1068 [in] lsa_LookupNamesLevel level,
1069 [in,out] uint32 *count,
1070 [in] uint32 unknown1,
1071 [in] uint32 unknown2
1075 [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1078 [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1081 [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1084 [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1088 [range(0,131072)] uint32 length;
1089 [size_is(length)] uint8 *data;
1090 } lsa_ForestTrustBinaryData;
1093 dom_sid2 *domain_sid;
1094 lsa_StringLarge dns_domain_name;
1095 lsa_StringLarge netbios_domain_name;
1096 } lsa_ForestTrustDomainInfo;
1098 typedef [switch_type(uint32)] union {
1099 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1100 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1101 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1102 [default] lsa_ForestTrustBinaryData data;
1103 } lsa_ForestTrustData;
1105 typedef [v1_enum] enum {
1106 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1107 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1108 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1109 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1110 } lsa_ForestTrustRecordType;
1114 lsa_ForestTrustRecordType level;
1116 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1117 } lsa_ForestTrustRecord;
1119 typedef [public] struct {
1120 [range(0,4000)] uint32 count;
1121 [size_is(count)] lsa_ForestTrustRecord **entries;
1122 } lsa_ForestTrustInformation;
1124 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1125 [in] policy_handle *handle,
1126 [in,ref] lsa_String *trusted_domain_name,
1127 [in] uint16 unknown, /* level ? */
1128 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1132 [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1135 [todo] NTSTATUS lsa_CREDRRENAME();
1140 [public] NTSTATUS lsa_LookupSids3(
1141 [in] lsa_SidArray *sids,
1142 [out,unique] lsa_RefDomainList *domains,
1143 [in,out] lsa_TransNameArray2 *names,
1145 [in,out] uint32 *count,
1146 [in] uint32 unknown1,
1147 [in] uint32 unknown2
1151 NTSTATUS lsa_LookupNames4(
1152 [in,range(0,1000)] uint32 num_names,
1153 [in,size_is(num_names)] lsa_String names[],
1154 [out,unique] lsa_RefDomainList *domains,
1155 [in,out] lsa_TransSidArray3 *sids,
1156 [in] lsa_LookupNamesLevel level,
1157 [in,out] uint32 *count,
1158 [in] uint32 unknown1,
1159 [in] uint32 unknown2
1163 [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1166 [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1169 [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1172 [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();