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 typedef [public] struct {
61 [subcontext(4)] security_descriptor *sd;
64 NTSTATUS lsa_QuerySecObj (
65 [in,ref] policy_handle *handle,
67 [out] sec_desc_buf *sd
73 NTSTATUS lsa_SetSecObj ();
78 NTSTATUS lsa_ChangePassword ();
84 uint32 len; /* ignored */
85 uint16 impersonation_level;
91 uint32 len; /* ignored */
95 security_descriptor *sec_desc;
97 } lsa_ObjectAttribute;
99 /* notice the screwup with the system_name - thats why MS created
101 NTSTATUS lsa_OpenPolicy (
102 [in] uint16 *system_name,
103 [in,ref] lsa_ObjectAttribute *attr,
104 [in] uint32 access_mask,
105 [out,ref] policy_handle *handle
116 NTTIME retention_time;
117 uint8 shutdown_in_progress;
118 NTTIME time_to_shutdown;
119 uint32 next_audit_record;
124 uint32 auditing_mode;
125 [size_is(count)] uint32 *settings;
127 } lsa_AuditEventsInfo;
139 uint16 unknown; /* an midl padding bug? */
146 } lsa_ReplicaSourceInfo;
150 uint32 non_paged_pool;
155 } lsa_DefaultQuotaInfo;
159 NTTIME db_create_time;
160 } lsa_ModificationInfo;
163 uint8 shutdown_on_full;
164 } lsa_AuditFullSetInfo;
167 uint16 unknown; /* an midl padding bug? */
168 uint8 shutdown_on_full;
170 } lsa_AuditFullQueryInfo;
181 LSA_POLICY_INFO_AUDIT_LOG=1,
182 LSA_POLICY_INFO_AUDIT_EVENTS=2,
183 LSA_POLICY_INFO_DOMAIN=3,
184 LSA_POLICY_INFO_PD=4,
185 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
186 LSA_POLICY_INFO_ROLE=6,
187 LSA_POLICY_INFO_REPLICA=7,
188 LSA_POLICY_INFO_QUOTA=8,
189 LSA_POLICY_INFO_DB=9,
190 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
191 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
192 LSA_POLICY_INFO_DNS=12
196 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
197 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
198 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
199 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
200 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
201 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
202 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
203 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
204 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
205 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
206 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
207 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
208 } lsa_PolicyInformation;
210 NTSTATUS lsa_QueryInfoPolicy (
211 [in,ref] policy_handle *handle,
213 [out,switch_is(level)] lsa_PolicyInformation *info
218 NTSTATUS lsa_SetInfoPolicy ();
222 NTSTATUS lsa_ClearAuditLog ();
226 NTSTATUS lsa_CreateAccount (
227 [in,ref] policy_handle *handle,
228 [in,ref] dom_sid2 *sid,
229 [in] uint32 access_mask,
230 [out,ref] policy_handle *acct_handle
239 typedef [public] struct {
241 [size_is(num_sids)] lsa_SidPtr *sids;
244 NTSTATUS lsa_EnumAccounts (
245 [in,ref] policy_handle *handle,
246 [in,out,ref] uint32 *resume_handle,
247 [in] uint32 num_entries,
248 [out,ref] lsa_SidArray *sids
252 /*************************************************/
258 } lsa_TrustInformation;
260 NTSTATUS lsa_CreateTrustedDomain(
261 [in,ref] policy_handle *handle,
262 [in,ref] lsa_TrustInformation *info,
263 [in] uint32 access_mask,
264 [out,ref] policy_handle *dom_handle
274 } lsa_DomainInformation;
278 [size_is(count)] lsa_DomainInformation *domains;
281 NTSTATUS lsa_EnumTrustDom (
282 [in,ref] policy_handle *handle,
283 [in,out,ref] uint32 *resume_handle,
284 [in] uint32 num_entries,
285 [out,ref] lsa_DomainList *domains
300 [size_is(count)] lsa_TranslatedSid *sids;
305 [size_is(count)] lsa_TrustInformation *domains;
309 NTSTATUS lsa_LookupNames (
310 [in,ref] policy_handle *handle,
311 [in] uint32 num_names,
312 [in,ref,size_is(num_names)] lsa_Name *names,
313 [out] lsa_RefDomainList *domains,
314 [in,out,ref] lsa_TransSidArray *sids,
316 [in,out,ref] uint32 *count
327 } lsa_TranslatedName;
331 [size_is(count)] lsa_TranslatedName *names;
332 } lsa_TransNameArray;
334 NTSTATUS lsa_LookupSids (
335 [in,ref] policy_handle *handle,
336 [in,ref] lsa_SidArray *sids,
337 [out] lsa_RefDomainList *domains,
338 [in,out,ref] lsa_TransNameArray *names,
340 [in,out,ref] uint32 *count
345 NTSTATUS lsa_CreateSecret(
346 [in,ref] policy_handle *handle,
348 [in] uint32 access_mask,
349 [out,ref] policy_handle *sec_handle
353 /*****************************************/
355 NTSTATUS lsa_OpenAccount (
356 [in,ref] policy_handle *handle,
357 [in,ref] dom_sid2 *sid,
358 [in] uint32 access_mask,
359 [out,ref] policy_handle *acct_handle
363 /****************************************/
379 [size_is(count)] lsa_LUIDAttribute set[*];
382 NTSTATUS lsa_EnumPrivsAccount (
383 [in,ref] policy_handle *handle,
384 [out] lsa_PrivilegeSet *privs
389 NTSTATUS lsa_AddPrivilegesToAccount();
392 NTSTATUS lsa_RemovePrivilegesFromAccount();
395 NTSTATUS lsa_GetQuotasForAccount();
398 NTSTATUS lsa_SetQuotasForAccount();
401 NTSTATUS lsa_GetSystemAccessAccount();
403 NTSTATUS lsa_SetSystemAccessAccount();
405 NTSTATUS lsa_OpenTrustedDomain();
407 NTSTATUS lsa_QueryInfoTrustedDomain();
409 NTSTATUS lsa_SetInformationTrustedDomain();
412 NTSTATUS lsa_OpenSecret(
413 [in,ref] policy_handle *handle,
415 [in] uint32 access_mask,
416 [out,ref] policy_handle *sec_handle
420 typedef [flag(NDR_PAHEX)] struct {
423 [size_is(size),length_is(length)] uint8 *data;
426 NTSTATUS lsa_SetSecret(
427 [in,ref] policy_handle *handle,
428 [in] lsa_DATA_BUF *new_val,
429 [in] lsa_DATA_BUF *old_val
437 NTSTATUS lsa_QuerySecret (
438 [in,ref] policy_handle *handle,
439 [in,out] lsa_DATA_BUF_PTR *new_val,
440 [in,out] NTTIME *new_mtime,
441 [in,out] lsa_DATA_BUF_PTR *old_val,
442 [in,out] NTTIME *old_mtime
446 NTSTATUS lsa_LookupPrivValue();
450 NTSTATUS lsa_LookupPrivName (
451 [in,ref] policy_handle *handle,
452 [in,ref] lsa_LUID *luid,
457 /*******************/
459 NTSTATUS lsa_LookupPrivDisplayName (
460 [in,ref] policy_handle *handle,
461 [in,ref] lsa_Name *name,
462 [out] lsa_Name *disp_name,
463 /* see http://www.microsoft.com/globaldev/nlsweb/ for
464 language definitions */
465 [in,out,ref] uint16 *language_id,
470 NTSTATUS lsa_DeleteObject();
473 /*******************/
475 NTSTATUS lsa_EnumAccountsWithUserRight (
476 [in,ref] policy_handle *handle,
478 [out,ref] lsa_SidArray *sids
484 } lsa_RightAttribute;
488 [size_is(count)] lsa_Name *names;
491 NTSTATUS lsa_EnumAccountRights (
492 [in,ref] policy_handle *handle,
493 [in,ref] dom_sid2 *sid,
494 [out,ref] lsa_RightSet *rights
498 /**********************/
500 NTSTATUS lsa_AddAccountRights (
501 [in,ref] policy_handle *handle,
502 [in,ref] dom_sid2 *sid,
503 [in,ref] lsa_RightSet *rights
506 /**********************/
508 NTSTATUS lsa_RemoveAccountRights (
509 [in,ref] policy_handle *handle,
510 [in,ref] dom_sid2 *sid,
512 [in,ref] lsa_RightSet *rights
516 NTSTATUS lsa_QueryTrustDomainInfo();
518 NTSTATUS lsa_SetTrustDomainInfo();
520 NTSTATUS lsa_DeleteTrustDomain();
522 NTSTATUS lsa_StorePrivateData();
524 NTSTATUS lsa_RetrievePrivateData();
527 /**********************/
529 NTSTATUS lsa_OpenPolicy2 (
530 [in] unistr *system_name,
531 [in,ref] lsa_ObjectAttribute *attr,
532 [in] uint32 access_mask,
533 [out,ref] policy_handle *handle
538 NTSTATUS lsa_GetUserName();
540 /**********************/
543 NTSTATUS lsa_QueryInfoPolicy2(
544 [in,ref] policy_handle *handle,
546 [out,switch_is(level)] lsa_PolicyInformation *info
550 NTSTATUS lsa_SetInfoPolicy2();
553 NTSTATUS lsa_QueryTrustedDomainInfoByName();
556 NTSTATUS lsa_SetTrustedDomainInfoByName();
559 NTSTATUS lsa_EnumTrustedDomainsEx();
562 NTSTATUS lsa_CreateTrustedDomainEx();
565 NTSTATUS lsa_CloseTrustedDomainEx();
568 NTSTATUS lsa_QueryDomainInformationPolicy();
571 NTSTATUS lsa_SetDomInfoPolicy();
574 NTSTATUS lsa_OpenTrustedDomainByName();
577 NTSTATUS lsa_TestCall();
580 NTSTATUS lsa_LookupSids2();
583 NTSTATUS lsa_LookupNames2();
586 NTSTATUS lsa_CreateTrustedDomainEx2();