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;
582 NTTIME_hyper last_update_time;
585 } lsa_TrustDomainInfoBuffer;
588 uint32 incoming_count;
589 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
590 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
591 uint32 outgoing_count;
592 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
593 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
594 } lsa_TrustDomainInfoAuthInfo;
597 lsa_TrustDomainInfoInfoEx info_ex;
598 lsa_TrustDomainInfoPosixOffset posix_offset;
599 lsa_TrustDomainInfoAuthInfo auth_info;
600 } lsa_TrustDomainInfoFullInfo;
603 lsa_TrustDomainInfoInfoEx info_ex;
605 } lsa_TrustDomainInfoInfoEx2Internal;
608 lsa_TrustDomainInfoInfoEx info_ex;
610 lsa_TrustDomainInfoPosixOffset posix_offset;
611 lsa_TrustDomainInfoAuthInfo auth_info;
612 } lsa_TrustDomainInfoInfo2Internal;
615 kerb_EncTypes enc_types;
616 } lsa_TrustDomainInfoSupportedEncTypes;
618 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
619 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)]
620 lsa_TrustDomainInfoName name;
621 [case(LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS)]
622 lsa_TrustDomainInfoControllers controllers;
623 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)]
624 lsa_TrustDomainInfoPosixOffset posix_offset;
625 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)]
626 lsa_TrustDomainInfoPassword password;
627 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)]
628 lsa_TrustDomainInfoBasic info_basic;
629 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)]
630 lsa_TrustDomainInfoInfoEx info_ex;
631 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)]
632 lsa_TrustDomainInfoAuthInfo auth_info;
633 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)]
634 lsa_TrustDomainInfoFullInfo full_info;
635 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO_INTERNAL)]
636 lsa_TrustDomainInfoAuthInfo auth_info_internal;
637 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL)]
638 lsa_TrustDomainInfoFullInfo full_info_internal;
639 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL)]
640 lsa_TrustDomainInfoInfoEx2Internal info_ex2_internal;
641 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
642 lsa_TrustDomainInfoInfo2Internal info2_internal;
643 [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
644 lsa_TrustDomainInfoSupportedEncTypes enc_types;
645 } lsa_TrustedDomainInfo;
648 NTSTATUS lsa_QueryTrustedDomainInfo(
649 [in] policy_handle *trustdom_handle,
650 [in] lsa_TrustDomInfoEnum level,
651 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
655 [todo] NTSTATUS lsa_SetInformationTrustedDomain();
658 [public] NTSTATUS lsa_OpenSecret(
659 [in] policy_handle *handle,
660 [in] lsa_String name,
661 [in] uint32 access_mask,
662 [out] policy_handle *sec_handle
667 [public] NTSTATUS lsa_SetSecret(
668 [in] policy_handle *sec_handle,
669 [in,unique] lsa_DATA_BUF *new_val,
670 [in,unique] lsa_DATA_BUF *old_val
678 [public] NTSTATUS lsa_QuerySecret (
679 [in] policy_handle *sec_handle,
680 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
681 [in,out,unique] NTTIME_hyper *new_mtime,
682 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
683 [in,out,unique] NTTIME_hyper *old_mtime
687 NTSTATUS lsa_LookupPrivValue(
688 [in] policy_handle *handle,
689 [in] lsa_String *name,
695 NTSTATUS lsa_LookupPrivName (
696 [in] policy_handle *handle,
698 [out,unique] lsa_StringLarge *name
702 /*******************/
704 NTSTATUS lsa_LookupPrivDisplayName (
705 [in] policy_handle *handle,
706 [in] lsa_String *name,
707 [out,unique] lsa_StringLarge *disp_name,
708 /* see http://www.microsoft.com/globaldev/nlsweb/ for
709 language definitions */
710 [in,out] uint16 *language_id,
714 /*******************/
716 NTSTATUS lsa_DeleteObject (
717 [in,out] policy_handle *handle
722 /*******************/
724 NTSTATUS lsa_EnumAccountsWithUserRight (
725 [in] policy_handle *handle,
726 [in,unique] lsa_String *name,
727 [out] lsa_SidArray *sids
732 [string,charset(UTF16)] uint16 *name;
733 } lsa_RightAttribute;
737 [size_is(count)] lsa_StringLarge *names;
740 NTSTATUS lsa_EnumAccountRights (
741 [in] policy_handle *handle,
743 [out] lsa_RightSet *rights
747 /**********************/
749 NTSTATUS lsa_AddAccountRights (
750 [in] policy_handle *handle,
752 [in] lsa_RightSet *rights
755 /**********************/
757 NTSTATUS lsa_RemoveAccountRights (
758 [in] policy_handle *handle,
761 [in] lsa_RightSet *rights
765 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
766 [in] policy_handle *handle,
767 [in] dom_sid2 *dom_sid,
768 [in] lsa_TrustDomInfoEnum level,
769 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
773 [todo] NTSTATUS lsa_SetTrustedDomainInfo();
775 NTSTATUS lsa_DeleteTrustedDomain(
776 [in] policy_handle *handle,
777 [in] dom_sid2 *dom_sid
781 [todo] NTSTATUS lsa_StorePrivateData();
783 [todo] NTSTATUS lsa_RetrievePrivateData();
786 /**********************/
788 [public] NTSTATUS lsa_OpenPolicy2 (
789 [in,unique] [string,charset(UTF16)] uint16 *system_name,
790 [in] lsa_ObjectAttribute *attr,
791 [in] uint32 access_mask,
792 [out] policy_handle *handle
795 /**********************/
801 NTSTATUS lsa_GetUserName(
802 [in,unique] [string,charset(UTF16)] uint16 *system_name,
803 [in,out,unique] lsa_String *account_name,
804 [in,out,unique] lsa_StringPointer *authority_name
807 /**********************/
810 NTSTATUS lsa_QueryInfoPolicy2(
811 [in] policy_handle *handle,
812 [in] lsa_PolicyInfo level,
813 [out,unique,switch_is(level)] lsa_PolicyInformation *info
817 NTSTATUS lsa_SetInfoPolicy2(
818 [in] policy_handle *handle,
819 [in] lsa_PolicyInfo level,
820 [in,switch_is(level)] lsa_PolicyInformation *info
823 /**********************/
825 NTSTATUS lsa_QueryTrustedDomainInfoByName(
826 [in] policy_handle *handle,
827 [in] lsa_String trusted_domain,
828 [in] lsa_TrustDomInfoEnum level,
829 [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
832 /**********************/
834 NTSTATUS lsa_SetTrustedDomainInfoByName(
835 [in] policy_handle *handle,
836 [in] lsa_String trusted_domain,
837 [in] lsa_TrustDomInfoEnum level,
838 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
843 /* w2k3 treats max_size as max_domains*82 */
844 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
848 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
851 NTSTATUS lsa_EnumTrustedDomainsEx (
852 [in] policy_handle *handle,
853 [in,out] uint32 *resume_handle,
854 [out] lsa_DomainListEx *domains,
860 [todo] NTSTATUS lsa_CreateTrustedDomainEx();
863 NTSTATUS lsa_CloseTrustedDomainEx(
864 [in,out] policy_handle *handle
869 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
872 uint32 enforce_restrictions;
873 hyper service_tkt_lifetime;
874 hyper user_tkt_lifetime;
875 hyper user_tkt_renewaltime;
878 } lsa_DomainInfoKerberos;
882 [size_is(blob_size)] uint8 *efs_blob;
886 LSA_DOMAIN_INFO_POLICY_EFS=2,
887 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
888 } lsa_DomainInfoEnum;
890 typedef [switch_type(uint16)] union {
891 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
892 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
893 } lsa_DomainInformationPolicy;
895 NTSTATUS lsa_QueryDomainInformationPolicy(
896 [in] policy_handle *handle,
898 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
902 NTSTATUS lsa_SetDomainInformationPolicy(
903 [in] policy_handle *handle,
905 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
908 /**********************/
910 NTSTATUS lsa_OpenTrustedDomainByName(
911 [in] policy_handle *handle,
912 [in] lsa_String name,
913 [in] uint32 access_mask,
914 [out] policy_handle *trustdom_handle
918 [todo] NTSTATUS lsa_TestCall();
920 /**********************/
924 lsa_SidType sid_type;
928 } lsa_TranslatedName2;
931 [range(0,1000)] uint32 count;
932 [size_is(count)] lsa_TranslatedName2 *names;
933 } lsa_TransNameArray2;
935 [public] NTSTATUS lsa_LookupSids2(
936 [in] policy_handle *handle,
937 [in] lsa_SidArray *sids,
938 [out,unique] lsa_RefDomainList *domains,
939 [in,out] lsa_TransNameArray2 *names,
941 [in,out] uint32 *count,
942 [in] uint32 unknown1,
946 /**********************/
950 lsa_SidType sid_type;
954 } lsa_TranslatedSid2;
957 [range(0,1000)] uint32 count;
958 [size_is(count)] lsa_TranslatedSid2 *sids;
959 } lsa_TransSidArray2;
961 [public] NTSTATUS lsa_LookupNames2 (
962 [in] policy_handle *handle,
963 [in,range(0,1000)] uint32 num_names,
964 [in,size_is(num_names)] lsa_String names[],
965 [out,unique] lsa_RefDomainList *domains,
966 [in,out] lsa_TransSidArray2 *sids,
967 [in] lsa_LookupNamesLevel level,
968 [in,out] uint32 *count,
969 [in] uint32 unknown1,
974 [todo] NTSTATUS lsa_CreateTrustedDomainEx2();
977 [todo] NTSTATUS lsa_CREDRWRITE();
980 [todo] NTSTATUS lsa_CREDRREAD();
983 [todo] NTSTATUS lsa_CREDRENUMERATE();
986 [todo] NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
989 [todo] NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
992 [todo] NTSTATUS lsa_CREDRDELETE();
995 [todo] NTSTATUS lsa_CREDRGETTARGETINFO();
998 [todo] NTSTATUS lsa_CREDRPROFILELOADED();
1000 /**********************/
1003 lsa_SidType sid_type;
1007 } lsa_TranslatedSid3;
1010 [range(0,1000)] uint32 count;
1011 [size_is(count)] lsa_TranslatedSid3 *sids;
1012 } lsa_TransSidArray3;
1014 [public] NTSTATUS lsa_LookupNames3 (
1015 [in] policy_handle *handle,
1016 [in,range(0,1000)] uint32 num_names,
1017 [in,size_is(num_names)] lsa_String names[],
1018 [out,unique] lsa_RefDomainList *domains,
1019 [in,out] lsa_TransSidArray3 *sids,
1020 [in] lsa_LookupNamesLevel level,
1021 [in,out] uint32 *count,
1022 [in] uint32 unknown1,
1023 [in] uint32 unknown2
1027 [todo] NTSTATUS lsa_CREDRGETSESSIONTYPES();
1030 [todo] NTSTATUS lsa_LSARREGISTERAUDITEVENT();
1033 [todo] NTSTATUS lsa_LSARGENAUDITEVENT();
1036 [todo] NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
1040 [range(0,131072)] uint32 length;
1041 [size_is(length)] uint8 *data;
1042 } lsa_ForestTrustBinaryData;
1045 dom_sid2 *domain_sid;
1046 lsa_StringLarge dns_domain_name;
1047 lsa_StringLarge netbios_domain_name;
1048 } lsa_ForestTrustDomainInfo;
1050 typedef [switch_type(uint32)] union {
1051 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1052 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1053 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1054 [default] lsa_ForestTrustBinaryData data;
1055 } lsa_ForestTrustData;
1057 typedef [v1_enum] enum {
1058 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1059 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1060 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1061 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1062 } lsa_ForestTrustRecordType;
1066 lsa_ForestTrustRecordType level;
1068 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1069 } lsa_ForestTrustRecord;
1071 typedef [public] struct {
1072 [range(0,4000)] uint32 count;
1073 [size_is(count)] lsa_ForestTrustRecord **entries;
1074 } lsa_ForestTrustInformation;
1076 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1077 [in] policy_handle *handle,
1078 [in,ref] lsa_String *trusted_domain_name,
1079 [in] uint16 unknown, /* level ? */
1080 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1084 [todo] NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1087 [todo] NTSTATUS lsa_CREDRRENAME();
1092 [public] NTSTATUS lsa_LookupSids3(
1093 [in] lsa_SidArray *sids,
1094 [out,unique] lsa_RefDomainList *domains,
1095 [in,out] lsa_TransNameArray2 *names,
1097 [in,out] uint32 *count,
1098 [in] uint32 unknown1,
1099 [in] uint32 unknown2
1103 NTSTATUS lsa_LookupNames4(
1104 [in,range(0,1000)] uint32 num_names,
1105 [in,size_is(num_names)] lsa_String names[],
1106 [out,unique] lsa_RefDomainList *domains,
1107 [in,out] lsa_TransSidArray3 *sids,
1108 [in] lsa_LookupNamesLevel level,
1109 [in,out] uint32 *count,
1110 [in] uint32 unknown1,
1111 [in] uint32 unknown2
1115 [todo] NTSTATUS lsa_LSAROPENPOLICYSCE();
1118 [todo] NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1121 [todo] NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1124 [todo] NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();