idl: Replace non-standard "declare" keyword with typedef and regenerate.
[Samba/bb.git] / source3 / librpc / idl / lsa.idl
blob6cf57b88d4cd27573ef590f56c68da7521638ccb
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 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 NTSTATUS lsa_EnumPrivs (
73 [in] policy_handle *handle,
74 [in,out] uint32 *resume_handle,
75 [in] uint32 max_count,
76 [out] lsa_PrivArray *privs
79 /******************/
80 /* Function: 0x03 */
82 NTSTATUS lsa_QuerySecurity (
83 [in] policy_handle *handle,
84 [in] security_secinfo sec_info,
85 [out,unique] sec_desc_buf *sdbuf
89 /******************/
90 /* Function: 0x04 */
91 NTSTATUS lsa_SetSecObj ();
94 /******************/
95 /* Function: 0x05 */
96 NTSTATUS lsa_ChangePassword ();
99 /******************/
100 /* Function: 0x06 */
101 typedef struct {
102 uint32 len; /* ignored */
103 uint16 impersonation_level;
104 uint8 context_mode;
105 uint8 effective_only;
106 } lsa_QosInfo;
108 typedef struct {
109 uint32 len; /* ignored */
110 uint8 *root_dir;
111 [string,charset(UTF16)] uint16 *object_name;
112 uint32 attributes;
113 security_descriptor *sec_desc;
114 lsa_QosInfo *sec_qos;
115 } lsa_ObjectAttribute;
117 /* notice the screwup with the system_name - thats why MS created
118 OpenPolicy2 */
119 NTSTATUS lsa_OpenPolicy (
120 [in,unique] uint16 *system_name,
121 [in] lsa_ObjectAttribute *attr,
122 [in] uint32 access_mask,
123 [out] policy_handle *handle
128 /******************/
129 /* Function: 0x07 */
131 typedef struct {
132 uint32 percent_full;
133 uint32 log_size;
134 NTTIME retention_time;
135 uint8 shutdown_in_progress;
136 NTTIME time_to_shutdown;
137 uint32 next_audit_record;
138 uint32 unknown;
139 } lsa_AuditLogInfo;
141 typedef struct {
142 uint32 auditing_mode;
143 [size_is(count)] uint32 *settings;
144 uint32 count;
145 } lsa_AuditEventsInfo;
147 typedef struct {
148 lsa_StringLarge name;
149 dom_sid2 *sid;
150 } lsa_DomainInfo;
152 typedef struct {
153 lsa_String name;
154 } lsa_PDAccountInfo;
156 typedef struct {
157 uint16 unknown; /* an midl padding bug? */
158 uint16 role;
159 } lsa_ServerRole;
161 typedef struct {
162 lsa_String source;
163 lsa_String account;
164 } lsa_ReplicaSourceInfo;
166 typedef struct {
167 uint32 paged_pool;
168 uint32 non_paged_pool;
169 uint32 min_wss;
170 uint32 max_wss;
171 uint32 pagefile;
172 hyper unknown;
173 } lsa_DefaultQuotaInfo;
175 typedef struct {
176 hyper modified_id;
177 NTTIME db_create_time;
178 } lsa_ModificationInfo;
180 typedef struct {
181 uint8 shutdown_on_full;
182 } lsa_AuditFullSetInfo;
184 typedef struct {
185 uint16 unknown; /* an midl padding bug? */
186 uint8 shutdown_on_full;
187 uint8 log_is_full;
188 } lsa_AuditFullQueryInfo;
190 typedef struct {
191 /* it's important that we use the lsa_StringLarge here,
192 * because otherwise windows clients result with such dns hostnames
193 * e.g. w2k3-client.samba4.samba.orgsamba4.samba.org
194 * where it should be
195 * w2k3-client.samba4.samba.org
197 lsa_StringLarge name;
198 lsa_StringLarge dns_domain;
199 lsa_StringLarge dns_forest;
200 GUID domain_guid;
201 dom_sid2 *sid;
202 } lsa_DnsDomainInfo;
204 typedef enum {
205 LSA_POLICY_INFO_AUDIT_LOG=1,
206 LSA_POLICY_INFO_AUDIT_EVENTS=2,
207 LSA_POLICY_INFO_DOMAIN=3,
208 LSA_POLICY_INFO_PD=4,
209 LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
210 LSA_POLICY_INFO_ROLE=6,
211 LSA_POLICY_INFO_REPLICA=7,
212 LSA_POLICY_INFO_QUOTA=8,
213 LSA_POLICY_INFO_DB=9,
214 LSA_POLICY_INFO_AUDIT_FULL_SET=10,
215 LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
216 LSA_POLICY_INFO_DNS=12
217 } lsaPolicyInfo;
219 typedef [switch_type(uint16)] union {
220 [case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
221 [case(LSA_POLICY_INFO_AUDIT_EVENTS)] lsa_AuditEventsInfo audit_events;
222 [case(LSA_POLICY_INFO_DOMAIN)] lsa_DomainInfo domain;
223 [case(LSA_POLICY_INFO_PD)] lsa_PDAccountInfo pd;
224 [case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] lsa_DomainInfo account_domain;
225 [case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
226 [case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
227 [case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
228 [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
229 [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
230 [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
231 [case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
232 } lsa_PolicyInformation;
234 NTSTATUS lsa_QueryInfoPolicy (
235 [in] policy_handle *handle,
236 [in] uint16 level,
237 [out,unique,switch_is(level)] lsa_PolicyInformation *info
240 /******************/
241 /* Function: 0x08 */
242 NTSTATUS lsa_SetInfoPolicy ();
244 /******************/
245 /* Function: 0x09 */
246 NTSTATUS lsa_ClearAuditLog ();
248 /******************/
249 /* Function: 0x0a */
250 NTSTATUS lsa_CreateAccount (
251 [in] policy_handle *handle,
252 [in] dom_sid2 *sid,
253 [in] uint32 access_mask,
254 [out] policy_handle *acct_handle
257 /******************/
258 /* NOTE: This only returns accounts that have at least
259 one privilege set
261 /* Function: 0x0b */
262 typedef struct {
263 dom_sid2 *sid;
264 } lsa_SidPtr;
266 typedef [public] struct {
267 [range(0,1000)] uint32 num_sids;
268 [size_is(num_sids)] lsa_SidPtr *sids;
269 } lsa_SidArray;
271 NTSTATUS lsa_EnumAccounts (
272 [in] policy_handle *handle,
273 [in,out] uint32 *resume_handle,
274 [in,range(0,8192)] uint32 num_entries,
275 [out] lsa_SidArray *sids
279 /*************************************************/
280 /* Function: 0x0c */
282 NTSTATUS lsa_CreateTrustedDomain(
283 [in] policy_handle *handle,
284 [in] lsa_DomainInfo *info,
285 [in] uint32 access_mask,
286 [out] policy_handle *trustdom_handle
290 /******************/
291 /* Function: 0x0d */
293 /* w2k3 treats max_size as max_domains*60 */
294 const int LSA_ENUM_TRUST_DOMAIN_MULTIPLIER = 60;
296 typedef struct {
297 uint32 count;
298 [size_is(count)] lsa_DomainInfo *domains;
299 } lsa_DomainList;
301 NTSTATUS lsa_EnumTrustDom (
302 [in] policy_handle *handle,
303 [in,out] uint32 *resume_handle,
304 [in,range(0,1000)] uint32 max_size,
305 [out] lsa_DomainList *domains
309 /******************/
310 /* Function: 0x0e */
311 typedef enum {
312 SID_NAME_USE_NONE = 0,/* NOTUSED */
313 SID_NAME_USER = 1, /* user */
314 SID_NAME_DOM_GRP = 2, /* domain group */
315 SID_NAME_DOMAIN = 3, /* domain: don't know what this is */
316 SID_NAME_ALIAS = 4, /* local group */
317 SID_NAME_WKN_GRP = 5, /* well-known group */
318 SID_NAME_DELETED = 6, /* deleted account: needed for c2 rating */
319 SID_NAME_INVALID = 7, /* invalid account */
320 SID_NAME_UNKNOWN = 8, /* oops. */
321 SID_NAME_COMPUTER = 9 /* machine */
322 } lsa_SidType;
324 typedef struct {
325 lsa_SidType sid_type;
326 uint32 rid;
327 uint32 sid_index;
328 } lsa_TranslatedSid;
330 typedef struct {
331 [range(0,1000)] uint32 count;
332 [size_is(count)] lsa_TranslatedSid *sids;
333 } lsa_TransSidArray;
335 const int LSA_REF_DOMAIN_LIST_MULTIPLIER = 32;
336 typedef struct {
337 [range(0,1000)] uint32 count;
338 [size_is(count)] lsa_DomainInfo *domains;
339 uint32 max_size;
340 } lsa_RefDomainList;
342 NTSTATUS lsa_LookupNames (
343 [in] policy_handle *handle,
344 [in,range(0,1000)] uint32 num_names,
345 [in,size_is(num_names)] lsa_String names[],
346 [out,unique] lsa_RefDomainList *domains,
347 [in,out] lsa_TransSidArray *sids,
348 [in] uint16 level,
349 [in,out] uint32 *count
353 /******************/
354 /* Function: 0x0f */
356 typedef struct {
357 lsa_SidType sid_type;
358 lsa_String name;
359 uint32 sid_index;
360 } lsa_TranslatedName;
362 typedef struct {
363 [range(0,1000)] uint32 count;
364 [size_is(count)] lsa_TranslatedName *names;
365 } lsa_TransNameArray;
367 NTSTATUS lsa_LookupSids (
368 [in] policy_handle *handle,
369 [in] lsa_SidArray *sids,
370 [out,unique] lsa_RefDomainList *domains,
371 [in,out] lsa_TransNameArray *names,
372 [in] uint16 level,
373 [in,out] uint32 *count
377 /* Function: 0x10 */
378 NTSTATUS lsa_CreateSecret(
379 [in] policy_handle *handle,
380 [in] lsa_String name,
381 [in] uint32 access_mask,
382 [out] policy_handle *sec_handle
386 /*****************************************/
387 /* Function: 0x11 */
388 NTSTATUS lsa_OpenAccount (
389 [in] policy_handle *handle,
390 [in] dom_sid2 *sid,
391 [in] uint32 access_mask,
392 [out] policy_handle *acct_handle
396 /****************************************/
397 /* Function: 0x12 */
399 typedef struct {
400 lsa_LUID luid;
401 uint32 attribute;
402 } lsa_LUIDAttribute;
404 typedef struct {
405 [range(0,1000)] uint32 count;
406 uint32 unknown;
407 [size_is(count)] lsa_LUIDAttribute set[*];
408 } lsa_PrivilegeSet;
410 NTSTATUS lsa_EnumPrivsAccount (
411 [in] policy_handle *handle,
412 [out,unique] lsa_PrivilegeSet *privs
416 /****************************************/
417 /* Function: 0x13 */
418 NTSTATUS lsa_AddPrivilegesToAccount(
419 [in] policy_handle *handle,
420 [in] lsa_PrivilegeSet *privs
424 /****************************************/
425 /* Function: 0x14 */
426 NTSTATUS lsa_RemovePrivilegesFromAccount(
427 [in] policy_handle *handle,
428 [in] uint8 remove_all,
429 [in,unique] lsa_PrivilegeSet *privs
432 /* Function: 0x15 */
433 NTSTATUS lsa_GetQuotasForAccount();
435 /* Function: 0x16 */
436 NTSTATUS lsa_SetQuotasForAccount();
438 /* Function: 0x17 */
439 NTSTATUS lsa_GetSystemAccessAccount();
440 /* Function: 0x18 */
441 NTSTATUS lsa_SetSystemAccessAccount();
443 /* Function: 0x19 */
444 NTSTATUS lsa_OpenTrustedDomain(
445 [in] policy_handle *handle,
446 [in] dom_sid2 *sid,
447 [in] uint32 access_mask,
448 [out] policy_handle *trustdom_handle
451 typedef [flag(NDR_PAHEX)] struct {
452 uint32 length;
453 uint32 size;
454 [size_is(size),length_is(length)] uint8 *data;
455 } lsa_DATA_BUF;
457 typedef [flag(NDR_PAHEX)] struct {
458 [range(0,65536)] uint32 size;
459 [size_is(size)] uint8 *data;
460 } lsa_DATA_BUF2;
462 typedef enum {
463 LSA_TRUSTED_DOMAIN_INFO_NAME = 1,
464 LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO = 2,
465 LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET = 3,
466 LSA_TRUSTED_DOMAIN_INFO_PASSWORD = 4,
467 LSA_TRUSTED_DOMAIN_INFO_BASIC = 5,
468 LSA_TRUSTED_DOMAIN_INFO_INFO_EX = 6,
469 LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO = 7,
470 LSA_TRUSTED_DOMAIN_INFO_FULL_INFO = 8,
471 LSA_TRUSTED_DOMAIN_INFO_11 = 11,
472 LSA_TRUSTED_DOMAIN_INFO_INFO_ALL = 12
473 } lsa_TrustDomInfoEnum;
475 typedef struct {
476 lsa_StringLarge netbios_name;
477 } lsa_TrustDomainInfoName;
479 typedef struct {
480 uint32 posix_offset;
481 } lsa_TrustDomainInfoPosixOffset;
483 typedef struct {
484 lsa_DATA_BUF *password;
485 lsa_DATA_BUF *old_password;
486 } lsa_TrustDomainInfoPassword;
488 typedef struct {
489 lsa_String netbios_name;
490 dom_sid2 *sid;
491 } lsa_TrustDomainInfoBasic;
493 typedef struct {
494 lsa_StringLarge domain_name;
495 lsa_StringLarge netbios_name;
496 dom_sid2 *sid;
497 uint32 trust_direction;
498 uint32 trust_type;
499 uint32 trust_attributes;
500 } lsa_TrustDomainInfoInfoEx;
502 typedef struct {
503 NTTIME_hyper last_update_time;
504 uint32 secret_type;
505 lsa_DATA_BUF2 data;
506 } lsa_TrustDomainInfoBuffer;
508 typedef struct {
509 uint32 incoming_count;
510 lsa_TrustDomainInfoBuffer *incoming_current_auth_info;
511 lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;
512 uint32 outgoing_count;
513 lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;
514 lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;
515 } lsa_TrustDomainInfoAuthInfo;
517 typedef struct {
518 lsa_TrustDomainInfoInfoEx info_ex;
519 lsa_TrustDomainInfoPosixOffset posix_offset;
520 lsa_TrustDomainInfoAuthInfo auth_info;
521 } lsa_TrustDomainInfoFullInfo;
523 typedef struct {
524 lsa_TrustDomainInfoInfoEx info_ex;
525 lsa_DATA_BUF2 data1;
526 } lsa_TrustDomainInfo11;
528 typedef struct {
529 lsa_TrustDomainInfoInfoEx info_ex;
530 lsa_DATA_BUF2 data1;
531 lsa_TrustDomainInfoPosixOffset posix_offset;
532 lsa_TrustDomainInfoAuthInfo auth_info;
533 } lsa_TrustDomainInfoInfoAll;
535 typedef [switch_type(lsa_TrustDomInfoEnum)] union {
536 [case(LSA_TRUSTED_DOMAIN_INFO_NAME)] lsa_TrustDomainInfoName name;
537 [case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] lsa_TrustDomainInfoPosixOffset posix_offset;
538 [case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] lsa_TrustDomainInfoPassword password;
539 [case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] lsa_TrustDomainInfoBasic info_basic;
540 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] lsa_TrustDomainInfoInfoEx info_ex;
541 [case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] lsa_TrustDomainInfoAuthInfo auth_info;
542 [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] lsa_TrustDomainInfoFullInfo full_info;
543 [case(LSA_TRUSTED_DOMAIN_INFO_11)] lsa_TrustDomainInfo11 info11;
544 [case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] lsa_TrustDomainInfoInfoAll info_all;
545 } lsa_TrustedDomainInfo;
547 /* Function: 0x1a */
548 NTSTATUS lsa_QueryTrustedDomainInfo(
549 [in] policy_handle *trustdom_handle,
550 [in] lsa_TrustDomInfoEnum level,
551 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
554 /* Function: 0x1b */
555 NTSTATUS lsa_SetInformationTrustedDomain();
557 /* Function: 0x1c */
558 NTSTATUS lsa_OpenSecret(
559 [in] policy_handle *handle,
560 [in] lsa_String name,
561 [in] uint32 access_mask,
562 [out] policy_handle *sec_handle
565 /* Function: 0x1d */
567 NTSTATUS lsa_SetSecret(
568 [in] policy_handle *sec_handle,
569 [in,unique] lsa_DATA_BUF *new_val,
570 [in,unique] lsa_DATA_BUF *old_val
573 typedef struct {
574 lsa_DATA_BUF *buf;
575 } lsa_DATA_BUF_PTR;
577 /* Function: 0x1e */
578 NTSTATUS lsa_QuerySecret (
579 [in] policy_handle *sec_handle,
580 [in,out,unique] lsa_DATA_BUF_PTR *new_val,
581 [in,out,unique] NTTIME_hyper *new_mtime,
582 [in,out,unique] lsa_DATA_BUF_PTR *old_val,
583 [in,out,unique] NTTIME_hyper *old_mtime
586 /* Function: 0x1f */
587 NTSTATUS lsa_LookupPrivValue(
588 [in] policy_handle *handle,
589 [in] lsa_String *name,
590 [out] lsa_LUID *luid
594 /* Function: 0x20 */
595 NTSTATUS lsa_LookupPrivName (
596 [in] policy_handle *handle,
597 [in] lsa_LUID *luid,
598 [out,unique] lsa_StringLarge *name
602 /*******************/
603 /* Function: 0x21 */
604 NTSTATUS lsa_LookupPrivDisplayName (
605 [in] policy_handle *handle,
606 [in] lsa_String *name,
607 [out,unique] lsa_StringLarge *disp_name,
608 /* see http://www.microsoft.com/globaldev/nlsweb/ for
609 language definitions */
610 [in,out] uint16 *language_id,
611 [in] uint16 unknown
614 /* Function: 0x22 */
615 NTSTATUS lsa_DeleteObject();
618 /*******************/
619 /* Function: 0x23 */
620 NTSTATUS lsa_EnumAccountsWithUserRight (
621 [in] policy_handle *handle,
622 [in,unique] lsa_String *name,
623 [out] lsa_SidArray *sids
626 /* Function: 0x24 */
627 typedef struct {
628 [string,charset(UTF16)] uint16 *name;
629 } lsa_RightAttribute;
631 typedef struct {
632 uint32 count;
633 [size_is(count)] lsa_StringLarge *names;
634 } lsa_RightSet;
636 NTSTATUS lsa_EnumAccountRights (
637 [in] policy_handle *handle,
638 [in] dom_sid2 *sid,
639 [out] lsa_RightSet *rights
643 /**********************/
644 /* Function: 0x25 */
645 NTSTATUS lsa_AddAccountRights (
646 [in] policy_handle *handle,
647 [in] dom_sid2 *sid,
648 [in] lsa_RightSet *rights
651 /**********************/
652 /* Function: 0x26 */
653 NTSTATUS lsa_RemoveAccountRights (
654 [in] policy_handle *handle,
655 [in] dom_sid2 *sid,
656 [in] uint32 unknown,
657 [in] lsa_RightSet *rights
660 /* Function: 0x27 */
661 NTSTATUS lsa_QueryTrustedDomainInfoBySid(
662 [in] policy_handle *handle,
663 [in] dom_sid2 *dom_sid,
664 [in] lsa_TrustDomInfoEnum level,
665 [out,switch_is(level),unique] lsa_TrustedDomainInfo *info
668 /* Function: 0x28 */
669 NTSTATUS lsa_SetTrustedDomainInfo();
670 /* Function: 0x29 */
671 NTSTATUS lsa_DeleteTrustedDomain(
672 [in] policy_handle *handle,
673 [in] dom_sid2 *dom_sid
676 /* Function: 0x2a */
677 NTSTATUS lsa_StorePrivateData();
678 /* Function: 0x2b */
679 NTSTATUS lsa_RetrievePrivateData();
682 /**********************/
683 /* Function: 0x2c */
684 NTSTATUS lsa_OpenPolicy2 (
685 [in,unique] [string,charset(UTF16)] uint16 *system_name,
686 [in] lsa_ObjectAttribute *attr,
687 [in] uint32 access_mask,
688 [out] policy_handle *handle
691 /**********************/
692 /* Function: 0x2d */
693 typedef struct {
694 lsa_String *string;
695 } lsa_StringPointer;
697 NTSTATUS lsa_GetUserName(
698 [in,unique] [string,charset(UTF16)] uint16 *system_name,
699 [in,out,unique] lsa_String *account_name,
700 [in,out,unique] lsa_StringPointer *authority_name
703 /**********************/
704 /* Function: 0x2e */
706 NTSTATUS lsa_QueryInfoPolicy2(
707 [in] policy_handle *handle,
708 [in] uint16 level,
709 [out,unique,switch_is(level)] lsa_PolicyInformation *info
712 /* Function 0x2f */
713 NTSTATUS lsa_SetInfoPolicy2();
715 /**********************/
716 /* Function 0x30 */
717 NTSTATUS lsa_QueryTrustedDomainInfoByName(
718 [in] policy_handle *handle,
719 [in] lsa_String trusted_domain,
720 [in] lsa_TrustDomInfoEnum level,
721 [out,unique,switch_is(level)] lsa_TrustedDomainInfo *info
724 /**********************/
725 /* Function 0x31 */
726 NTSTATUS lsa_SetTrustedDomainInfoByName(
727 [in] policy_handle *handle,
728 [in] lsa_String trusted_domain,
729 [in] lsa_TrustDomInfoEnum level,
730 [in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
733 /* Function 0x32 */
735 /* w2k3 treats max_size as max_domains*82 */
736 const int LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER = 82;
738 typedef struct {
739 uint32 count;
740 [size_is(count)] lsa_TrustDomainInfoInfoEx *domains;
741 } lsa_DomainListEx;
743 NTSTATUS lsa_EnumTrustedDomainsEx (
744 [in] policy_handle *handle,
745 [in,out] uint32 *resume_handle,
746 [out] lsa_DomainListEx *domains,
747 [in] uint32 max_size
751 /* Function 0x33 */
752 NTSTATUS lsa_CreateTrustedDomainEx();
754 /* Function 0x34 */
755 NTSTATUS lsa_CloseTrustedDomainEx(
756 [in,out] policy_handle *handle
759 /* Function 0x35 */
761 /* w2k3 returns either 0x000bbbd000000000 or 0x000a48e800000000
762 for unknown6 - gd */
763 typedef struct {
764 uint32 enforce_restrictions;
765 hyper service_tkt_lifetime;
766 hyper user_tkt_lifetime;
767 hyper user_tkt_renewaltime;
768 hyper clock_skew;
769 hyper unknown6;
770 } lsa_DomainInfoKerberos;
772 typedef struct {
773 uint32 blob_size;
774 [size_is(blob_size)] uint8 *efs_blob;
775 } lsa_DomainInfoEfs;
777 typedef enum {
778 LSA_DOMAIN_INFO_POLICY_EFS=2,
779 LSA_DOMAIN_INFO_POLICY_KERBEROS=3
780 } lsa_DomainInfoEnum;
782 typedef [switch_type(uint16)] union {
783 [case(LSA_DOMAIN_INFO_POLICY_EFS)] lsa_DomainInfoEfs efs_info;
784 [case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] lsa_DomainInfoKerberos kerberos_info;
785 } lsa_DomainInformationPolicy;
787 NTSTATUS lsa_QueryDomainInformationPolicy(
788 [in] policy_handle *handle,
789 [in] uint16 level,
790 [out,unique,switch_is(level)] lsa_DomainInformationPolicy *info
793 /* Function 0x36 */
794 NTSTATUS lsa_SetDomainInformationPolicy(
795 [in] policy_handle *handle,
796 [in] uint16 level,
797 [in,unique,switch_is(level)] lsa_DomainInformationPolicy *info
800 /**********************/
801 /* Function 0x37 */
802 NTSTATUS lsa_OpenTrustedDomainByName(
803 [in] policy_handle *handle,
804 [in] lsa_String name,
805 [in] uint32 access_mask,
806 [out] policy_handle *trustdom_handle
809 /* Function 0x38 */
810 NTSTATUS lsa_TestCall();
812 /**********************/
813 /* Function 0x39 */
815 typedef struct {
816 lsa_SidType sid_type;
817 lsa_String name;
818 uint32 sid_index;
819 uint32 unknown;
820 } lsa_TranslatedName2;
822 typedef struct {
823 [range(0,1000)] uint32 count;
824 [size_is(count)] lsa_TranslatedName2 *names;
825 } lsa_TransNameArray2;
827 NTSTATUS lsa_LookupSids2(
828 [in] policy_handle *handle,
829 [in] lsa_SidArray *sids,
830 [out,unique] lsa_RefDomainList *domains,
831 [in,out] lsa_TransNameArray2 *names,
832 [in] uint16 level,
833 [in,out] uint32 *count,
834 [in] uint32 unknown1,
835 [in] uint32 unknown2
838 /**********************/
839 /* Function 0x3a */
841 typedef struct {
842 lsa_SidType sid_type;
843 uint32 rid;
844 uint32 sid_index;
845 uint32 unknown;
846 } lsa_TranslatedSid2;
848 typedef struct {
849 [range(0,1000)] uint32 count;
850 [size_is(count)] lsa_TranslatedSid2 *sids;
851 } lsa_TransSidArray2;
853 NTSTATUS lsa_LookupNames2 (
854 [in] policy_handle *handle,
855 [in,range(0,1000)] uint32 num_names,
856 [in,size_is(num_names)] lsa_String names[],
857 [out,unique] lsa_RefDomainList *domains,
858 [in,out] lsa_TransSidArray2 *sids,
859 [in] uint16 level,
860 [in,out] uint32 *count,
861 [in] uint32 unknown1,
862 [in] uint32 unknown2
865 /* Function 0x3b */
866 NTSTATUS lsa_CreateTrustedDomainEx2();
868 /* Function 0x3c */
869 NTSTATUS lsa_CREDRWRITE();
871 /* Function 0x3d */
872 NTSTATUS lsa_CREDRREAD();
874 /* Function 0x3e */
875 NTSTATUS lsa_CREDRENUMERATE();
877 /* Function 0x3f */
878 NTSTATUS lsa_CREDRWRITEDOMAINCREDENTIALS();
880 /* Function 0x40 */
881 NTSTATUS lsa_CREDRREADDOMAINCREDENTIALS();
883 /* Function 0x41 */
884 NTSTATUS lsa_CREDRDELETE();
886 /* Function 0x42 */
887 NTSTATUS lsa_CREDRGETTARGETINFO();
889 /* Function 0x43 */
890 NTSTATUS lsa_CREDRPROFILELOADED();
892 /**********************/
893 /* Function 0x44 */
894 typedef struct {
895 lsa_SidType sid_type;
896 dom_sid2 *sid;
897 uint32 sid_index;
898 uint32 unknown;
899 } lsa_TranslatedSid3;
901 typedef struct {
902 [range(0,1000)] uint32 count;
903 [size_is(count)] lsa_TranslatedSid3 *sids;
904 } lsa_TransSidArray3;
906 NTSTATUS lsa_LookupNames3 (
907 [in] policy_handle *handle,
908 [in,range(0,1000)] uint32 num_names,
909 [in,size_is(num_names)] lsa_String names[],
910 [out,unique] lsa_RefDomainList *domains,
911 [in,out] lsa_TransSidArray3 *sids,
912 [in] uint16 level,
913 [in,out] uint32 *count,
914 [in] uint32 unknown1,
915 [in] uint32 unknown2
918 /* Function 0x45 */
919 NTSTATUS lsa_CREDRGETSESSIONTYPES();
921 /* Function 0x46 */
922 NTSTATUS lsa_LSARREGISTERAUDITEVENT();
924 /* Function 0x47 */
925 NTSTATUS lsa_LSARGENAUDITEVENT();
927 /* Function 0x48 */
928 NTSTATUS lsa_LSARUNREGISTERAUDITEVENT();
930 /* Function 0x49 */
931 NTSTATUS lsa_LSARQUERYFORESTTRUSTINFORMATION();
933 /* Function 0x4a */
934 NTSTATUS lsa_LSARSETFORESTTRUSTINFORMATION();
936 /* Function 0x4b */
937 NTSTATUS lsa_CREDRRENAME();
939 /*****************/
940 /* Function 0x4c */
942 NTSTATUS lsa_LookupSids3(
943 [in] lsa_SidArray *sids,
944 [out,unique] lsa_RefDomainList *domains,
945 [in,out] lsa_TransNameArray2 *names,
946 [in] uint16 level,
947 [in,out] uint32 *count,
948 [in] uint32 unknown1,
949 [in] uint32 unknown2
952 /* Function 0x4d */
953 NTSTATUS lsa_LookupNames4(
954 [in,range(0,1000)] uint32 num_names,
955 [in,size_is(num_names)] lsa_String names[],
956 [out,unique] lsa_RefDomainList *domains,
957 [in,out] lsa_TransSidArray3 *sids,
958 [in] uint16 level,
959 [in,out] uint32 *count,
960 [in] uint32 unknown1,
961 [in] uint32 unknown2
964 /* Function 0x4e */
965 NTSTATUS lsa_LSAROPENPOLICYSCE();
967 /* Function 0x4f */
968 NTSTATUS lsa_LSARADTREGISTERSECURITYEVENTSOURCE();
970 /* Function 0x50 */
971 NTSTATUS lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE();
973 /* Function 0x51 */
974 NTSTATUS lsa_LSARADTREPORTSECURITYEVENT();