tevent: Fix typos
[Samba.git] / librpc / idl / netlogon.idl
blob22f86b9207668a5e505ba8ee13bddb410a5f0116
1 /*
2 netlogon interface
3 much of this was derived from the ethereal sources - thanks to everyone
4 who contributed!
5 */
7 import "misc.idl", "lsa.idl", "samr.idl", "security.idl";
9 #include "idl_types.h"
11 cpp_quote("#define netr_DeltaEnum8Bit netr_DeltaEnum")
12 cpp_quote("#define netr_SamDatabaseID8Bit netr_SamDatabaseID")
14 cpp_quote("#define ENC_CRC32 KERB_ENCTYPE_DES_CBC_CRC")
15 cpp_quote("#define ENC_RSA_MD5 KERB_ENCTYPE_DES_CBC_MD5")
16 cpp_quote("#define ENC_RC4_HMAC_MD5 KERB_ENCTYPE_RC4_HMAC_MD5")
17 cpp_quote("#define ENC_HMAC_SHA1_96_AES128 KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96")
18 cpp_quote("#define ENC_HMAC_SHA1_96_AES256 KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96")
21 uuid("12345678-1234-abcd-ef00-01234567cffb"),
22 version(1.0),
23 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
24 helper("../librpc/ndr/ndr_netlogon.h"),
25 ms_union,
26 pointer_default(unique)
29 interface netlogon
31 typedef bitmap samr_AcctFlags samr_AcctFlags;
32 typedef bitmap samr_GroupAttrs samr_GroupAttrs;
33 typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit;
34 typedef enum netr_SamDatabaseID8Bit netr_SamDatabaseID8Bit;
36 /*****************/
37 /* Function 0x00 */
39 typedef struct {
40 [string,charset(UTF16)] uint16 *account_name;
41 uint32 priv;
42 uint32 auth_flags;
43 uint32 logon_count;
44 uint32 bad_pw_count;
45 time_t last_logon;
46 time_t last_logoff;
47 time_t logoff_time;
48 time_t kickoff_time;
49 uint32 password_age;
50 time_t pw_can_change;
51 time_t pw_must_change;
52 [string,charset(UTF16)] uint16 *computer;
53 [string,charset(UTF16)] uint16 *domain;
54 [string,charset(UTF16)] uint16 *script_path;
55 uint32 unknown;
56 } netr_UasInfo;
58 WERROR netr_LogonUasLogon(
59 [in,unique] [string,charset(UTF16)] uint16 *server_name,
60 [in] [string,charset(UTF16)] uint16 *account_name,
61 [in] [string,charset(UTF16)] uint16 *workstation,
62 [out,ref] netr_UasInfo **info
66 /*****************/
67 /* Function 0x01 */
69 typedef struct {
70 uint32 duration;
71 uint16 logon_count;
72 } netr_UasLogoffInfo;
74 WERROR netr_LogonUasLogoff(
75 [in,unique] [string,charset(UTF16)] uint16 *server_name,
76 [in] [string,charset(UTF16)] uint16 *account_name,
77 [in] [string,charset(UTF16)] uint16 *workstation,
78 [out,ref] netr_UasLogoffInfo *info
82 /*****************/
83 /* Function 0x02 */
85 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
86 that the structure of the bindata looks like this:
88 dlong lockout_duration;
89 udlong reset_count;
90 uint32 bad_attempt_lockout;
91 uint32 dummy;
93 but it doesn't look as though this structure is reflected at the
94 NDR level. Maybe it is left to the application to decode the bindata array.
96 typedef [public] struct {
97 dlong lockout_duration;
98 udlong reset_count;
99 uint32 bad_attempt_lockout;
100 uint32 dummy;
101 } netr_AcctLockStr;
103 /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
104 * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
105 * - MSV1_0_UPDATE_LOGON_STATISTICS
106 * sets the logon time on network logon
107 * - MSV1_0_RETURN_USER_PARAMETERS
108 * sets the user parameters in the driveletter
109 * - MSV1_0_RETURN_PROFILE_PATH
110 * returns the profilepath in the driveletter and
111 * sets LOGON_PROFILE_PATH_RETURNED user_flag
114 typedef [public,bitmap32bit] bitmap {
115 MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x00000002,
116 MSV1_0_UPDATE_LOGON_STATISTICS = 0x00000004,
117 MSV1_0_RETURN_USER_PARAMETERS = 0x00000008,
118 MSV1_0_DONT_TRY_GUEST_ACCOUNT = 0x00000010,
119 MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x00000020,
120 MSV1_0_RETURN_PASSWORD_EXPIRY = 0x00000040,
121 MSV1_0_USE_CLIENT_CHALLENGE = 0x00000080,
122 MSV1_0_TRY_GUEST_ACCOUNT_ONLY = 0x00000100,
123 MSV1_0_RETURN_PROFILE_PATH = 0x00000200,
124 MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY = 0x00000400,
125 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x00000800,
126 MSV1_0_DISABLE_PERSONAL_FALLBACK = 0x00001000,
127 MSV1_0_ALLOW_FORCE_GUEST = 0x00002000,
128 MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED = 0x00004000,
129 MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY = 0x00008000,
130 MSV1_0_ALLOW_MSVCHAPV2 = 0x00010000,
131 MSV1_0_S4U2SELF = 0x00020000,
132 MSV1_0_CHECK_LOGONHOURS_FOR_S4U = 0x00040000,
133 MSV1_0_SUBAUTHENTICATION_DLL_EX = 0x00100000
134 } netr_LogonParameterControl;
136 typedef struct {
137 lsa_String domain_name;
138 netr_LogonParameterControl parameter_control; /* see MSV1_0_* */
139 uint32 logon_id_low;
140 uint32 logon_id_high;
141 lsa_String account_name;
142 lsa_String workstation;
143 } netr_IdentityInfo;
145 typedef struct {
146 netr_IdentityInfo identity_info;
147 samr_Password lmpassword;
148 samr_Password ntpassword;
149 } netr_PasswordInfo;
151 typedef [flag(NDR_PAHEX)] struct {
152 uint16 length;
153 [value(length)] uint16 size;
154 [size_is(length),length_is(length)] uint8 *data;
155 } netr_ChallengeResponse;
157 typedef [flag(NDR_PAHEX)] struct {
158 netr_IdentityInfo identity_info;
159 uint8 challenge[8];
160 netr_ChallengeResponse nt;
161 netr_ChallengeResponse lm;
162 } netr_NetworkInfo;
164 typedef [flag(NDR_PAHEX)] struct {
165 netr_IdentityInfo identity_info;
166 lsa_String package_name;
167 uint32 length;
168 [size_is(length)] uint8 *data;
169 } netr_GenericInfo;
171 typedef [public] enum {
172 NetlogonInteractiveInformation = 1,
173 NetlogonNetworkInformation = 2,
174 NetlogonServiceInformation = 3,
175 NetlogonGenericInformation = 4,
176 NetlogonInteractiveTransitiveInformation = 5,
177 NetlogonNetworkTransitiveInformation = 6,
178 NetlogonServiceTransitiveInformation = 7
179 } netr_LogonInfoClass;
181 typedef [public,switch_type(netr_LogonInfoClass)] union {
182 [case(NetlogonInteractiveInformation)] netr_PasswordInfo *password;
183 [case(NetlogonNetworkInformation)] netr_NetworkInfo *network;
184 [case(NetlogonServiceInformation)] netr_PasswordInfo *password;
185 [case(NetlogonGenericInformation)] netr_GenericInfo *generic;
186 [case(NetlogonInteractiveTransitiveInformation)] netr_PasswordInfo *password;
187 [case(NetlogonNetworkTransitiveInformation)] netr_NetworkInfo *network;
188 [case(NetlogonServiceTransitiveInformation)] netr_PasswordInfo *password;
189 [default];
190 } netr_LogonLevel;
192 typedef [public,flag(NDR_PAHEX)] struct {
193 uint8 key[16];
194 } netr_UserSessionKey;
196 typedef [public,flag(NDR_PAHEX)] struct {
197 uint8 key[8];
198 } netr_LMSessionKey;
200 /* Flags for user_flags below */
201 typedef [public,bitmap32bit] bitmap {
202 NETLOGON_GUEST = 0x00000001,
203 NETLOGON_NOENCRYPTION = 0x00000002,
204 NETLOGON_CACHED_ACCOUNT = 0x00000004,
205 NETLOGON_USED_LM_PASSWORD = 0x00000008,
206 NETLOGON_EXTRA_SIDS = 0x00000020,
207 NETLOGON_SUBAUTH_SESSION_KEY = 0x00000040,
208 NETLOGON_SERVER_TRUST_ACCOUNT = 0x00000080,
209 NETLOGON_NTLMV2_ENABLED = 0x00000100,
210 NETLOGON_RESOURCE_GROUPS = 0x00000200,
211 NETLOGON_PROFILE_PATH_RETURNED = 0x00000400,
212 NETLOGON_GRACE_LOGON = 0x01000000
213 } netr_UserFlags;
215 typedef struct {
216 NTTIME logon_time;
217 NTTIME logoff_time;
218 NTTIME kickoff_time;
219 NTTIME last_password_change;
220 NTTIME allow_password_change;
221 NTTIME force_password_change;
222 lsa_String account_name;
223 lsa_String full_name;
224 lsa_String logon_script;
225 lsa_String profile_path;
226 lsa_String home_directory;
227 lsa_String home_drive;
228 uint16 logon_count;
229 uint16 bad_password_count;
230 uint32 rid;
231 uint32 primary_gid;
232 samr_RidWithAttributeArray groups;
233 netr_UserFlags user_flags;
234 [flag(NDR_SECRET)] netr_UserSessionKey key;
235 lsa_StringLarge logon_server;
236 lsa_StringLarge logon_domain;
237 dom_sid2 *domain_sid;
238 [flag(NDR_SECRET)] netr_LMSessionKey LMSessKey;
239 samr_AcctFlags acct_flags;
240 uint32 sub_auth_status;
241 NTTIME last_successful_logon;
242 NTTIME last_failed_logon;
243 uint32 failed_logon_count;
244 uint32 reserved;
245 } netr_SamBaseInfo;
247 typedef struct {
248 netr_SamBaseInfo base;
249 } netr_SamInfo2;
251 typedef [public] struct {
252 dom_sid2 *sid;
253 samr_GroupAttrs attributes;
254 } netr_SidAttr;
256 typedef [public] struct {
257 netr_SamBaseInfo base;
258 uint32 sidcount;
259 [size_is(sidcount)] netr_SidAttr *sids;
260 } netr_SamInfo3;
262 typedef struct {
263 netr_SamBaseInfo base;
264 uint32 sidcount;
265 [size_is(sidcount)] netr_SidAttr *sids;
267 * On ndr_push:
268 * Should pointer values be allocated
269 * of sids[*].sid before the following ones?
271 * That's at least the case for
272 * PAC_LOGON_INFO.
274 lsa_String dns_domainname;
275 lsa_String principal_name;
276 uint32 unknown4[20];
277 } netr_SamInfo6;
279 typedef struct {
280 uint32 pac_size;
281 [size_is(pac_size)] uint8 *pac;
282 lsa_String logon_domain;
283 lsa_String logon_server;
284 lsa_String principal_name;
285 uint32 auth_size;
286 [size_is(auth_size)] uint8 *auth;
287 netr_UserSessionKey user_session_key;
288 uint32 expansionroom[10];
289 lsa_String unknown1;
290 lsa_String unknown2;
291 lsa_String unknown3;
292 lsa_String unknown4;
293 } netr_PacInfo;
295 typedef [flag(NDR_PAHEX)] struct {
296 uint32 length;
297 [size_is(length)] uint8 *data;
298 } netr_GenericInfo2;
300 typedef enum {
301 NetlogonValidationUasInfo = 1,
302 NetlogonValidationSamInfo = 2,
303 NetlogonValidationSamInfo2 = 3,
304 NetlogonValidationGenericInfo2 = 5,
305 NetlogonValidationSamInfo4 = 6
306 } netr_ValidationInfoClass;
308 typedef [public,switch_type(uint16)] union {
309 [case(NetlogonValidationSamInfo)] netr_SamInfo2 *sam2;
310 [case(NetlogonValidationSamInfo2)] netr_SamInfo3 *sam3;
311 [case(4)] netr_PacInfo *pac;
312 [case(NetlogonValidationGenericInfo2)] netr_GenericInfo2 *generic;
313 [case(NetlogonValidationSamInfo4)] netr_SamInfo6 *sam6;
314 [default];
315 } netr_Validation;
317 typedef [public, flag(NDR_PAHEX)] struct {
318 uint8 data[8];
319 } netr_Credential;
321 typedef [public] struct {
322 netr_Credential cred;
323 time_t timestamp;
324 } netr_Authenticator;
326 [public] NTSTATUS netr_LogonSamLogon(
327 [in,unique] [string,charset(UTF16)] uint16 *server_name,
328 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
329 [in,unique] netr_Authenticator *credential,
330 [in,out,unique] netr_Authenticator *return_authenticator,
331 [in] netr_LogonInfoClass logon_level,
332 [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
333 [in] uint16 validation_level,
334 [out,ref] [switch_is(validation_level)] netr_Validation *validation,
335 [out,ref] uint8 *authoritative
339 /*****************/
340 /* Function 0x03 */
342 NTSTATUS netr_LogonSamLogoff(
343 [in,unique] [string,charset(UTF16)] uint16 *server_name,
344 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
345 [in,unique] netr_Authenticator *credential,
346 [in,out,unique] netr_Authenticator *return_authenticator,
347 [in] netr_LogonInfoClass logon_level,
348 [in] [switch_is(logon_level)] netr_LogonLevel logon
353 /*****************/
354 /* Function 0x04 */
356 [public] NTSTATUS netr_ServerReqChallenge(
357 [in,unique,string,charset(UTF16)] uint16 *server_name,
358 [in,string,charset(UTF16)] uint16 *computer_name,
359 [in,ref] netr_Credential *credentials,
360 [out,ref] netr_Credential *return_credentials
364 /*****************/
365 /* Function 0x05 */
367 typedef enum netr_SchannelType netr_SchannelType;
369 NTSTATUS netr_ServerAuthenticate(
370 [in,unique,string,charset(UTF16)] uint16 *server_name,
371 [in,string,charset(UTF16)] uint16 *account_name,
372 [in] netr_SchannelType secure_channel_type,
373 [in,string,charset(UTF16)] uint16 *computer_name,
374 [in,ref] netr_Credential *credentials,
375 [out,ref] netr_Credential *return_credentials
379 /*****************/
380 /* Function 0x06 */
382 NTSTATUS netr_ServerPasswordSet(
383 [in,unique] [string,charset(UTF16)] uint16 *server_name,
384 [in] [string,charset(UTF16)] uint16 *account_name,
385 [in] netr_SchannelType secure_channel_type,
386 [in] [string,charset(UTF16)] uint16 *computer_name,
387 [in,ref] netr_Authenticator *credential,
388 [out,ref] netr_Authenticator *return_authenticator,
389 [in,ref] samr_Password *new_password
393 /*****************/
394 /* Function 0x07 */
396 typedef enum netr_SamDatabaseID netr_SamDatabaseID;
398 typedef struct {
399 [string,charset(UTF16)] uint16 *account_name;
400 lsa_String unknown1;
401 lsa_String unknown2;
402 lsa_String unknown3;
403 lsa_String unknown4;
404 uint32 unknown5;
405 uint32 unknown6;
406 uint32 unknown7;
407 uint32 unknown8;
408 } netr_DELTA_DELETE_USER;
410 typedef struct {
411 uint16 length;
412 [value(length)] uint16 size;
413 uint32 flags;
414 samr_Password pwd;
415 } netr_USER_KEY16;
417 typedef struct {
418 uint16 nt_length;
419 [value(nt_length)] uint16 nt_size;
420 uint32 nt_flags;
421 uint16 lm_length;
422 [value(lm_length)] uint16 lm_size;
423 uint32 lm_flags;
424 uint8 nt_history[nt_length];
425 uint8 lm_history[lm_length];
426 } netr_PasswordHistory;
428 typedef struct {
429 netr_USER_KEY16 lmpassword;
430 netr_USER_KEY16 ntpassword;
431 netr_PasswordHistory history;
432 } netr_USER_KEYS2;
434 typedef struct { /* TODO: make this a union! */
435 netr_USER_KEYS2 keys2;
436 } netr_USER_KEY_UNION;
438 typedef [public] struct {
439 uint32 version;
440 netr_USER_KEY_UNION keys;
441 } netr_USER_KEYS;
443 typedef struct {
444 boolean8 SensitiveDataFlag;
445 uint32 DataLength;
447 /* netr_USER_KEYS encrypted with the session key */
448 [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
449 } netr_USER_PRIVATE_INFO;
451 typedef struct {
452 lsa_String account_name;
453 lsa_String full_name;
454 uint32 rid;
455 uint32 primary_gid;
456 lsa_String home_directory;
457 lsa_String home_drive;
458 lsa_String logon_script;
459 lsa_String description;
460 lsa_String workstations;
461 NTTIME last_logon;
462 NTTIME last_logoff;
463 samr_LogonHours logon_hours;
464 uint16 bad_password_count;
465 uint16 logon_count;
466 NTTIME last_password_change;
467 NTTIME acct_expiry;
468 samr_AcctFlags acct_flags;
469 samr_Password lmpassword;
470 samr_Password ntpassword;
471 boolean8 nt_password_present;
472 boolean8 lm_password_present;
473 boolean8 password_expired;
474 lsa_String comment;
475 lsa_BinaryString parameters;
476 uint16 country_code;
477 uint16 code_page;
478 netr_USER_PRIVATE_INFO user_private_info;
479 uint32 SecurityInformation;
480 sec_desc_buf sdbuf;
481 lsa_String profile_path;
482 lsa_String unknown2;
483 lsa_String unknown3;
484 lsa_String unknown4;
485 uint32 unknown5;
486 uint32 unknown6;
487 uint32 unknown7;
488 uint32 unknown8;
489 } netr_DELTA_USER;
491 typedef struct {
492 lsa_String domain_name;
493 lsa_String oem_information; /* comment */
494 dlong force_logoff_time;
495 uint16 min_password_length;
496 uint16 password_history_length;
497 /* yes, these are signed. They are in negative 100ns */
498 dlong max_password_age;
499 dlong min_password_age;
500 udlong sequence_num;
501 NTTIME domain_create_time;
502 uint32 SecurityInformation;
503 sec_desc_buf sdbuf;
504 lsa_BinaryString account_lockout;
505 lsa_String unknown2;
506 lsa_String unknown3;
507 lsa_String unknown4;
508 uint32 logon_to_chgpass;
509 uint32 unknown6;
510 uint32 unknown7;
511 uint32 unknown8;
512 } netr_DELTA_DOMAIN;
514 typedef struct {
515 lsa_String group_name;
516 uint32 rid;
517 uint32 attributes;
518 lsa_String description;
519 uint32 SecurityInformation;
520 sec_desc_buf sdbuf;
521 lsa_String unknown1;
522 lsa_String unknown2;
523 lsa_String unknown3;
524 lsa_String unknown4;
525 uint32 unknown5;
526 uint32 unknown6;
527 uint32 unknown7;
528 uint32 unknown8;
529 } netr_DELTA_GROUP;
531 typedef struct {
532 lsa_String OldName;
533 lsa_String NewName;
534 lsa_String unknown1;
535 lsa_String unknown2;
536 lsa_String unknown3;
537 lsa_String unknown4;
538 uint32 unknown5;
539 uint32 unknown6;
540 uint32 unknown7;
541 uint32 unknown8;
542 } netr_DELTA_RENAME;
544 typedef struct {
545 [size_is(num_rids)] uint32 *rids;
546 [size_is(num_rids)] uint32 *attribs;
547 uint32 num_rids;
548 uint32 unknown1;
549 uint32 unknown2;
550 uint32 unknown3;
551 uint32 unknown4;
552 } netr_DELTA_GROUP_MEMBER;
554 typedef struct {
555 lsa_String alias_name;
556 uint32 rid;
557 uint32 SecurityInformation;
558 sec_desc_buf sdbuf;
559 lsa_String description;
560 lsa_String unknown2;
561 lsa_String unknown3;
562 lsa_String unknown4;
563 uint32 unknown5;
564 uint32 unknown6;
565 uint32 unknown7;
566 uint32 unknown8;
567 } netr_DELTA_ALIAS;
569 typedef struct {
570 lsa_SidArray sids;
571 uint32 unknown1;
572 uint32 unknown2;
573 uint32 unknown3;
574 uint32 unknown4;
575 } netr_DELTA_ALIAS_MEMBER;
577 typedef struct {
578 uint32 pagedpoollimit;
579 uint32 nonpagedpoollimit;
580 uint32 minimumworkingsetsize;
581 uint32 maximumworkingsetsize;
582 uint32 pagefilelimit;
583 NTTIME timelimit;
584 } netr_QUOTA_LIMITS;
586 typedef struct {
587 uint32 maxlogsize;
588 NTTIME auditretentionperiod;
589 boolean8 auditingmode;
590 uint32 maxauditeventcount;
591 [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
592 lsa_String primary_domain_name;
593 dom_sid2 *sid;
594 netr_QUOTA_LIMITS quota_limits;
595 udlong sequence_num;
596 NTTIME db_create_time;
597 uint32 SecurityInformation;
598 sec_desc_buf sdbuf;
599 lsa_String unknown1;
600 lsa_String unknown2;
601 lsa_String unknown3;
602 lsa_String unknown4;
603 uint32 unknown5;
604 uint32 unknown6;
605 uint32 unknown7;
606 uint32 unknown8;
607 } netr_DELTA_POLICY;
609 typedef struct {
610 lsa_String domain_name;
611 uint32 num_controllers;
612 [size_is(num_controllers)] lsa_String *controller_names;
613 uint32 SecurityInformation;
614 sec_desc_buf sdbuf;
615 lsa_String unknown1;
616 lsa_String unknown2;
617 lsa_String unknown3;
618 lsa_String unknown4;
619 uint32 posix_offset;
620 uint32 unknown6;
621 uint32 unknown7;
622 uint32 unknown8;
623 } netr_DELTA_TRUSTED_DOMAIN;
625 typedef struct {
626 uint32 privilege_entries;
627 uint32 privilege_control;
628 [size_is(privilege_entries)] uint32 *privilege_attrib;
629 [size_is(privilege_entries)] lsa_String *privilege_name;
630 netr_QUOTA_LIMITS quotalimits;
631 uint32 system_flags;
632 uint32 SecurityInformation;
633 sec_desc_buf sdbuf;
634 lsa_String unknown1;
635 lsa_String unknown2;
636 lsa_String unknown3;
637 lsa_String unknown4;
638 uint32 unknown5;
639 uint32 unknown6;
640 uint32 unknown7;
641 uint32 unknown8;
642 } netr_DELTA_ACCOUNT;
644 typedef struct {
645 uint32 len;
646 uint32 maxlen;
647 [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
648 } netr_CIPHER_VALUE;
650 typedef struct {
651 netr_CIPHER_VALUE current_cipher;
652 NTTIME current_cipher_set_time;
653 netr_CIPHER_VALUE old_cipher;
654 NTTIME old_cipher_set_time;
655 uint32 SecurityInformation;
656 sec_desc_buf sdbuf;
657 lsa_String unknown1;
658 lsa_String unknown2;
659 lsa_String unknown3;
660 lsa_String unknown4;
661 uint32 unknown5;
662 uint32 unknown6;
663 uint32 unknown7;
664 uint32 unknown8;
665 } netr_DELTA_SECRET;
667 typedef enum {
668 NETR_DELTA_DOMAIN = 1,
669 NETR_DELTA_GROUP = 2,
670 NETR_DELTA_DELETE_GROUP = 3,
671 NETR_DELTA_RENAME_GROUP = 4,
672 NETR_DELTA_USER = 5,
673 NETR_DELTA_DELETE_USER = 6,
674 NETR_DELTA_RENAME_USER = 7,
675 NETR_DELTA_GROUP_MEMBER = 8,
676 NETR_DELTA_ALIAS = 9,
677 NETR_DELTA_DELETE_ALIAS = 10,
678 NETR_DELTA_RENAME_ALIAS = 11,
679 NETR_DELTA_ALIAS_MEMBER = 12,
680 NETR_DELTA_POLICY = 13,
681 NETR_DELTA_TRUSTED_DOMAIN = 14,
682 NETR_DELTA_DELETE_TRUST = 15,
683 NETR_DELTA_ACCOUNT = 16,
684 NETR_DELTA_DELETE_ACCOUNT = 17,
685 NETR_DELTA_SECRET = 18,
686 NETR_DELTA_DELETE_SECRET = 19,
687 NETR_DELTA_DELETE_GROUP2 = 20,
688 NETR_DELTA_DELETE_USER2 = 21,
689 NETR_DELTA_MODIFY_COUNT = 22
690 } netr_DeltaEnum;
692 typedef [switch_type(netr_DeltaEnum)] union {
693 [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
694 [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
695 [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
696 [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
697 [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
698 [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
699 [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
700 [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
701 [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
702 [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
703 [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
704 [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
705 [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
706 [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
707 [case(NETR_DELTA_DELETE_TRUST)] ; /* sid only */
708 [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
709 [case(NETR_DELTA_DELETE_ACCOUNT)] ; /* sid only */
710 [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
711 [case(NETR_DELTA_DELETE_SECRET)] ; /* name only */
712 [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
713 [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
714 [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
715 [default];
716 } netr_DELTA_UNION;
718 typedef [switch_type(netr_DeltaEnum)] union {
719 [case(NETR_DELTA_DOMAIN)] uint32 rid;
720 [case(NETR_DELTA_GROUP)] uint32 rid;
721 [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
722 [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
723 [case(NETR_DELTA_USER)] uint32 rid;
724 [case(NETR_DELTA_DELETE_USER)] uint32 rid;
725 [case(NETR_DELTA_RENAME_USER)] uint32 rid;
726 [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
727 [case(NETR_DELTA_ALIAS)] uint32 rid;
728 [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
729 [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
730 [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
731 [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
732 [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
733 [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
734 [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
735 [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
736 [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
737 [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
738 [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
739 [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
740 [case(NETR_DELTA_MODIFY_COUNT)] ;
741 [default];
742 } netr_DELTA_ID_UNION;
744 typedef struct {
745 netr_DeltaEnum delta_type;
746 [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
747 [switch_is(delta_type)] netr_DELTA_UNION delta_union;
748 } netr_DELTA_ENUM;
750 typedef struct {
751 uint32 num_deltas;
752 [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
753 } netr_DELTA_ENUM_ARRAY;
755 NTSTATUS netr_DatabaseDeltas(
756 [in] [string,charset(UTF16)] uint16 *logon_server,
757 [in] [string,charset(UTF16)] uint16 *computername,
758 [in,ref] netr_Authenticator *credential,
759 [in,out,ref] netr_Authenticator *return_authenticator,
760 [in] netr_SamDatabaseID database_id,
761 [in,out,ref] udlong *sequence_num,
762 [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
763 [in] uint32 preferredmaximumlength
767 /*****************/
768 /* Function 0x08 */
770 NTSTATUS netr_DatabaseSync(
771 [in] [string,charset(UTF16)] uint16 *logon_server,
772 [in] [string,charset(UTF16)] uint16 *computername,
773 [in,ref] netr_Authenticator *credential,
774 [in,out,ref] netr_Authenticator *return_authenticator,
775 [in] netr_SamDatabaseID database_id,
776 [in,out,ref] uint32 *sync_context,
777 [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
778 [in] uint32 preferredmaximumlength
782 /*****************/
783 /* Function 0x09 */
785 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
787 typedef [flag(NDR_PAHEX)] struct {
788 uint8 computer_name[16];
789 uint32 timecreated;
790 uint32 serial_number;
791 } netr_UAS_INFO_0;
793 typedef struct {
794 [flag(NDR_REMAINING)] DATA_BLOB blob;
795 } netr_AccountBuffer;
797 NTSTATUS netr_AccountDeltas(
798 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
799 [in] [string,charset(UTF16)] uint16 *computername,
800 [in] netr_Authenticator credential,
801 [in,out,ref] netr_Authenticator *return_authenticator,
802 [in] netr_UAS_INFO_0 uas,
803 [in] uint32 count,
804 [in] uint32 level,
805 [in] uint32 buffersize,
806 [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
807 [out,ref] uint32 *count_returned,
808 [out,ref] uint32 *total_entries,
809 [out,ref] netr_UAS_INFO_0 *recordid
813 /*****************/
814 /* Function 0x0A */
816 NTSTATUS netr_AccountSync(
817 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
818 [in] [string,charset(UTF16)] uint16 *computername,
819 [in] netr_Authenticator credential,
820 [in,out,ref] netr_Authenticator *return_authenticator,
821 [in] uint32 reference,
822 [in] uint32 level,
823 [in] uint32 buffersize,
824 [out,ref,subcontext(4)] netr_AccountBuffer *buffer,
825 [out,ref] uint32 *count_returned,
826 [out,ref] uint32 *total_entries,
827 [out,ref] uint32 *next_reference,
828 [in,out,ref] netr_UAS_INFO_0 *recordid
832 /*****************/
833 /* Function 0x0B */
835 WERROR netr_GetDcName(
836 [in] [string,charset(UTF16)] uint16 *logon_server,
837 [in,unique] [string,charset(UTF16)] uint16 *domainname,
838 [out,ref] [string,charset(UTF16)] uint16 **dcname
841 /*****************/
842 /* Function 0x0C */
844 typedef [bitmap32bit] bitmap {
845 NETLOGON_REPLICATION_NEEDED = 0x00000001,
846 NETLOGON_REPLICATION_IN_PROGRESS = 0x00000002,
847 NETLOGON_FULL_SYNC_REPLICATION = 0x00000004,
848 NETLOGON_REDO_NEEDED = 0x00000008,
849 NETLOGON_HAS_IP = 0x00000010,
850 NETLOGON_HAS_TIMESERV = 0x00000020,
851 NETLOGON_DNS_UPDATE_FAILURE = 0x00000040,
852 NETLOGON_VERIFY_STATUS_RETURNED = 0x00000080
853 } netr_InfoFlags;
855 typedef struct {
856 netr_InfoFlags flags;
857 WERROR pdc_connection_status;
858 } netr_NETLOGON_INFO_1;
860 typedef struct {
861 netr_InfoFlags flags;
862 WERROR pdc_connection_status;
863 [string,charset(UTF16)] uint16 *trusted_dc_name;
864 WERROR tc_connection_status;
865 } netr_NETLOGON_INFO_2;
867 typedef struct {
868 netr_InfoFlags flags;
869 uint32 logon_attempts;
870 uint32 unknown1;
871 uint32 unknown2;
872 uint32 unknown3;
873 uint32 unknown4;
874 uint32 unknown5;
875 } netr_NETLOGON_INFO_3;
877 typedef struct {
878 [string,charset(UTF16)] uint16 *trusted_dc_name;
879 [string,charset(UTF16)] uint16 *trusted_domain_name;
880 } netr_NETLOGON_INFO_4;
882 typedef [public] union {
883 [case(1)] netr_NETLOGON_INFO_1 *info1;
884 [case(2)] netr_NETLOGON_INFO_2 *info2;
885 [case(3)] netr_NETLOGON_INFO_3 *info3;
886 [case(4)] netr_NETLOGON_INFO_4 *info4;
887 [default] ;
888 } netr_CONTROL_QUERY_INFORMATION;
890 /* function_code values */
891 typedef [v1_enum,public] enum {
892 NETLOGON_CONTROL_QUERY = 0x00000001,
893 NETLOGON_CONTROL_REPLICATE = 0x00000002,
894 NETLOGON_CONTROL_SYNCHRONIZE = 0x00000003,
895 NETLOGON_CONTROL_PDC_REPLICATE = 0x00000004,
896 NETLOGON_CONTROL_REDISCOVER = 0x00000005,
897 NETLOGON_CONTROL_TC_QUERY = 0x00000006,
898 NETLOGON_CONTROL_TRANSPORT_NOTIFY = 0x00000007,
899 NETLOGON_CONTROL_FIND_USER = 0x00000008,
900 NETLOGON_CONTROL_CHANGE_PASSWORD = 0x00000009,
901 NETLOGON_CONTROL_TC_VERIFY = 0x0000000A,
902 NETLOGON_CONTROL_FORCE_DNS_REG = 0x0000000B,
903 NETLOGON_CONTROL_QUERY_DNS_REG = 0x0000000C,
904 NETLOGON_CONTROL_BACKUP_CHANGE_LOG = 0x0000FFFC,
905 NETLOGON_CONTROL_TRUNCATE_LOG = 0x0000FFFD,
906 NETLOGON_CONTROL_SET_DBFLAG = 0x0000FFFE,
907 NETLOGON_CONTROL_BREAKPOINT = 0x0000FFFF
908 } netr_LogonControlCode;
910 WERROR netr_LogonControl(
911 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
912 [in] netr_LogonControlCode function_code,
913 [in] uint32 level,
914 [out,ref,switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
918 /*****************/
919 /* Function 0x0D */
921 WERROR netr_GetAnyDCName(
922 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
923 [in,unique] [string,charset(UTF16)] uint16 *domainname,
924 [out,ref] [string,charset(UTF16)] uint16 **dcname
928 /*****************/
929 /* Function 0x0E */
931 typedef [public,switch_type(netr_LogonControlCode)] union {
932 [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
933 [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
934 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
935 [case(NETLOGON_CONTROL_CHANGE_PASSWORD)] [string,charset(UTF16)] uint16 *domain;
936 [case(NETLOGON_CONTROL_TC_VERIFY)] [string,charset(UTF16)] uint16 *domain;
937 [case(NETLOGON_CONTROL_FIND_USER)] [string,charset(UTF16)] uint16 *user;
938 [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
939 [default] ;
940 } netr_CONTROL_DATA_INFORMATION;
942 WERROR netr_LogonControl2(
943 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
944 [in] netr_LogonControlCode function_code,
945 [in] uint32 level,
946 [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
947 [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
951 /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
952 * session keys are encrypted with DES calls. (And the user session key
953 * is unencrypted) */
955 /*****************/
956 /* Function 0x0F */
958 typedef [public,bitmap32bit] bitmap {
959 NETLOGON_NEG_ACCOUNT_LOCKOUT = 0x00000001,
960 NETLOGON_NEG_PERSISTENT_SAMREPL = 0x00000002,
961 NETLOGON_NEG_ARCFOUR = 0x00000004,
962 NETLOGON_NEG_PROMOTION_COUNT = 0x00000008,
963 NETLOGON_NEG_CHANGELOG_BDC = 0x00000010,
964 NETLOGON_NEG_FULL_SYNC_REPL = 0x00000020,
965 NETLOGON_NEG_MULTIPLE_SIDS = 0x00000040,
966 NETLOGON_NEG_REDO = 0x00000080,
967 NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL = 0x00000100,
968 NETLOGON_NEG_SEND_PASSWORD_INFO_PDC = 0x00000200,
969 NETLOGON_NEG_GENERIC_PASSTHROUGH = 0x00000400,
970 NETLOGON_NEG_CONCURRENT_RPC = 0x00000800,
971 NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL = 0x00001000,
972 NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL = 0x00002000,
973 NETLOGON_NEG_STRONG_KEYS = 0x00004000,
974 NETLOGON_NEG_TRANSITIVE_TRUSTS = 0x00008000,
975 NETLOGON_NEG_DNS_DOMAIN_TRUSTS = 0x00010000,
976 NETLOGON_NEG_PASSWORD_SET2 = 0x00020000,
977 NETLOGON_NEG_GETDOMAININFO = 0x00040000,
978 NETLOGON_NEG_CROSS_FOREST_TRUSTS = 0x00080000,
979 NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION = 0x00100000,
980 NETLOGON_NEG_RODC_PASSTHROUGH = 0x00200000,
981 NETLOGON_NEG_SUPPORTS_AES_SHA2 = 0x00400000,
982 NETLOGON_NEG_SUPPORTS_AES = 0x01000000,
983 NETLOGON_NEG_AUTHENTICATED_RPC_LSASS = 0x20000000,
984 NETLOGON_NEG_AUTHENTICATED_RPC = 0x40000000
985 } netr_NegotiateFlags;
987 const uint32 NETLOGON_NEG_128BIT = NETLOGON_NEG_STRONG_KEYS;
988 const uint32 NETLOGON_NEG_SCHANNEL = NETLOGON_NEG_AUTHENTICATED_RPC;
990 NTSTATUS netr_ServerAuthenticate2(
991 [in,unique] [string,charset(UTF16)] uint16 *server_name,
992 [in] [string,charset(UTF16)] uint16 *account_name,
993 [in] netr_SchannelType secure_channel_type,
994 [in] [string,charset(UTF16)] uint16 *computer_name,
995 [in,ref] netr_Credential *credentials,
996 [out,ref] netr_Credential *return_credentials,
997 [in,out,ref] netr_NegotiateFlags *negotiate_flags
1001 /*****************/
1002 /* Function 0x10 */
1004 typedef enum {
1005 SYNCSTATE_NORMAL_STATE = 0,
1006 SYNCSTATE_DOMAIN_STATE = 1,
1007 SYNCSTATE_GROUP_STATE = 2,
1008 SYNCSTATE_UAS_BUILT_IN_GROUP_STATE = 3,
1009 SYNCSTATE_USER_STATE = 4,
1010 SYNCSTATE_GROUP_MEMBER_STATE = 5,
1011 SYNCSTATE_ALIAS_STATE = 6,
1012 SYNCSTATE_ALIAS_MEMBER_STATE = 7,
1013 SYNCSTATE_SAM_DONE_STATE = 8
1014 } SyncStateEnum;
1016 NTSTATUS netr_DatabaseSync2(
1017 [in] [string,charset(UTF16)] uint16 *logon_server,
1018 [in] [string,charset(UTF16)] uint16 *computername,
1019 [in,ref] netr_Authenticator *credential,
1020 [in,out,ref] netr_Authenticator *return_authenticator,
1021 [in] netr_SamDatabaseID database_id,
1022 [in] SyncStateEnum restart_state,
1023 [in,out,ref] uint32 *sync_context,
1024 [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array,
1025 [in] uint32 preferredmaximumlength
1029 /*****************/
1030 /* Function 0x11 */
1032 /* i'm not at all sure how this call works */
1034 typedef [bitmap16bit] bitmap {
1035 NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED = 0x0001,
1036 NETR_CHANGELOG_CHANGED_PASSWORD = 0x0002,
1037 NETR_CHANGELOG_SID_INCLUDED = 0x0004,
1038 NETR_CHANGELOG_NAME_INCLUDED = 0x0008,
1039 NETR_CHANGELOG_FIRST_PROMOTION_OBJ = 0x0010
1040 } netr_ChangeLogFlags;
1042 typedef [nodiscriminant] union {
1043 [case(NETR_CHANGELOG_SID_INCLUDED)] dom_sid object_sid;
1044 [case(NETR_CHANGELOG_NAME_INCLUDED)] nstring object_name;
1045 [default];
1046 } netr_ChangeLogObject;
1048 typedef [public,gensize] struct {
1049 uint32 serial_number1;
1050 uint32 serial_number2;
1051 uint32 object_rid;
1052 netr_ChangeLogFlags flags;
1053 netr_SamDatabaseID8Bit db_index;
1054 netr_DeltaEnum8Bit delta_type;
1055 [switch_is(flags & (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED))] netr_ChangeLogObject object;
1056 } netr_ChangeLogEntry;
1058 NTSTATUS netr_DatabaseRedo(
1059 [in] [string,charset(UTF16)] uint16 *logon_server,
1060 [in] [string,charset(UTF16)] uint16 *computername,
1061 [in] netr_Authenticator *credential,
1062 [in,out,ref] netr_Authenticator *return_authenticator,
1064 * we cannot use subcontext_size() here, as
1065 * change_log_entry_size is encoded after the subcontext
1067 [in] [subcontext(4)/*,subcontext_size(change_log_entry_size)*/]
1068 netr_ChangeLogEntry change_log_entry,
1069 [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,
1070 ndr->flags))]
1071 uint32 change_log_entry_size,
1072 [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array
1076 /*****************/
1077 /* Function 0x12 */
1079 WERROR netr_LogonControl2Ex(
1080 [in,unique] [string,charset(UTF16)] uint16 *logon_server,
1081 [in] netr_LogonControlCode function_code,
1082 [in] uint32 level,
1083 [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
1084 [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
1087 /*****************/
1088 /* Function 0x13 */
1089 typedef struct {
1090 uint32 length;
1091 [size_is(length)] uint8 *data;
1092 } netr_Blob;
1094 NTSTATUS netr_NetrEnumerateTrustedDomains(
1095 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1096 [out,ref] netr_Blob *trusted_domains_blob
1099 /*****************/
1100 /* Function 0x14 */
1102 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1104 const int DSGETDC_VALID_FLAGS = (DS_FORCE_REDISCOVERY |
1105 DS_DIRECTORY_SERVICE_REQUIRED |
1106 DS_DIRECTORY_SERVICE_PREFERRED |
1107 DS_GC_SERVER_REQUIRED |
1108 DS_PDC_REQUIRED |
1109 DS_BACKGROUND_ONLY |
1110 DS_IP_REQUIRED |
1111 DS_KDC_REQUIRED |
1112 DS_TIMESERV_REQUIRED |
1113 DS_WRITABLE_REQUIRED |
1114 DS_GOOD_TIMESERV_PREFERRED |
1115 DS_AVOID_SELF |
1116 DS_ONLY_LDAP_NEEDED |
1117 DS_IS_FLAT_NAME |
1118 DS_IS_DNS_NAME |
1119 DS_TRY_NEXTCLOSEST_SITE |
1120 DS_DIRECTORY_SERVICE_6_REQUIRED |
1121 DS_WEB_SERVICE_REQUIRED |
1122 DS_RETURN_FLAT_NAME |
1123 DS_RETURN_DNS_NAME);
1125 typedef [bitmap32bit] bitmap {
1126 DS_FORCE_REDISCOVERY = 0x00000001,
1127 DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
1128 DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
1129 DS_GC_SERVER_REQUIRED = 0x00000040,
1130 DS_PDC_REQUIRED = 0x00000080,
1131 DS_BACKGROUND_ONLY = 0x00000100,
1132 DS_IP_REQUIRED = 0x00000200,
1133 DS_KDC_REQUIRED = 0x00000400,
1134 DS_TIMESERV_REQUIRED = 0x00000800,
1135 DS_WRITABLE_REQUIRED = 0x00001000,
1136 DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
1137 DS_AVOID_SELF = 0x00004000,
1138 DS_ONLY_LDAP_NEEDED = 0x00008000,
1139 DS_IS_FLAT_NAME = 0x00010000,
1140 DS_IS_DNS_NAME = 0x00020000,
1141 DS_TRY_NEXTCLOSEST_SITE = 0x00040000,
1142 DS_DIRECTORY_SERVICE_6_REQUIRED = 0x00080000,
1143 DS_WEB_SERVICE_REQUIRED = 0x00100000,
1144 DS_RETURN_DNS_NAME = 0x40000000,
1145 DS_RETURN_FLAT_NAME = 0x80000000
1146 } netr_DsRGetDCName_flags;
1148 typedef [v1_enum] enum {
1149 DS_ADDRESS_TYPE_INET = 1,
1150 DS_ADDRESS_TYPE_NETBIOS = 2
1151 } netr_DsRGetDCNameInfo_AddressType;
1153 typedef [bitmap32bit] bitmap {
1154 DS_SERVER_PDC = 0x00000001,
1155 DS_SERVER_GC = 0x00000004,
1156 DS_SERVER_LDAP = 0x00000008,
1157 DS_SERVER_DS = 0x00000010,
1158 DS_SERVER_KDC = 0x00000020,
1159 DS_SERVER_TIMESERV = 0x00000040,
1160 DS_SERVER_CLOSEST = 0x00000080,
1161 DS_SERVER_WRITABLE = 0x00000100,
1162 DS_SERVER_GOOD_TIMESERV = 0x00000200,
1163 DS_SERVER_NDNC = 0x00000400,
1164 DS_SERVER_SELECT_SECRET_DOMAIN_6 = 0x00000800,
1165 DS_SERVER_FULL_SECRET_DOMAIN_6 = 0x00001000,
1166 DS_SERVER_WEBSERV = 0x00002000,
1167 DS_SERVER_DS_8 = 0x00004000,
1168 DS_DNS_CONTROLLER = 0x20000000,
1169 DS_DNS_DOMAIN = 0x40000000,
1170 DS_DNS_FOREST_ROOT = 0x80000000
1171 } netr_DsR_DcFlags;
1173 typedef [public] struct {
1174 [string,charset(UTF16)] uint16 *dc_unc;
1175 [string,charset(UTF16)] uint16 *dc_address;
1176 netr_DsRGetDCNameInfo_AddressType dc_address_type;
1177 GUID domain_guid;
1178 [string,charset(UTF16)] uint16 *domain_name;
1179 [string,charset(UTF16)] uint16 *forest_name;
1180 netr_DsR_DcFlags dc_flags;
1181 [string,charset(UTF16)] uint16 *dc_site_name;
1182 [string,charset(UTF16)] uint16 *client_site_name;
1183 } netr_DsRGetDCNameInfo;
1185 WERROR netr_DsRGetDCName(
1186 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
1187 [in,unique] [string,charset(UTF16)] uint16 *domain_name,
1188 [in,unique] GUID *domain_guid,
1189 [in,unique] GUID *site_guid,
1190 [in] netr_DsRGetDCName_flags flags,
1191 [out,ref] netr_DsRGetDCNameInfo **info
1194 /*****************/
1195 /* Function 0x15 */
1196 typedef [switch_type(uint32)] union {
1197 [case(1)] netr_NegotiateFlags server_capabilities;
1198 } netr_Capabilities;
1200 NTSTATUS netr_LogonGetCapabilities(
1201 [in] [string,charset(UTF16)] uint16 *server_name,
1202 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
1203 [in,ref] netr_Authenticator *credential,
1204 [in,out,ref] netr_Authenticator *return_authenticator,
1205 [in] uint32 query_level,
1206 [out,ref,switch_is(query_level)] netr_Capabilities *capabilities
1209 /****************/
1210 /* Function 0x16 */
1211 [todo] WERROR netr_NETRLOGONSETSERVICEBITS();
1213 /****************/
1214 /* Function 0x17 */
1215 WERROR netr_LogonGetTrustRid(
1216 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1217 [in,unique] [string,charset(UTF16)] uint16 *domain_name,
1218 [out,ref] uint32 *rid
1221 /****************/
1222 /* Function 0x18 */
1223 [todo] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
1225 /****************/
1226 /* Function 0x19 */
1227 [todo] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
1229 /****************/
1230 /* Function 0x1a */
1231 [public] NTSTATUS netr_ServerAuthenticate3(
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_Credential *credentials,
1237 [out,ref] netr_Credential *return_credentials,
1238 [in,out,ref] netr_NegotiateFlags *negotiate_flags,
1239 [out,ref] uint32 *rid
1242 /****************/
1243 /* Function 0x1b */
1245 WERROR netr_DsRGetDCNameEx(
1246 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
1247 [in,unique] [string,charset(UTF16)] uint16 *domain_name,
1248 [in,unique] GUID *domain_guid,
1249 [in,unique] [string,charset(UTF16)] uint16 *site_name,
1250 [in] netr_DsRGetDCName_flags flags,
1251 [out,ref] netr_DsRGetDCNameInfo **info
1255 /****************/
1256 /* Function 0x1c */
1257 WERROR netr_DsRGetSiteName(
1258 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
1259 [out,ref] [string,charset(UTF16)] uint16 **site
1262 /****************/
1263 /* Function 0x1d */
1264 typedef [public,bitmap32bit] bitmap {
1265 NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
1266 NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
1267 NETR_TRUST_FLAG_TREEROOT = 0x00000004,
1268 NETR_TRUST_FLAG_PRIMARY = 0x00000008,
1269 NETR_TRUST_FLAG_NATIVE = 0x00000010,
1270 NETR_TRUST_FLAG_INBOUND = 0x00000020,
1271 NETR_TRUST_FLAG_MIT_KRB5 = 0x00000080,
1272 NETR_TRUST_FLAG_AES = 0x00000100
1273 } netr_TrustFlags;
1275 typedef [bitmap32bit] bitmap {
1276 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS = 0x00000001,
1277 NETR_WS_FLAG_HANDLES_SPN_UPDATE = 0x00000002
1278 } netr_WorkstationFlags;
1280 typedef [bitmap16bit] bitmap {
1281 NETR_VER_SUITE_BACKOFFICE = 0x0004,
1282 NETR_VER_SUITE_BLADE = 0x0400,
1283 NETR_VER_SUITE_COMPUTE_SERVER = 0x4000,
1284 NETR_VER_SUITE_DATACENTER = 0x0080,
1285 NETR_VER_SUITE_ENTERPRISE = 0x0002,
1286 NETR_VER_SUITE_EMBEDDEDNT = 0x0040,
1287 NETR_VER_SUITE_PERSONAL = 0x0200,
1288 NETR_VER_SUITE_SINGLEUSERTS = 0x0100,
1289 NETR_VER_SUITE_SMALLBUSINESS = 0x0001,
1290 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x0020,
1291 NETR_VER_SUITE_STORAGE_SERVER = 0x2000,
1292 NETR_VER_SUITE_TERMINAL = 0x0010,
1293 NETR_VER_SUITE_WH_SERVER = 0x8000
1294 } netr_SuiteMask;
1296 typedef [bitmap8bit] bitmap {
1297 NETR_VER_NT_DOMAIN_CONTROLLER = 0x02,
1298 NETR_VER_NT_SERVER = 0x03,
1299 NETR_VER_NT_WORKSTATION = 0x01
1300 } netr_ProductType;
1302 typedef struct {
1303 uint32 policy_size;
1304 [size_is(policy_size)] uint8 *policy;
1305 } netr_LsaPolicyInformation;
1307 typedef struct {
1308 [value(284)] uint32 OSVersionInfoSize;
1309 uint32 MajorVersion;
1310 uint32 MinorVersion;
1311 uint32 BuildNumber;
1312 uint32 PlatformId;
1313 [subcontext(0),subcontext_size(256)] nstring CSDVersion;
1314 uint16 ServicePackMajor;
1315 uint16 ServicePackMinor;
1316 netr_SuiteMask SuiteMask;
1317 netr_ProductType ProductType;
1318 uint8 Reserved;
1319 } netr_OsVersionInfoEx;
1321 typedef struct {
1322 /* these first 3 values come from the fact windows
1323 actually encodes this structure as a UNICODE_STRING
1324 - see MS-NRPC section 2.2.1.3.9 */
1325 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1326 [value(142)] uint32 length;
1327 [value(0)] uint32 dummy;
1328 [value(142)] uint32 size;
1329 netr_OsVersionInfoEx os;
1330 } netr_OsVersion;
1332 typedef struct {
1333 /* value is 284 when info != os, otherwise 0 (for length and
1334 size) */
1335 [value(os == NULL ? 0 : 284)] uint16 length;
1336 [value(os == NULL ? 0 : 284)] uint16 size;
1337 netr_OsVersion *os;
1338 } netr_OsVersionContainer;
1340 typedef struct {
1341 netr_LsaPolicyInformation lsa_policy;
1342 [string,charset(UTF16)] uint16 *dns_hostname;
1343 [string,charset(UTF16)] uint16 *sitename;
1344 [string,charset(UTF16)] uint16 *dummy1;
1345 [string,charset(UTF16)] uint16 *dummy2;
1346 [string,charset(UTF16)] uint16 *dummy3;
1347 [string,charset(UTF16)] uint16 *dummy4;
1348 netr_OsVersionContainer os_version;
1349 lsa_String os_name;
1350 lsa_String dummy_string3;
1351 lsa_String dummy_string4;
1352 netr_WorkstationFlags workstation_flags;
1353 kerb_EncTypes supported_enc_types;
1354 uint32 dummy_long3;
1355 uint32 dummy_long4;
1356 } netr_WorkstationInformation;
1358 typedef union {
1359 [case(1)] netr_WorkstationInformation *workstation_info;
1360 [case(2)] netr_WorkstationInformation *lsa_policy_info;
1361 } netr_WorkstationInfo;
1363 typedef struct {
1364 /* these first 3 values come from the fact windows
1365 actually encodes this structure as a UNICODE_STRING
1366 - see MS-NRPC section 2.2.1.3.9 */
1367 [value(8)] uint32 length;
1368 [value(0)] uint32 dummy;
1369 [value(8)] uint32 size;
1370 netr_TrustFlags flags;
1371 uint32 parent_index;
1372 lsa_TrustType trust_type;
1373 lsa_TrustAttributes trust_attributes;
1374 } netr_trust_extension;
1376 typedef struct {
1377 uint16 length; /* value is 16 when info != NULL, otherwise 0 */
1378 [value(length)] uint16 size; /* value is 16 when info != NULL, otherwise 0 */
1379 netr_trust_extension *info;
1380 } netr_trust_extension_container;
1382 typedef struct {
1383 lsa_StringLarge domainname;
1384 lsa_StringLarge dns_domainname;
1385 lsa_StringLarge dns_forestname;
1386 GUID domain_guid;
1387 dom_sid2 *domain_sid;
1388 netr_trust_extension_container trust_extension;
1389 lsa_StringLarge dummy_string2;
1390 lsa_StringLarge dummy_string3;
1391 lsa_StringLarge dummy_string4;
1392 uint32 dummy_long1;
1393 uint32 dummy_long2;
1394 uint32 dummy_long3;
1395 uint32 dummy_long4;
1396 } netr_OneDomainInfo;
1398 typedef struct {
1399 netr_OneDomainInfo primary_domain;
1400 uint32 trusted_domain_count;
1401 [size_is(trusted_domain_count)] netr_OneDomainInfo *trusted_domains;
1402 netr_LsaPolicyInformation lsa_policy;
1403 lsa_StringLarge dns_hostname;
1404 lsa_StringLarge dummy_string2;
1405 lsa_StringLarge dummy_string3;
1406 lsa_StringLarge dummy_string4;
1407 netr_WorkstationFlags workstation_flags;
1408 kerb_EncTypes supported_enc_types;
1409 uint32 dummy_long3;
1410 uint32 dummy_long4;
1411 } netr_DomainInformation;
1413 typedef union {
1414 [case(1)] netr_DomainInformation *domain_info;
1415 [case(2)] netr_LsaPolicyInformation *lsa_policy_info;
1416 } netr_DomainInfo;
1418 NTSTATUS netr_LogonGetDomainInfo(
1419 [in] [string,charset(UTF16)] uint16 *server_name,
1420 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
1421 [in,ref] netr_Authenticator *credential,
1422 [in,out,ref] netr_Authenticator *return_authenticator,
1423 [in] uint32 level,
1424 [in,ref,switch_is(level)] netr_WorkstationInfo *query,
1425 [out,ref,switch_is(level)] netr_DomainInfo *info
1428 /*****************/
1429 /* Function 0x1e */
1431 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1433 /* someone's birthday ? */
1434 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT = 0x02231968;
1436 typedef struct {
1437 uint32 ReservedField;
1438 uint32 PasswordVersionNumber;
1439 uint32 PasswordVersionPresent;
1440 } NL_PASSWORD_VERSION;
1442 typedef [flag(NDR_PAHEX)] struct {
1443 uint8 data[512];
1444 uint32 length;
1445 } netr_CryptPassword;
1447 NTSTATUS netr_ServerPasswordSet2(
1448 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1449 [in] [string,charset(UTF16)] uint16 *account_name,
1450 [in] netr_SchannelType secure_channel_type,
1451 [in] [string,charset(UTF16)] uint16 *computer_name,
1452 [in,ref] netr_Authenticator *credential,
1453 [out,ref] netr_Authenticator *return_authenticator,
1454 [in,ref] netr_CryptPassword *new_password
1457 /****************/
1458 /* Function 0x1f */
1459 NTSTATUS netr_ServerPasswordGet(
1460 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1461 [in] [string,charset(UTF16)] uint16 *account_name,
1462 [in] netr_SchannelType secure_channel_type,
1463 [in] [string,charset(UTF16)] uint16 *computer_name,
1464 [in,ref] netr_Authenticator *credential,
1465 [out,ref] netr_Authenticator *return_authenticator,
1466 [out,ref] samr_Password *password
1469 typedef [public] enum {
1470 SendToSamUpdatePassword = 0,
1471 SendToSamResetBadPasswordCount = 1,
1472 SendToSamUpdatePasswordForward = 2,
1473 SendToSamUpdateLastLogonTimestamp = 3,
1474 SendToSamResetSmartCardPassword = 4
1475 } netr_SendToSamType;
1477 typedef struct {
1478 GUID guid;
1479 } netr_SendToSamResetBadPasswordCount;
1481 typedef [nodiscriminant, public,switch_type(netr_SendToSamType)] union {
1482 /* TODO Implement other SendToSam message types
1483 * [case(SendToSamUpdatePassword)] netr_SendToSamUpdatePassword ...; */
1484 [case(SendToSamResetBadPasswordCount)] netr_SendToSamResetBadPasswordCount reset_bad_password;
1486 * [case(SendToSamUpdatePasswordForward)] netrSendToSamUpdatePasswordForward ...;
1487 * [case(SendToSamUpdateLastLogonTimestamp)] netrSendToSamUpdateLastLogonTimestamp ...;
1488 * [case(SendToSamResetSmartCardPassword)] netrSendToSamResetSmartCardPassword ...;
1490 [default];
1491 } netr_SendToSamMessage;
1493 typedef [public] struct {
1494 netr_SendToSamType message_type;
1495 uint32 message_size;
1496 [switch_is(message_type), subcontext(0), subcontext_size(message_size)] netr_SendToSamMessage message;
1497 } netr_SendToSamBase;
1499 /****************/
1500 /* Function 0x20 */
1501 NTSTATUS netr_NetrLogonSendToSam(
1502 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1503 [in] [string,charset(UTF16)] uint16 *computer_name,
1504 [in,ref] netr_Authenticator *credential,
1505 [out,ref] netr_Authenticator *return_authenticator,
1506 [in,ref] [size_is(buffer_len)] uint8 *opaque_buffer,
1507 [in] uint32 buffer_len
1510 /****************/
1511 /* Function 0x21 */
1512 typedef struct {
1513 uint32 count;
1514 [size_is(count)] lsa_String *sitename;
1515 } netr_DsRAddressToSitenamesWCtr;
1517 typedef struct {
1518 [size_is(size)] uint8 *buffer;
1519 uint32 size;
1520 } netr_DsRAddress;
1522 WERROR netr_DsRAddressToSitenamesW(
1523 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1524 [in] [range(0,32000)] uint32 count,
1525 [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
1526 [out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
1529 /****************/
1530 /* Function 0x22 */
1531 WERROR netr_DsRGetDCNameEx2(
1532 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
1533 [in,unique] [string,charset(UTF16)] uint16 *client_account,
1534 [in] samr_AcctFlags mask,
1535 [in,unique] [string,charset(UTF16)] uint16 *domain_name,
1536 [in,unique] GUID *domain_guid,
1537 [in,unique] [string,charset(UTF16)] uint16 *site_name,
1538 [in] netr_DsRGetDCName_flags flags,
1539 [out,ref] netr_DsRGetDCNameInfo **info
1542 /****************/
1543 /* Function 0x23 */
1544 [todo] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
1546 /****************/
1547 /* Function 0x24 */
1549 typedef struct {
1550 [string,charset(UTF16)] uint16 *netbios_name;
1551 [string,charset(UTF16)] uint16 *dns_name;
1552 netr_TrustFlags trust_flags;
1553 uint32 parent_index;
1554 lsa_TrustType trust_type;
1555 lsa_TrustAttributes trust_attributes;
1556 dom_sid2 *sid;
1557 GUID guid;
1558 } netr_DomainTrust;
1560 typedef struct {
1561 uint32 count;
1562 [size_is(count)] netr_DomainTrust *array;
1563 } netr_DomainTrustList;
1565 WERROR netr_NetrEnumerateTrustedDomainsEx(
1566 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1567 [out,ref] netr_DomainTrustList *dom_trust_list
1570 /****************/
1571 /* Function 0x25 */
1572 typedef struct {
1573 uint32 count;
1574 [size_is(count)] lsa_String *sitename;
1575 [size_is(count)] lsa_String *subnetname;
1576 } netr_DsRAddressToSitenamesExWCtr;
1578 WERROR netr_DsRAddressToSitenamesExW(
1579 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1580 [in] [range(0,32000)] uint32 count,
1581 [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
1582 [out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
1585 /****************/
1586 /* Function 0x26 */
1588 typedef struct {
1589 uint32 num_sites;
1590 [size_is(num_sites)] [unique] lsa_String *sites;
1591 } DcSitesCtr;
1593 WERROR netr_DsrGetDcSiteCoverageW(
1594 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1595 [out,ref] DcSitesCtr **ctr
1598 /****************/
1599 /* Function 0x27 */
1600 typedef [public,bitmap32bit] bitmap {
1601 /* Request MUST be passed to the domain controller at the root of the forest. */
1602 NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT = 0x00000001,
1603 /* Request MUST be passed to the DC at the end of the first hop over a cross-forest trust. */
1604 NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP = 0x00000002,
1605 /* Request was passed by an RODC to a DC in a different domain. */
1606 NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN = 0x00000004,
1607 /* Request is an NTLM authentication package request passed by an RODC. */
1608 NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST = 0x00000008
1609 } netr_LogonSamLogon_flags;
1611 NTSTATUS netr_LogonSamLogonEx(
1612 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1613 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
1614 [in] netr_LogonInfoClass logon_level,
1615 [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
1616 [in] uint16 validation_level,
1617 [out,ref] [switch_is(validation_level)] netr_Validation *validation,
1618 [out,ref] uint8 *authoritative,
1619 [in,out,ref] netr_LogonSamLogon_flags *flags
1622 /****************/
1623 /* Function 0x28 */
1625 WERROR netr_DsrEnumerateDomainTrusts(
1626 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1627 [in] netr_TrustFlags trust_flags,
1628 [out,ref] netr_DomainTrustList *trusts
1632 /****************/
1633 /* Function 0x29 */
1634 WERROR netr_DsrDeregisterDNSHostRecords(
1635 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1636 [in,unique] [string,charset(UTF16)] uint16 *domain,
1637 [in,unique] GUID *domain_guid,
1638 [in,unique] GUID *dsa_guid,
1639 [in,ref] [string,charset(UTF16)] uint16 *dns_host
1642 /****************/
1643 /* Function 0x2a */
1644 NTSTATUS netr_ServerTrustPasswordsGet(
1645 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1646 [in] [string,charset(UTF16)] uint16 *account_name,
1647 [in] netr_SchannelType secure_channel_type,
1648 [in] [string,charset(UTF16)] uint16 *computer_name,
1649 [in,ref] netr_Authenticator *credential,
1650 [out,ref] netr_Authenticator *return_authenticator,
1651 [out,ref] samr_Password *new_owf_password,
1652 [out,ref] samr_Password *old_owf_password
1655 /****************/
1656 /* Function 0x2b */
1658 const int DS_GFTI_UPDATE_TDO = 0x1;
1660 WERROR netr_DsRGetForestTrustInformation(
1661 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1662 [in,unique] [string,charset(UTF16)] uint16 *trusted_domain_name,
1663 [in] uint32 flags,
1664 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1667 /****************/
1668 /* Function 0x2c */
1669 NTSTATUS netr_GetForestTrustInformation(
1670 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1671 [in,ref] [string,charset(UTF16)] uint16 *computer_name,
1672 [in,ref] netr_Authenticator *credential,
1673 [out,ref] netr_Authenticator *return_authenticator,
1674 [in] uint32 flags,
1675 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1678 /****************/
1679 /* Function 0x2d */
1681 /* this is the ADS varient. I don't yet know what the "flags" are for */
1682 NTSTATUS netr_LogonSamLogonWithFlags(
1683 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1684 [in,unique] [string,charset(UTF16)] uint16 *computer_name,
1685 [in,unique] netr_Authenticator *credential,
1686 [in,out,unique] netr_Authenticator *return_authenticator,
1687 [in] netr_LogonInfoClass logon_level,
1688 [in,ref] [switch_is(logon_level)] netr_LogonLevel *logon,
1689 [in] uint16 validation_level,
1690 [out,ref] [switch_is(validation_level)] netr_Validation *validation,
1691 [out,ref] uint8 *authoritative,
1692 [in,out,ref] netr_LogonSamLogon_flags *flags
1695 /****************/
1696 /* Function 0x2e */
1698 typedef struct {
1699 uint32 count;
1700 [size_is(count)] uint32 *data;
1701 uint32 entry_count;
1702 [size_is(count)] lsa_String *entries;
1703 } netr_TrustInfo;
1705 NTSTATUS netr_ServerGetTrustInfo(
1706 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1707 [in,ref] [string,charset(UTF16)] uint16 *account_name,
1708 [in] netr_SchannelType secure_channel_type,
1709 [in,ref] [string,charset(UTF16)] uint16 *computer_name,
1710 [in,ref] netr_Authenticator *credential,
1711 [out,ref] netr_Authenticator *return_authenticator,
1712 [out,ref] samr_Password *new_owf_password,
1713 [out,ref] samr_Password *old_owf_password,
1714 [out,ref] netr_TrustInfo **trust_info
1717 /****************/
1718 /* Function 0x2f */
1720 NTSTATUS netr_Unused47(void);
1723 /****************/
1724 /* Function 0x30 */
1726 typedef enum {
1727 NlDnsLdapAtSite = 22,
1728 NlDnsGcAtSite = 25,
1729 NlDnsDsaCname = 28,
1730 NlDnsKdcAtSite = 30,
1731 NlDnsDcAtSite = 32,
1732 NlDnsRfc1510KdcAtSite = 34,
1733 NlDnsGenericGcAtSite = 36
1734 } netr_DnsType;
1736 typedef enum {
1737 NlDnsInfoTypeNone = 0,
1738 NlDnsDomainName = 1,
1739 NlDnsDomainNameAlias = 2,
1740 NlDnsForestName = 3,
1741 NlDnsForestNameAlias = 4,
1742 NlDnsNdncDomainName = 5,
1743 NlDnsRecordName = 6
1744 } netr_DnsDomainInfoType;
1746 typedef struct {
1747 netr_DnsType type;
1748 [string,charset(UTF16)] uint16 *dns_domain_info;
1749 netr_DnsDomainInfoType dns_domain_info_type;
1750 uint32 priority;
1751 uint32 weight;
1752 uint32 port;
1753 boolean32 dns_register;
1754 uint32 status;
1755 } NL_DNS_NAME_INFO;
1757 typedef [public] struct {
1758 uint32 count;
1759 [size_is(count)] NL_DNS_NAME_INFO *names;
1760 } NL_DNS_NAME_INFO_ARRAY;
1762 NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords(
1763 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1764 [in,ref] [string,charset(UTF16)] uint16 *computer_name,
1765 [in, ref] netr_Authenticator *credential,
1766 [out,ref] netr_Authenticator *return_authenticator,
1767 [in,unique] [string,charset(UTF16)] uint16 *site_name,
1768 [in] uint32 dns_ttl,
1769 [in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names