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
233 /* NOTE: This only returns accounts that have at least
241 typedef [public] struct {
242 [range(0,1000)] uint32 num_sids;
243 [size_is(num_sids)] lsa_SidPtr *sids;
246 NTSTATUS lsa_EnumAccounts (
247 [in,ref] policy_handle *handle,
248 [in,out,ref] uint32 *resume_handle,
249 [in,range(0,8192)] uint32 num_entries,
250 [out,ref] lsa_SidArray *sids
254 /*************************************************/
260 } lsa_TrustInformation;
262 NTSTATUS lsa_CreateTrustedDomain(
263 [in,ref] policy_handle *handle,
264 [in,ref] lsa_TrustInformation *info,
265 [in] uint32 access_mask,
266 [out,ref] policy_handle *dom_handle
276 } lsa_DomainInformation;
280 [size_is(count)] lsa_DomainInformation *domains;
283 NTSTATUS lsa_EnumTrustDom (
284 [in,ref] policy_handle *handle,
285 [in,out,ref] uint32 *resume_handle,
286 [in,range(0,1000)] uint32 num_entries,
287 [out,ref] lsa_DomainList *domains
301 [range(0,1000)] uint32 count;
302 [size_is(count)] lsa_TranslatedSid *sids;
306 [range(0,1000)] uint32 count;
307 [size_is(count)] lsa_TrustInformation *domains;
311 NTSTATUS lsa_LookupNames (
312 [in,ref] policy_handle *handle,
313 [in,range(0,1000)] uint32 num_names,
314 [in,ref,size_is(num_names)] lsa_String *names,
315 [out] lsa_RefDomainList *domains,
316 [in,out,ref] lsa_TransSidArray *sids,
318 [in,out,ref] uint32 *count
329 } lsa_TranslatedName;
332 [range(0,1000)] uint32 count;
333 [size_is(count)] lsa_TranslatedName *names;
334 } lsa_TransNameArray;
336 NTSTATUS lsa_LookupSids (
337 [in,ref] policy_handle *handle,
338 [in,ref] lsa_SidArray *sids,
339 [out] lsa_RefDomainList *domains,
340 [in,out,ref] lsa_TransNameArray *names,
342 [in,out,ref] uint32 *count
347 NTSTATUS lsa_CreateSecret(
348 [in,ref] policy_handle *handle,
349 [in] lsa_String name,
350 [in] uint32 access_mask,
351 [out,ref] policy_handle *sec_handle
355 /*****************************************/
357 NTSTATUS lsa_OpenAccount (
358 [in,ref] policy_handle *handle,
359 [in,ref] dom_sid2 *sid,
360 [in] uint32 access_mask,
361 [out,ref] policy_handle *acct_handle
365 /****************************************/
374 [range(0,1000)] uint32 count;
376 [size_is(count)] lsa_LUIDAttribute set[*];
379 NTSTATUS lsa_EnumPrivsAccount (
380 [in,ref] policy_handle *handle,
381 [out] lsa_PrivilegeSet *privs
385 /****************************************/
387 NTSTATUS lsa_AddPrivilegesToAccount(
388 [in,ref] policy_handle *handle,
389 [in,ref] lsa_PrivilegeSet *privs
393 /****************************************/
395 NTSTATUS lsa_RemovePrivilegesFromAccount(
396 [in,ref] policy_handle *handle,
397 [in] uint8 remove_all,
398 [in] lsa_PrivilegeSet *privs
402 NTSTATUS lsa_GetQuotasForAccount();
405 NTSTATUS lsa_SetQuotasForAccount();
408 NTSTATUS lsa_GetSystemAccessAccount();
410 NTSTATUS lsa_SetSystemAccessAccount();
413 NTSTATUS lsa_OpenTrustedDomain(
414 [in,ref] policy_handle *handle,
415 [in,ref] dom_sid2 *sid,
416 [in] uint32 access_mask,
417 [out,ref] policy_handle *trustdom_handle
420 typedef [flag(NDR_PAHEX)] struct {
423 [size_is(size),length_is(length)] uint8 *data;
426 typedef [flag(NDR_PAHEX)] struct {
428 [size_is(size)] uint8 *data;
432 LSA_TRUSTED_DOMAIN_INFO_NAME=1,
433 LSA_TRUSTED_DOMAIN_INFO_2=2,
434 LSA_TRUSTED_DOMAIN_INFO_FLAGS=3,
435 LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
436 LSA_TRUSTED_DOMAIN_INFO_5=5,
437 LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
438 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
439 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
440 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
441 } lsa_TrustDomInfoEnum;
444 lsa_String netbios_name;
445 } lsa_TrustDomainInfoName;
449 } lsa_TrustDomainInfoFlags;
452 lsa_DATA_BUF *password;
453 lsa_DATA_BUF *old_password;
454 } lsa_TrustDomainInfoPassword;
457 lsa_String netbios_name;
459 } lsa_TrustDomainInfo5;
462 lsa_String domain_name;
463 lsa_String netbios_name;
468 } lsa_TrustDomainInfoInfoEx;
474 } lsa_TrustDomainInfoBuffer;
478 lsa_TrustDomainInfoBuffer *buff1;
479 lsa_TrustDomainInfoBuffer *buff2;
481 lsa_TrustDomainInfoBuffer *buff3;
482 lsa_TrustDomainInfoBuffer *buff4;
483 } lsa_TrustDomainInfoAuthInfo;
486 lsa_TrustDomainInfoInfoEx info_ex;
487 lsa_TrustDomainInfoFlags flags;
488 lsa_TrustDomainInfoAuthInfo auth_info;
489 } lsa_TrustDomainInfoFullInfo;
492 lsa_TrustDomainInfoInfoEx info_ex;
494 } lsa_TrustDomainInfo11;
497 lsa_TrustDomainInfoInfoEx info_ex;
499 lsa_TrustDomainInfoFlags flags;
500 lsa_TrustDomainInfoAuthInfo auth_info;
501 } lsa_TrustDomainInfoInfoAll;
504 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name;
505 [case(LSA_TRUSTED_DOMAIN_INFO_FLAGS)] lsa_TrustDomainInfoFlags flags;
506 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password;
507 [case(LSA_TRUSTED_DOMAIN_INFO_5)] lsa_TrustDomainInfo5 info5;
508 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex;
509 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info;
510 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info;
511 [case(11)] lsa_TrustDomainInfo11 info11;
512 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all;
513 } lsa_TrustedDomainInfo;
516 NTSTATUS lsa_QueryTrustedDomainInfo(
517 [in,ref] policy_handle *trustdom_handle,
519 [out,switch_is(level)] lsa_TrustedDomainInfo *info
523 NTSTATUS lsa_SetInformationTrustedDomain();
526 NTSTATUS lsa_OpenSecret(
527 [in,ref] policy_handle *handle,
528 [in] lsa_String name,
529 [in] uint32 access_mask,
530 [out,ref] policy_handle *sec_handle
535 NTSTATUS lsa_SetSecret(
536 [in,ref] policy_handle *handle,
537 [in] lsa_DATA_BUF *new_val,
538 [in] lsa_DATA_BUF *old_val
546 NTSTATUS lsa_QuerySecret (
547 [in,ref] policy_handle *handle,
548 [in,out] lsa_DATA_BUF_PTR *new_val,
549 [in,out] NTTIME *new_mtime,
550 [in,out] lsa_DATA_BUF_PTR *old_val,
551 [in,out] NTTIME *old_mtime
555 NTSTATUS lsa_LookupPrivValue(
556 [in,ref] policy_handle *handle,
557 [in,ref] lsa_String *name,
558 [out,ref] lsa_LUID *luid
563 NTSTATUS lsa_LookupPrivName (
564 [in,ref] policy_handle *handle,
565 [in,ref] lsa_LUID *luid,
566 [out] lsa_String *name
570 /*******************/
572 NTSTATUS lsa_LookupPrivDisplayName (
573 [in,ref] policy_handle *handle,
574 [in,ref] lsa_String *name,
575 [out] lsa_String *disp_name,
576 /* see http://www.microsoft.com/globaldev/nlsweb/ for
577 language definitions */
578 [in,out,ref] uint16 *language_id,
583 NTSTATUS lsa_DeleteObject();
586 /*******************/
588 NTSTATUS lsa_EnumAccountsWithUserRight (
589 [in,ref] policy_handle *handle,
590 [in] lsa_String *name,
591 [out,ref] lsa_SidArray *sids
597 } lsa_RightAttribute;
601 [size_is(count)] lsa_String *names;
604 NTSTATUS lsa_EnumAccountRights (
605 [in,ref] policy_handle *handle,
606 [in,ref] dom_sid2 *sid,
607 [out,ref] lsa_RightSet *rights
611 /**********************/
613 NTSTATUS lsa_AddAccountRights (
614 [in,ref] policy_handle *handle,
615 [in,ref] dom_sid2 *sid,
616 [in,ref] lsa_RightSet *rights
619 /**********************/
621 NTSTATUS lsa_RemoveAccountRights (
622 [in,ref] policy_handle *handle,
623 [in,ref] dom_sid2 *sid,
625 [in,ref] lsa_RightSet *rights
629 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
630 [in,ref] policy_handle *handle,
631 [in,ref] dom_sid2 *dom_sid,
633 [out,switch_is(level)] lsa_TrustedDomainInfo *info
637 NTSTATUS lsa_SetTrustDomainInfo();
639 NTSTATUS lsa_DeleteTrustDomain();
641 NTSTATUS lsa_StorePrivateData();
643 NTSTATUS lsa_RetrievePrivateData();
646 /**********************/
648 NTSTATUS lsa_OpenPolicy2 (
649 [in] unistr *system_name,
650 [in,ref] lsa_ObjectAttribute *attr,
651 [in] uint32 access_mask,
652 [out,ref] policy_handle *handle
655 /**********************/
661 NTSTATUS lsa_GetUserName(
662 [in] unistr *system_name,
663 [in,out] lsa_String *account_name,
664 [in,out] lsa_StringPointer *authority_name
667 /**********************/
670 NTSTATUS lsa_QueryInfoPolicy2(
671 [in,ref] policy_handle *handle,
673 [out,switch_is(level)] lsa_PolicyInformation *info
677 NTSTATUS lsa_SetInfoPolicy2();
679 /**********************/
681 NTSTATUS lsa_QueryTrustedDomainInfoByName(
682 [in,ref] policy_handle *handle,
683 [in] lsa_String trusted_domain,
685 [out,switch_is(level)] lsa_TrustedDomainInfo *info
689 NTSTATUS lsa_SetTrustedDomainInfoByName();
692 NTSTATUS lsa_EnumTrustedDomainsEx();
695 NTSTATUS lsa_CreateTrustedDomainEx();
698 NTSTATUS lsa_CloseTrustedDomainEx();
701 NTSTATUS lsa_QueryDomainInformationPolicy();
704 NTSTATUS lsa_SetDomInfoPolicy();
706 /**********************/
708 NTSTATUS lsa_OpenTrustedDomainByName(
709 [in,ref] policy_handle *handle,
710 [in] lsa_String name,
711 [in] uint32 access_mask,
712 [out,ref] policy_handle *trustdom_handle
716 NTSTATUS lsa_TestCall();
718 /**********************/
726 } lsa_TranslatedName2;
729 [range(0,1000)] uint32 count;
730 [size_is(count)] lsa_TranslatedName2 *names;
731 } lsa_TransNameArray2;
733 NTSTATUS lsa_LookupSids2(
734 [in,ref] policy_handle *handle,
735 [in,ref] lsa_SidArray *sids,
736 [out] lsa_RefDomainList *domains,
737 [in,out,ref] lsa_TransNameArray2 *names,
739 [in,out,ref] uint32 *count,
740 [in] uint32 unknown1,
744 /**********************/
752 } lsa_TranslatedSid2;
755 [range(0,1000)] uint32 count;
756 [size_is(count)] lsa_TranslatedSid2 *sids;
757 } lsa_TransSidArray2;
759 NTSTATUS lsa_LookupNames2 (
760 [in,ref] policy_handle *handle,
761 [in,range(0,1000)] uint32 num_names,
762 [in,ref,size_is(num_names)] lsa_String *names,
763 [out] lsa_RefDomainList *domains,
764 [in,out,ref] lsa_TransSidArray2 *sids,
766 [in,out,ref] uint32 *count,
767 [in] uint32 unknown1,
772 NTSTATUS lsa_CreateTrustedDomainEx2();
775 NTSTATUS lsa_CREDRWRITE();
778 NTSTATUS lsa_CREDRREAD();
781 NTSTATUS lsa_CREDRENUMERATE();
784 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
787 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
790 NTSTATUS lsa_CREDRDELETE();
793 NTSTATUS lsa_CREDRGETTARGETINFO();
796 NTSTATUS lsa_CREDRPROFILELOADED();
798 /**********************/
805 } lsa_TranslatedSid3;
808 [range(0,1000)] uint32 count;
809 [size_is(count)] lsa_TranslatedSid3 *sids;
810 } lsa_TransSidArray3;
812 NTSTATUS lsa_LookupNames3 (
813 [in,ref] policy_handle *handle,
814 [in,range(0,1000)] uint32 num_names,
815 [in,ref,size_is(num_names)] lsa_String *names,
816 [out] lsa_RefDomainList *domains,
817 [in,out,ref] lsa_TransSidArray3 *sids,
819 [in,out,ref] uint32 *count,
820 [in] uint32 unknown1,
825 NTSTATUS lsa_CREDRGETSESSIONTYPES();
828 NTSTATUS lsa_LSARREGISTERAUDITEVENT();
831 NTSTATUS lsa_LSARGENAUDITEVENT();
834 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
837 NTSTATUS lsa_LSARQUERYFORESTTRUSTINFORMATION();
840 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
843 NTSTATUS lsa_CREDRRENAME();
848 NTSTATUS lsa_LookupSids3(
849 [in,ref] lsa_SidArray *sids,
850 [out] lsa_RefDomainList *domains,
851 [in,out,ref] lsa_TransNameArray2 *names,
853 [in,out,ref] uint32 *count,
854 [in] uint32 unknown1,
859 NTSTATUS lsa_LSARLOOKUPNAMES4();
862 NTSTATUS lsa_LSAROPENPOLICYSCE();
865 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
868 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
871 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();