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 Server Authentication(?)"),
18 [in,out,ref] policy_handle *handle
25 [in,ref] policy_handle *handle
33 [value(2*strlen_m(r->name))] uint16 name_len;
34 [value(r->name_len)] uint16 name_size;
46 [size_is(count)] lsa_PrivEntry *privs;
49 NTSTATUS lsa_EnumPrivs (
50 [in,ref] policy_handle *handle,
51 [in,out,ref] uint32 *resume_handle,
52 [in] uint32 max_count,
53 [out,ref] lsa_PrivArray *privs
59 NTSTATUS lsa_QuerySecurity (
60 [in,ref] policy_handle *handle,
62 [out] sec_desc_buf *sdbuf
68 NTSTATUS lsa_SetSecObj ();
73 NTSTATUS lsa_ChangePassword ();
79 uint32 len; /* ignored */
80 uint16 impersonation_level;
86 uint32 len; /* ignored */
90 security_descriptor *sec_desc;
92 } lsa_ObjectAttribute;
94 /* notice the screwup with the system_name - thats why MS created
96 NTSTATUS lsa_OpenPolicy (
97 [in] uint16 *system_name,
98 [in,ref] lsa_ObjectAttribute *attr,
99 [in] uint32 access_mask,
100 [out,ref] policy_handle *handle
111 NTTIME retention_time;
112 uint8 shutdown_in_progress;
113 NTTIME time_to_shutdown;
114 uint32 next_audit_record;
119 uint32 auditing_mode;
120 [size_is(count)] uint32 *settings;
122 } lsa_AuditEventsInfo;
134 uint16 unknown; /* an midl padding bug? */
141 } lsa_ReplicaSourceInfo;
145 uint32 non_paged_pool;
150 } lsa_DefaultQuotaInfo;
154 NTTIME db_create_time;
155 } lsa_ModificationInfo;
158 uint8 shutdown_on_full;
159 } lsa_AuditFullSetInfo;
162 uint16 unknown; /* an midl padding bug? */
163 uint8 shutdown_on_full;
165 } lsa_AuditFullQueryInfo;
176 LSA_POLICY_INFO_AUDIT_LOG=1,
177 LSA_POLICY_INFO_AUDIT_EVENTS=2,
178 LSA_POLICY_INFO_DOMAIN=3,
179 LSA_POLICY_INFO_PD=4,
180 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
181 LSA_POLICY_INFO_ROLE=6,
182 LSA_POLICY_INFO_REPLICA=7,
183 LSA_POLICY_INFO_QUOTA=8,
184 LSA_POLICY_INFO_DB=9,
185 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
186 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
187 LSA_POLICY_INFO_DNS=12
191 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
192 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
193 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
194 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
195 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
196 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
197 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
198 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
199 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
200 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
201 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
202 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
203 } lsa_PolicyInformation;
205 NTSTATUS lsa_QueryInfoPolicy (
206 [in,ref] policy_handle *handle,
208 [out,switch_is(level)] lsa_PolicyInformation *info
213 NTSTATUS lsa_SetInfoPolicy ();
217 NTSTATUS lsa_ClearAuditLog ();
221 NTSTATUS lsa_CreateAccount (
222 [in,ref] policy_handle *handle,
223 [in,ref] dom_sid2 *sid,
224 [in] uint32 access_mask,
225 [out,ref] policy_handle *acct_handle
234 typedef [public] struct {
235 [range(0,1000)] uint32 num_sids;
236 [size_is(num_sids)] lsa_SidPtr *sids;
239 NTSTATUS lsa_EnumAccounts (
240 [in,ref] policy_handle *handle,
241 [in,out,ref] uint32 *resume_handle,
242 [in,range(0,1000)] uint32 num_entries,
243 [out,ref] lsa_SidArray *sids
247 /*************************************************/
253 } lsa_TrustInformation;
255 NTSTATUS lsa_CreateTrustedDomain(
256 [in,ref] policy_handle *handle,
257 [in,ref] lsa_TrustInformation *info,
258 [in] uint32 access_mask,
259 [out,ref] policy_handle *dom_handle
269 } lsa_DomainInformation;
273 [size_is(count)] lsa_DomainInformation *domains;
276 NTSTATUS lsa_EnumTrustDom (
277 [in,ref] policy_handle *handle,
278 [in,out,ref] uint32 *resume_handle,
279 [in,range(0,1000)] uint32 num_entries,
280 [out,ref] lsa_DomainList *domains
294 [range(0,1000)] uint32 count;
295 [size_is(count)] lsa_TranslatedSid *sids;
299 [range(0,1000)] uint32 count;
300 [size_is(count)] lsa_TrustInformation *domains;
304 NTSTATUS lsa_LookupNames (
305 [in,ref] policy_handle *handle,
306 [in,range(0,1000)] uint32 num_names,
307 [in,ref,size_is(num_names)] lsa_Name *names,
308 [out] lsa_RefDomainList *domains,
309 [in,out,ref] lsa_TransSidArray *sids,
311 [in,out,ref] uint32 *count
322 } lsa_TranslatedName;
325 [range(0,1000)] uint32 count;
326 [size_is(count)] lsa_TranslatedName *names;
327 } lsa_TransNameArray;
329 NTSTATUS lsa_LookupSids (
330 [in,ref] policy_handle *handle,
331 [in,ref] lsa_SidArray *sids,
332 [out] lsa_RefDomainList *domains,
333 [in,out,ref] lsa_TransNameArray *names,
335 [in,out,ref] uint32 *count
340 NTSTATUS lsa_CreateSecret(
341 [in,ref] policy_handle *handle,
343 [in] uint32 access_mask,
344 [out,ref] policy_handle *sec_handle
348 /*****************************************/
350 NTSTATUS lsa_OpenAccount (
351 [in,ref] policy_handle *handle,
352 [in,ref] dom_sid2 *sid,
353 [in] uint32 access_mask,
354 [out,ref] policy_handle *acct_handle
358 /****************************************/
374 [size_is(count)] lsa_LUIDAttribute set[*];
377 NTSTATUS lsa_EnumPrivsAccount (
378 [in,ref] policy_handle *handle,
379 [out] lsa_PrivilegeSet *privs
384 NTSTATUS lsa_AddPrivilegesToAccount();
387 NTSTATUS lsa_RemovePrivilegesFromAccount();
390 NTSTATUS lsa_GetQuotasForAccount();
393 NTSTATUS lsa_SetQuotasForAccount();
396 NTSTATUS lsa_GetSystemAccessAccount();
398 NTSTATUS lsa_SetSystemAccessAccount();
401 NTSTATUS lsa_OpenTrustedDomain(
402 [in,ref] policy_handle *handle,
403 [in,ref] dom_sid2 *sid,
404 [in] uint32 access_mask,
405 [out,ref] policy_handle *trustdom_handle
409 NTSTATUS lsa_QueryInfoTrustedDomain();
411 NTSTATUS lsa_SetInformationTrustedDomain();
414 NTSTATUS lsa_OpenSecret(
415 [in,ref] policy_handle *handle,
417 [in] uint32 access_mask,
418 [out,ref] policy_handle *sec_handle
422 typedef [flag(NDR_PAHEX)] struct {
425 [size_is(size),length_is(length)] uint8 *data;
428 NTSTATUS lsa_SetSecret(
429 [in,ref] policy_handle *handle,
430 [in] lsa_DATA_BUF *new_val,
431 [in] lsa_DATA_BUF *old_val
439 NTSTATUS lsa_QuerySecret (
440 [in,ref] policy_handle *handle,
441 [in,out] lsa_DATA_BUF_PTR *new_val,
442 [in,out] NTTIME *new_mtime,
443 [in,out] lsa_DATA_BUF_PTR *old_val,
444 [in,out] NTTIME *old_mtime
448 NTSTATUS lsa_LookupPrivValue();
452 NTSTATUS lsa_LookupPrivName (
453 [in,ref] policy_handle *handle,
454 [in,ref] lsa_LUID *luid,
459 /*******************/
461 NTSTATUS lsa_LookupPrivDisplayName (
462 [in,ref] policy_handle *handle,
463 [in,ref] lsa_Name *name,
464 [out] lsa_Name *disp_name,
465 /* see http://www.microsoft.com/globaldev/nlsweb/ for
466 language definitions */
467 [in,out,ref] uint16 *language_id,
472 NTSTATUS lsa_DeleteObject();
475 /*******************/
477 NTSTATUS lsa_EnumAccountsWithUserRight (
478 [in,ref] policy_handle *handle,
480 [out,ref] lsa_SidArray *sids
486 } lsa_RightAttribute;
490 [size_is(count)] lsa_Name *names;
493 NTSTATUS lsa_EnumAccountRights (
494 [in,ref] policy_handle *handle,
495 [in,ref] dom_sid2 *sid,
496 [out,ref] lsa_RightSet *rights
500 /**********************/
502 NTSTATUS lsa_AddAccountRights (
503 [in,ref] policy_handle *handle,
504 [in,ref] dom_sid2 *sid,
505 [in,ref] lsa_RightSet *rights
508 /**********************/
510 NTSTATUS lsa_RemoveAccountRights (
511 [in,ref] policy_handle *handle,
512 [in,ref] dom_sid2 *sid,
514 [in,ref] lsa_RightSet *rights
518 NTSTATUS lsa_QueryTrustDomainInfo();
520 NTSTATUS lsa_SetTrustDomainInfo();
522 NTSTATUS lsa_DeleteTrustDomain();
524 NTSTATUS lsa_StorePrivateData();
526 NTSTATUS lsa_RetrievePrivateData();
529 /**********************/
531 NTSTATUS lsa_OpenPolicy2 (
532 [in] unistr *system_name,
533 [in,ref] lsa_ObjectAttribute *attr,
534 [in] uint32 access_mask,
535 [out,ref] policy_handle *handle
540 NTSTATUS lsa_GetUserName();
542 /**********************/
545 NTSTATUS lsa_QueryInfoPolicy2(
546 [in,ref] policy_handle *handle,
548 [out,switch_is(level)] lsa_PolicyInformation *info
552 NTSTATUS lsa_SetInfoPolicy2();
555 NTSTATUS lsa_QueryTrustedDomainInfoByName();
558 NTSTATUS lsa_SetTrustedDomainInfoByName();
561 NTSTATUS lsa_EnumTrustedDomainsEx();
564 NTSTATUS lsa_CreateTrustedDomainEx();
567 NTSTATUS lsa_CloseTrustedDomainEx();
570 NTSTATUS lsa_QueryDomainInformationPolicy();
573 NTSTATUS lsa_SetDomInfoPolicy();
576 NTSTATUS lsa_OpenTrustedDomainByName(
577 [in,ref] policy_handle *handle,
579 [in] uint32 access_mask,
580 [out,ref] policy_handle *trustdom_handle
584 NTSTATUS lsa_TestCall();
587 NTSTATUS lsa_LookupSids2();
590 NTSTATUS lsa_LookupNames2();
593 NTSTATUS lsa_CreateTrustedDomainEx2();