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_LOOKUP_NAMES_RODC_REFERRAL_TO_FULL_DC = 7
392 } lsa_LookupNamesLevel;
394 [public] NTSTATUS lsa_LookupNames (
395 [in] policy_handle *handle,
396 [in,range(0,1000)] uint32 num_names,
397 [in,size_is(num_names)] lsa_String names[],
398 [out,unique] lsa_RefDomainList *domains,
399 [in,out] lsa_TransSidArray *sids,
400 [in] lsa_LookupNamesLevel level,
401 [in,out] uint32 *count
409 lsa_SidType sid_type;
412 } lsa_TranslatedName;
415 [range(0,1000)] uint32 count;
416 [size_is(count)] lsa_TranslatedName *names;
417 } lsa_TransNameArray;
419 [public] NTSTATUS lsa_LookupSids (
420 [in] policy_handle *handle,
421 [in] lsa_SidArray *sids,
422 [out,unique] lsa_RefDomainList *domains,
423 [in,out] lsa_TransNameArray *names,
425 [in,out] uint32 *count
430 [public] NTSTATUS lsa_CreateSecret(
431 [in] policy_handle *handle,
432 [in] lsa_String name,
433 [in] uint32 access_mask,
434 [out] policy_handle *sec_handle
438 /*****************************************/
440 NTSTATUS lsa_OpenAccount (
441 [in] policy_handle *handle,
443 [in] uint32 access_mask,
444 [out] policy_handle *acct_handle
448 /****************************************/
457 [range(0,1000)] uint32 count;
459 [size_is(count)] lsa_LUIDAttribute set[*];
462 NTSTATUS lsa_EnumPrivsAccount (
463 [in] policy_handle *handle,
464 [out,unique] lsa_PrivilegeSet *privs
468 /****************************************/
470 NTSTATUS lsa_AddPrivilegesToAccount(
471 [in] policy_handle *handle,
472 [in] lsa_PrivilegeSet *privs
476 /****************************************/
478 NTSTATUS lsa_RemovePrivilegesFromAccount(
479 [in] policy_handle *handle,
480 [in] uint8 remove_all,
481 [in,unique] lsa_PrivilegeSet *privs
485 [todo] NTSTATUS lsa_GetQuotasForAccount();
488 [todo] NTSTATUS lsa_SetQuotasForAccount();
491 NTSTATUS lsa_GetSystemAccessAccount(
492 [in] policy_handle *handle,
493 [out,ref] uint32 *access_mask
497 NTSTATUS lsa_SetSystemAccessAccount(
498 [in] policy_handle *handle,
499 [in] uint32 access_mask
503 NTSTATUS lsa_OpenTrustedDomain(
504 [in] policy_handle *handle,
506 [in] uint32 access_mask,
507 [out] policy_handle *trustdom_handle
510 typedef [flag(NDR_PAHEX)] struct {
513 [size_is(size),length_is(length)] uint8 *data;
516 typedef [flag(NDR_PAHEX)] struct {
517 [range(0,65536)] uint32 size;
518 [size_is(size)] uint8 *data;
522 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
523 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS = 2,
524 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
525 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
526 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
527 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
528 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
529 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
530 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL = 9,
531 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL = 10,
532 LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL = 11,
533 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL = 12,
534 LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
535 } lsa_TrustDomInfoEnum;
537 typedef [public,bitmap32bit] bitmap {
538 LSA_TRUST_DIRECTION_INBOUND = 0x00000001,
539 LSA_TRUST_DIRECTION_OUTBOUND = 0x00000002
540 } lsa_TrustDirection;
542 typedef [v1_enum] enum {
543 LSA_TRUST_TYPE_DOWNLEVEL = 0x00000001,
544 LSA_TRUST_TYPE_UPLEVEL = 0x00000002,
545 LSA_TRUST_TYPE_MIT = 0x00000003
548 typedef [public,bitmap32bit] bitmap {
549 LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
550 LSA_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
551 LSA_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
552 LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
553 LSA_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
554 LSA_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
555 LSA_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040,
556 LSA_TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION = 0x00000080
557 } lsa_TrustAttributes;
560 lsa_StringLarge netbios_name;
561 } lsa_TrustDomainInfoName;
566 [size_is(entries)] lsa_StringLarge *netbios_names;
567 } lsa_TrustDomainInfoControllers;
571 } lsa_TrustDomainInfoPosixOffset;
574 lsa_DATA_BUF *password;
575 lsa_DATA_BUF *old_password;
576 } lsa_TrustDomainInfoPassword;
579 lsa_String netbios_name;
581 } lsa_TrustDomainInfoBasic;
584 lsa_StringLarge domain_name;
585 lsa_StringLarge netbios_name;
587 lsa_TrustDirection trust_direction;
588 lsa_TrustType trust_type;
589 lsa_TrustAttributes trust_attributes;
590 } lsa_TrustDomainInfoInfoEx;
592 typedef [public,v1_enum] enum {
593 TRUST_AUTH_TYPE_NONE = 0,
594 TRUST_AUTH_TYPE_NT4OWF = 1,
595 TRUST_AUTH_TYPE_CLEAR = 2,
596 TRUST_AUTH_TYPE_VERSION = 3
600 NTTIME_hyper last_update_time;
601 lsa_TrustAuthType AuthType;
603 } lsa_TrustDomainInfoBuffer;
606 uint32 incoming_count;
607 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
608 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
609 uint32 outgoing_count;
610 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
611 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
612 } lsa_TrustDomainInfoAuthInfo;
615 lsa_TrustDomainInfoInfoEx info_ex;
616 lsa_TrustDomainInfoPosixOffset posix_offset;
617 lsa_TrustDomainInfoAuthInfo auth_info;
618 } lsa_TrustDomainInfoFullInfo;
621 lsa_DATA_BUF2 auth_blob;
622 } lsa_TrustDomainInfoAuthInfoInternal;
625 lsa_TrustDomainInfoInfoEx info_ex;
626 lsa_TrustDomainInfoPosixOffset posix_offset;
627 lsa_TrustDomainInfoAuthInfoInternal auth_info;
628 } lsa_TrustDomainInfoFullInfoInternal;
631 lsa_TrustDomainInfoInfoEx info_ex;
632 uint32 forest_trust_length;
633 [size_is(forest_trust_length)] uint8 *forest_trust_data;
634 } lsa_TrustDomainInfoInfoEx2Internal;
637 lsa_TrustDomainInfoInfoEx2Internal info;
638 lsa_TrustDomainInfoPosixOffset posix_offset;
639 lsa_TrustDomainInfoAuthInfo auth_info;
640 } lsa_TrustDomainInfoFullInfo2Internal;
643 kerb_EncTypes enc_types;
644 } lsa_TrustDomainInfoSupportedEncTypes;
646 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
647 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
648 lsa_TrustDomainInfoName name;
649 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
650 lsa_TrustDomainInfoControllers controllers;
651 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
652 lsa_TrustDomainInfoPosixOffset posix_offset;
653 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
654 lsa_TrustDomainInfoPassword password;
655 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
656 lsa_TrustDomainInfoBasic info_basic;
657 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
658 lsa_TrustDomainInfoInfoEx info_ex;
659 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
660 lsa_TrustDomainInfoAuthInfo auth_info;
661 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
662 lsa_TrustDomainInfoFullInfo full_info;
663 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
664 lsa_TrustDomainInfoAuthInfoInternal auth_info_internal;
665 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
666 lsa_TrustDomainInfoFullInfoInternal full_info_internal;
667 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
668 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;
669 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
670 lsa_TrustDomainInfoFullInfo2Internal full_info2_internal;
671 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
672 lsa_TrustDomainInfoSupportedEncTypes enc_types;
673 } lsa_TrustedDomainInfo;
676 NTSTATUS lsa_QueryTrustedDomainInfo(
677 [in] policy_handle *trustdom_handle,
678 [in] lsa_TrustDomInfoEnum level,
679 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
683 NTSTATUS lsa_SetInformationTrustedDomain(
684 [in] policy_handle *trustdom_handle,
685 [in] lsa_TrustDomInfoEnum level,
686 [in,switch_is(level)] lsa_TrustedDomainInfo *info
690 [public] NTSTATUS lsa_OpenSecret(
691 [in] policy_handle *handle,
692 [in] lsa_String name,
693 [in] uint32 access_mask,
694 [out] policy_handle *sec_handle
699 [public] NTSTATUS lsa_SetSecret(
700 [in] policy_handle *sec_handle,
701 [in,unique] lsa_DATA_BUF *new_val,
702 [in,unique] lsa_DATA_BUF *old_val
710 [public] NTSTATUS lsa_QuerySecret (
711 [in] policy_handle *sec_handle,
712 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
713 [in,out,unique] NTTIME_hyper *new_mtime,
714 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
715 [in,out,unique] NTTIME_hyper *old_mtime
719 NTSTATUS lsa_LookupPrivValue(
720 [in] policy_handle *handle,
721 [in] lsa_String *name,
727 NTSTATUS lsa_LookupPrivName (
728 [in] policy_handle *handle,
730 [out,unique] lsa_StringLarge *name
734 /*******************/
736 NTSTATUS lsa_LookupPrivDisplayName (
737 [in] policy_handle *handle,
738 [in] lsa_String *name,
739 [out,unique] lsa_StringLarge *disp_name,
740 /* see http://www.microsoft.com/globaldev/nlsweb/ for
741 language definitions */
742 [in,out] uint16 *language_id,
746 /*******************/
748 NTSTATUS lsa_DeleteObject (
749 [in,out] policy_handle *handle
754 /*******************/
756 NTSTATUS lsa_EnumAccountsWithUserRight (
757 [in] policy_handle *handle,
758 [in,unique] lsa_String *name,
759 [out] lsa_SidArray *sids
764 [string,charset(UTF16)] uint16 *name;
765 } lsa_RightAttribute;
769 [size_is(count)] lsa_StringLarge *names;
772 NTSTATUS lsa_EnumAccountRights (
773 [in] policy_handle *handle,
775 [out] lsa_RightSet *rights
779 /**********************/
781 NTSTATUS lsa_AddAccountRights (
782 [in] policy_handle *handle,
784 [in] lsa_RightSet *rights
787 /**********************/
789 NTSTATUS lsa_RemoveAccountRights (
790 [in] policy_handle *handle,
793 [in] lsa_RightSet *rights
797 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
798 [in] policy_handle *handle,
799 [in] dom_sid2 *dom_sid,
800 [in] lsa_TrustDomInfoEnum level,
801 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
805 NTSTATUS lsa_SetTrustedDomainInfo(
806 [in] policy_handle *handle,
807 [in] dom_sid2 *dom_sid,
808 [in] lsa_TrustDomInfoEnum level,
809 [in,switch_is(level)] lsa_TrustedDomainInfo *info
812 NTSTATUS lsa_DeleteTrustedDomain(
813 [in] policy_handle *handle,
814 [in] dom_sid2 *dom_sid
818 [todo] NTSTATUS lsa_StorePrivateData();
820 [todo] NTSTATUS lsa_RetrievePrivateData();
823 /**********************/
825 [public] NTSTATUS lsa_OpenPolicy2 (
826 [in,unique] [string,charset(UTF16)] uint16 *system_name,
827 [in] lsa_ObjectAttribute *attr,
828 [in] uint32 access_mask,
829 [out] policy_handle *handle
832 /**********************/
838 NTSTATUS lsa_GetUserName(
839 [in,unique] [string,charset(UTF16)] uint16 *system_name,
840 [in,out,unique] lsa_String *account_name,
841 [in,out,unique] lsa_StringPointer *authority_name
844 /**********************/
847 NTSTATUS lsa_QueryInfoPolicy2(
848 [in] policy_handle *handle,
849 [in] lsa_PolicyInfo level,
850 [out,unique,switch_is(level)] lsa_PolicyInformation *info
854 NTSTATUS lsa_SetInfoPolicy2(
855 [in] policy_handle *handle,
856 [in] lsa_PolicyInfo level,
857 [in,switch_is(level)] lsa_PolicyInformation *info
860 /**********************/
862 NTSTATUS lsa_QueryTrustedDomainInfoByName(
863 [in] policy_handle *handle,
864 [in] lsa_String trusted_domain,
865 [in] lsa_TrustDomInfoEnum level,
866 [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
869 /**********************/
871 NTSTATUS lsa_SetTrustedDomainInfoByName(
872 [in] policy_handle *handle,
873 [in] lsa_String trusted_domain,
874 [in] lsa_TrustDomInfoEnum level,
875 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
880 /* w2k3 treats max_size as max_domains*82 */
881 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
885 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
888 NTSTATUS lsa_EnumTrustedDomainsEx (
889 [in] policy_handle *handle,
890 [in,out] uint32 *resume_handle,
891 [out] lsa_DomainListEx *domains,
896 NTSTATUS lsa_CreateTrustedDomainEx(
897 [in] policy_handle *policy_handle,
898 [in] lsa_TrustDomainInfoInfoEx *info,
899 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
900 [in] uint32 access_mask,
901 [out] policy_handle *trustdom_handle
906 NTSTATUS lsa_CloseTrustedDomainEx(
907 [in,out] policy_handle *handle
912 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
915 uint32 enforce_restrictions;
916 hyper service_tkt_lifetime;
917 hyper user_tkt_lifetime;
918 hyper user_tkt_renewaltime;
921 } lsa_DomainInfoKerberos;
925 [size_is(blob_size)] uint8 *efs_blob;
929 LSA_DOMAIN_INFO_POLICY_EFS=2,
930 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
931 } lsa_DomainInfoEnum;
933 typedef [switch_type(uint16)] union {
934 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
935 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
936 } lsa_DomainInformationPolicy;
938 NTSTATUS lsa_QueryDomainInformationPolicy(
939 [in] policy_handle *handle,
941 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
945 NTSTATUS lsa_SetDomainInformationPolicy(
946 [in] policy_handle *handle,
948 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
951 /**********************/
953 NTSTATUS lsa_OpenTrustedDomainByName(
954 [in] policy_handle *handle,
955 [in] lsa_String name,
956 [in] uint32 access_mask,
957 [out] policy_handle *trustdom_handle
961 [todo] NTSTATUS lsa_TestCall();
963 /**********************/
967 lsa_SidType sid_type;
971 } lsa_TranslatedName2;
974 [range(0,1000)] uint32 count;
975 [size_is(count)] lsa_TranslatedName2 *names;
976 } lsa_TransNameArray2;
978 [public] NTSTATUS lsa_LookupSids2(
979 [in] policy_handle *handle,
980 [in] lsa_SidArray *sids,
981 [out,unique] lsa_RefDomainList *domains,
982 [in,out] lsa_TransNameArray2 *names,
984 [in,out] uint32 *count,
985 [in] uint32 unknown1,
989 /**********************/
993 lsa_SidType sid_type;
997 } lsa_TranslatedSid2;
1000 [range(0,1000)] uint32 count;
1001 [size_is(count)] lsa_TranslatedSid2 *sids;
1002 } lsa_TransSidArray2;
1004 [public] NTSTATUS lsa_LookupNames2 (
1005 [in] policy_handle *handle,
1006 [in,range(0,1000)] uint32 num_names,
1007 [in,size_is(num_names)] lsa_String names[],
1008 [out,unique] lsa_RefDomainList *domains,
1009 [in,out] lsa_TransSidArray2 *sids,
1010 [in] lsa_LookupNamesLevel level,
1011 [in,out] uint32 *count,
1012 [in] uint32 unknown1,
1013 [in] uint32 unknown2
1017 NTSTATUS lsa_CreateTrustedDomainEx2(
1018 [in] policy_handle *policy_handle,
1019 [in] lsa_TrustDomainInfoInfoEx *info,
1020 [in] lsa_TrustDomainInfoAuthInfoInternal *auth_info,
1021 [in] uint32 access_mask,
1022 [out] policy_handle *trustdom_handle
1026 [todo] NTSTATUS lsa_CREDRWRITE();
1029 [todo] NTSTATUS lsa_CREDRREAD();
1032 [todo] NTSTATUS lsa_CREDRENUMERATE();
1035 [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
1038 [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
1041 [todo] NTSTATUS lsa_CREDRDELETE();
1044 [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
1047 [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1049 /**********************/
1052 lsa_SidType sid_type;
1056 } lsa_TranslatedSid3;
1059 [range(0,1000)] uint32 count;
1060 [size_is(count)] lsa_TranslatedSid3 *sids;
1061 } lsa_TransSidArray3;
1063 [public] NTSTATUS lsa_LookupNames3 (
1064 [in] policy_handle *handle,
1065 [in,range(0,1000)] uint32 num_names,
1066 [in,size_is(num_names)] lsa_String names[],
1067 [out,unique] lsa_RefDomainList *domains,
1068 [in,out] lsa_TransSidArray3 *sids,
1069 [in] lsa_LookupNamesLevel level,
1070 [in,out] uint32 *count,
1071 [in] uint32 unknown1,
1072 [in] uint32 unknown2
1076 [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1079 [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1082 [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1085 [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1089 [range(0,131072)] uint32 length;
1090 [size_is(length)] uint8 *data;
1091 } lsa_ForestTrustBinaryData;
1094 dom_sid2 *domain_sid;
1095 lsa_StringLarge dns_domain_name;
1096 lsa_StringLarge netbios_domain_name;
1097 } lsa_ForestTrustDomainInfo;
1099 typedef [switch_type(uint32)] union {
1100 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1101 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1102 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1103 [default] lsa_ForestTrustBinaryData data;
1104 } lsa_ForestTrustData;
1106 typedef [v1_enum] enum {
1107 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1108 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1109 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1110 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1111 } lsa_ForestTrustRecordType;
1115 lsa_ForestTrustRecordType level;
1117 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1118 } lsa_ForestTrustRecord;
1120 typedef [public] struct {
1121 [range(0,4000)] uint32 count;
1122 [size_is(count)] lsa_ForestTrustRecord **entries;
1123 } lsa_ForestTrustInformation;
1125 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1126 [in] policy_handle *handle,
1127 [in,ref] lsa_String *trusted_domain_name,
1128 [in] uint16 unknown, /* level ? */
1129 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1133 [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1136 [todo] NTSTATUS lsa_CREDRRENAME();
1141 [public] NTSTATUS lsa_LookupSids3(
1142 [in] lsa_SidArray *sids,
1143 [out,unique] lsa_RefDomainList *domains,
1144 [in,out] lsa_TransNameArray2 *names,
1146 [in,out] uint32 *count,
1147 [in] uint32 unknown1,
1148 [in] uint32 unknown2
1152 NTSTATUS lsa_LookupNames4(
1153 [in,range(0,1000)] uint32 num_names,
1154 [in,size_is(num_names)] lsa_String names[],
1155 [out,unique] lsa_RefDomainList *domains,
1156 [in,out] lsa_TransSidArray3 *sids,
1157 [in] lsa_LookupNamesLevel level,
1158 [in,out] uint32 *count,
1159 [in] uint32 unknown1,
1160 [in] uint32 unknown2
1164 [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1167 [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1170 [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1173 [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();