summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/lsa.idl
blob: d4829097bdc147307ffd67b4dff4371e7ae5cb3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
#include "idl_types.h"

/*
  lsa interface definition
*/

[ uuid(12345778-1234-abcd-ef00-0123456789ab),
  version(0.0),
  endpoints(lsarpc lsass),
  pointer_default(unique)
] interface lsarpc
{
	/******************/
	/* Function: 0x00 */
	NTSTATUS lsa_Close (
		[in,out,ref]     policy_handle *handle
		);
	

	/******************/
	/* Function: 0x01 */
	NTSTATUS lsa_Delete (
		[in,ref]     policy_handle *handle
		);


	/******************/
	/* Function: 0x02 */

	typedef struct {
		[value(2*strlen_m(r->name))] uint16 name_len;
		[value(r->name_len)] uint16 name_size;
		unistr_noterm *name;
	} lsa_Name;

	typedef struct {
		lsa_Name name;
		uint32 luid_low;
		uint32 luid_high;
	} lsa_PrivEntry;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_PrivEntry *privs;
	} lsa_PrivArray;

	NTSTATUS lsa_EnumPrivs (
		[in,ref]     policy_handle *handle,
		[in,out,ref] uint32 *resume_handle,
		[in]         uint32 max_count,
		[out,ref]    lsa_PrivArray *privs
		);


	/******************/
	/* Function: 0x03 */

	typedef [public] struct {
		uint32 size;
		[subcontext(4)] security_descriptor *sd;
	} sec_desc_buf;

	NTSTATUS lsa_QuerySecObj (
		[in,ref]     policy_handle *handle,
		[in]         uint32 sec_info,
		[out]        sec_desc_buf *sd
		);


	/******************/
	/* Function: 0x04 */
	NTSTATUS lsa_SetSecObj ();


	/******************/
	/* Function: 0x05 */
	NTSTATUS lsa_ChangePassword ();


	/******************/
	/* Function: 0x06 */
	typedef struct {
		uint32  len; /* ignored */
		uint16  impersonation_level;
		uint8   context_mode;
		uint8   effective_only;
	} lsa_QosInfo;
	
	typedef struct {
		uint32 len; /* ignored */
		uint8 *root_dir;
		unistr *object_name;
		uint32 attributes;
		security_descriptor *sec_desc;
		lsa_QosInfo *sec_qos;
	} lsa_ObjectAttribute;

	/* notice the screwup with the system_name - thats why MS created
	   OpenPolicy2 */
	NTSTATUS lsa_OpenPolicy (
		[in]       uint16 *system_name,
		[in,ref]   lsa_ObjectAttribute *attr,
		[in]       uint32 desired_access,
		[out,ref]  policy_handle *handle
		);
	


	/******************/
	/* Function: 0x07 */

	typedef struct {
		uint32 percent_full;
		uint32 log_size;
		NTTIME retention_time;
		uint8  shutdown_in_progress;
		NTTIME time_to_shutdown;
		uint32 next_audit_record;
		uint32 unknown;
	} lsa_AuditLogInfo;

	typedef struct {
		uint32 auditing_mode;
		[size_is(count)] uint32 *settings;
		uint32 count;
	} lsa_AuditEventsInfo;

	typedef struct {
		lsa_Name name;
		dom_sid2 *sid;
	} lsa_DomainInfo;

	typedef struct {
		lsa_Name name;
	} lsa_PDAccountInfo;

	typedef struct {
		uint16 unknown; /* an midl padding bug? */
		uint16 role;
	} lsa_ServerRole;

	typedef struct {
		lsa_Name source;
		lsa_Name account;
	} lsa_ReplicaSourceInfo;

	typedef struct {
		uint32 paged_pool;
		uint32 non_paged_pool;
		uint32 min_wss;
		uint32 max_wss;
		uint32 pagefile;
		HYPER_T unknown;
	} lsa_DefaultQuotaInfo;

	typedef struct {
		HYPER_T modified_id;
		NTTIME db_create_time;
	} lsa_ModificationInfo;

	typedef struct {
		uint8 shutdown_on_full;
	} lsa_AuditFullSetInfo;

	typedef struct {
		uint16 unknown; /* an midl padding bug? */
		uint8 shutdown_on_full;
		uint8 log_is_full;
	} lsa_AuditFullQueryInfo;

	typedef struct {
		lsa_Name name;
		lsa_Name dns_domain;
		lsa_Name dns_forest;
		GUID domain_guid;
		dom_sid2 *sid;
	} lsa_DnsDomainInfo;

	typedef union {
		[case(1)]  lsa_AuditLogInfo audit_log;
		[case(2)]  lsa_AuditEventsInfo audit_events;
		[case(3)]  lsa_DomainInfo domain;
		[case(4)]  lsa_PDAccountInfo pd;
		[case(5)]  lsa_DomainInfo account_domain;
		[case(6)]  lsa_ServerRole role;
		[case(7)]  lsa_ReplicaSourceInfo replica;
		[case(8)]  lsa_DefaultQuotaInfo quota;
		[case(9)]  lsa_ModificationInfo db;
		[case(10)] lsa_AuditFullSetInfo auditfullset;
		[case(11)] lsa_AuditFullQueryInfo auditfullquery;
		[case(12)] lsa_DnsDomainInfo dns;
	} lsa_PolicyInformation;

	NTSTATUS lsa_QueryInfoPolicy (
		[in,ref]                 policy_handle *handle,
		[in]                     uint16 level,
		[out,switch_is(level)]   lsa_PolicyInformation *info
		);

	/******************/
	/* Function:       0x08 */
	NTSTATUS lsa_SetInfoPolicy ();

	/******************/
	/* Function:       0x09 */
	NTSTATUS lsa_ClearAuditLog ();

	/******************/
	/* Function: 0x0a */
	NTSTATUS lsa_CreateAccount ();


	/******************/
	/* Function: 0x0b */
	typedef struct {
		dom_sid2 *sid;
	} lsa_SidPtr;
	
	typedef [public] struct {
		uint32 num_sids;
		[size_is(num_sids)] lsa_SidPtr *sids;
	} lsa_SidArray;

	NTSTATUS lsa_EnumAccounts (
		[in,ref]     policy_handle *handle,
		[in,out,ref] uint32 *resume_handle,
		[in]         uint32 num_entries,
		[out,ref]    lsa_SidArray *sids
		);


	/*************************************************/
	/* Function: 0x0c                                */
	NTSTATUS lsa_CreateTrustDom ();


	/******************/
	/* Function: 0x0d */

	typedef struct {
		lsa_Name name;
		dom_sid2 *sid;
	} lsa_DomainInformation;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_DomainInformation *domains;
	} lsa_DomainList;

	NTSTATUS lsa_EnumTrustDom (
		[in,ref]     policy_handle *handle,
		[in,out,ref] uint32 *resume_handle,
		[in]         uint32 num_entries,
		[out,ref]    lsa_DomainList *domains
		);


	/******************/
	/* Function: 0x0e */

	typedef struct {
		uint16 sid_type;
		uint32 rid;
		uint32 sid_index;
	} lsa_TranslatedSid;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TranslatedSid *sids;
	} lsa_TransSidArray;

	typedef struct {
		lsa_Name name;
		dom_sid2 *sid;
	} lsa_TrustInformation;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TrustInformation *domains;
		uint32 max_count;
	} lsa_RefDomainList;

	NTSTATUS lsa_LookupNames (
		[in,ref]     policy_handle *handle,
		[in]         uint32 num_names,
		[in,ref,size_is(num_names)]  lsa_Name *names,
		[out]        lsa_RefDomainList *domains,
		[in,out,ref] lsa_TransSidArray *sids,
		[in]         uint16 level,
		[in,out,ref] uint32 *count
		);


	/******************/
	/* Function: 0x0f */

	typedef struct {
		uint16 sid_type;
		lsa_Name name;
		uint32 sid_index;
	} lsa_TranslatedName;

	typedef struct {
		uint32 count;
		[size_is(count)] lsa_TranslatedName *names;
	} lsa_TransNameArray;

	NTSTATUS lsa_LookupSids (
		[in,ref]     policy_handle *handle,
		[in,ref]     lsa_SidArray *sids,
		[out]        lsa_RefDomainList *domains,
		[in,out,ref] lsa_TransNameArray *names,
		[in]         uint16 level,
		[in,out,ref] uint32 *count
		);


	/* Function:        0x10 */
	NTSTATUS CREATESECRET ();


	/*****************************************/
	/* Function:     0x11                    */
	NTSTATUS lsa_OpenAccount (
		[in,ref]     policy_handle *handle,
		[in,ref]     dom_sid2 *sid,
		[in]         uint32 desired_access,
		[out,ref]    policy_handle *acct_handle
		);


	/****************************************/
	/* Function:    0x12                    */

	typedef struct {
		uint32 low;
		uint32 high;
	} lsa_LUID;
	
	typedef struct {
		lsa_LUID luid;
		uint32 attribute;
	} lsa_LUIDAttribute;
	
	typedef struct {
		uint32 count;
		uint32 unknown;
		[size_is(count)] lsa_LUIDAttribute set[*];
	} lsa_PrivilegeSet;
	
	NTSTATUS lsa_EnumPrivsAccount (
		[in,ref]     policy_handle *handle,
		[out]        lsa_PrivilegeSet *privs
		);


	/* Function:            0x13 */
	NTSTATUS ADDPRIVS ();
	/* Function:         0x14 */
	NTSTATUS REMOVEPRIVS ();
	/* Function:           0x15 */
	NTSTATUS GETQUOTAS ();
	/* Function:           0x16 */
	NTSTATUS SETQUOTAS ();
	/* Function:    0x17 */
	NTSTATUS GETSYSTEMACCOUNT ();
	/* Function:    0x18 */
	NTSTATUS SETSYSTEMACCOUNT ();
	/* Function:        0x19 */
	NTSTATUS OPENTRUSTDOM ();
	/* Function:       0x1a */
	NTSTATUS QUERYTRUSTDOM ();
	/* Function:     0x1b */
	NTSTATUS SETINFOTRUSTDOM ();
	/* Function:          0x1c */
	NTSTATUS OPENSECRET ();
	/* Function:           0x1d */
	NTSTATUS SETSECRET ();
	/* Function:         0x1e */
	NTSTATUS QUERYSECRET ();

	/* Function:     0x1f */
	NTSTATUS LOOKUPPRIVVALUE ();


	/* Function:      0x20 */
	NTSTATUS lsa_LookupPrivName (
		[in,ref]     policy_handle *handle,
		[in,ref]     lsa_LUID *luid,
		[out]        lsa_Name *name
		);


	/* Function:  0x21 */
	NTSTATUS PRIV_GET_DISPNAME ();
	/* Function:        0x22 */
	NTSTATUS DELETEOBJECT ();
	/* Function:   0x23 */
	NTSTATUS ENUMACCTWITHRIGHT ();

	/* Function:      0x24 */
	typedef struct {
		unistr *name;
	} lsa_RightAttribute;
	
	typedef struct {
		uint32 count;
		[size_is(count)] lsa_Name *names;
	} lsa_RightSet;
	
	NTSTATUS lsa_EnumAccountRights (
		[in,ref]     policy_handle *handle,
		[in,ref]     dom_sid2 *sid,
		[out,ref]    lsa_RightSet *rights
		);


	/* Function:       0x25 */
	NTSTATUS ADDACCTRIGHTS ();
	/* Function:    0x26 */
	NTSTATUS REMOVEACCTRIGHTS ();
	/* Function:   0x27 */
	NTSTATUS QUERYTRUSTDOMINFO ();
	/* Function:     0x28 */
	NTSTATUS SETTRUSTDOMINFO ();
	/* Function:      0x29 */
	NTSTATUS DELETETRUSTDOM ();
	/* Function:       0x2a */
	NTSTATUS STOREPRIVDATA ();
	/* Function:        0x2b */
	NTSTATUS RETRPRIVDATA ();


	/**********************/
	/* Function:     0x2c */
	NTSTATUS lsa_OpenPolicy2 (
		[in]      unistr *system_name,
		[in,ref]  lsa_ObjectAttribute *attr,
		[in]      uint32 desired_access,
		[out,ref] policy_handle *handle
		);


	/* Function:    0x2d */
	NTSTATUS UNK_GET_CONNUSER ();
	/* Function:          0x2e */
	NTSTATUS QUERYINFO2 ();
}


[ 
  uuid(3919286a-b10c-11d0-9ba8-00c04fd92ef5)
  version(0.0),
  endpoints(lsarpc,lsass),
  pointer_default(unique)
] 
interface lsads
{

	/*****************/
        /* Function 0x00 */
	lsads_Unknown0();

}