Use lsa_PolicyAccessMask in lsa_OpenPolicy/2.
[Samba/gebeck_regimport.git] / source3 / librpc / idl / lsa.idl
blob228634ea1f0d11b92821475d4b8416a486830ea8
1 #include "idl_types.h"
3 /*
4 lsa interface definition
5 */
7 import "security.idl";
9 [ uuid("12345778-1234-abcd-ef00-0123456789ab"),
10 version(0.0),
11 endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\netlogon]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
12 pointer_default(unique),
13 helpstring("Local Security Authority")
14 ] interface lsarpc
16 typedef bitmap security_secinfo security_secinfo;
18 typedef [public,noejs] struct {
19 [value(2*strlen_m(string))] uint16 length;
20 [value(2*strlen_m(string))] uint16 size;
21 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
22 } lsa_String;
24 typedef [public] struct {
25 [value(2*strlen_m(string))] uint16 length;
26 [value(2*(strlen_m(string)+1))] uint16 size;
27 [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string;
28 } lsa_StringLarge;
30 typedef [public] struct {
31 uint32 count;
32 [size_is(count)] lsa_String *names;
33 } lsa_Strings;
35 typedef [public] struct {
36 [value(strlen_m(string))] uint16 length;
37 [value(strlen_m(string))] uint16 size;
38 ascstr_noterm *string;
39 } lsa_AsciiString;
41 /******************/
42 /* Function: 0x00 */
43 NTSTATUS lsa_Close (
44 [in,out] policy_handle *handle
48 /******************/
49 /* Function: 0x01 */
50 [public] NTSTATUS lsa_Delete (
51 [in] policy_handle *handle
55 /******************/
56 /* Function: 0x02 */
57 typedef struct {
58 uint32 low;
59 uint32 high;
60 } lsa_LUID;
62 typedef struct {
63 lsa_StringLarge name;
64 lsa_LUID luid;
65 } lsa_PrivEntry;
67 typedef struct {
68 uint32 count;
69 [size_is(count)] lsa_PrivEntry *privs;
70 } lsa_PrivArray;
72 [public] NTSTATUS lsa_EnumPrivs (
73 [in] policy_handle *handle,
74 [in,out,ref] uint32 *resume_handle,
75 [out,ref] lsa_PrivArray *privs,
76 [in] uint32 max_count
79 /******************/
80 /* Function: 0x03 */
82 NTSTATUS lsa_QuerySecurity (
83 [in] policy_handle *handle,
84 [in] security_secinfo sec_info,
85 [out,ref] sec_desc_buf **sdbuf
89 /******************/
90 /* Function: 0x04 */
91 NTSTATUS lsa_SetSecObj(
92 [in] policy_handle *handle,
93 [in] security_secinfo sec_info,
94 [in,ref] sec_desc_buf *sdbuf
97 /******************/
98 /* Function: 0x05 */
99 NTSTATUS lsa_ChangePassword ();
102 /******************/
103 /* Function: 0x06 */
104 typedef struct {
105 uint32 len; /* ignored */
106 uint16 impersonation_level;
107 uint8 context_mode;
108 uint8 effective_only;
109 } lsa_QosInfo;
111 typedef struct {
112 uint32 len; /* ignored */
113 uint8 *root_dir;
114 [string,charset(UTF16)] uint16 *object_name;
115 uint32 attributes;
116 security_descriptor *sec_desc;
117 lsa_QosInfo *sec_qos;
118 } lsa_ObjectAttribute;
120 typedef [public,bitmap32bit] bitmap {
121 LSA_POLICY_VIEW_LOCAL_INFORMATION = 0x00000001,
122 LSA_POLICY_VIEW_AUDIT_INFORMATION = 0x00000002,
123 LSA_POLICY_GET_PRIVATE_INFORMATION = 0x00000004,
124 LSA_POLICY_TRUST_ADMIN = 0x00000008,
125 LSA_POLICY_CREATE_ACCOUNT = 0x00000010,
126 LSA_POLICY_CREATE_SECRET = 0x00000020,
127 LSA_POLICY_CREATE_PRIVILEGE = 0x00000040,
128 LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS = 0x00000080,
129 LSA_POLICY_SET_AUDIT_REQUIREMENTS = 0x00000100,
130 LSA_POLICY_AUDIT_LOG_ADMIN = 0x00000200,
131 LSA_POLICY_SERVER_ADMIN = 0x00000400,
132 LSA_POLICY_LOOKUP_NAMES = 0x00000800
133 } lsa_PolicyAccessMask;
135 /* notice the screwup with the system_name - thats why MS created
136 OpenPolicy2 */
137 [public] NTSTATUS lsa_OpenPolicy (
138 [in,unique] uint16 *system_name,
139 [in] lsa_ObjectAttribute *attr,
140 [in] lsa_PolicyAccessMask access_mask,
141 [out] policy_handle *handle
146 /******************/
147 /* Function: 0x07 */
149 typedef struct {
150 uint32 percent_full;
151 uint32 log_size;
152 NTTIME retention_time;
153 uint8 shutdown_in_progress;
154 NTTIME time_to_shutdown;
155 uint32 next_audit_record;
156 uint32 unknown;
157 } lsa_AuditLogInfo;
159 typedef [v1_enum] enum {
160 LSA_AUDIT_POLICY_NONE=0,
161 LSA_AUDIT_POLICY_SUCCESS=1,
162 LSA_AUDIT_POLICY_FAILURE=2,
163 LSA_AUDIT_POLICY_ALL=(LSA_AUDIT_POLICY_SUCCESS|LSA_AUDIT_POLICY_FAILURE),
164 LSA_AUDIT_POLICY_CLEAR=4
165 } lsa_PolicyAuditPolicy;
167 typedef enum {
168 LSA_AUDIT_CATEGORY_SYSTEM = 0,
169 LSA_AUDIT_CATEGORY_LOGON = 1,
170 LSA_AUDIT_CATEGORY_FILE_AND_OBJECT_ACCESS = 2,
171 LSA_AUDIT_CATEGORY_USE_OF_USER_RIGHTS = 3,
172 LSA_AUDIT_CATEGORY_PROCCESS_TRACKING = 4,
173 LSA_AUDIT_CATEGORY_SECURITY_POLICY_CHANGES = 5,
174 LSA_AUDIT_CATEGORY_ACCOUNT_MANAGEMENT = 6,
175 LSA_AUDIT_CATEGORY_DIRECTORY_SERVICE_ACCESS = 7, /* only in win2k/2k3 */
176 LSA_AUDIT_CATEGORY_ACCOUNT_LOGON = 8 /* only in win2k/2k3 */
177 } lsa_PolicyAuditEventType;
179 typedef struct {
180 uint32 auditing_mode;
181 [size_is(count)] lsa_PolicyAuditPolicy *settings;
182 uint32 count;
183 } lsa_AuditEventsInfo;
185 typedef struct {
186 lsa_StringLarge name;
187 dom_sid2 *sid;
188 } lsa_DomainInfo;
190 typedef struct {
191 lsa_String name;
192 } lsa_PDAccountInfo;
194 typedef struct {
195 uint16 unknown; /* an midl padding bug? */
196 uint16 role;
197 } lsa_ServerRole;
199 typedef struct {
200 lsa_String source;
201 lsa_String account;
202 } lsa_ReplicaSourceInfo;
204 typedef struct {
205 uint32 paged_pool;
206 uint32 non_paged_pool;
207 uint32 min_wss;
208 uint32 max_wss;
209 uint32 pagefile;
210 hyper unknown;
211 } lsa_DefaultQuotaInfo;
213 typedef struct {
214 hyper modified_id;
215 NTTIME db_create_time;
216 } lsa_ModificationInfo;
218 typedef struct {
219 uint8 shutdown_on_full;
220 } lsa_AuditFullSetInfo;
222 typedef struct {
223 uint16 unknown; /* an midl padding bug? */
224 uint8 shutdown_on_full;
225 uint8 log_is_full;
226 } lsa_AuditFullQueryInfo;
228 typedef struct {
229 /* it's important that we use the lsa_StringLarge here,
230 * because otherwise windows clients result with such dns hostnames
231 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
232 * where it should be
233 * w2k3-client.samba4.samba.org
235 lsa_StringLarge name;
236 lsa_StringLarge dns_domain;
237 lsa_StringLarge dns_forest;
238 GUID domain_guid;
239 dom_sid2 *sid;
240 } lsa_DnsDomainInfo;
242 typedef enum {
243 LSA_POLICY_INFO_AUDIT_LOG=1,
244 LSA_POLICY_INFO_AUDIT_EVENTS=2,
245 LSA_POLICY_INFO_DOMAIN=3,
246 LSA_POLICY_INFO_PD=4,
247 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
248 LSA_POLICY_INFO_ROLE=6,
249 LSA_POLICY_INFO_REPLICA=7,
250 LSA_POLICY_INFO_QUOTA=8,
251 LSA_POLICY_INFO_DB=9,
252 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
253 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
254 LSA_POLICY_INFO_DNS=12
255 } lsa_PolicyInfo;
257 typedef [switch_type(uint16)] union {
258 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
259 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
260 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
261 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
262 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
263 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
264 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
265 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
266 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
267 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
268 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
269 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
270 } lsa_PolicyInformation;
272 NTSTATUS lsa_QueryInfoPolicy(
273 [in] policy_handle *handle,
274 [in] lsa_PolicyInfo level,
275 [out,ref,switch_is(level)] lsa_PolicyInformation **info
278 /******************/
279 /* Function: 0x08 */
280 NTSTATUS lsa_SetInfoPolicy (
281 [in] policy_handle *handle,
282 [in] lsa_PolicyInfo level,
283 [in,switch_is(level)] lsa_PolicyInformation *info
286 /******************/
287 /* Function: 0x09 */
288 NTSTATUS lsa_ClearAuditLog ();
290 /******************/
291 /* Function: 0x0a */
292 [public] NTSTATUS lsa_CreateAccount (
293 [in] policy_handle *handle,
294 [in,ref] dom_sid2 *sid,
295 [in] uint32 access_mask,
296 [out] policy_handle *acct_handle
299 /******************/
300 /* NOTE: This only returns accounts that have at least
301 one privilege set
303 /* Function: 0x0b */
304 typedef struct {
305 dom_sid2 *sid;
306 } lsa_SidPtr;
308 typedef [public] struct {
309 [range(0,1000)] uint32 num_sids;
310 [size_is(num_sids)] lsa_SidPtr *sids;
311 } lsa_SidArray;
313 [public] NTSTATUS lsa_EnumAccounts (
314 [in] policy_handle *handle,
315 [in,out,ref] uint32 *resume_handle,
316 [out,ref] lsa_SidArray *sids,
317 [in,range(0,8192)] uint32 num_entries
321 /*************************************************/
322 /* Function: 0x0c */
324 [public] NTSTATUS lsa_CreateTrustedDomain(
325 [in] policy_handle *handle,
326 [in] lsa_DomainInfo *info,
327 [in] uint32 access_mask,
328 [out] policy_handle *trustdom_handle
332 /******************/
333 /* Function: 0x0d */
335 /* w2k3 treats max_size as max_domains*60 */
336 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
338 typedef struct {
339 uint32 count;
340 [size_is(count)] lsa_DomainInfo *domains;
341 } lsa_DomainList;
343 NTSTATUS lsa_EnumTrustDom (
344 [in] policy_handle *handle,
345 [in,out,ref] uint32 *resume_handle,
346 [out,ref] lsa_DomainList *domains,
347 [in] uint32 max_size
351 /******************/
352 /* Function: 0x0e */
353 typedef enum {
354 SID_NAME_USE_NONE = 0,/* NOTUSED */
355 SID_NAME_USER = 1, /* user */
356 SID_NAME_DOM_GRP = 2, /* domain group */
357 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
358 SID_NAME_ALIAS = 4, /* local group */
359 SID_NAME_WKN_GRP = 5, /* well-known group */
360 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
361 SID_NAME_INVALID = 7, /* invalid account */
362 SID_NAME_UNKNOWN = 8, /* oops. */
363 SID_NAME_COMPUTER = 9 /* machine */
364 } lsa_SidType;
366 typedef struct {
367 lsa_SidType sid_type;
368 uint32 rid;
369 uint32 sid_index;
370 } lsa_TranslatedSid;
372 typedef struct {
373 [range(0,1000)] uint32 count;
374 [size_is(count)] lsa_TranslatedSid *sids;
375 } lsa_TransSidArray;
377 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
378 typedef struct {
379 [range(0,1000)] uint32 count;
380 [size_is(count)] lsa_DomainInfo *domains;
381 uint32 max_size;
382 } lsa_RefDomainList;
384 /* Level 1: Ask everywhere
385 * Level 2: Ask domain and trusted domains, no builtin and wkn
386 * Level 3: Only ask domain
387 * Level 4: W2k3ad: Only ask AD trusts
388 * Level 5: Only ask transitive forest trusts
389 * Level 6: Like 4
392 typedef enum {
393 LSA_LOOKUP_NAMES_ALL = 1,
394 LSA_LOOKUP_NAMES_DOMAINS_ONLY = 2,
395 LSA_LOOKUP_NAMES_PRIMARY_DOMAIN_ONLY = 3,
396 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY = 4,
397 LSA_LOOKUP_NAMES_FOREST_TRUSTS_ONLY = 5,
398 LSA_LOOKUP_NAMES_UPLEVEL_TRUSTS_ONLY2 = 6
399 } lsa_LookupNamesLevel;
401 [public] NTSTATUS lsa_LookupNames (
402 [in] policy_handle *handle,
403 [in,range(0,1000)] uint32 num_names,
404 [in,size_is(num_names)] lsa_String names[],
405 [out,ref] lsa_RefDomainList **domains,
406 [in,out,ref] lsa_TransSidArray *sids,
407 [in] lsa_LookupNamesLevel level,
408 [in,out,ref] uint32 *count
412 /******************/
413 /* Function: 0x0f */
415 typedef struct {
416 lsa_SidType sid_type;
417 lsa_String name;
418 uint32 sid_index;
419 } lsa_TranslatedName;
421 typedef struct {
422 [range(0,1000)] uint32 count;
423 [size_is(count)] lsa_TranslatedName *names;
424 } lsa_TransNameArray;
426 [public] NTSTATUS lsa_LookupSids (
427 [in] policy_handle *handle,
428 [in,ref] lsa_SidArray *sids,
429 [out,ref] lsa_RefDomainList **domains,
430 [in,out,ref] lsa_TransNameArray *names,
431 [in] uint16 level,
432 [in,out,ref] uint32 *count
436 /* Function: 0x10 */
437 [public] NTSTATUS lsa_CreateSecret(
438 [in] policy_handle *handle,
439 [in] lsa_String name,
440 [in] uint32 access_mask,
441 [out] policy_handle *sec_handle
445 /*****************************************/
446 /* Function: 0x11 */
447 NTSTATUS lsa_OpenAccount(
448 [in] policy_handle *handle,
449 [in,ref] dom_sid2 *sid,
450 [in] uint32 access_mask,
451 [out] policy_handle *acct_handle
455 /****************************************/
456 /* Function: 0x12 */
458 typedef struct {
459 lsa_LUID luid;
460 uint32 attribute;
461 } lsa_LUIDAttribute;
463 typedef struct {
464 [range(0,1000)] uint32 count;
465 uint32 unknown;
466 [size_is(count)] lsa_LUIDAttribute set[*];
467 } lsa_PrivilegeSet;
469 NTSTATUS lsa_EnumPrivsAccount (
470 [in] policy_handle *handle,
471 [out,ref] lsa_PrivilegeSet **privs
475 /****************************************/
476 /* Function: 0x13 */
477 NTSTATUS lsa_AddPrivilegesToAccount(
478 [in] policy_handle *handle,
479 [in,ref] lsa_PrivilegeSet *privs
483 /****************************************/
484 /* Function: 0x14 */
485 NTSTATUS lsa_RemovePrivilegesFromAccount(
486 [in] policy_handle *handle,
487 [in] uint8 remove_all,
488 [in,unique] lsa_PrivilegeSet *privs
491 /* Function: 0x15 */
492 NTSTATUS lsa_GetQuotasForAccount();
494 /* Function: 0x16 */
495 NTSTATUS lsa_SetQuotasForAccount();
497 /* Function: 0x17 */
498 NTSTATUS lsa_GetSystemAccessAccount(
499 [in] policy_handle *handle,
500 [out,ref] uint32 *access_mask
503 /* Function: 0x18 */
504 NTSTATUS lsa_SetSystemAccessAccount(
505 [in] policy_handle *handle,
506 [in] uint32 access_mask
509 /* Function: 0x19 */
510 NTSTATUS lsa_OpenTrustedDomain(
511 [in] policy_handle *handle,
512 [in] dom_sid2 *sid,
513 [in] uint32 access_mask,
514 [out] policy_handle *trustdom_handle
517 typedef [flag(NDR_PAHEX)] struct {
518 uint32 length;
519 uint32 size;
520 [size_is(size),length_is(length)] uint8 *data;
521 } lsa_DATA_BUF;
523 typedef [flag(NDR_PAHEX)] struct {
524 [range(0,65536)] uint32 size;
525 [size_is(size)] uint8 *data;
526 } lsa_DATA_BUF2;
528 typedef enum {
529 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
530 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO = 2,
531 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
532 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
533 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
534 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
535 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
536 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
537 LSA_TRUSTED_DOMAIN_INFO_11 = 11,
538 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL = 12
539 } lsa_TrustDomInfoEnum;
541 typedef struct {
542 lsa_StringLarge netbios_name;
543 } lsa_TrustDomainInfoName;
545 typedef struct {
546 uint32 posix_offset;
547 } lsa_TrustDomainInfoPosixOffset;
549 typedef struct {
550 lsa_DATA_BUF *password;
551 lsa_DATA_BUF *old_password;
552 } lsa_TrustDomainInfoPassword;
554 typedef struct {
555 lsa_String netbios_name;
556 dom_sid2 *sid;
557 } lsa_TrustDomainInfoBasic;
559 typedef struct {
560 lsa_StringLarge domain_name;
561 lsa_StringLarge netbios_name;
562 dom_sid2 *sid;
563 uint32 trust_direction;
564 uint32 trust_type;
565 uint32 trust_attributes;
566 } lsa_TrustDomainInfoInfoEx;
568 typedef struct {
569 NTTIME_hyper last_update_time;
570 uint32 secret_type;
571 lsa_DATA_BUF2 data;
572 } lsa_TrustDomainInfoBuffer;
574 typedef struct {
575 uint32 incoming_count;
576 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
577 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
578 uint32 outgoing_count;
579 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
580 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
581 } lsa_TrustDomainInfoAuthInfo;
583 typedef struct {
584 lsa_TrustDomainInfoInfoEx info_ex;
585 lsa_TrustDomainInfoPosixOffset posix_offset;
586 lsa_TrustDomainInfoAuthInfo auth_info;
587 } lsa_TrustDomainInfoFullInfo;
589 typedef struct {
590 lsa_TrustDomainInfoInfoEx info_ex;
591 lsa_DATA_BUF2 data1;
592 } lsa_TrustDomainInfo11;
594 typedef struct {
595 lsa_TrustDomainInfoInfoEx info_ex;
596 lsa_DATA_BUF2 data1;
597 lsa_TrustDomainInfoPosixOffset posix_offset;
598 lsa_TrustDomainInfoAuthInfo auth_info;
599 } lsa_TrustDomainInfoInfoAll;
601 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
602 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name;
603 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] lsa_TrustDomainInfoPosixOffset posix_offset;
604 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password;
605 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] lsa_TrustDomainInfoBasic info_basic;
606 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex;
607 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info;
608 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info;
609 [case(LSA_TRUSTED_DOMAIN_INFO_11)] lsa_TrustDomainInfo11 info11;
610 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all;
611 } lsa_TrustedDomainInfo;
613 /* Function: 0x1a */
614 NTSTATUS lsa_QueryTrustedDomainInfo(
615 [in] policy_handle *trustdom_handle,
616 [in] lsa_TrustDomInfoEnum level,
617 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
620 /* Function: 0x1b */
621 NTSTATUS lsa_SetInformationTrustedDomain();
623 /* Function: 0x1c */
624 [public] NTSTATUS lsa_OpenSecret(
625 [in] policy_handle *handle,
626 [in] lsa_String name,
627 [in] uint32 access_mask,
628 [out] policy_handle *sec_handle
631 /* Function: 0x1d */
633 [public] NTSTATUS lsa_SetSecret(
634 [in] policy_handle *sec_handle,
635 [in,unique] lsa_DATA_BUF *new_val,
636 [in,unique] lsa_DATA_BUF *old_val
639 typedef struct {
640 lsa_DATA_BUF *buf;
641 } lsa_DATA_BUF_PTR;
643 /* Function: 0x1e */
644 [public] NTSTATUS lsa_QuerySecret (
645 [in] policy_handle *sec_handle,
646 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
647 [in,out,unique] NTTIME_hyper *new_mtime,
648 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
649 [in,out,unique] NTTIME_hyper *old_mtime
652 /* Function: 0x1f */
653 NTSTATUS lsa_LookupPrivValue(
654 [in] policy_handle *handle,
655 [in,ref] lsa_String *name,
656 [out,ref] lsa_LUID *luid
660 /* Function: 0x20 */
661 NTSTATUS lsa_LookupPrivName (
662 [in] policy_handle *handle,
663 [in] lsa_LUID *luid,
664 [out,unique] lsa_StringLarge *name
668 /*******************/
669 /* Function: 0x21 */
670 NTSTATUS lsa_LookupPrivDisplayName (
671 [in] policy_handle *handle,
672 [in,ref] lsa_String *name,
673 [in] uint16 language_id,
674 [in] uint16 language_id_sys,
675 [out,ref] lsa_StringLarge **disp_name,
676 /* see http://www.microsoft.com/globaldev/nlsweb/ for
677 language definitions */
678 [out,ref] uint16 *returned_language_id
681 /* Function: 0x22 */
682 NTSTATUS lsa_DeleteObject(
683 [in,out] policy_handle *handle
686 /*******************/
687 /* Function: 0x23 */
688 NTSTATUS lsa_EnumAccountsWithUserRight (
689 [in] policy_handle *handle,
690 [in,unique] lsa_String *name,
691 [out] lsa_SidArray *sids
694 /* Function: 0x24 */
695 typedef struct {
696 [string,charset(UTF16)] uint16 *name;
697 } lsa_RightAttribute;
699 typedef struct {
700 [range(0,256)] uint32 count;
701 [size_is(count)] lsa_StringLarge *names;
702 } lsa_RightSet;
704 NTSTATUS lsa_EnumAccountRights (
705 [in] policy_handle *handle,
706 [in,ref] dom_sid2 *sid,
707 [out,ref] lsa_RightSet *rights
711 /**********************/
712 /* Function: 0x25 */
713 NTSTATUS lsa_AddAccountRights (
714 [in] policy_handle *handle,
715 [in,ref] dom_sid2 *sid,
716 [in,ref] lsa_RightSet *rights
719 /**********************/
720 /* Function: 0x26 */
721 NTSTATUS lsa_RemoveAccountRights (
722 [in] policy_handle *handle,
723 [in,ref] dom_sid2 *sid,
724 [in] uint8 remove_all,
725 [in,ref] lsa_RightSet *rights
728 /* Function: 0x27 */
729 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
730 [in] policy_handle *handle,
731 [in] dom_sid2 *dom_sid,
732 [in] lsa_TrustDomInfoEnum level,
733 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
736 /* Function: 0x28 */
737 NTSTATUS lsa_SetTrustedDomainInfo();
738 /* Function: 0x29 */
739 NTSTATUS lsa_DeleteTrustedDomain(
740 [in] policy_handle *handle,
741 [in] dom_sid2 *dom_sid
744 /* Function: 0x2a */
745 NTSTATUS lsa_StorePrivateData();
746 /* Function: 0x2b */
747 NTSTATUS lsa_RetrievePrivateData();
750 /**********************/
751 /* Function: 0x2c */
752 [public] NTSTATUS lsa_OpenPolicy2 (
753 [in,unique] [string,charset(UTF16)] uint16 *system_name,
754 [in] lsa_ObjectAttribute *attr,
755 [in] lsa_PolicyAccessMask access_mask,
756 [out] policy_handle *handle
759 /**********************/
760 /* Function: 0x2d */
761 NTSTATUS lsa_GetUserName(
762 [in,unique] [string,charset(UTF16)] uint16 *system_name,
763 [in,out,ref] lsa_String **account_name,
764 [in,out,unique] lsa_String **authority_name
767 /**********************/
768 /* Function: 0x2e */
770 NTSTATUS lsa_QueryInfoPolicy2(
771 [in] policy_handle *handle,
772 [in] lsa_PolicyInfo level,
773 [out,ref,switch_is(level)] lsa_PolicyInformation **info
776 /* Function 0x2f */
777 NTSTATUS lsa_SetInfoPolicy2(
778 [in] policy_handle *handle,
779 [in] lsa_PolicyInfo level,
780 [in,switch_is(level)] lsa_PolicyInformation *info
783 /**********************/
784 /* Function 0x30 */
785 NTSTATUS lsa_QueryTrustedDomainInfoByName(
786 [in] policy_handle *handle,
787 [in,ref] lsa_String *trusted_domain,
788 [in] lsa_TrustDomInfoEnum level,
789 [out,ref,switch_is(level)] lsa_TrustedDomainInfo *info
792 /**********************/
793 /* Function 0x31 */
794 NTSTATUS lsa_SetTrustedDomainInfoByName(
795 [in] policy_handle *handle,
796 [in] lsa_String trusted_domain,
797 [in] lsa_TrustDomInfoEnum level,
798 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
801 /* Function 0x32 */
803 /* w2k3 treats max_size as max_domains*82 */
804 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
806 typedef struct {
807 uint32 count;
808 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
809 } lsa_DomainListEx;
811 NTSTATUS lsa_EnumTrustedDomainsEx (
812 [in] policy_handle *handle,
813 [in,out] uint32 *resume_handle,
814 [out] lsa_DomainListEx *domains,
815 [in] uint32 max_size
819 /* Function 0x33 */
820 NTSTATUS lsa_CreateTrustedDomainEx();
822 /* Function 0x34 */
823 NTSTATUS lsa_CloseTrustedDomainEx(
824 [in,out] policy_handle *handle
827 /* Function 0x35 */
829 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
830 for unknown6 - gd */
831 typedef struct {
832 uint32 enforce_restrictions;
833 hyper service_tkt_lifetime;
834 hyper user_tkt_lifetime;
835 hyper user_tkt_renewaltime;
836 hyper clock_skew;
837 hyper unknown6;
838 } lsa_DomainInfoKerberos;
840 typedef struct {
841 uint32 blob_size;
842 [size_is(blob_size)] uint8 *efs_blob;
843 } lsa_DomainInfoEfs;
845 typedef enum {
846 LSA_DOMAIN_INFO_POLICY_EFS=2,
847 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
848 } lsa_DomainInfoEnum;
850 typedef [switch_type(uint16)] union {
851 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
852 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
853 } lsa_DomainInformationPolicy;
855 NTSTATUS lsa_QueryDomainInformationPolicy(
856 [in] policy_handle *handle,
857 [in] uint16 level,
858 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
861 /* Function 0x36 */
862 NTSTATUS lsa_SetDomainInformationPolicy(
863 [in] policy_handle *handle,
864 [in] uint16 level,
865 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
868 /**********************/
869 /* Function 0x37 */
870 NTSTATUS lsa_OpenTrustedDomainByName(
871 [in] policy_handle *handle,
872 [in] lsa_String name,
873 [in] uint32 access_mask,
874 [out] policy_handle *trustdom_handle
877 /* Function 0x38 */
878 NTSTATUS lsa_TestCall();
880 /**********************/
881 /* Function 0x39 */
883 typedef struct {
884 lsa_SidType sid_type;
885 lsa_String name;
886 uint32 sid_index;
887 uint32 unknown;
888 } lsa_TranslatedName2;
890 typedef struct {
891 [range(0,1000)] uint32 count;
892 [size_is(count)] lsa_TranslatedName2 *names;
893 } lsa_TransNameArray2;
895 [public] NTSTATUS lsa_LookupSids2(
896 [in] policy_handle *handle,
897 [in,ref] lsa_SidArray *sids,
898 [out,ref] lsa_RefDomainList **domains,
899 [in,out,ref] lsa_TransNameArray2 *names,
900 [in] uint16 level,
901 [in,out,ref] uint32 *count,
902 [in] uint32 unknown1,
903 [in] uint32 unknown2
906 /**********************/
907 /* Function 0x3a */
909 typedef struct {
910 lsa_SidType sid_type;
911 uint32 rid;
912 uint32 sid_index;
913 uint32 unknown;
914 } lsa_TranslatedSid2;
916 typedef struct {
917 [range(0,1000)] uint32 count;
918 [size_is(count)] lsa_TranslatedSid2 *sids;
919 } lsa_TransSidArray2;
921 [public] NTSTATUS lsa_LookupNames2 (
922 [in] policy_handle *handle,
923 [in,range(0,1000)] uint32 num_names,
924 [in,size_is(num_names)] lsa_String names[],
925 [out,ref] lsa_RefDomainList **domains,
926 [in,out,ref] lsa_TransSidArray2 *sids,
927 [in] lsa_LookupNamesLevel level,
928 [in,out,ref] uint32 *count,
929 [in] uint32 unknown1,
930 [in] uint32 unknown2
933 /* Function 0x3b */
934 NTSTATUS lsa_CreateTrustedDomainEx2();
936 /* Function 0x3c */
937 NTSTATUS lsa_CREDRWRITE();
939 /* Function 0x3d */
940 NTSTATUS lsa_CREDRREAD();
942 /* Function 0x3e */
943 NTSTATUS lsa_CREDRENUMERATE();
945 /* Function 0x3f */
946 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
948 /* Function 0x40 */
949 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
951 /* Function 0x41 */
952 NTSTATUS lsa_CREDRDELETE();
954 /* Function 0x42 */
955 NTSTATUS lsa_CREDRGETTARGETINFO();
957 /* Function 0x43 */
958 NTSTATUS lsa_CREDRPROFILELOADED();
960 /**********************/
961 /* Function 0x44 */
962 typedef struct {
963 lsa_SidType sid_type;
964 dom_sid2 *sid;
965 uint32 sid_index;
966 uint32 unknown;
967 } lsa_TranslatedSid3;
969 typedef struct {
970 [range(0,1000)] uint32 count;
971 [size_is(count)] lsa_TranslatedSid3 *sids;
972 } lsa_TransSidArray3;
974 [public] NTSTATUS lsa_LookupNames3 (
975 [in] policy_handle *handle,
976 [in,range(0,1000)] uint32 num_names,
977 [in,size_is(num_names)] lsa_String names[],
978 [out,ref] lsa_RefDomainList **domains,
979 [in,out,ref] lsa_TransSidArray3 *sids,
980 [in] lsa_LookupNamesLevel level,
981 [in,out,ref] uint32 *count,
982 [in] uint32 unknown1,
983 [in] uint32 unknown2
986 /* Function 0x45 */
987 NTSTATUS lsa_CREDRGETSESSIONTYPES();
989 /* Function 0x46 */
990 NTSTATUS lsa_LSARREGISTERAUDITEVENT();
992 /* Function 0x47 */
993 NTSTATUS lsa_LSARGENAUDITEVENT();
995 /* Function 0x48 */
996 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
998 /* Function 0x49 */
999 typedef struct {
1000 [range(0,131072)] uint32 length;
1001 [size_is(length)] uint8 *data;
1002 } lsa_ForestTrustBinaryData;
1004 typedef struct {
1005 dom_sid2 *domain_sid;
1006 lsa_StringLarge dns_domain_name;
1007 lsa_StringLarge netbios_domain_name;
1008 } lsa_ForestTrustDomainInfo;
1010 typedef [switch_type(uint32)] union {
1011 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME)] lsa_String top_level_name;
1012 [case(LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX)] lsa_StringLarge top_level_name_ex;
1013 [case(LSA_FOREST_TRUST_DOMAIN_INFO)] lsa_ForestTrustDomainInfo domain_info;
1014 [default] lsa_ForestTrustBinaryData data;
1015 } lsa_ForestTrustData;
1017 typedef [v1_enum] enum {
1018 LSA_FOREST_TRUST_TOP_LEVEL_NAME = 0,
1019 LSA_FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
1020 LSA_FOREST_TRUST_DOMAIN_INFO = 2,
1021 LSA_FOREST_TRUST_RECORD_TYPE_LAST = 3
1022 } lsa_ForestTrustRecordType;
1024 typedef struct {
1025 uint32 flags;
1026 lsa_ForestTrustRecordType level;
1027 hyper unknown;
1028 [switch_is(level)] lsa_ForestTrustData forest_trust_data;
1029 } lsa_ForestTrustRecord;
1031 typedef [public] struct {
1032 [range(0,4000)] uint32 count;
1033 [size_is(count)] lsa_ForestTrustRecord **entries;
1034 } lsa_ForestTrustInformation;
1036 NTSTATUS lsa_lsaRQueryForestTrustInformation(
1037 [in] policy_handle *handle,
1038 [in,ref] lsa_String *trusted_domain_name,
1039 [in] uint16 unknown, /* level ? */
1040 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1043 /* Function 0x4a */
1044 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
1046 /* Function 0x4b */
1047 NTSTATUS lsa_CREDRRENAME();
1049 /*****************/
1050 /* Function 0x4c */
1052 [public] NTSTATUS lsa_LookupSids3(
1053 [in,ref] lsa_SidArray *sids,
1054 [out,ref] lsa_RefDomainList **domains,
1055 [in,out,ref] lsa_TransNameArray2 *names,
1056 [in] uint16 level,
1057 [in,out,ref] uint32 *count,
1058 [in] uint32 unknown1,
1059 [in] uint32 unknown2
1062 /* Function 0x4d */
1063 NTSTATUS lsa_LookupNames4(
1064 [in,range(0,1000)] uint32 num_names,
1065 [in,size_is(num_names)] lsa_String names[],
1066 [out,ref] lsa_RefDomainList **domains,
1067 [in,out,ref] lsa_TransSidArray3 *sids,
1068 [in] lsa_LookupNamesLevel level,
1069 [in,out,ref] uint32 *count,
1070 [in] uint32 unknown1,
1071 [in] uint32 unknown2
1074 /* Function 0x4e */
1075 NTSTATUS lsa_LSAROPENPOLICYSCE();
1077 /* Function 0x4f */
1078 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
1080 /* Function 0x50 */
1081 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
1083 /* Function 0x51 */
1084 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();