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_QuerySecObj (
60 [in,ref] policy_handle *handle,
62 [out] sec_desc_buf *sd
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();
400 NTSTATUS lsa_OpenTrustedDomain();
402 NTSTATUS lsa_QueryInfoTrustedDomain();
404 NTSTATUS lsa_SetInformationTrustedDomain();
407 NTSTATUS lsa_OpenSecret(
408 [in,ref] policy_handle *handle,
410 [in] uint32 access_mask,
411 [out,ref] policy_handle *sec_handle
415 typedef [flag(NDR_PAHEX)] struct {
418 [size_is(size),length_is(length)] uint8 *data;
421 NTSTATUS lsa_SetSecret(
422 [in,ref] policy_handle *handle,
423 [in] lsa_DATA_BUF *new_val,
424 [in] lsa_DATA_BUF *old_val
432 NTSTATUS lsa_QuerySecret (
433 [in,ref] policy_handle *handle,
434 [in,out] lsa_DATA_BUF_PTR *new_val,
435 [in,out] NTTIME *new_mtime,
436 [in,out] lsa_DATA_BUF_PTR *old_val,
437 [in,out] NTTIME *old_mtime
441 NTSTATUS lsa_LookupPrivValue();
445 NTSTATUS lsa_LookupPrivName (
446 [in,ref] policy_handle *handle,
447 [in,ref] lsa_LUID *luid,
452 /*******************/
454 NTSTATUS lsa_LookupPrivDisplayName (
455 [in,ref] policy_handle *handle,
456 [in,ref] lsa_Name *name,
457 [out] lsa_Name *disp_name,
458 /* see http://www.microsoft.com/globaldev/nlsweb/ for
459 language definitions */
460 [in,out,ref] uint16 *language_id,
465 NTSTATUS lsa_DeleteObject();
468 /*******************/
470 NTSTATUS lsa_EnumAccountsWithUserRight (
471 [in,ref] policy_handle *handle,
473 [out,ref] lsa_SidArray *sids
479 } lsa_RightAttribute;
483 [size_is(count)] lsa_Name *names;
486 NTSTATUS lsa_EnumAccountRights (
487 [in,ref] policy_handle *handle,
488 [in,ref] dom_sid2 *sid,
489 [out,ref] lsa_RightSet *rights
493 /**********************/
495 NTSTATUS lsa_AddAccountRights (
496 [in,ref] policy_handle *handle,
497 [in,ref] dom_sid2 *sid,
498 [in,ref] lsa_RightSet *rights
501 /**********************/
503 NTSTATUS lsa_RemoveAccountRights (
504 [in,ref] policy_handle *handle,
505 [in,ref] dom_sid2 *sid,
507 [in,ref] lsa_RightSet *rights
511 NTSTATUS lsa_QueryTrustDomainInfo();
513 NTSTATUS lsa_SetTrustDomainInfo();
515 NTSTATUS lsa_DeleteTrustDomain();
517 NTSTATUS lsa_StorePrivateData();
519 NTSTATUS lsa_RetrievePrivateData();
522 /**********************/
524 NTSTATUS lsa_OpenPolicy2 (
525 [in] unistr *system_name,
526 [in,ref] lsa_ObjectAttribute *attr,
527 [in] uint32 access_mask,
528 [out,ref] policy_handle *handle
533 NTSTATUS lsa_GetUserName();
535 /**********************/
538 NTSTATUS lsa_QueryInfoPolicy2(
539 [in,ref] policy_handle *handle,
541 [out,switch_is(level)] lsa_PolicyInformation *info
545 NTSTATUS lsa_SetInfoPolicy2();
548 NTSTATUS lsa_QueryTrustedDomainInfoByName();
551 NTSTATUS lsa_SetTrustedDomainInfoByName();
554 NTSTATUS lsa_EnumTrustedDomainsEx();
557 NTSTATUS lsa_CreateTrustedDomainEx();
560 NTSTATUS lsa_CloseTrustedDomainEx();
563 NTSTATUS lsa_QueryDomainInformationPolicy();
566 NTSTATUS lsa_SetDomInfoPolicy();
569 NTSTATUS lsa_OpenTrustedDomainByName();
572 NTSTATUS lsa_TestCall();
575 NTSTATUS lsa_LookupSids2();
578 NTSTATUS lsa_LookupNames2();
581 NTSTATUS lsa_CreateTrustedDomainEx2();