4 lsa interface definition
7 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
9 endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:"),
10 pointer_default(unique),
11 helpstring("Local Security Authority"),
18 [in,out,ref] policy_handle *handle
25 [in,ref] policy_handle *handle
33 [value(2*strlen_m(r->string))] uint16 length;
34 [value(r->length)] uint16 size;
35 unistr_noterm *string;
50 [size_is(count)] lsa_PrivEntry *privs;
53 NTSTATUS lsa_EnumPrivs (
54 [in,ref] policy_handle *handle,
55 [in,out,ref] uint32 *resume_handle,
56 [in] uint32 max_count,
57 [out,ref] lsa_PrivArray *privs
63 NTSTATUS lsa_QuerySecurity (
64 [in,ref] policy_handle *handle,
66 [out] sec_desc_buf *sdbuf
72 NTSTATUS lsa_SetSecObj ();
77 NTSTATUS lsa_ChangePassword ();
83 uint32 len; /* ignored */
84 uint16 impersonation_level;
90 uint32 len; /* ignored */
94 security_descriptor *sec_desc;
96 } lsa_ObjectAttribute;
98 /* notice the screwup with the system_name - thats why MS created
100 NTSTATUS lsa_OpenPolicy (
101 [in] uint16 *system_name,
102 [in,ref] lsa_ObjectAttribute *attr,
103 [in] uint32 access_mask,
104 [out,ref] policy_handle *handle
115 NTTIME retention_time;
116 uint8 shutdown_in_progress;
117 NTTIME time_to_shutdown;
118 uint32 next_audit_record;
123 uint32 auditing_mode;
124 [size_is(count)] uint32 *settings;
126 } lsa_AuditEventsInfo;
138 uint16 unknown; /* an midl padding bug? */
145 } lsa_ReplicaSourceInfo;
149 uint32 non_paged_pool;
154 } lsa_DefaultQuotaInfo;
158 NTTIME db_create_time;
159 } lsa_ModificationInfo;
162 uint8 shutdown_on_full;
163 } lsa_AuditFullSetInfo;
166 uint16 unknown; /* an midl padding bug? */
167 uint8 shutdown_on_full;
169 } lsa_AuditFullQueryInfo;
173 lsa_String dns_domain;
174 lsa_String dns_forest;
180 LSA_POLICY_INFO_AUDIT_LOG=1,
181 LSA_POLICY_INFO_AUDIT_EVENTS=2,
182 LSA_POLICY_INFO_DOMAIN=3,
183 LSA_POLICY_INFO_PD=4,
184 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
185 LSA_POLICY_INFO_ROLE=6,
186 LSA_POLICY_INFO_REPLICA=7,
187 LSA_POLICY_INFO_QUOTA=8,
188 LSA_POLICY_INFO_DB=9,
189 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
190 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
191 LSA_POLICY_INFO_DNS=12
195 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
196 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
197 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
198 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
199 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
200 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
201 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
202 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
203 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
204 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
205 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
206 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
207 } lsa_PolicyInformation;
209 NTSTATUS lsa_QueryInfoPolicy (
210 [in,ref] policy_handle *handle,
212 [out,switch_is(level)] lsa_PolicyInformation *info
217 NTSTATUS lsa_SetInfoPolicy ();
221 NTSTATUS lsa_ClearAuditLog ();
225 NTSTATUS lsa_CreateAccount (
226 [in,ref] policy_handle *handle,
227 [in,ref] dom_sid2 *sid,
228 [in] uint32 access_mask,
229 [out,ref] policy_handle *acct_handle
238 typedef [public] struct {
239 [range(0,1000)] uint32 num_sids;
240 [size_is(num_sids)] lsa_SidPtr *sids;
243 NTSTATUS lsa_EnumAccounts (
244 [in,ref] policy_handle *handle,
245 [in,out,ref] uint32 *resume_handle,
246 [in,range(0,8192)] uint32 num_entries,
247 [out,ref] lsa_SidArray *sids
251 /*************************************************/
257 } lsa_TrustInformation;
259 NTSTATUS lsa_CreateTrustedDomain(
260 [in,ref] policy_handle *handle,
261 [in,ref] lsa_TrustInformation *info,
262 [in] uint32 access_mask,
263 [out,ref] policy_handle *dom_handle
273 } lsa_DomainInformation;
277 [size_is(count)] lsa_DomainInformation *domains;
280 NTSTATUS lsa_EnumTrustDom (
281 [in,ref] policy_handle *handle,
282 [in,out,ref] uint32 *resume_handle,
283 [in,range(0,1000)] uint32 num_entries,
284 [out,ref] lsa_DomainList *domains
298 [range(0,1000)] uint32 count;
299 [size_is(count)] lsa_TranslatedSid *sids;
303 [range(0,1000)] uint32 count;
304 [size_is(count)] lsa_TrustInformation *domains;
308 NTSTATUS lsa_LookupNames (
309 [in,ref] policy_handle *handle,
310 [in,range(0,1000)] uint32 num_names,
311 [in,ref,size_is(num_names)] lsa_String *names,
312 [out] lsa_RefDomainList *domains,
313 [in,out,ref] lsa_TransSidArray *sids,
315 [in,out,ref] uint32 *count
326 } lsa_TranslatedName;
329 [range(0,1000)] uint32 count;
330 [size_is(count)] lsa_TranslatedName *names;
331 } lsa_TransNameArray;
333 NTSTATUS lsa_LookupSids (
334 [in,ref] policy_handle *handle,
335 [in,ref] lsa_SidArray *sids,
336 [out] lsa_RefDomainList *domains,
337 [in,out,ref] lsa_TransNameArray *names,
339 [in,out,ref] uint32 *count
344 NTSTATUS lsa_CreateSecret(
345 [in,ref] policy_handle *handle,
346 [in] lsa_String name,
347 [in] uint32 access_mask,
348 [out,ref] policy_handle *sec_handle
352 /*****************************************/
354 NTSTATUS lsa_OpenAccount (
355 [in,ref] policy_handle *handle,
356 [in,ref] dom_sid2 *sid,
357 [in] uint32 access_mask,
358 [out,ref] policy_handle *acct_handle
362 /****************************************/
371 [range(0,1000)] uint32 count;
373 [size_is(count)] lsa_LUIDAttribute set[*];
376 NTSTATUS lsa_EnumPrivsAccount (
377 [in,ref] policy_handle *handle,
378 [out] lsa_PrivilegeSet *privs
382 /****************************************/
384 NTSTATUS lsa_AddPrivilegesToAccount(
385 [in,ref] policy_handle *handle,
386 [in,ref] lsa_PrivilegeSet *privs
390 /****************************************/
392 NTSTATUS lsa_RemovePrivilegesFromAccount(
393 [in,ref] policy_handle *handle,
394 [in] uint8 remove_all,
395 [in] lsa_PrivilegeSet *privs
399 NTSTATUS lsa_GetQuotasForAccount();
402 NTSTATUS lsa_SetQuotasForAccount();
405 NTSTATUS lsa_GetSystemAccessAccount();
407 NTSTATUS lsa_SetSystemAccessAccount();
410 NTSTATUS lsa_OpenTrustedDomain(
411 [in,ref] policy_handle *handle,
412 [in,ref] dom_sid2 *sid,
413 [in] uint32 access_mask,
414 [out,ref] policy_handle *trustdom_handle
417 typedef [flag(NDR_PAHEX)] struct {
420 [size_is(size),length_is(length)] uint8 *data;
423 typedef [flag(NDR_PAHEX)] struct {
425 [size_is(size)] uint8 *data;
429 LSA_TRUSTED_DOMAIN_INFO_NAME=1,
430 LSA_TRUSTED_DOMAIN_INFO_2=2,
431 LSA_TRUSTED_DOMAIN_INFO_FLAGS=3,
432 LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
433 LSA_TRUSTED_DOMAIN_INFO_5=5,
434 LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
435 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
436 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
437 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
438 } lsa_TrustDomInfoEnum;
441 lsa_String netbios_name;
442 } lsa_TrustDomainInfoName;
446 } lsa_TrustDomainInfoFlags;
449 lsa_DATA_BUF *password;
450 lsa_DATA_BUF *old_password;
451 } lsa_TrustDomainInfoPassword;
454 lsa_String netbios_name;
456 } lsa_TrustDomainInfo5;
459 lsa_String domain_name;
460 lsa_String netbios_name;
465 } lsa_TrustDomainInfoInfoEx;
471 } lsa_TrustDomainInfoBuffer;
475 lsa_TrustDomainInfoBuffer *buff1;
476 lsa_TrustDomainInfoBuffer *buff2;
478 lsa_TrustDomainInfoBuffer *buff3;
479 lsa_TrustDomainInfoBuffer *buff4;
480 } lsa_TrustDomainInfoAuthInfo;
483 lsa_TrustDomainInfoInfoEx info_ex;
484 lsa_TrustDomainInfoFlags flags;
485 lsa_TrustDomainInfoAuthInfo auth_info;
486 } lsa_TrustDomainInfoFullInfo;
489 lsa_TrustDomainInfoInfoEx info_ex;
491 } lsa_TrustDomainInfo11;
494 lsa_TrustDomainInfoInfoEx info_ex;
496 lsa_TrustDomainInfoFlags flags;
497 lsa_TrustDomainInfoAuthInfo auth_info;
498 } lsa_TrustDomainInfoInfoAll;
501 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name;
502 [case(LSA_TRUSTED_DOMAIN_INFO_FLAGS)] lsa_TrustDomainInfoFlags flags;
503 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password;
504 [case(LSA_TRUSTED_DOMAIN_INFO_5)] lsa_TrustDomainInfo5 info5;
505 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex;
506 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info;
507 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info;
508 [case(11)] lsa_TrustDomainInfo11 info11;
509 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all;
510 } lsa_TrustedDomainInfo;
513 NTSTATUS lsa_QueryTrustedDomainInfo(
514 [in,ref] policy_handle *trustdom_handle,
516 [out,switch_is(level)] lsa_TrustedDomainInfo *info
520 NTSTATUS lsa_SetInformationTrustedDomain();
523 NTSTATUS lsa_OpenSecret(
524 [in,ref] policy_handle *handle,
525 [in] lsa_String name,
526 [in] uint32 access_mask,
527 [out,ref] policy_handle *sec_handle
532 NTSTATUS lsa_SetSecret(
533 [in,ref] policy_handle *handle,
534 [in] lsa_DATA_BUF *new_val,
535 [in] lsa_DATA_BUF *old_val
543 NTSTATUS lsa_QuerySecret (
544 [in,ref] policy_handle *handle,
545 [in,out] lsa_DATA_BUF_PTR *new_val,
546 [in,out] NTTIME *new_mtime,
547 [in,out] lsa_DATA_BUF_PTR *old_val,
548 [in,out] NTTIME *old_mtime
552 NTSTATUS lsa_LookupPrivValue(
553 [in,ref] policy_handle *handle,
554 [in,ref] lsa_String *name,
555 [out,ref] lsa_LUID *luid
560 NTSTATUS lsa_LookupPrivName (
561 [in,ref] policy_handle *handle,
562 [in,ref] lsa_LUID *luid,
563 [out] lsa_String *name
567 /*******************/
569 NTSTATUS lsa_LookupPrivDisplayName (
570 [in,ref] policy_handle *handle,
571 [in,ref] lsa_String *name,
572 [out] lsa_String *disp_name,
573 /* see http://www.microsoft.com/globaldev/nlsweb/ for
574 language definitions */
575 [in,out,ref] uint16 *language_id,
580 NTSTATUS lsa_DeleteObject();
583 /*******************/
585 NTSTATUS lsa_EnumAccountsWithUserRight (
586 [in,ref] policy_handle *handle,
587 [in] lsa_String *name,
588 [out,ref] lsa_SidArray *sids
594 } lsa_RightAttribute;
598 [size_is(count)] lsa_String *names;
601 NTSTATUS lsa_EnumAccountRights (
602 [in,ref] policy_handle *handle,
603 [in,ref] dom_sid2 *sid,
604 [out,ref] lsa_RightSet *rights
608 /**********************/
610 NTSTATUS lsa_AddAccountRights (
611 [in,ref] policy_handle *handle,
612 [in,ref] dom_sid2 *sid,
613 [in,ref] lsa_RightSet *rights
616 /**********************/
618 NTSTATUS lsa_RemoveAccountRights (
619 [in,ref] policy_handle *handle,
620 [in,ref] dom_sid2 *sid,
622 [in,ref] lsa_RightSet *rights
626 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
627 [in,ref] policy_handle *handle,
628 [in,ref] dom_sid2 *dom_sid,
630 [out,switch_is(level)] lsa_TrustedDomainInfo *info
634 NTSTATUS lsa_SetTrustDomainInfo();
636 NTSTATUS lsa_DeleteTrustDomain();
638 NTSTATUS lsa_StorePrivateData();
640 NTSTATUS lsa_RetrievePrivateData();
643 /**********************/
645 NTSTATUS lsa_OpenPolicy2 (
646 [in] unistr *system_name,
647 [in,ref] lsa_ObjectAttribute *attr,
648 [in] uint32 access_mask,
649 [out,ref] policy_handle *handle
652 /**********************/
658 NTSTATUS lsa_GetUserName(
659 [in] unistr *system_name,
660 [in,out] lsa_String *account_name,
661 [in,out] lsa_StringPointer *authority_name
664 /**********************/
667 NTSTATUS lsa_QueryInfoPolicy2(
668 [in,ref] policy_handle *handle,
670 [out,switch_is(level)] lsa_PolicyInformation *info
674 NTSTATUS lsa_SetInfoPolicy2();
676 /**********************/
678 NTSTATUS lsa_QueryTrustedDomainInfoByName(
679 [in,ref] policy_handle *handle,
680 [in] lsa_String trusted_domain,
682 [out,switch_is(level)] lsa_TrustedDomainInfo *info
686 NTSTATUS lsa_SetTrustedDomainInfoByName();
689 NTSTATUS lsa_EnumTrustedDomainsEx();
692 NTSTATUS lsa_CreateTrustedDomainEx();
695 NTSTATUS lsa_CloseTrustedDomainEx();
698 NTSTATUS lsa_QueryDomainInformationPolicy();
701 NTSTATUS lsa_SetDomInfoPolicy();
703 /**********************/
705 NTSTATUS lsa_OpenTrustedDomainByName(
706 [in,ref] policy_handle *handle,
707 [in] lsa_String name,
708 [in] uint32 access_mask,
709 [out,ref] policy_handle *trustdom_handle
713 NTSTATUS lsa_TestCall();
715 /**********************/
723 } lsa_TranslatedName2;
726 [range(0,1000)] uint32 count;
727 [size_is(count)] lsa_TranslatedName2 *names;
728 } lsa_TransNameArray2;
730 NTSTATUS lsa_LookupSids2(
731 [in,ref] policy_handle *handle,
732 [in,ref] lsa_SidArray *sids,
733 [out] lsa_RefDomainList *domains,
734 [in,out,ref] lsa_TransNameArray2 *names,
736 [in,out,ref] uint32 *count,
737 [in] uint32 unknown1,
741 /**********************/
749 } lsa_TranslatedSid2;
752 [range(0,1000)] uint32 count;
753 [size_is(count)] lsa_TranslatedSid2 *sids;
754 } lsa_TransSidArray2;
756 NTSTATUS lsa_LookupNames2 (
757 [in,ref] policy_handle *handle,
758 [in,range(0,1000)] uint32 num_names,
759 [in,ref,size_is(num_names)] lsa_String *names,
760 [out] lsa_RefDomainList *domains,
761 [in,out,ref] lsa_TransSidArray2 *sids,
763 [in,out,ref] uint32 *count,
764 [in] uint32 unknown1,
769 NTSTATUS lsa_CreateTrustedDomainEx2();
772 NTSTATUS lsa_CREDRWRITE();
775 NTSTATUS lsa_CREDRREAD();
778 NTSTATUS lsa_CREDRENUMERATE();
781 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
784 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
787 NTSTATUS lsa_CREDRDELETE();
790 NTSTATUS lsa_CREDRGETTARGETINFO();
793 NTSTATUS lsa_CREDRPROFILELOADED();
795 /**********************/
802 } lsa_TranslatedSid3;
805 [range(0,1000)] uint32 count;
806 [size_is(count)] lsa_TranslatedSid3 *sids;
807 } lsa_TransSidArray3;
809 NTSTATUS lsa_LookupNames3 (
810 [in,ref] policy_handle *handle,
811 [in,range(0,1000)] uint32 num_names,
812 [in,ref,size_is(num_names)] lsa_String *names,
813 [out] lsa_RefDomainList *domains,
814 [in,out,ref] lsa_TransSidArray3 *sids,
816 [in,out,ref] uint32 *count,
817 [in] uint32 unknown1,
822 NTSTATUS lsa_CREDRGETSESSIONTYPES();
825 NTSTATUS lsa_LSARREGISTERAUDITEVENT();
828 NTSTATUS lsa_LSARGENAUDITEVENT();
831 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
834 NTSTATUS lsa_LSARQUERYFORESTTRUSTINFORMATION();
837 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
840 NTSTATUS lsa_CREDRRENAME();
845 NTSTATUS lsa_LookupSids3(
846 [in,ref] lsa_SidArray *sids,
847 [out] lsa_RefDomainList *domains,
848 [in,out,ref] lsa_TransNameArray2 *names,
850 [in,out,ref] uint32 *count,
851 [in] uint32 unknown1,
856 NTSTATUS lsa_LSARLOOKUPNAMES4();
859 NTSTATUS lsa_LSAROPENPOLICYSCE();
862 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
865 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
868 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();