1 | /*
|
---|
2 | netlogon interface
|
---|
3 | much of this was derived from the ethereal sources - thanks to everyone
|
---|
4 | who contributed!
|
---|
5 | */
|
---|
6 |
|
---|
7 | import "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
|
---|
8 |
|
---|
9 | #include "idl_types.h"
|
---|
10 |
|
---|
11 | cpp_quote("#define netr_DeltaEnum8Bit netr_DeltaEnum")
|
---|
12 |
|
---|
13 | [
|
---|
14 | uuid("12345678-1234-abcd-ef00-01234567cffb"),
|
---|
15 | version(1.0),
|
---|
16 | endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
|
---|
17 | helper("librpc/ndr/ndr_netlogon.h"),
|
---|
18 | pointer_default(unique)
|
---|
19 | ]
|
---|
20 |
|
---|
21 | interface netlogon
|
---|
22 | {
|
---|
23 | typedef bitmap samr_AcctFlags samr_AcctFlags;
|
---|
24 | typedef bitmap samr_GroupAttrs samr_GroupAttrs;
|
---|
25 | typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit;
|
---|
26 |
|
---|
27 | /*****************/
|
---|
28 | /* Function 0x00 */
|
---|
29 |
|
---|
30 | typedef struct {
|
---|
31 | [string,charset(UTF16)] uint16 *account_name;
|
---|
32 | uint32 priv;
|
---|
33 | uint32 auth_flags;
|
---|
34 | uint32 logon_count;
|
---|
35 | uint32 bad_pw_count;
|
---|
36 | time_t last_logon;
|
---|
37 | time_t last_logoff;
|
---|
38 | time_t logoff_time;
|
---|
39 | time_t kickoff_time;
|
---|
40 | uint32 password_age;
|
---|
41 | time_t pw_can_change;
|
---|
42 | time_t pw_must_change;
|
---|
43 | [string,charset(UTF16)] uint16 *computer;
|
---|
44 | [string,charset(UTF16)] uint16 *domain;
|
---|
45 | [string,charset(UTF16)] uint16 *script_path;
|
---|
46 | uint32 unknown;
|
---|
47 | } netr_UasInfo;
|
---|
48 |
|
---|
49 | WERROR netr_LogonUasLogon(
|
---|
50 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
51 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
52 | [in] [string,charset(UTF16)] uint16 workstation[],
|
---|
53 | [out,ref] netr_UasInfo *info
|
---|
54 | );
|
---|
55 |
|
---|
56 |
|
---|
57 | /*****************/
|
---|
58 | /* Function 0x01 */
|
---|
59 |
|
---|
60 | typedef struct {
|
---|
61 | uint32 duration;
|
---|
62 | uint16 logon_count;
|
---|
63 | } netr_UasLogoffInfo;
|
---|
64 |
|
---|
65 | WERROR netr_LogonUasLogoff(
|
---|
66 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
67 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
68 | [in] [string,charset(UTF16)] uint16 workstation[],
|
---|
69 | [out,ref] netr_UasLogoffInfo *info
|
---|
70 | );
|
---|
71 |
|
---|
72 |
|
---|
73 | /*****************/
|
---|
74 | /* Function 0x02 */
|
---|
75 |
|
---|
76 | /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
|
---|
77 | that the structure of the bindata looks like this:
|
---|
78 |
|
---|
79 | dlong lockout_duration;
|
---|
80 | udlong reset_count;
|
---|
81 | uint32 bad_attempt_lockout;
|
---|
82 | uint32 dummy;
|
---|
83 |
|
---|
84 | but it doesn't look as though this structure is reflected at the
|
---|
85 | NDR level. Maybe it is left to the application to decode the bindata array.
|
---|
86 | */
|
---|
87 | typedef [public] struct {
|
---|
88 | dlong lockout_duration;
|
---|
89 | udlong reset_count;
|
---|
90 | uint32 bad_attempt_lockout;
|
---|
91 | uint32 dummy;
|
---|
92 | } netr_AcctLockStr;
|
---|
93 |
|
---|
94 | /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
|
---|
95 | * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
|
---|
96 | * - MSV1_0_UPDATE_LOGON_STATISTICS
|
---|
97 | * sets the logon time on network logon
|
---|
98 | * - MSV1_0_RETURN_USER_PARAMETERS
|
---|
99 | * sets the user parameters in the driveletter
|
---|
100 | * - MSV1_0_RETURN_PROFILE_PATH
|
---|
101 | * returns the profilepath in the driveletter and
|
---|
102 | * sets LOGON_PROFILE_PATH_RETURNED user_flag
|
---|
103 | */
|
---|
104 |
|
---|
105 | typedef [public,bitmap32bit] bitmap {
|
---|
106 | MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x00000002,
|
---|
107 | MSV1_0_UPDATE_LOGON_STATISTICS = 0x00000004,
|
---|
108 | MSV1_0_RETURN_USER_PARAMETERS = 0x00000008,
|
---|
109 | MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x00000020,
|
---|
110 | MSV1_0_RETURN_PROFILE_PATH = 0x00000200,
|
---|
111 | MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x00000800
|
---|
112 | } netr_LogonParameterControl;
|
---|
113 |
|
---|
114 | typedef struct {
|
---|
115 | lsa_String domain_name;
|
---|
116 | netr_LogonParameterControl parameter_control; /* see MSV1_0_* */
|
---|
117 | uint32 logon_id_low;
|
---|
118 | uint32 logon_id_high;
|
---|
119 | lsa_String account_name;
|
---|
120 | lsa_String workstation;
|
---|
121 | } netr_IdentityInfo;
|
---|
122 |
|
---|
123 | typedef struct {
|
---|
124 | netr_IdentityInfo identity_info;
|
---|
125 | samr_Password lmpassword;
|
---|
126 | samr_Password ntpassword;
|
---|
127 | } netr_PasswordInfo;
|
---|
128 |
|
---|
129 | typedef [flag(NDR_PAHEX)] struct {
|
---|
130 | uint16 length;
|
---|
131 | [value(length)] uint16 size;
|
---|
132 | [size_is(length),length_is(length)] uint8 *data;
|
---|
133 | } netr_ChallengeResponse;
|
---|
134 |
|
---|
135 | typedef [flag(NDR_PAHEX)] struct {
|
---|
136 | netr_IdentityInfo identity_info;
|
---|
137 | uint8 challenge[8];
|
---|
138 | netr_ChallengeResponse nt;
|
---|
139 | netr_ChallengeResponse lm;
|
---|
140 | } netr_NetworkInfo;
|
---|
141 |
|
---|
142 | typedef [public,switch_type(uint16)] union {
|
---|
143 | [case(1)] netr_PasswordInfo *password;
|
---|
144 | [case(2)] netr_NetworkInfo *network;
|
---|
145 | [case(3)] netr_PasswordInfo *password;
|
---|
146 | [case(5)] netr_PasswordInfo *password;
|
---|
147 | [case(6)] netr_NetworkInfo *network;
|
---|
148 | } netr_LogonInfo;
|
---|
149 |
|
---|
150 | typedef [public,flag(NDR_PAHEX)] struct {
|
---|
151 | uint8 key[16];
|
---|
152 | } netr_UserSessionKey;
|
---|
153 |
|
---|
154 | typedef [public,flag(NDR_PAHEX)] struct {
|
---|
155 | uint8 key[8];
|
---|
156 | } netr_LMSessionKey;
|
---|
157 |
|
---|
158 | /* Flags for user_flags below */
|
---|
159 | typedef [public,bitmap32bit] bitmap {
|
---|
160 | NETLOGON_GUEST = 0x00000001,
|
---|
161 | NETLOGON_NOENCRYPTION = 0x00000002,
|
---|
162 | NETLOGON_CACHED_ACCOUNT = 0x00000004,
|
---|
163 | NETLOGON_USED_LM_PASSWORD = 0x00000008,
|
---|
164 | NETLOGON_EXTRA_SIDS = 0x00000020,
|
---|
165 | NETLOGON_SUBAUTH_SESSION_KEY = 0x00000040,
|
---|
166 | NETLOGON_SERVER_TRUST_ACCOUNT = 0x00000080,
|
---|
167 | NETLOGON_NTLMV2_ENABLED = 0x00000100,
|
---|
168 | NETLOGON_RESOURCE_GROUPS = 0x00000200,
|
---|
169 | NETLOGON_PROFILE_PATH_RETURNED = 0x00000400,
|
---|
170 | NETLOGON_GRACE_LOGON = 0x01000000
|
---|
171 | } netr_UserFlags;
|
---|
172 |
|
---|
173 | typedef struct {
|
---|
174 | NTTIME last_logon;
|
---|
175 | NTTIME last_logoff;
|
---|
176 | NTTIME acct_expiry;
|
---|
177 | NTTIME last_password_change;
|
---|
178 | NTTIME allow_password_change;
|
---|
179 | NTTIME force_password_change;
|
---|
180 | lsa_String account_name;
|
---|
181 | lsa_String full_name;
|
---|
182 | lsa_String logon_script;
|
---|
183 | lsa_String profile_path;
|
---|
184 | lsa_String home_directory;
|
---|
185 | lsa_String home_drive;
|
---|
186 | uint16 logon_count;
|
---|
187 | uint16 bad_password_count;
|
---|
188 | uint32 rid;
|
---|
189 | uint32 primary_gid;
|
---|
190 | samr_RidWithAttributeArray groups;
|
---|
191 | netr_UserFlags user_flags;
|
---|
192 | netr_UserSessionKey key;
|
---|
193 | lsa_StringLarge logon_server;
|
---|
194 | lsa_StringLarge domain;
|
---|
195 | dom_sid2 *domain_sid;
|
---|
196 | netr_LMSessionKey LMSessKey;
|
---|
197 | samr_AcctFlags acct_flags;
|
---|
198 | uint32 unknown[7];
|
---|
199 | } netr_SamBaseInfo;
|
---|
200 |
|
---|
201 | typedef struct {
|
---|
202 | netr_SamBaseInfo base;
|
---|
203 | } netr_SamInfo2;
|
---|
204 |
|
---|
205 | typedef struct {
|
---|
206 | dom_sid2 *sid;
|
---|
207 | samr_GroupAttrs attributes;
|
---|
208 | } netr_SidAttr;
|
---|
209 |
|
---|
210 | typedef [public] struct {
|
---|
211 | netr_SamBaseInfo base;
|
---|
212 | uint32 sidcount;
|
---|
213 | [size_is(sidcount)] netr_SidAttr *sids;
|
---|
214 | } netr_SamInfo3;
|
---|
215 |
|
---|
216 | typedef struct {
|
---|
217 | netr_SamBaseInfo base;
|
---|
218 | uint32 sidcount;
|
---|
219 | [size_is(sidcount)] netr_SidAttr *sids;
|
---|
220 | lsa_String forest;
|
---|
221 | lsa_String principle;
|
---|
222 | uint32 unknown4[20];
|
---|
223 | } netr_SamInfo6;
|
---|
224 |
|
---|
225 | typedef struct {
|
---|
226 | uint32 pac_size;
|
---|
227 | [size_is(pac_size)] uint8 *pac;
|
---|
228 | lsa_String logon_domain;
|
---|
229 | lsa_String logon_server;
|
---|
230 | lsa_String principal_name;
|
---|
231 | uint32 auth_size;
|
---|
232 | [size_is(auth_size)] uint8 *auth;
|
---|
233 | netr_UserSessionKey user_session_key;
|
---|
234 | uint32 expansionroom[10];
|
---|
235 | lsa_String unknown1;
|
---|
236 | lsa_String unknown2;
|
---|
237 | lsa_String unknown3;
|
---|
238 | lsa_String unknown4;
|
---|
239 | } netr_PacInfo;
|
---|
240 |
|
---|
241 | typedef [public,switch_type(uint16)] union {
|
---|
242 | [case(2)] netr_SamInfo2 *sam2;
|
---|
243 | [case(3)] netr_SamInfo3 *sam3;
|
---|
244 | [case(4)] netr_PacInfo *pac;
|
---|
245 | [case(5)] netr_PacInfo *pac;
|
---|
246 | [case(6)] netr_SamInfo6 *sam6;
|
---|
247 | } netr_Validation;
|
---|
248 |
|
---|
249 | typedef [public, flag(NDR_PAHEX)] struct {
|
---|
250 | uint8 data[8];
|
---|
251 | } netr_Credential;
|
---|
252 |
|
---|
253 | typedef [public] struct {
|
---|
254 | netr_Credential cred;
|
---|
255 | time_t timestamp;
|
---|
256 | } netr_Authenticator;
|
---|
257 |
|
---|
258 | typedef enum {
|
---|
259 | INTERACTIVE_LOGON_TYPE = 1,
|
---|
260 | NET_LOGON_TYPE = 2
|
---|
261 | } netr_LogonLevel;
|
---|
262 |
|
---|
263 | NTSTATUS netr_LogonSamLogon(
|
---|
264 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
265 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
266 | [in,unique] netr_Authenticator *credential,
|
---|
267 | [in,out,unique] netr_Authenticator *return_authenticator,
|
---|
268 | [in] netr_LogonLevel logon_level,
|
---|
269 | [in,ref] [switch_is(logon_level)] netr_LogonInfo *logon,
|
---|
270 | [in] uint16 validation_level,
|
---|
271 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
---|
272 | [out,ref] uint8 *authoritative
|
---|
273 | );
|
---|
274 |
|
---|
275 |
|
---|
276 | /*****************/
|
---|
277 | /* Function 0x03 */
|
---|
278 |
|
---|
279 | NTSTATUS netr_LogonSamLogoff(
|
---|
280 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
281 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
282 | [in,unique] netr_Authenticator *credential,
|
---|
283 | [in,out,unique] netr_Authenticator *return_authenticator,
|
---|
284 | [in] netr_LogonLevel logon_level,
|
---|
285 | [in] [switch_is(logon_level)] netr_LogonInfo logon
|
---|
286 | );
|
---|
287 |
|
---|
288 |
|
---|
289 |
|
---|
290 | /*****************/
|
---|
291 | /* Function 0x04 */
|
---|
292 |
|
---|
293 | NTSTATUS netr_ServerReqChallenge(
|
---|
294 | [in,unique,string,charset(UTF16)] uint16 *server_name,
|
---|
295 | [in,string,charset(UTF16)] uint16 computer_name[],
|
---|
296 | [in,ref] netr_Credential *credentials,
|
---|
297 | [out,ref] netr_Credential *return_credentials
|
---|
298 | );
|
---|
299 |
|
---|
300 |
|
---|
301 | /*****************/
|
---|
302 | /* Function 0x05 */
|
---|
303 |
|
---|
304 | typedef enum netr_SchannelType netr_SchannelType;
|
---|
305 |
|
---|
306 | NTSTATUS netr_ServerAuthenticate(
|
---|
307 | [in,unique,string,charset(UTF16)] uint16 *server_name,
|
---|
308 | [in,string,charset(UTF16)] uint16 account_name[],
|
---|
309 | [in] netr_SchannelType secure_channel_type,
|
---|
310 | [in,string,charset(UTF16)] uint16 computer_name[],
|
---|
311 | [in,ref] netr_Credential *credentials,
|
---|
312 | [out,ref] netr_Credential *return_credentials
|
---|
313 | );
|
---|
314 |
|
---|
315 |
|
---|
316 | /*****************/
|
---|
317 | /* Function 0x06 */
|
---|
318 |
|
---|
319 | NTSTATUS netr_ServerPasswordSet(
|
---|
320 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
321 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
322 | [in] netr_SchannelType secure_channel_type,
|
---|
323 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
324 | [in,ref] netr_Authenticator *credential,
|
---|
325 | [out,ref] netr_Authenticator *return_authenticator,
|
---|
326 | [in,ref] samr_Password *new_password
|
---|
327 | );
|
---|
328 |
|
---|
329 |
|
---|
330 | /*****************/
|
---|
331 | /* Function 0x07 */
|
---|
332 |
|
---|
333 | typedef enum netr_SamDatabaseID netr_SamDatabaseID;
|
---|
334 |
|
---|
335 | typedef struct {
|
---|
336 | [string,charset(UTF16)] uint16 *account_name;
|
---|
337 | lsa_String unknown1;
|
---|
338 | lsa_String unknown2;
|
---|
339 | lsa_String unknown3;
|
---|
340 | lsa_String unknown4;
|
---|
341 | uint32 unknown5;
|
---|
342 | uint32 unknown6;
|
---|
343 | uint32 unknown7;
|
---|
344 | uint32 unknown8;
|
---|
345 | } netr_DELTA_DELETE_USER;
|
---|
346 |
|
---|
347 | typedef struct {
|
---|
348 | uint16 length;
|
---|
349 | [value(length)] uint16 size;
|
---|
350 | uint32 flags;
|
---|
351 | samr_Password pwd;
|
---|
352 | } netr_USER_KEY16;
|
---|
353 |
|
---|
354 | typedef struct {
|
---|
355 | uint16 nt_length;
|
---|
356 | [value(nt_length)] uint16 nt_size;
|
---|
357 | uint32 nt_flags;
|
---|
358 | uint16 lm_length;
|
---|
359 | [value(lm_length)] uint16 lm_size;
|
---|
360 | uint32 lm_flags;
|
---|
361 | uint8 nt_history[nt_length];
|
---|
362 | uint8 lm_history[lm_length];
|
---|
363 | } netr_PasswordHistory;
|
---|
364 |
|
---|
365 | typedef struct {
|
---|
366 | netr_USER_KEY16 lmpassword;
|
---|
367 | netr_USER_KEY16 ntpassword;
|
---|
368 | netr_PasswordHistory history;
|
---|
369 | } netr_USER_KEYS2;
|
---|
370 |
|
---|
371 | typedef struct { /* TODO: make this a union! */
|
---|
372 | netr_USER_KEYS2 keys2;
|
---|
373 | } netr_USER_KEY_UNION;
|
---|
374 |
|
---|
375 | typedef [public] struct {
|
---|
376 | uint32 version;
|
---|
377 | netr_USER_KEY_UNION keys;
|
---|
378 | } netr_USER_KEYS;
|
---|
379 |
|
---|
380 | typedef struct {
|
---|
381 | boolean8 SensitiveDataFlag;
|
---|
382 | uint32 DataLength;
|
---|
383 |
|
---|
384 | /* netr_USER_KEYS encrypted with the session key */
|
---|
385 | [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
|
---|
386 | } netr_USER_PRIVATE_INFO;
|
---|
387 |
|
---|
388 | typedef struct {
|
---|
389 | lsa_String account_name;
|
---|
390 | lsa_String full_name;
|
---|
391 | uint32 rid;
|
---|
392 | uint32 primary_gid;
|
---|
393 | lsa_String home_directory;
|
---|
394 | lsa_String home_drive;
|
---|
395 | lsa_String logon_script;
|
---|
396 | lsa_String description;
|
---|
397 | lsa_String workstations;
|
---|
398 | NTTIME last_logon;
|
---|
399 | NTTIME last_logoff;
|
---|
400 | samr_LogonHours logon_hours;
|
---|
401 | uint16 bad_password_count;
|
---|
402 | uint16 logon_count;
|
---|
403 | NTTIME last_password_change;
|
---|
404 | NTTIME acct_expiry;
|
---|
405 | samr_AcctFlags acct_flags;
|
---|
406 | samr_Password lmpassword;
|
---|
407 | samr_Password ntpassword;
|
---|
408 | boolean8 nt_password_present;
|
---|
409 | boolean8 lm_password_present;
|
---|
410 | boolean8 password_expired;
|
---|
411 | lsa_String comment;
|
---|
412 | lsa_BinaryString parameters;
|
---|
413 | uint16 country_code;
|
---|
414 | uint16 code_page;
|
---|
415 | netr_USER_PRIVATE_INFO user_private_info;
|
---|
416 | uint32 SecurityInformation;
|
---|
417 | sec_desc_buf sdbuf;
|
---|
418 | lsa_String profile_path;
|
---|
419 | lsa_String unknown2;
|
---|
420 | lsa_String unknown3;
|
---|
421 | lsa_String unknown4;
|
---|
422 | uint32 unknown5;
|
---|
423 | uint32 unknown6;
|
---|
424 | uint32 unknown7;
|
---|
425 | uint32 unknown8;
|
---|
426 | } netr_DELTA_USER;
|
---|
427 |
|
---|
428 | typedef struct {
|
---|
429 | lsa_String domain_name;
|
---|
430 | lsa_String comment;
|
---|
431 | dlong force_logoff_time;
|
---|
432 | uint16 min_password_length;
|
---|
433 | uint16 password_history_length;
|
---|
434 | /* yes, these are signed. They are in negative 100ns */
|
---|
435 | dlong max_password_age;
|
---|
436 | dlong min_password_age;
|
---|
437 | udlong sequence_num;
|
---|
438 | NTTIME domain_create_time;
|
---|
439 | uint32 SecurityInformation;
|
---|
440 | sec_desc_buf sdbuf;
|
---|
441 | lsa_BinaryString account_lockout;
|
---|
442 | lsa_String unknown2;
|
---|
443 | lsa_String unknown3;
|
---|
444 | lsa_String unknown4;
|
---|
445 | uint32 logon_to_chgpass;
|
---|
446 | uint32 unknown6;
|
---|
447 | uint32 unknown7;
|
---|
448 | uint32 unknown8;
|
---|
449 | } netr_DELTA_DOMAIN;
|
---|
450 |
|
---|
451 | typedef struct {
|
---|
452 | lsa_String group_name;
|
---|
453 | uint32 rid;
|
---|
454 | uint32 attributes;
|
---|
455 | lsa_String description;
|
---|
456 | uint32 SecurityInformation;
|
---|
457 | sec_desc_buf sdbuf;
|
---|
458 | lsa_String unknown1;
|
---|
459 | lsa_String unknown2;
|
---|
460 | lsa_String unknown3;
|
---|
461 | lsa_String unknown4;
|
---|
462 | uint32 unknown5;
|
---|
463 | uint32 unknown6;
|
---|
464 | uint32 unknown7;
|
---|
465 | uint32 unknown8;
|
---|
466 | } netr_DELTA_GROUP;
|
---|
467 |
|
---|
468 | typedef struct {
|
---|
469 | lsa_String OldName;
|
---|
470 | lsa_String NewName;
|
---|
471 | lsa_String unknown1;
|
---|
472 | lsa_String unknown2;
|
---|
473 | lsa_String unknown3;
|
---|
474 | lsa_String unknown4;
|
---|
475 | uint32 unknown5;
|
---|
476 | uint32 unknown6;
|
---|
477 | uint32 unknown7;
|
---|
478 | uint32 unknown8;
|
---|
479 | } netr_DELTA_RENAME;
|
---|
480 |
|
---|
481 | typedef struct {
|
---|
482 | [size_is(num_rids)] uint32 *rids;
|
---|
483 | [size_is(num_rids)] uint32 *attribs;
|
---|
484 | uint32 num_rids;
|
---|
485 | uint32 unknown1;
|
---|
486 | uint32 unknown2;
|
---|
487 | uint32 unknown3;
|
---|
488 | uint32 unknown4;
|
---|
489 | } netr_DELTA_GROUP_MEMBER;
|
---|
490 |
|
---|
491 | typedef struct {
|
---|
492 | lsa_String alias_name;
|
---|
493 | uint32 rid;
|
---|
494 | uint32 SecurityInformation;
|
---|
495 | sec_desc_buf sdbuf;
|
---|
496 | lsa_String description;
|
---|
497 | lsa_String unknown2;
|
---|
498 | lsa_String unknown3;
|
---|
499 | lsa_String unknown4;
|
---|
500 | uint32 unknown5;
|
---|
501 | uint32 unknown6;
|
---|
502 | uint32 unknown7;
|
---|
503 | uint32 unknown8;
|
---|
504 | } netr_DELTA_ALIAS;
|
---|
505 |
|
---|
506 | typedef struct {
|
---|
507 | lsa_SidArray sids;
|
---|
508 | uint32 unknown1;
|
---|
509 | uint32 unknown2;
|
---|
510 | uint32 unknown3;
|
---|
511 | uint32 unknown4;
|
---|
512 | } netr_DELTA_ALIAS_MEMBER;
|
---|
513 |
|
---|
514 | typedef struct {
|
---|
515 | uint32 pagedpoollimit;
|
---|
516 | uint32 nonpagedpoollimit;
|
---|
517 | uint32 minimumworkingsetsize;
|
---|
518 | uint32 maximumworkingsetsize;
|
---|
519 | uint32 pagefilelimit;
|
---|
520 | NTTIME timelimit;
|
---|
521 | } netr_QUOTA_LIMITS;
|
---|
522 |
|
---|
523 | typedef struct {
|
---|
524 | uint32 maxlogsize;
|
---|
525 | NTTIME auditretentionperiod;
|
---|
526 | boolean8 auditingmode;
|
---|
527 | uint32 maxauditeventcount;
|
---|
528 | [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
|
---|
529 | lsa_String primary_domain_name;
|
---|
530 | dom_sid2 *sid;
|
---|
531 | netr_QUOTA_LIMITS quota_limits;
|
---|
532 | udlong sequence_num;
|
---|
533 | NTTIME db_create_time;
|
---|
534 | uint32 SecurityInformation;
|
---|
535 | sec_desc_buf sdbuf;
|
---|
536 | lsa_String unknown1;
|
---|
537 | lsa_String unknown2;
|
---|
538 | lsa_String unknown3;
|
---|
539 | lsa_String unknown4;
|
---|
540 | uint32 unknown5;
|
---|
541 | uint32 unknown6;
|
---|
542 | uint32 unknown7;
|
---|
543 | uint32 unknown8;
|
---|
544 | } netr_DELTA_POLICY;
|
---|
545 |
|
---|
546 | typedef struct {
|
---|
547 | lsa_String domain_name;
|
---|
548 | uint32 num_controllers;
|
---|
549 | [size_is(num_controllers)] lsa_String *controller_names;
|
---|
550 | uint32 SecurityInformation;
|
---|
551 | sec_desc_buf sdbuf;
|
---|
552 | lsa_String unknown1;
|
---|
553 | lsa_String unknown2;
|
---|
554 | lsa_String unknown3;
|
---|
555 | lsa_String unknown4;
|
---|
556 | uint32 posix_offset;
|
---|
557 | uint32 unknown6;
|
---|
558 | uint32 unknown7;
|
---|
559 | uint32 unknown8;
|
---|
560 | } netr_DELTA_TRUSTED_DOMAIN;
|
---|
561 |
|
---|
562 | typedef struct {
|
---|
563 | uint16 unknown;
|
---|
564 | } netr_DELTA_DELETE_TRUST;
|
---|
565 |
|
---|
566 | typedef struct {
|
---|
567 | uint32 privilege_entries;
|
---|
568 | uint32 privilege_control;
|
---|
569 | [size_is(privilege_entries)] uint32 *privilege_attrib;
|
---|
570 | [size_is(privilege_entries)] lsa_String *privilege_name;
|
---|
571 | netr_QUOTA_LIMITS quotalimits;
|
---|
572 | uint32 system_flags;
|
---|
573 | uint32 SecurityInformation;
|
---|
574 | sec_desc_buf sdbuf;
|
---|
575 | lsa_String unknown1;
|
---|
576 | lsa_String unknown2;
|
---|
577 | lsa_String unknown3;
|
---|
578 | lsa_String unknown4;
|
---|
579 | uint32 unknown5;
|
---|
580 | uint32 unknown6;
|
---|
581 | uint32 unknown7;
|
---|
582 | uint32 unknown8;
|
---|
583 | } netr_DELTA_ACCOUNT;
|
---|
584 |
|
---|
585 | typedef struct {
|
---|
586 | uint16 unknown;
|
---|
587 | } netr_DELTA_DELETE_ACCOUNT;
|
---|
588 |
|
---|
589 | typedef struct {
|
---|
590 | uint16 unknown;
|
---|
591 | } netr_DELTA_DELETE_SECRET;
|
---|
592 |
|
---|
593 | typedef struct {
|
---|
594 | uint32 len;
|
---|
595 | uint32 maxlen;
|
---|
596 | [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
|
---|
597 | } netr_CIPHER_VALUE;
|
---|
598 |
|
---|
599 | typedef struct {
|
---|
600 | netr_CIPHER_VALUE current_cipher;
|
---|
601 | NTTIME current_cipher_set_time;
|
---|
602 | netr_CIPHER_VALUE old_cipher;
|
---|
603 | NTTIME old_cipher_set_time;
|
---|
604 | uint32 SecurityInformation;
|
---|
605 | sec_desc_buf sdbuf;
|
---|
606 | lsa_String unknown1;
|
---|
607 | lsa_String unknown2;
|
---|
608 | lsa_String unknown3;
|
---|
609 | lsa_String unknown4;
|
---|
610 | uint32 unknown5;
|
---|
611 | uint32 unknown6;
|
---|
612 | uint32 unknown7;
|
---|
613 | uint32 unknown8;
|
---|
614 | } netr_DELTA_SECRET;
|
---|
615 |
|
---|
616 | typedef enum {
|
---|
617 | NETR_DELTA_DOMAIN = 1,
|
---|
618 | NETR_DELTA_GROUP = 2,
|
---|
619 | NETR_DELTA_DELETE_GROUP = 3,
|
---|
620 | NETR_DELTA_RENAME_GROUP = 4,
|
---|
621 | NETR_DELTA_USER = 5,
|
---|
622 | NETR_DELTA_DELETE_USER = 6,
|
---|
623 | NETR_DELTA_RENAME_USER = 7,
|
---|
624 | NETR_DELTA_GROUP_MEMBER = 8,
|
---|
625 | NETR_DELTA_ALIAS = 9,
|
---|
626 | NETR_DELTA_DELETE_ALIAS = 10,
|
---|
627 | NETR_DELTA_RENAME_ALIAS = 11,
|
---|
628 | NETR_DELTA_ALIAS_MEMBER = 12,
|
---|
629 | NETR_DELTA_POLICY = 13,
|
---|
630 | NETR_DELTA_TRUSTED_DOMAIN = 14,
|
---|
631 | NETR_DELTA_DELETE_TRUST = 15,
|
---|
632 | NETR_DELTA_ACCOUNT = 16,
|
---|
633 | NETR_DELTA_DELETE_ACCOUNT = 17,
|
---|
634 | NETR_DELTA_SECRET = 18,
|
---|
635 | NETR_DELTA_DELETE_SECRET = 19,
|
---|
636 | NETR_DELTA_DELETE_GROUP2 = 20,
|
---|
637 | NETR_DELTA_DELETE_USER2 = 21,
|
---|
638 | NETR_DELTA_MODIFY_COUNT = 22
|
---|
639 | } netr_DeltaEnum;
|
---|
640 |
|
---|
641 | typedef [switch_type(netr_DeltaEnum)] union {
|
---|
642 | [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
|
---|
643 | [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
|
---|
644 | [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
|
---|
645 | [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
|
---|
646 | [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
|
---|
647 | [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
|
---|
648 | [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
|
---|
649 | [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
|
---|
650 | [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
|
---|
651 | [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
|
---|
652 | [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
|
---|
653 | [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
|
---|
654 | [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
|
---|
655 | [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
|
---|
656 | [case(NETR_DELTA_DELETE_TRUST)] netr_DELTA_DELETE_TRUST delete_trust;
|
---|
657 | [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
|
---|
658 | [case(NETR_DELTA_DELETE_ACCOUNT)] netr_DELTA_DELETE_ACCOUNT delete_account;
|
---|
659 | [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
|
---|
660 | [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret;
|
---|
661 | [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
|
---|
662 | [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
|
---|
663 | [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
|
---|
664 | } netr_DELTA_UNION;
|
---|
665 |
|
---|
666 | typedef [switch_type(netr_DeltaEnum)] union {
|
---|
667 | [case(NETR_DELTA_DOMAIN)] uint32 rid;
|
---|
668 | [case(NETR_DELTA_GROUP)] uint32 rid;
|
---|
669 | [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
|
---|
670 | [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
|
---|
671 | [case(NETR_DELTA_USER)] uint32 rid;
|
---|
672 | [case(NETR_DELTA_DELETE_USER)] uint32 rid;
|
---|
673 | [case(NETR_DELTA_RENAME_USER)] uint32 rid;
|
---|
674 | [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
|
---|
675 | [case(NETR_DELTA_ALIAS)] uint32 rid;
|
---|
676 | [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
|
---|
677 | [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
|
---|
678 | [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
|
---|
679 | [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
|
---|
680 | [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
|
---|
681 | [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
|
---|
682 | [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
|
---|
683 | [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
|
---|
684 | [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
|
---|
685 | [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
|
---|
686 | [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
|
---|
687 | [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
|
---|
688 | [case(NETR_DELTA_MODIFY_COUNT)] ;
|
---|
689 | } netr_DELTA_ID_UNION;
|
---|
690 |
|
---|
691 | typedef struct {
|
---|
692 | netr_DeltaEnum delta_type;
|
---|
693 | [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
|
---|
694 | [switch_is(delta_type)] netr_DELTA_UNION delta_union;
|
---|
695 | } netr_DELTA_ENUM;
|
---|
696 |
|
---|
697 | typedef struct {
|
---|
698 | uint32 num_deltas;
|
---|
699 | [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
|
---|
700 | } netr_DELTA_ENUM_ARRAY;
|
---|
701 |
|
---|
702 |
|
---|
703 | NTSTATUS netr_DatabaseDeltas(
|
---|
704 | [in] [string,charset(UTF16)] uint16 logon_server[],
|
---|
705 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
706 | [in,ref] netr_Authenticator *credential,
|
---|
707 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
708 | [in] netr_SamDatabaseID database_id,
|
---|
709 | [in,out,ref] udlong *sequence_num,
|
---|
710 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
|
---|
711 | [in] uint32 preferredmaximumlength
|
---|
712 | );
|
---|
713 |
|
---|
714 |
|
---|
715 | /*****************/
|
---|
716 | /* Function 0x08 */
|
---|
717 |
|
---|
718 | NTSTATUS netr_DatabaseSync(
|
---|
719 | [in] [string,charset(UTF16)] uint16 logon_server[],
|
---|
720 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
721 | [in] netr_Authenticator credential,
|
---|
722 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
723 | [in] netr_SamDatabaseID database_id,
|
---|
724 | [in,out,ref] uint32 *sync_context,
|
---|
725 | [in] uint32 preferredmaximumlength,
|
---|
726 | [out,ref] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
---|
727 | );
|
---|
728 |
|
---|
729 |
|
---|
730 | /*****************/
|
---|
731 | /* Function 0x09 */
|
---|
732 |
|
---|
733 | /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
|
---|
734 |
|
---|
735 | typedef [flag(NDR_PAHEX)] struct {
|
---|
736 | uint8 computer_name[16];
|
---|
737 | uint32 timecreated;
|
---|
738 | uint32 serial_number;
|
---|
739 | } netr_UAS_INFO_0;
|
---|
740 |
|
---|
741 | typedef struct {
|
---|
742 | [flag(NDR_REMAINING)] DATA_BLOB blob;
|
---|
743 | } netr_AccountBuffer;
|
---|
744 |
|
---|
745 | NTSTATUS netr_AccountDeltas(
|
---|
746 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
747 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
748 | [in] netr_Authenticator credential,
|
---|
749 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
750 | [in] netr_UAS_INFO_0 uas,
|
---|
751 | [in] uint32 count,
|
---|
752 | [in] uint32 level,
|
---|
753 | [in] uint32 buffersize,
|
---|
754 | [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
|
---|
755 | [out,ref] uint32 *count_returned,
|
---|
756 | [out,ref] uint32 *total_entries,
|
---|
757 | [out,ref] netr_UAS_INFO_0 *recordid
|
---|
758 | );
|
---|
759 |
|
---|
760 |
|
---|
761 | /*****************/
|
---|
762 | /* Function 0x0A */
|
---|
763 |
|
---|
764 | NTSTATUS netr_AccountSync(
|
---|
765 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
766 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
767 | [in] netr_Authenticator credential,
|
---|
768 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
769 | [in] uint32 reference,
|
---|
770 | [in] uint32 level,
|
---|
771 | [in] uint32 buffersize,
|
---|
772 | [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
|
---|
773 | [out,ref] uint32 *count_returned,
|
---|
774 | [out,ref] uint32 *total_entries,
|
---|
775 | [out,ref] uint32 *next_reference,
|
---|
776 | [in,out,ref] netr_UAS_INFO_0 *recordid
|
---|
777 | );
|
---|
778 |
|
---|
779 |
|
---|
780 | /*****************/
|
---|
781 | /* Function 0x0B */
|
---|
782 |
|
---|
783 | WERROR netr_GetDcName(
|
---|
784 | [in] [string,charset(UTF16)] uint16 logon_server[],
|
---|
785 | [in,unique] [string,charset(UTF16)] uint16 *domainname,
|
---|
786 | [out,ref] [string,charset(UTF16)] uint16 **dcname
|
---|
787 | );
|
---|
788 |
|
---|
789 | /*****************/
|
---|
790 | /* Function 0x0C */
|
---|
791 |
|
---|
792 | typedef [bitmap32bit] bitmap {
|
---|
793 | NETLOGON_CTRL_REPL_NEEDED = 0x0001,
|
---|
794 | NETLOGON_CTRL_REPL_IN_PROGRESS = 0x0002,
|
---|
795 | NETLOGON_CTRL_REPL_FULL_SYNC = 0x0004
|
---|
796 | } netr_InfoFlags;
|
---|
797 |
|
---|
798 | typedef struct {
|
---|
799 | netr_InfoFlags flags;
|
---|
800 | uint32 pdc_connection_status;
|
---|
801 | } netr_NETLOGON_INFO_1;
|
---|
802 |
|
---|
803 | typedef struct {
|
---|
804 | netr_InfoFlags flags;
|
---|
805 | uint32 pdc_connection_status;
|
---|
806 | [string,charset(UTF16)] uint16 *trusted_dc_name;
|
---|
807 | uint32 tc_connection_status;
|
---|
808 | } netr_NETLOGON_INFO_2;
|
---|
809 |
|
---|
810 | typedef struct {
|
---|
811 | netr_InfoFlags flags;
|
---|
812 | uint32 logon_attempts;
|
---|
813 | uint32 unknown1;
|
---|
814 | uint32 unknown2;
|
---|
815 | uint32 unknown3;
|
---|
816 | uint32 unknown4;
|
---|
817 | uint32 unknown5;
|
---|
818 | } netr_NETLOGON_INFO_3;
|
---|
819 |
|
---|
820 | typedef union {
|
---|
821 | [case(1)] netr_NETLOGON_INFO_1 *info1;
|
---|
822 | [case(2)] netr_NETLOGON_INFO_2 *info2;
|
---|
823 | [case(3)] netr_NETLOGON_INFO_3 *info3;
|
---|
824 | } netr_CONTROL_QUERY_INFORMATION;
|
---|
825 |
|
---|
826 | /* function_code values */
|
---|
827 | typedef [v1_enum] enum {
|
---|
828 | NETLOGON_CONTROL_SYNC = 2,
|
---|
829 | NETLOGON_CONTROL_REDISCOVER = 5,
|
---|
830 | NETLOGON_CONTROL_TC_QUERY = 6,
|
---|
831 | NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
|
---|
832 | NETLOGON_CONTROL_SET_DBFLAG = 65534
|
---|
833 | } netr_LogonControlCode;
|
---|
834 |
|
---|
835 | WERROR netr_LogonControl(
|
---|
836 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
837 | [in] netr_LogonControlCode function_code,
|
---|
838 | [in] uint32 level,
|
---|
839 | [out,ref,switch_is(level)] netr_CONTROL_QUERY_INFORMATION *info
|
---|
840 | );
|
---|
841 |
|
---|
842 |
|
---|
843 | /*****************/
|
---|
844 | /* Function 0x0D */
|
---|
845 |
|
---|
846 | WERROR netr_GetAnyDCName(
|
---|
847 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
848 | [in,unique] [string,charset(UTF16)] uint16 *domainname,
|
---|
849 | [out,ref] [string,charset(UTF16)] uint16 **dcname
|
---|
850 | );
|
---|
851 |
|
---|
852 |
|
---|
853 | /*****************/
|
---|
854 | /* Function 0x0E */
|
---|
855 |
|
---|
856 | typedef union {
|
---|
857 | [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
|
---|
858 | [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
|
---|
859 | [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
|
---|
860 | [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
|
---|
861 | } netr_CONTROL_DATA_INFORMATION;
|
---|
862 |
|
---|
863 | WERROR netr_LogonControl2(
|
---|
864 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
865 | [in] netr_LogonControlCode function_code,
|
---|
866 | [in] uint32 level,
|
---|
867 | [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
|
---|
868 | [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
|
---|
869 | );
|
---|
870 |
|
---|
871 |
|
---|
872 | /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
|
---|
873 | * session keys are encrypted with DES calls. (And the user session key
|
---|
874 | * is unencrypted) */
|
---|
875 |
|
---|
876 | /*****************/
|
---|
877 | /* Function 0x0F */
|
---|
878 |
|
---|
879 | typedef [bitmap32bit] bitmap {
|
---|
880 | NETLOGON_NEG_ACCOUNT_LOCKOUT = 0x00000001,
|
---|
881 | NETLOGON_NEG_PERSISTENT_SAMREPL = 0x00000002,
|
---|
882 | NETLOGON_NEG_ARCFOUR = 0x00000004,
|
---|
883 | NETLOGON_NEG_PROMOTION_COUNT = 0x00000008,
|
---|
884 | NETLOGON_NEG_CHANGELOG_BDC = 0x00000010,
|
---|
885 | NETLOGON_NEG_FULL_SYNC_REPL = 0x00000020,
|
---|
886 | NETLOGON_NEG_MULTIPLE_SIDS = 0x00000040,
|
---|
887 | NETLOGON_NEG_REDO = 0x00000080,
|
---|
888 | NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL = 0x00000100,
|
---|
889 | NETLOGON_NEG_SEND_PASSWORD_INFO_PDC = 0x00000200,
|
---|
890 | NETLOGON_NEG_GENERIC_PASSTHROUGH = 0x00000400,
|
---|
891 | NETLOGON_NEG_CONCURRENT_RPC = 0x00000800,
|
---|
892 | NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL = 0x00001000,
|
---|
893 | NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL = 0x00002000,
|
---|
894 | NETLOGON_NEG_128BIT = 0x00004000, /* STRONG_KEYS */
|
---|
895 | NETLOGON_NEG_TRANSITIVE_TRUSTS = 0x00008000,
|
---|
896 | NETLOGON_NEG_DNS_DOMAIN_TRUSTS = 0x00010000,
|
---|
897 | NETLOGON_NEG_PASSWORD_SET2 = 0x00020000,
|
---|
898 | NETLOGON_NEG_GETDOMAININFO = 0x00040000,
|
---|
899 | NETLOGON_NEG_CROSS_FOREST_TRUSTS = 0x00080000,
|
---|
900 | NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION = 0x00100000,
|
---|
901 | NETLOGON_NEG_RODC_PASSTHROUGH = 0x00200000,
|
---|
902 | NETLOGON_NEG_AUTHENTICATED_RPC_LSASS = 0x20000000,
|
---|
903 | NETLOGON_NEG_SCHANNEL = 0x40000000 /* AUTHENTICATED_RPC */
|
---|
904 | } netr_NegotiateFlags;
|
---|
905 |
|
---|
906 | NTSTATUS netr_ServerAuthenticate2(
|
---|
907 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
908 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
909 | [in] netr_SchannelType secure_channel_type,
|
---|
910 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
911 | [in,ref] netr_Credential *credentials,
|
---|
912 | [out,ref] netr_Credential *return_credentials,
|
---|
913 | [in,out,ref] netr_NegotiateFlags *negotiate_flags
|
---|
914 | );
|
---|
915 |
|
---|
916 |
|
---|
917 | /*****************/
|
---|
918 | /* Function 0x10 */
|
---|
919 |
|
---|
920 | NTSTATUS netr_DatabaseSync2(
|
---|
921 | [in] [string,charset(UTF16)] uint16 logon_server[],
|
---|
922 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
923 | [in] netr_Authenticator *credential,
|
---|
924 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
925 | [in] netr_SamDatabaseID database_id,
|
---|
926 | [in] uint16 restart_state,
|
---|
927 | [in,out,ref] uint32 *sync_context,
|
---|
928 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
|
---|
929 | [in] uint32 preferredmaximumlength
|
---|
930 | );
|
---|
931 |
|
---|
932 |
|
---|
933 | /*****************/
|
---|
934 | /* Function 0x11 */
|
---|
935 |
|
---|
936 | /* i'm not at all sure how this call works */
|
---|
937 |
|
---|
938 | typedef [bitmap16bit] bitmap {
|
---|
939 | NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED = 0x0001,
|
---|
940 | NETR_CHANGELOG_CHANGED_PASSWORD = 0x0002,
|
---|
941 | NETR_CHANGELOG_SID_INCLUDED = 0x0004,
|
---|
942 | NETR_CHANGELOG_NAME_INCLUDED = 0x0008,
|
---|
943 | NETR_CHANGELOG_FIRST_PROMOTION_OBJ = 0x0010
|
---|
944 | } netr_ChangeLogFlags;
|
---|
945 |
|
---|
946 | typedef [nodiscriminant] union {
|
---|
947 | [case(NETR_CHANGELOG_SID_INCLUDED)] dom_sid object_sid;
|
---|
948 | [case(NETR_CHANGELOG_NAME_INCLUDED)] nstring object_name;
|
---|
949 | [default];
|
---|
950 | } netr_ChangeLogObject;
|
---|
951 |
|
---|
952 | typedef [public,gensize] struct {
|
---|
953 | uint32 serial_number1;
|
---|
954 | uint32 serial_number2;
|
---|
955 | uint32 object_rid;
|
---|
956 | netr_ChangeLogFlags flags;
|
---|
957 | netr_SamDatabaseID8Bit db_index;
|
---|
958 | netr_DeltaEnum8Bit delta_type;
|
---|
959 | [switch_is(flags & (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED))] netr_ChangeLogObject object;
|
---|
960 | } netr_ChangeLogEntry;
|
---|
961 |
|
---|
962 | NTSTATUS netr_DatabaseRedo(
|
---|
963 | [in] [string,charset(UTF16)] uint16 logon_server[],
|
---|
964 | [in] [string,charset(UTF16)] uint16 computername[],
|
---|
965 | [in] netr_Authenticator *credential,
|
---|
966 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
967 | [in] [subcontext(4),subcontext_size(change_log_entry_size)] netr_ChangeLogEntry change_log_entry,
|
---|
968 | [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry, ndr->flags))] uint32 change_log_entry_size,
|
---|
969 | [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array
|
---|
970 | );
|
---|
971 |
|
---|
972 |
|
---|
973 | /*****************/
|
---|
974 | /* Function 0x12 */
|
---|
975 |
|
---|
976 | WERROR netr_LogonControl2Ex(
|
---|
977 | [in,unique] [string,charset(UTF16)] uint16 *logon_server,
|
---|
978 | [in] uint32 function_code,
|
---|
979 | [in] uint32 level,
|
---|
980 | [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
|
---|
981 | [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
|
---|
982 | );
|
---|
983 |
|
---|
984 | /*****************/
|
---|
985 | /* Function 0x13 */
|
---|
986 | typedef struct {
|
---|
987 | uint32 length;
|
---|
988 | [size_is(length)] uint8 *data;
|
---|
989 | } netr_Blob;
|
---|
990 |
|
---|
991 | WERROR netr_NetrEnumerateTrustedDomains(
|
---|
992 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
993 | [out,ref] netr_Blob *trusted_domains_blob
|
---|
994 | );
|
---|
995 |
|
---|
996 | /*****************/
|
---|
997 | /* Function 0x14 */
|
---|
998 |
|
---|
999 | /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
|
---|
1000 |
|
---|
1001 | const int DSGETDC_VALID_FLAGS = (DS_FORCE_REDISCOVERY |
|
---|
1002 | DS_DIRECTORY_SERVICE_REQUIRED |
|
---|
1003 | DS_DIRECTORY_SERVICE_PREFERRED |
|
---|
1004 | DS_GC_SERVER_REQUIRED |
|
---|
1005 | DS_PDC_REQUIRED |
|
---|
1006 | DS_BACKGROUND_ONLY |
|
---|
1007 | DS_IP_REQUIRED |
|
---|
1008 | DS_KDC_REQUIRED |
|
---|
1009 | DS_TIMESERV_REQUIRED |
|
---|
1010 | DS_WRITABLE_REQUIRED |
|
---|
1011 | DS_GOOD_TIMESERV_PREFERRED |
|
---|
1012 | DS_AVOID_SELF |
|
---|
1013 | DS_ONLY_LDAP_NEEDED |
|
---|
1014 | DS_IS_FLAT_NAME |
|
---|
1015 | DS_IS_DNS_NAME |
|
---|
1016 | DS_RETURN_FLAT_NAME |
|
---|
1017 | DS_RETURN_DNS_NAME);
|
---|
1018 |
|
---|
1019 | typedef [bitmap32bit] bitmap {
|
---|
1020 | DS_FORCE_REDISCOVERY = 0x00000001,
|
---|
1021 | DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
|
---|
1022 | DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
|
---|
1023 | DS_GC_SERVER_REQUIRED = 0x00000040,
|
---|
1024 | DS_PDC_REQUIRED = 0x00000080,
|
---|
1025 | DS_BACKGROUND_ONLY = 0x00000100,
|
---|
1026 | DS_IP_REQUIRED = 0x00000200,
|
---|
1027 | DS_KDC_REQUIRED = 0x00000400,
|
---|
1028 | DS_TIMESERV_REQUIRED = 0x00000800,
|
---|
1029 | DS_WRITABLE_REQUIRED = 0x00001000,
|
---|
1030 | DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
|
---|
1031 | DS_AVOID_SELF = 0x00004000,
|
---|
1032 | DS_ONLY_LDAP_NEEDED = 0x00008000,
|
---|
1033 | DS_IS_FLAT_NAME = 0x00010000,
|
---|
1034 | DS_IS_DNS_NAME = 0x00020000,
|
---|
1035 | DS_TRY_NEXTCLOSEST_SITE = 0x00040000,
|
---|
1036 | DS_DIRECTORY_SERVICE_6_REQUIRED = 0x00080000,
|
---|
1037 | DS_RETURN_DNS_NAME = 0x40000000,
|
---|
1038 | DS_RETURN_FLAT_NAME = 0x80000000
|
---|
1039 | } netr_DsRGetDCName_flags;
|
---|
1040 |
|
---|
1041 | typedef [v1_enum] enum {
|
---|
1042 | DS_ADDRESS_TYPE_INET = 1,
|
---|
1043 | DS_ADDRESS_TYPE_NETBIOS = 2
|
---|
1044 | } netr_DsRGetDCNameInfo_AddressType;
|
---|
1045 |
|
---|
1046 | typedef [bitmap32bit] bitmap {
|
---|
1047 | DS_SERVER_PDC = NBT_SERVER_PDC,
|
---|
1048 | DS_SERVER_GC = NBT_SERVER_GC,
|
---|
1049 | DS_SERVER_LDAP = NBT_SERVER_LDAP,
|
---|
1050 | DS_SERVER_DS = NBT_SERVER_DS,
|
---|
1051 | DS_SERVER_KDC = NBT_SERVER_KDC,
|
---|
1052 | DS_SERVER_TIMESERV = NBT_SERVER_TIMESERV,
|
---|
1053 | DS_SERVER_CLOSEST = NBT_SERVER_CLOSEST,
|
---|
1054 | DS_SERVER_WRITABLE = NBT_SERVER_WRITABLE,
|
---|
1055 | DS_SERVER_GOOD_TIMESERV = NBT_SERVER_GOOD_TIMESERV,
|
---|
1056 | DS_SERVER_NDNC = NBT_SERVER_NDNC,
|
---|
1057 | DS_SERVER_SELECT_SECRET_DOMAIN_6 = NBT_SERVER_SELECT_SECRET_DOMAIN_6,
|
---|
1058 | DS_SERVER_FULL_SECRET_DOMAIN_6 = NBT_SERVER_FULL_SECRET_DOMAIN_6,
|
---|
1059 | DS_DNS_CONTROLLER = 0x20000000,
|
---|
1060 | DS_DNS_DOMAIN = 0x40000000,
|
---|
1061 | DS_DNS_FOREST = 0x80000000
|
---|
1062 | } netr_DsR_DcFlags;
|
---|
1063 |
|
---|
1064 | typedef [public] struct {
|
---|
1065 | [string,charset(UTF16)] uint16 *dc_unc;
|
---|
1066 | [string,charset(UTF16)] uint16 *dc_address;
|
---|
1067 | netr_DsRGetDCNameInfo_AddressType dc_address_type;
|
---|
1068 | GUID domain_guid;
|
---|
1069 | [string,charset(UTF16)] uint16 *domain_name;
|
---|
1070 | [string,charset(UTF16)] uint16 *forest_name;
|
---|
1071 | netr_DsR_DcFlags dc_flags;
|
---|
1072 | [string,charset(UTF16)] uint16 *dc_site_name;
|
---|
1073 | [string,charset(UTF16)] uint16 *client_site_name;
|
---|
1074 | } netr_DsRGetDCNameInfo;
|
---|
1075 |
|
---|
1076 | WERROR netr_DsRGetDCName(
|
---|
1077 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
---|
1078 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
---|
1079 | [in,unique] GUID *domain_guid,
|
---|
1080 | [in,unique] GUID *site_guid,
|
---|
1081 | [in] netr_DsRGetDCName_flags flags,
|
---|
1082 | [out,ref] netr_DsRGetDCNameInfo **info
|
---|
1083 | );
|
---|
1084 |
|
---|
1085 | /*****************/
|
---|
1086 | /* Function 0x15 */
|
---|
1087 | typedef [switch_type(uint32)] union {
|
---|
1088 | [case(1)] netr_NegotiateFlags server_capabilities;
|
---|
1089 | } netr_Capabilities;
|
---|
1090 |
|
---|
1091 | NTSTATUS netr_LogonGetCapabilities(
|
---|
1092 | [in] [string,charset(UTF16)] uint16 server_name[],
|
---|
1093 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
1094 | [in,ref] netr_Authenticator *credential,
|
---|
1095 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
1096 | [in] uint32 query_level,
|
---|
1097 | [out,ref,switch_is(query_level)] netr_Capabilities *capabilities
|
---|
1098 | );
|
---|
1099 |
|
---|
1100 | /****************/
|
---|
1101 | /* Function 0x16 */
|
---|
1102 | WERROR netr_NETRLOGONSETSERVICEBITS();
|
---|
1103 |
|
---|
1104 | /****************/
|
---|
1105 | /* Function 0x17 */
|
---|
1106 | WERROR netr_LogonGetTrustRid(
|
---|
1107 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1108 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
---|
1109 | [out,ref] uint32 *rid
|
---|
1110 | );
|
---|
1111 |
|
---|
1112 | /****************/
|
---|
1113 | /* Function 0x18 */
|
---|
1114 | WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
|
---|
1115 |
|
---|
1116 | /****************/
|
---|
1117 | /* Function 0x19 */
|
---|
1118 | WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
|
---|
1119 |
|
---|
1120 | /****************/
|
---|
1121 | /* Function 0x1a */
|
---|
1122 | NTSTATUS netr_ServerAuthenticate3(
|
---|
1123 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1124 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
1125 | [in] netr_SchannelType secure_channel_type,
|
---|
1126 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
1127 | [in,out,ref] netr_Credential *credentials,
|
---|
1128 | [in,out,ref] netr_NegotiateFlags *negotiate_flags,
|
---|
1129 | [out,ref] uint32 *rid
|
---|
1130 | );
|
---|
1131 |
|
---|
1132 | /****************/
|
---|
1133 | /* Function 0x1b */
|
---|
1134 |
|
---|
1135 | WERROR netr_DsRGetDCNameEx(
|
---|
1136 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
---|
1137 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
---|
1138 | [in,unique] GUID *domain_guid,
|
---|
1139 | [in,unique] [string,charset(UTF16)] uint16 *site_name,
|
---|
1140 | [in] netr_DsRGetDCName_flags flags,
|
---|
1141 | [out,ref] netr_DsRGetDCNameInfo **info
|
---|
1142 | );
|
---|
1143 |
|
---|
1144 | /****************/
|
---|
1145 | /* Function 0x1c */
|
---|
1146 | WERROR netr_DsRGetSiteName(
|
---|
1147 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
1148 | [out,ref] [string,charset(UTF16)] uint16 **site
|
---|
1149 | );
|
---|
1150 |
|
---|
1151 | /****************/
|
---|
1152 | /* Function 0x1d */
|
---|
1153 |
|
---|
1154 | typedef [flag(NDR_PAHEX)] struct {
|
---|
1155 | uint16 length;
|
---|
1156 | uint16 size;
|
---|
1157 | [size_is(size/2),length_is(length/2)] uint16 *data;
|
---|
1158 | } netr_BinaryString;
|
---|
1159 |
|
---|
1160 | typedef struct {
|
---|
1161 | netr_Blob blob;
|
---|
1162 | [string,charset(UTF16)] uint16 *workstation_domain;
|
---|
1163 | [string,charset(UTF16)] uint16 *workstation_site;
|
---|
1164 | [string,charset(UTF16)] uint16 *unknown1;
|
---|
1165 | [string,charset(UTF16)] uint16 *unknown2;
|
---|
1166 | [string,charset(UTF16)] uint16 *unknown3;
|
---|
1167 | [string,charset(UTF16)] uint16 *unknown4;
|
---|
1168 | netr_BinaryString blob2;
|
---|
1169 | lsa_String product;
|
---|
1170 | lsa_String unknown5;
|
---|
1171 | lsa_String unknown6;
|
---|
1172 | uint32 unknown7[4];
|
---|
1173 | } netr_DomainQuery1;
|
---|
1174 |
|
---|
1175 | typedef union {
|
---|
1176 | [case(1)] netr_DomainQuery1 *query1;
|
---|
1177 | [case(2)] netr_DomainQuery1 *query1;
|
---|
1178 | } netr_DomainQuery;
|
---|
1179 |
|
---|
1180 | typedef struct {
|
---|
1181 | lsa_String domainname;
|
---|
1182 | lsa_String fulldomainname;
|
---|
1183 | lsa_String forest;
|
---|
1184 | GUID guid;
|
---|
1185 | dom_sid2 *sid;
|
---|
1186 | netr_BinaryString unknown1[4];
|
---|
1187 | uint32 unknown[4];
|
---|
1188 | } netr_DomainTrustInfo;
|
---|
1189 |
|
---|
1190 | typedef struct {
|
---|
1191 | netr_DomainTrustInfo domaininfo;
|
---|
1192 | uint32 num_trusts;
|
---|
1193 | [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
|
---|
1194 | uint32 unknown[14]; /* room for expansion? */
|
---|
1195 | } netr_DomainInfo1;
|
---|
1196 |
|
---|
1197 | typedef union {
|
---|
1198 | [case(1)] netr_DomainInfo1 *info1;
|
---|
1199 | [case(2)] netr_DomainInfo1 *info1;
|
---|
1200 | } netr_DomainInfo;
|
---|
1201 |
|
---|
1202 | NTSTATUS netr_LogonGetDomainInfo(
|
---|
1203 | [in] [string,charset(UTF16)] uint16 server_name[],
|
---|
1204 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
1205 | [in,ref] netr_Authenticator *credential,
|
---|
1206 | [in,out,ref] netr_Authenticator *return_authenticator,
|
---|
1207 | [in] uint32 level,
|
---|
1208 | [in,switch_is(level)] netr_DomainQuery query,
|
---|
1209 | [out,ref,switch_is(level)] netr_DomainInfo *info
|
---|
1210 | );
|
---|
1211 |
|
---|
1212 | typedef [flag(NDR_PAHEX)] struct {
|
---|
1213 | uint8 data[512];
|
---|
1214 | uint32 length;
|
---|
1215 | } netr_CryptPassword;
|
---|
1216 |
|
---|
1217 | /*****************/
|
---|
1218 | /* Function 0x1e */
|
---|
1219 | NTSTATUS netr_ServerPasswordSet2(
|
---|
1220 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1221 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
1222 | [in] netr_SchannelType secure_channel_type,
|
---|
1223 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
1224 | [in,ref] netr_Authenticator *credential,
|
---|
1225 | [out,ref] netr_Authenticator *return_authenticator,
|
---|
1226 | [in,ref] netr_CryptPassword *new_password
|
---|
1227 | );
|
---|
1228 |
|
---|
1229 | /****************/
|
---|
1230 | /* Function 0x1f */
|
---|
1231 | WERROR netr_ServerPasswordGet(
|
---|
1232 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1233 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
1234 | [in] netr_SchannelType secure_channel_type,
|
---|
1235 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
1236 | [in,ref] netr_Authenticator *credential,
|
---|
1237 | [out,ref] netr_Authenticator *return_authenticator,
|
---|
1238 | [out,ref] samr_Password *password
|
---|
1239 | );
|
---|
1240 |
|
---|
1241 | /****************/
|
---|
1242 | /* Function 0x20 */
|
---|
1243 | WERROR netr_NETRLOGONSENDTOSAM();
|
---|
1244 |
|
---|
1245 | /****************/
|
---|
1246 | /* Function 0x21 */
|
---|
1247 | typedef struct {
|
---|
1248 | uint32 count;
|
---|
1249 | [size_is(count)] lsa_String *sitename;
|
---|
1250 | } netr_DsRAddressToSitenamesWCtr;
|
---|
1251 |
|
---|
1252 | typedef struct {
|
---|
1253 | [size_is(size)] uint8 *buffer;
|
---|
1254 | uint32 size;
|
---|
1255 | } netr_DsRAddress;
|
---|
1256 |
|
---|
1257 | WERROR netr_DsRAddressToSitenamesW(
|
---|
1258 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1259 | [in] [range(0,32000)] uint32 count,
|
---|
1260 | [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
---|
1261 | [out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
|
---|
1262 | );
|
---|
1263 |
|
---|
1264 | /****************/
|
---|
1265 | /* Function 0x22 */
|
---|
1266 | WERROR netr_DsRGetDCNameEx2(
|
---|
1267 | [in,unique] [string,charset(UTF16)] uint16 *server_unc,
|
---|
1268 | [in,unique] [string,charset(UTF16)] uint16 *client_account,
|
---|
1269 | [in] samr_AcctFlags mask,
|
---|
1270 | [in,unique] [string,charset(UTF16)] uint16 *domain_name,
|
---|
1271 | [in,unique] GUID *domain_guid,
|
---|
1272 | [in,unique] [string,charset(UTF16)] uint16 *site_name,
|
---|
1273 | [in] netr_DsRGetDCName_flags flags,
|
---|
1274 | [out,ref] netr_DsRGetDCNameInfo **info
|
---|
1275 | );
|
---|
1276 |
|
---|
1277 | /****************/
|
---|
1278 | /* Function 0x23 */
|
---|
1279 | WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
|
---|
1280 |
|
---|
1281 | /****************/
|
---|
1282 | /* Function 0x24 */
|
---|
1283 | typedef [bitmap32bit] bitmap {
|
---|
1284 | NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
|
---|
1285 | NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
|
---|
1286 | NETR_TRUST_FLAG_TREEROOT = 0x00000004,
|
---|
1287 | NETR_TRUST_FLAG_PRIMARY = 0x00000008,
|
---|
1288 | NETR_TRUST_FLAG_NATIVE = 0x00000010,
|
---|
1289 | NETR_TRUST_FLAG_INBOUND = 0x00000020
|
---|
1290 | } netr_TrustFlags;
|
---|
1291 |
|
---|
1292 | typedef [v1_enum] enum {
|
---|
1293 | NETR_TRUST_TYPE_DOWNLEVEL = 1,
|
---|
1294 | NETR_TRUST_TYPE_UPLEVEL = 2,
|
---|
1295 | NETR_TRUST_TYPE_MIT = 3,
|
---|
1296 | NETR_TRUST_TYPE_DCE = 4
|
---|
1297 | } netr_TrustType;
|
---|
1298 |
|
---|
1299 | typedef [bitmap32bit] bitmap {
|
---|
1300 | NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
|
---|
1301 | NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
|
---|
1302 | NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
|
---|
1303 | NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
|
---|
1304 | NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
|
---|
1305 | NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
|
---|
1306 | NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040
|
---|
1307 | } netr_TrustAttributes;
|
---|
1308 |
|
---|
1309 | typedef struct {
|
---|
1310 | [string,charset(UTF16)] uint16 *netbios_name;
|
---|
1311 | [string,charset(UTF16)] uint16 *dns_name;
|
---|
1312 | netr_TrustFlags trust_flags;
|
---|
1313 | uint32 parent_index;
|
---|
1314 | netr_TrustType trust_type;
|
---|
1315 | netr_TrustAttributes trust_attributes;
|
---|
1316 | dom_sid2 *sid;
|
---|
1317 | GUID guid;
|
---|
1318 | } netr_DomainTrust;
|
---|
1319 |
|
---|
1320 | typedef struct {
|
---|
1321 | uint32 count;
|
---|
1322 | [size_is(count)] netr_DomainTrust *array;
|
---|
1323 | } netr_DomainTrustList;
|
---|
1324 |
|
---|
1325 | WERROR netr_NetrEnumerateTrustedDomainsEx(
|
---|
1326 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1327 | [out,ref] netr_DomainTrustList *dom_trust_list
|
---|
1328 | );
|
---|
1329 |
|
---|
1330 | /****************/
|
---|
1331 | /* Function 0x25 */
|
---|
1332 | typedef struct {
|
---|
1333 | uint32 count;
|
---|
1334 | [size_is(count)] lsa_String *sitename;
|
---|
1335 | [size_is(count)] lsa_String *subnetname;
|
---|
1336 | } netr_DsRAddressToSitenamesExWCtr;
|
---|
1337 |
|
---|
1338 | WERROR netr_DsRAddressToSitenamesExW(
|
---|
1339 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1340 | [in] [range(0,32000)] uint32 count,
|
---|
1341 | [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
|
---|
1342 | [out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
|
---|
1343 | );
|
---|
1344 |
|
---|
1345 | /****************/
|
---|
1346 | /* Function 0x26 */
|
---|
1347 |
|
---|
1348 | typedef struct {
|
---|
1349 | uint32 num_sites;
|
---|
1350 | [size_is(num_sites)] [unique] lsa_String *sites;
|
---|
1351 | } DcSitesCtr;
|
---|
1352 |
|
---|
1353 | WERROR netr_DsrGetDcSiteCoverageW(
|
---|
1354 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1355 | [out,ref] DcSitesCtr *ctr
|
---|
1356 | );
|
---|
1357 |
|
---|
1358 | /****************/
|
---|
1359 | /* Function 0x27 */
|
---|
1360 | NTSTATUS netr_LogonSamLogonEx(
|
---|
1361 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1362 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
1363 | [in] netr_LogonLevel logon_level,
|
---|
1364 | [in,ref] [switch_is(logon_level)] netr_LogonInfo *logon,
|
---|
1365 | [in] uint16 validation_level,
|
---|
1366 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
---|
1367 | [out,ref] uint8 *authoritative,
|
---|
1368 | [in,out,ref] uint32 *flags
|
---|
1369 | );
|
---|
1370 |
|
---|
1371 | /****************/
|
---|
1372 | /* Function 0x28 */
|
---|
1373 |
|
---|
1374 | WERROR netr_DsrEnumerateDomainTrusts(
|
---|
1375 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1376 | [in] netr_TrustFlags trust_flags,
|
---|
1377 | [out,ref] netr_DomainTrustList *trusts
|
---|
1378 | );
|
---|
1379 |
|
---|
1380 |
|
---|
1381 | /****************/
|
---|
1382 | /* Function 0x29 */
|
---|
1383 | WERROR netr_DsrDeregisterDNSHostRecords(
|
---|
1384 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1385 | [in,unique] [string,charset(UTF16)] uint16 *domain,
|
---|
1386 | [in,unique] GUID *domain_guid,
|
---|
1387 | [in,unique] GUID *dsa_guid,
|
---|
1388 | [in,ref] [string,charset(UTF16)] uint16 *dns_host
|
---|
1389 | );
|
---|
1390 |
|
---|
1391 | /****************/
|
---|
1392 | /* Function 0x2a */
|
---|
1393 | NTSTATUS netr_ServerTrustPasswordsGet(
|
---|
1394 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1395 | [in] [string,charset(UTF16)] uint16 account_name[],
|
---|
1396 | [in] netr_SchannelType secure_channel_type,
|
---|
1397 | [in] [string,charset(UTF16)] uint16 computer_name[],
|
---|
1398 | [in,ref] netr_Authenticator *credential,
|
---|
1399 | [out,ref] netr_Authenticator *return_authenticator,
|
---|
1400 | [out,ref] samr_Password *password,
|
---|
1401 | [out,ref] samr_Password *password2
|
---|
1402 | );
|
---|
1403 |
|
---|
1404 | /****************/
|
---|
1405 | /* Function 0x2b */
|
---|
1406 |
|
---|
1407 | const int DS_GFTI_UPDATE_TDO = 0x1;
|
---|
1408 |
|
---|
1409 | WERROR netr_DsRGetForestTrustInformation(
|
---|
1410 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1411 | [in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
---|
1412 | [in] uint32 flags,
|
---|
1413 | [out,ref] lsa_ForestTrustInformation **forest_trust_info
|
---|
1414 | );
|
---|
1415 |
|
---|
1416 | /****************/
|
---|
1417 | /* Function 0x2c */
|
---|
1418 | WERROR netr_GetForestTrustInformation(
|
---|
1419 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1420 | [in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
|
---|
1421 | [in,ref] netr_Authenticator *credential,
|
---|
1422 | [out,ref] netr_Authenticator *return_authenticator,
|
---|
1423 | [in] uint32 flags,
|
---|
1424 | [out,ref] lsa_ForestTrustInformation **forest_trust_info
|
---|
1425 | );
|
---|
1426 |
|
---|
1427 | /****************/
|
---|
1428 | /* Function 0x2d */
|
---|
1429 |
|
---|
1430 | /* this is the ADS varient. I don't yet know what the "flags" are for */
|
---|
1431 | NTSTATUS netr_LogonSamLogonWithFlags(
|
---|
1432 | [in,unique] [string,charset(UTF16)] uint16 *server_name,
|
---|
1433 | [in,unique] [string,charset(UTF16)] uint16 *computer_name,
|
---|
1434 | [in,unique] netr_Authenticator *credential,
|
---|
1435 | [in,out,unique] netr_Authenticator *return_authenticator,
|
---|
1436 | [in] netr_LogonLevel logon_level,
|
---|
1437 | [in] [switch_is(logon_level)] netr_LogonInfo logon,
|
---|
1438 | [in] uint16 validation_level,
|
---|
1439 | [out,ref] [switch_is(validation_level)] netr_Validation *validation,
|
---|
1440 | [out,ref] uint8 *authoritative,
|
---|
1441 | [in,out,ref] uint32 *flags
|
---|
1442 | );
|
---|
1443 |
|
---|
1444 | /****************/
|
---|
1445 | /* Function 0x2e */
|
---|
1446 | WERROR netr_NETRSERVERGETTRUSTINFO();
|
---|
1447 | }
|
---|