3 much of this was derived from the ethereal sources - thanks to everyone
7 import
"misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
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")
19 cpp_quote
("#define ENC_HMAC_SHA1_96_AES256_SK KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96_SK")
20 cpp_quote
("#define ENC_FAST_SUPPORTED KERB_ENCTYPE_FAST_SUPPORTED")
21 cpp_quote
("#define ENC_COMPOUND_IDENTITY_SUPPORTED KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED")
22 cpp_quote
("#define ENC_CLAIMS_SUPPORTED KERB_ENCTYPE_CLAIMS_SUPPORTED")
23 cpp_quote
("#define ENC_RESOURCE_SID_COMPRESSION_DISABLED KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED")
24 cpp_quote
("#define NETLOGON_SERVER_PIPE_STATE_MAGIC 0x4f555358")
26 cpp_quote
("#define DS_SERVER_PDC NBT_SERVER_PDC")
27 cpp_quote
("#define DS_SERVER_GC NBT_SERVER_GC")
28 cpp_quote
("#define DS_SERVER_LDAP NBT_SERVER_LDAP")
29 cpp_quote
("#define DS_SERVER_DS NBT_SERVER_DS")
30 cpp_quote
("#define DS_SERVER_KDC NBT_SERVER_KDC")
31 cpp_quote
("#define DS_SERVER_TIMESERV NBT_SERVER_TIMESERV")
32 cpp_quote
("#define DS_SERVER_CLOSEST NBT_SERVER_CLOSEST")
33 cpp_quote
("#define DS_SERVER_WRITABLE NBT_SERVER_WRITABLE")
34 cpp_quote
("#define DS_SERVER_GOOD_TIMESERV NBT_SERVER_GOOD_TIMESERV")
35 cpp_quote
("#define DS_SERVER_NDNC NBT_SERVER_NDNC")
36 cpp_quote
("#define DS_SERVER_SELECT_SECRET_DOMAIN_6 NBT_SERVER_SELECT_SECRET_DOMAIN_6 /* 2008 / RODC */")
37 cpp_quote
("#define DS_SERVER_FULL_SECRET_DOMAIN_6 NBT_SERVER_FULL_SECRET_DOMAIN_6 /* 2008 */")
38 cpp_quote
("#define DS_SERVER_WEBSERV NBT_SERVER_ADS_WEB_SERVICE")
39 cpp_quote
("#define DS_SERVER_DS_8 NBT_SERVER_DS_8 /* 2012 */")
40 cpp_quote
("#define DS_SERVER_DS_9 NBT_SERVER_DS_9 /* 2012R2 */")
41 cpp_quote
("#define DS_SERVER_DS_10 NBT_SERVER_DS_10 /* 2016 */")
42 cpp_quote
("#define DS_DNS_CONTROLLER NBT_SERVER_HAS_DNS_NAME")
43 cpp_quote
("#define DS_DNS_DOMAIN NBT_SERVER_IS_DEFAULT_NC")
44 cpp_quote
("#define DS_DNS_FOREST_ROOT NBT_SERVER_FOREST_ROOT")
47 uuid("12345678-1234-abcd-ef00-01234567cffb"),
49 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
50 helper
("../librpc/ndr/ndr_netlogon.h"),
51 authservice
("netlogon"),
53 pointer_default(unique)
58 typedef bitmap samr_AcctFlags samr_AcctFlags
;
59 typedef bitmap security_GroupAttrs security_GroupAttrs
;
60 typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit
;
61 typedef enum netr_SamDatabaseID8Bit netr_SamDatabaseID8Bit
;
67 [string,charset
(UTF16
)] uint16
*account_name
;
78 time_t pw_must_change
;
79 [string,charset
(UTF16
)] uint16
*computer
;
80 [string,charset
(UTF16
)] uint16
*domain
;
81 [string,charset
(UTF16
)] uint16
*script_path
;
85 WERROR netr_LogonUasLogon
(
86 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
87 [in] [string,charset
(UTF16
)] uint16
*account_name
,
88 [in] [string,charset
(UTF16
)] uint16
*workstation
,
89 [out,ref] netr_UasInfo
**info
101 WERROR netr_LogonUasLogoff
(
102 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
103 [in] [string,charset
(UTF16
)] uint16
*account_name
,
104 [in] [string,charset
(UTF16
)] uint16
*workstation
,
105 [out,ref] netr_UasLogoffInfo
*info
112 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
113 that the structure of the bindata looks like this:
115 dlong lockout_duration;
117 uint32 bad_attempt_lockout;
120 but it doesn't look as though this structure is reflected at the
121 NDR level. Maybe it is left to the application to decode the bindata array.
123 typedef [public] struct {
124 dlong lockout_duration
;
126 uint32 bad_attempt_lockout
;
130 /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
131 * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
132 * - MSV1_0_UPDATE_LOGON_STATISTICS
133 * sets the logon time on network logon
134 * - MSV1_0_RETURN_USER_PARAMETERS
135 * sets the user parameters in the driveletter
136 * - MSV1_0_RETURN_PROFILE_PATH
137 * returns the profilepath in the driveletter and
138 * sets LOGON_PROFILE_PATH_RETURNED user_flag
141 typedef [public,bitmap32bit
] bitmap
{
142 MSV1_0_CLEARTEXT_PASSWORD_ALLOWED
= 0x00000002,
143 MSV1_0_UPDATE_LOGON_STATISTICS
= 0x00000004,
144 MSV1_0_RETURN_USER_PARAMETERS
= 0x00000008,
145 MSV1_0_DONT_TRY_GUEST_ACCOUNT
= 0x00000010,
146 MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
= 0x00000020,
147 MSV1_0_RETURN_PASSWORD_EXPIRY
= 0x00000040,
148 MSV1_0_USE_CLIENT_CHALLENGE
= 0x00000080,
149 MSV1_0_TRY_GUEST_ACCOUNT_ONLY
= 0x00000100,
150 MSV1_0_RETURN_PROFILE_PATH
= 0x00000200,
151 MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY
= 0x00000400,
152 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
= 0x00000800,
153 MSV1_0_DISABLE_PERSONAL_FALLBACK
= 0x00001000,
154 MSV1_0_ALLOW_FORCE_GUEST
= 0x00002000,
155 MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED
= 0x00004000,
156 MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY
= 0x00008000,
157 MSV1_0_ALLOW_MSVCHAPV2
= 0x00010000,
158 MSV1_0_S4U2SELF
= 0x00020000,
159 MSV1_0_CHECK_LOGONHOURS_FOR_S4U
= 0x00040000,
160 MSV1_0_SUBAUTHENTICATION_DLL_EX
= 0x00100000
161 } netr_LogonParameterControl
;
163 /* Summary of the of the Query and Response from Microsoft on
164 * the usage of logon_id in netr_IdendityInfo
166 * [REG:119013019612095] [MS-NRPC]: NETLOGON_LOGON_IDENTITY_INFO: Does
167 * the Reserved field have LogonId meaning?
170 * In NetrLogonSamLogonEx does the Reserved field
171 * (of NETLOGON_LOGON_IDENTITY_INFO) have LogonId meaning?
173 * What is a valid LogonID, and does have any audit usage?
175 * Samba is sending a constant "deadbeef" in hex and would like to
176 * understand any usage of this field.
179 * The NRPC spec is accurate in defining the field as Reserved, and
180 * without protocol significance. In the header file in our source
181 * code, it is defined as LogonId and commented as such, but it’s
182 * effectively not used. This is probably why the API structure has
183 * that field name. It may have been intended as such but it’s not
186 * Samba now sends a random value in this field.
189 lsa_String domain_name
;
190 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
192 lsa_String account_name
;
193 lsa_String workstation
;
196 typedef [public,flag
(NDR_PAHEX
)] struct {
197 netr_IdentityInfo identity_info
;
198 samr_Password lmpassword
;
199 samr_Password ntpassword
;
202 typedef [flag
(NDR_PAHEX
)] struct {
204 [value
(length
)] uint16 size
;
205 [size_is(length
),length_is(length
)] uint8
*data
;
206 } netr_ChallengeResponse
;
208 typedef [public,flag
(NDR_PAHEX
)] struct {
209 netr_IdentityInfo identity_info
;
211 netr_ChallengeResponse nt
;
212 netr_ChallengeResponse lm
;
215 typedef [public,flag
(NDR_PAHEX
)] struct {
216 netr_IdentityInfo identity_info
;
217 lsa_String package_name
;
219 [size_is(length
)] uint8
*data
;
222 typedef [bitmap64bit
] bitmap
{
224 * These are documented in strange ways!
226 * Following [MS-ADPS] 2.2.2.1 NETLOGON_TICKET_LOGON_INFO Message,
227 * would mean this, but these are not really flags...
228 * they document the number of the bit in the 64 bit value.
231 * NO_AUTHORIZATION_DATA = 0x0000
233 * ComputerDomainOptions:
234 * SKIP_RESOURCE_GROUPS = 0x0010
235 * SKIP_A2A_CHECKS = 0x0011
238 * SKIP_SID_FILTER = 0x0020
239 * SKIP_NAMESPACE_FILTER = 0x0021
242 * SKIP_PAC_SIGNATURES = 0x0030
243 * REMOVE_RESOURCE_GROUPS = 0x0031
245 * Following [MS-NPRPC] 2.2.1.4.19 NETLOGON_TICKET_LOGON_INFO
246 * and its DUMMYSTRUCTNAME definition
248 NETLOGON_TICKET_LOGON_CRITICAL_OPTIONS
= 0x000000000000FFFF,
249 NETLOGON_TICKET_LOGON_NO_AUTHORIZATION_DATA
= 0x0000000000000001,
250 NETLOGON_TICKET_LOGON_COMPUTER_DOMAIN_OPTIONS
= 0x00000000FFFF0000,
251 NETLOGON_TICKET_LOGON_SKIP_RESOURCE_GROUPS
= 0x0000000000010000,
252 NETLOGON_TICKET_LOGON_SKIP_A2A_CHECKS
= 0x0000000000020000,
253 NETLOGON_TICKET_LOGON_TRANSIT_OPTIONS
= 0x0000FFFF00000000,
254 NETLOGON_TICKET_LOGON_SKIP_SID_FILTER
= 0x0000000100000000,
255 NETLOGON_TICKET_LOGON_SKIP_NAMESPACE_FILTER
= 0x0000000200000000,
256 NETLOGON_TICKET_LOGON_KERBEROS_OPTIONS
= 0xFFFF000000000000,
257 NETLOGON_TICKET_LOGON_SKIP_PAC_SIGNATURES
= 0x0001000000000000,
258 NETLOGON_TICKET_LOGON_REMOVE_RESOURCE_GROUPS
= 0x0002000000000000
259 } netr_TicketLogonInfoRequestOptions
;
261 typedef [public,flag
(NDR_PAHEX
)] struct {
262 netr_IdentityInfo identity_info
;
263 netr_TicketLogonInfoRequestOptions request_options
;
264 uint32 service_ticket_length
;
265 [size_is(service_ticket_length
)] uint8
*service_ticket
;
266 uint32 additional_ticket_length
;
267 [size_is(additional_ticket_length
)] uint8
*additional_ticket
;
268 } netr_TicketLogonInfo
;
270 typedef [public] enum {
271 NetlogonInteractiveInformation
= 1,
272 NetlogonNetworkInformation
= 2,
273 NetlogonServiceInformation
= 3,
274 NetlogonGenericInformation
= 4,
275 NetlogonInteractiveTransitiveInformation
= 5,
276 NetlogonNetworkTransitiveInformation
= 6,
277 NetlogonServiceTransitiveInformation
= 7,
278 NetlogonTicketLogonInformation
= 8
279 } netr_LogonInfoClass
;
281 typedef [public,switch_type(netr_LogonInfoClass
)] union {
282 [case(NetlogonInteractiveInformation
)] netr_PasswordInfo
*password
;
283 [case(NetlogonNetworkInformation
)] netr_NetworkInfo
*network
;
284 [case(NetlogonServiceInformation
)] netr_PasswordInfo
*password
;
285 [case(NetlogonGenericInformation
)] netr_GenericInfo
*generic
;
286 [case(NetlogonInteractiveTransitiveInformation
)] netr_PasswordInfo
*password
;
287 [case(NetlogonNetworkTransitiveInformation
)] netr_NetworkInfo
*network
;
288 [case(NetlogonServiceTransitiveInformation
)] netr_PasswordInfo
*password
;
289 [case(NetlogonTicketLogonInformation
)] netr_TicketLogonInfo
*ticket
;
293 typedef [public,flag
(NDR_PAHEX
)] struct {
294 [flag
(NDR_SECRET
)] uint8 key
[16];
295 } netr_UserSessionKey
;
297 typedef [public,flag
(NDR_PAHEX
)] struct {
298 [flag
(NDR_SECRET
)] uint8 key
[8];
301 /* Flags for user_flags below */
302 typedef [public,bitmap32bit
] bitmap
{
303 NETLOGON_GUEST
= 0x00000001,
304 NETLOGON_NOENCRYPTION
= 0x00000002,
305 NETLOGON_CACHED_ACCOUNT
= 0x00000004,
306 NETLOGON_USED_LM_PASSWORD
= 0x00000008,
307 NETLOGON_EXTRA_SIDS
= 0x00000020,
308 NETLOGON_SUBAUTH_SESSION_KEY
= 0x00000040,
309 NETLOGON_SERVER_TRUST_ACCOUNT
= 0x00000080,
310 NETLOGON_NTLMV2_ENABLED
= 0x00000100,
311 NETLOGON_RESOURCE_GROUPS
= 0x00000200,
312 NETLOGON_PROFILE_PATH_RETURNED
= 0x00000400,
313 NETLOGON_GRACE_LOGON
= 0x01000000
320 NTTIME last_password_change
;
321 NTTIME allow_password_change
;
322 NTTIME force_password_change
;
323 lsa_String account_name
;
324 lsa_String full_name
;
325 lsa_String logon_script
;
326 lsa_String profile_path
;
327 lsa_String home_directory
;
328 lsa_String home_drive
;
330 uint16 bad_password_count
;
333 samr_RidWithAttributeArray groups
;
334 netr_UserFlags user_flags
;
335 netr_UserSessionKey key
;
336 lsa_StringLarge logon_server
;
337 lsa_StringLarge logon_domain
;
338 dom_sid2
*domain_sid
;
339 netr_LMSessionKey LMSessKey
;
340 samr_AcctFlags acct_flags
;
341 uint32 sub_auth_status
;
342 NTTIME last_successful_logon
;
343 NTTIME last_failed_logon
;
344 uint32 failed_logon_count
;
348 typedef [public] struct {
349 netr_SamBaseInfo base
;
352 typedef [public] struct {
354 security_GroupAttrs attributes
;
357 typedef [public] struct {
358 netr_SamBaseInfo base
;
360 [size_is(sidcount
)] netr_SidAttr
*sids
;
363 typedef [public] struct {
364 netr_SamBaseInfo base
;
366 [size_is(sidcount
)] netr_SidAttr
*sids
;
369 * Should pointer values be allocated
370 * of sids[*].sid before the following ones?
372 * That's at least the case for
375 lsa_String dns_domainname
;
376 lsa_String principal_name
;
380 typedef [public,flag
(NDR_PAHEX
)] struct {
382 [size_is(pac_size
)] uint8
*pac
;
383 lsa_String logon_domain
;
384 lsa_String logon_server
;
385 lsa_String principal_name
;
387 [size_is(auth_size
)] uint8
*auth
;
388 netr_UserSessionKey user_session_key
;
389 uint32 expansionroom
[10];
396 typedef [public,flag
(NDR_PAHEX
)] struct {
398 [size_is(length
)] uint8
*data
;
401 typedef [bitmap64bit
] bitmap
{
403 * These are documented in strange ways!
405 * Following [MS-ADPS] 2.2.3.1 NETLOGON_VALIDATION_TICKET_LOGON
406 * message would mean this, but these are not really flags...
407 * they document the number of the bit in the relative 16-bit
411 * LogonFailed = 0x0000
414 * TicketDecryptionFailed = 0x0000
415 * PacValidationFailed = 0x0001
416 * CompoundSource = 0x0002
417 * SourceUserClaims = 0x0003
418 * SourceDeviceClaims = 0x0004
419 * FullSignaturePresent = 0x0005
420 * ResourceGroupsRemoved = 0x0006
422 * TransitInformation:
423 * UserSidsFailed = 0x0000
424 * UserNamespaceFailed = 0x0001
425 * UserFailedA2A = 0x0002
426 * DeviceSidsFailed = 0x0003
427 * DeviceNamespaceFailed = 0x0004
428 * UserSidsFiltered = 0x0005
429 * DeviceSidsFiltered = 0x0006
431 * Following [MS-NPRPC] 2.2.1.4.20 NETLOGON_VALIDATION_TICKET_LOGON
432 * and its DUMMYSTRUCTNAME definition
434 NETLOGON_TICKET_LOGON_CRITICAL_RESULTS
= 0x00000000000000FF,
435 NETLOGON_TICKET_LOGON_FAILED_LOGON
= 0x0000000000000001,
436 NETLOGON_TICKET_LOGON_CRITICAL_CLIENT_RESULTS
= 0x000000000000FF00,
437 NETLOGON_TICKET_LOGON_CRITICAL_COMPUTER_DOMAIN_RESULTS
= 0x0000000000FF0000,
438 NETLOGON_TICKET_LOGON_CRITICAL_TRANSIT_RESULTS
= 0x00000000FF000000,
439 NETLOGON_TICKET_LOGON_SOURCE_INFORMATION
= 0x0000FFFF00000000,
440 NETLOGON_TICKET_LOGON_TICKET_DECRYPTION_FAILED
= 0x0000000100000000,
441 NETLOGON_TICKET_LOGON_PAC_VALIDATION_FAILED
= 0x0000000200000000,
442 NETLOGON_TICKET_LOGON_COMPOUND_SOURCE
= 0x0000000400000000,
443 NETLOGON_TICKET_LOGON_SOURCE_USER_CLAIMS
= 0x0000000800000000,
444 NETLOGON_TICKET_LOGON_SOURCE_DEVICE_CLAIMS
= 0x0000001000000000,
445 NETLOGON_TICKET_LOGON_FULL_SIGNATURE_PRESENT
= 0x0000002000000000,
446 NETLOGON_TICKET_LOGON_RESOURCE_GROUPS_REMOVED
= 0x0000004000000000,
447 NETLOGON_TICKET_LOGON_TRANSIT_INFORMATION
= 0xFFFF000000000000,
448 NETLOGON_TICKET_LOGON_USER_SIDS_FAILED
= 0x0001000000000000,
449 NETLOGON_TICKET_LOGON_USER_NAMESPACE_FAILED
= 0x0002000000000000,
450 NETLOGON_TICKET_LOGON_USER_FAILED_A2A
= 0x0004000000000000,
451 NETLOGON_TICKET_LOGON_DEVICE_SIDS_FAILED
= 0x0008000000000000,
452 NETLOGON_TICKET_LOGON_DEVICE_NAMESPACE_FAILED
= 0x0010000000000000,
453 NETLOGON_TICKET_LOGON_USER_SIDS_FILTERED
= 0x0020000000000000,
454 NETLOGON_TICKET_LOGON_DEVICE_SIDS_FILTERED
= 0x0040000000000000
455 } netr_TicketLogonResults
;
457 typedef [public,flag
(NDR_PAHEX
)] struct {
458 netr_TicketLogonResults results
;
459 NTSTATUS kerberos_status
;
460 NTSTATUS netlogon_status
;
461 lsa_String source_of_status
;
462 netr_SamInfo6
*user_information
;
463 netr_SamInfo6
*device_information
;
464 uint32 user_claims_length
;
465 [size_is(user_claims_length
)] uint8
*user_claims
;
466 uint32 device_claims_length
;
467 [size_is(device_claims_length
)] uint8
*device_claims
;
468 } netr_ValidationTicketLogon
;
470 typedef [public] enum {
471 NetlogonValidationUasInfo
= 1,
472 NetlogonValidationSamInfo
= 2,
473 NetlogonValidationSamInfo2
= 3,
474 NetlogonValidationGenericInfo2
= 5,
475 NetlogonValidationSamInfo4
= 6,
476 NetlogonValidationTicketLogon
= 7
477 } netr_ValidationInfoClass
;
479 typedef [public,switch_type(uint16
)] union {
480 [case(NetlogonValidationSamInfo
)] netr_SamInfo2
*sam2
;
481 [case(NetlogonValidationSamInfo2
)] netr_SamInfo3
*sam3
;
482 [case(4)] netr_PacInfo
*pac
;
483 [case(NetlogonValidationGenericInfo2
)] netr_GenericInfo2
*generic
;
484 [case(NetlogonValidationSamInfo4
)] netr_SamInfo6
*sam6
;
485 [case(NetlogonValidationTicketLogon
)] netr_ValidationTicketLogon
*ticket
;
489 typedef [public, flag
(NDR_PAHEX
)] struct {
493 typedef [public] struct {
494 netr_Credential client_challenge
;
495 netr_Credential server_challenge
;
496 } netlogon_server_pipe_state
;
498 typedef [public] struct {
499 netr_Credential cred
;
501 } netr_Authenticator
;
503 [public] NTSTATUS netr_LogonSamLogon
(
504 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
505 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
506 [in,unique] netr_Authenticator
*credential
,
507 [in,out,unique] netr_Authenticator
*return_authenticator
,
508 [in] netr_LogonInfoClass logon_level
,
509 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
510 [in] uint16 validation_level
,
511 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
512 [out,ref] uint8
*authoritative
519 NTSTATUS netr_LogonSamLogoff
(
520 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
521 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
522 [in,unique] netr_Authenticator
*credential
,
523 [in,out,unique] netr_Authenticator
*return_authenticator
,
524 [in] netr_LogonInfoClass logon_level
,
525 [in] [switch_is(logon_level
)] netr_LogonLevel logon
533 [public] NTSTATUS netr_ServerReqChallenge
(
534 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
535 [in,string,charset
(UTF16
)] uint16
*computer_name
,
536 [in,ref] netr_Credential
*credentials
,
537 [out,ref] netr_Credential
*return_credentials
544 typedef enum netr_SchannelType netr_SchannelType
;
546 NTSTATUS netr_ServerAuthenticate
(
547 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
548 [in,string,charset
(UTF16
)] uint16
*account_name
,
549 [in] netr_SchannelType secure_channel_type
,
550 [in,string,charset
(UTF16
)] uint16
*computer_name
,
551 [in,ref] netr_Credential
*credentials
,
552 [out,ref] netr_Credential
*return_credentials
559 NTSTATUS netr_ServerPasswordSet
(
560 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
561 [in] [string,charset
(UTF16
)] uint16
*account_name
,
562 [in] netr_SchannelType secure_channel_type
,
563 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
564 [in,ref] netr_Authenticator
*credential
,
565 [out,ref] netr_Authenticator
*return_authenticator
,
566 [in,ref] samr_Password
*new_password
573 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
576 [string,charset
(UTF16
)] uint16
*account_name
;
585 } netr_DELTA_DELETE_USER
;
589 [value
(length
)] uint16 size
;
596 [value
(nt_length
)] uint16 nt_size
;
599 [value
(lm_length
)] uint16 lm_size
;
601 uint8 nt_history
[nt_length
];
602 uint8 lm_history
[lm_length
];
603 } netr_PasswordHistory
;
606 netr_USER_KEY16 lmpassword
;
607 netr_USER_KEY16 ntpassword
;
608 netr_PasswordHistory history
;
611 typedef struct { /* TODO: make this a union! */
612 netr_USER_KEYS2 keys2
;
613 } netr_USER_KEY_UNION
;
615 typedef [public] struct {
617 netr_USER_KEY_UNION keys
;
621 boolean8 SensitiveDataFlag
;
624 /* netr_USER_KEYS encrypted with the session key */
625 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
626 } netr_USER_PRIVATE_INFO
;
629 lsa_String account_name
;
630 lsa_String full_name
;
633 lsa_String home_directory
;
634 lsa_String home_drive
;
635 lsa_String logon_script
;
636 lsa_String description
;
637 lsa_String workstations
;
640 samr_LogonHours logon_hours
;
641 uint16 bad_password_count
;
643 NTTIME last_password_change
;
645 samr_AcctFlags acct_flags
;
646 samr_Password lmpassword
;
647 samr_Password ntpassword
;
648 boolean8 nt_password_present
;
649 boolean8 lm_password_present
;
650 boolean8 password_expired
;
652 lsa_BinaryString parameters
;
655 netr_USER_PRIVATE_INFO user_private_info
;
656 uint32 SecurityInformation
;
658 lsa_String profile_path
;
669 lsa_String domain_name
;
670 lsa_String oem_information
; /* comment */
671 dlong force_logoff_time
;
672 uint16 min_password_length
;
673 uint16 password_history_length
;
674 /* yes, these are signed. They are in negative 100ns */
675 dlong max_password_age
;
676 dlong min_password_age
;
678 NTTIME domain_create_time
;
679 uint32 SecurityInformation
;
681 lsa_BinaryString account_lockout
;
685 uint32 logon_to_chgpass
;
692 lsa_String group_name
;
695 lsa_String description
;
696 uint32 SecurityInformation
;
722 [size_is(num_rids
)] uint32
*rids
;
723 [size_is(num_rids
)] uint32
*attribs
;
729 } netr_DELTA_GROUP_MEMBER
;
732 lsa_String alias_name
;
734 uint32 SecurityInformation
;
736 lsa_String description
;
752 } netr_DELTA_ALIAS_MEMBER
;
755 uint32 pagedpoollimit
;
756 uint32 nonpagedpoollimit
;
757 uint32 minimumworkingsetsize
;
758 uint32 maximumworkingsetsize
;
759 uint32 pagefilelimit
;
765 NTTIME auditretentionperiod
;
766 boolean8 auditingmode
;
767 uint32 maxauditeventcount
;
768 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
769 lsa_String primary_domain_name
;
771 netr_QUOTA_LIMITS quota_limits
;
773 NTTIME db_create_time
;
774 uint32 SecurityInformation
;
787 lsa_String domain_name
;
788 uint32 num_controllers
;
789 [size_is(num_controllers
)] lsa_String
*controller_names
;
790 uint32 SecurityInformation
;
800 } netr_DELTA_TRUSTED_DOMAIN
;
803 uint32 privilege_entries
;
804 uint32 privilege_control
;
805 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
806 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
807 netr_QUOTA_LIMITS quotalimits
;
809 uint32 SecurityInformation
;
819 } netr_DELTA_ACCOUNT
;
824 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
828 netr_CIPHER_VALUE current_cipher
;
829 NTTIME current_cipher_set_time
;
830 netr_CIPHER_VALUE old_cipher
;
831 NTTIME old_cipher_set_time
;
832 uint32 SecurityInformation
;
845 NETR_DELTA_DOMAIN
= 1,
846 NETR_DELTA_GROUP
= 2,
847 NETR_DELTA_DELETE_GROUP
= 3,
848 NETR_DELTA_RENAME_GROUP
= 4,
850 NETR_DELTA_DELETE_USER
= 6,
851 NETR_DELTA_RENAME_USER
= 7,
852 NETR_DELTA_GROUP_MEMBER
= 8,
853 NETR_DELTA_ALIAS
= 9,
854 NETR_DELTA_DELETE_ALIAS
= 10,
855 NETR_DELTA_RENAME_ALIAS
= 11,
856 NETR_DELTA_ALIAS_MEMBER
= 12,
857 NETR_DELTA_POLICY
= 13,
858 NETR_DELTA_TRUSTED_DOMAIN
= 14,
859 NETR_DELTA_DELETE_TRUST
= 15,
860 NETR_DELTA_ACCOUNT
= 16,
861 NETR_DELTA_DELETE_ACCOUNT
= 17,
862 NETR_DELTA_SECRET
= 18,
863 NETR_DELTA_DELETE_SECRET
= 19,
864 NETR_DELTA_DELETE_GROUP2
= 20,
865 NETR_DELTA_DELETE_USER2
= 21,
866 NETR_DELTA_MODIFY_COUNT
= 22
869 typedef [switch_type(netr_DeltaEnum
)] union {
870 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
871 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
872 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
873 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
874 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
875 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
876 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
877 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
878 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
879 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
880 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
881 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
882 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
883 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
884 [case(NETR_DELTA_DELETE_TRUST
)] ; /* sid only */
885 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
886 [case(NETR_DELTA_DELETE_ACCOUNT
)] ; /* sid only */
887 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
888 [case(NETR_DELTA_DELETE_SECRET
)] ; /* name only */
889 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
890 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
891 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
895 typedef [switch_type(netr_DeltaEnum
)] union {
896 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
897 [case(NETR_DELTA_GROUP
)] uint32 rid
;
898 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
899 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
900 [case(NETR_DELTA_USER
)] uint32 rid
;
901 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
902 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
903 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
904 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
905 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
906 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
907 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
908 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
909 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
910 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
911 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
912 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
913 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
914 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
915 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
916 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
917 [case(NETR_DELTA_MODIFY_COUNT
)] ;
919 } netr_DELTA_ID_UNION
;
922 netr_DeltaEnum delta_type
;
923 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
924 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
929 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
930 } netr_DELTA_ENUM_ARRAY
;
932 NTSTATUS netr_DatabaseDeltas
(
933 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
934 [in] [string,charset
(UTF16
)] uint16
*computername
,
935 [in,ref] netr_Authenticator
*credential
,
936 [in,out,ref] netr_Authenticator
*return_authenticator
,
937 [in] netr_SamDatabaseID database_id
,
938 [in,out,ref] udlong
*sequence_num
,
939 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
940 [in] uint32 preferredmaximumlength
947 NTSTATUS netr_DatabaseSync
(
948 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
949 [in] [string,charset
(UTF16
)] uint16
*computername
,
950 [in,ref] netr_Authenticator
*credential
,
951 [in,out,ref] netr_Authenticator
*return_authenticator
,
952 [in] netr_SamDatabaseID database_id
,
953 [in,out,ref] uint32
*sync_context
,
954 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
955 [in] uint32 preferredmaximumlength
962 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
964 typedef [flag
(NDR_PAHEX
)] struct {
965 uint8 computer_name
[16];
967 uint32 serial_number
;
971 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
972 } netr_AccountBuffer
;
974 NTSTATUS netr_AccountDeltas
(
975 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
976 [in] [string,charset
(UTF16
)] uint16
*computername
,
977 [in] netr_Authenticator credential
,
978 [in,out,ref] netr_Authenticator
*return_authenticator
,
979 [in] netr_UAS_INFO_0 uas
,
982 [in] uint32 buffersize
,
983 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
984 [out,ref] uint32
*count_returned
,
985 [out,ref] uint32
*total_entries
,
986 [out,ref] netr_UAS_INFO_0
*recordid
993 NTSTATUS netr_AccountSync
(
994 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
995 [in] [string,charset
(UTF16
)] uint16
*computername
,
996 [in] netr_Authenticator credential
,
997 [in,out,ref] netr_Authenticator
*return_authenticator
,
998 [in] uint32 reference
,
1000 [in] uint32 buffersize
,
1001 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
1002 [out,ref] uint32
*count_returned
,
1003 [out,ref] uint32
*total_entries
,
1004 [out,ref] uint32
*next_reference
,
1005 [in,out,ref] netr_UAS_INFO_0
*recordid
1012 WERROR netr_GetDcName
(
1013 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1014 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
1015 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
1021 typedef [bitmap32bit
] bitmap
{
1022 NETLOGON_REPLICATION_NEEDED
= 0x00000001,
1023 NETLOGON_REPLICATION_IN_PROGRESS
= 0x00000002,
1024 NETLOGON_FULL_SYNC_REPLICATION
= 0x00000004,
1025 NETLOGON_REDO_NEEDED
= 0x00000008,
1026 NETLOGON_HAS_IP
= 0x00000010,
1027 NETLOGON_HAS_TIMESERV
= 0x00000020,
1028 NETLOGON_DNS_UPDATE_FAILURE
= 0x00000040,
1029 NETLOGON_VERIFY_STATUS_RETURNED
= 0x00000080
1033 netr_InfoFlags flags
;
1034 WERROR pdc_connection_status
;
1035 } netr_NETLOGON_INFO_1
;
1038 netr_InfoFlags flags
;
1039 WERROR pdc_connection_status
;
1040 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
1041 WERROR tc_connection_status
;
1042 } netr_NETLOGON_INFO_2
;
1045 netr_InfoFlags flags
;
1046 uint32 logon_attempts
;
1052 } netr_NETLOGON_INFO_3
;
1055 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
1056 [string,charset
(UTF16
)] uint16
*trusted_domain_name
;
1057 } netr_NETLOGON_INFO_4
;
1059 typedef [public] union {
1060 [case(1)] netr_NETLOGON_INFO_1
*info1
;
1061 [case(2)] netr_NETLOGON_INFO_2
*info2
;
1062 [case(3)] netr_NETLOGON_INFO_3
*info3
;
1063 [case(4)] netr_NETLOGON_INFO_4
*info4
;
1065 } netr_CONTROL_QUERY_INFORMATION
;
1067 /* function_code values */
1068 typedef [v1_enum,public] enum {
1069 NETLOGON_CONTROL_QUERY
= 0x00000001,
1070 NETLOGON_CONTROL_REPLICATE
= 0x00000002,
1071 NETLOGON_CONTROL_SYNCHRONIZE
= 0x00000003,
1072 NETLOGON_CONTROL_PDC_REPLICATE
= 0x00000004,
1073 NETLOGON_CONTROL_REDISCOVER
= 0x00000005,
1074 NETLOGON_CONTROL_TC_QUERY
= 0x00000006,
1075 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 0x00000007,
1076 NETLOGON_CONTROL_FIND_USER
= 0x00000008,
1077 NETLOGON_CONTROL_CHANGE_PASSWORD
= 0x00000009,
1078 NETLOGON_CONTROL_TC_VERIFY
= 0x0000000A,
1079 NETLOGON_CONTROL_FORCE_DNS_REG
= 0x0000000B,
1080 NETLOGON_CONTROL_QUERY_DNS_REG
= 0x0000000C,
1081 NETLOGON_CONTROL_BACKUP_CHANGE_LOG
= 0x0000FFFC,
1082 NETLOGON_CONTROL_TRUNCATE_LOG
= 0x0000FFFD,
1083 NETLOGON_CONTROL_SET_DBFLAG
= 0x0000FFFE,
1084 NETLOGON_CONTROL_BREAKPOINT
= 0x0000FFFF
1085 } netr_LogonControlCode
;
1087 WERROR netr_LogonControl
(
1088 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1089 [in] netr_LogonControlCode function_code
,
1091 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1098 WERROR netr_GetAnyDCName
(
1099 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1100 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
1101 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
1108 typedef [public,switch_type(netr_LogonControlCode
)] union {
1109 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
1110 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
1111 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
1112 [case(NETLOGON_CONTROL_CHANGE_PASSWORD
)] [string,charset
(UTF16
)] uint16
*domain
;
1113 [case(NETLOGON_CONTROL_TC_VERIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
1114 [case(NETLOGON_CONTROL_FIND_USER
)] [string,charset
(UTF16
)] uint16
*user
;
1115 [case(NETLOGON_CONTROL_SET_DBFLAG
)] uint32 debug_level
;
1117 } netr_CONTROL_DATA_INFORMATION
;
1119 WERROR netr_LogonControl2
(
1120 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1121 [in] netr_LogonControlCode function_code
,
1123 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1124 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1128 /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
1129 * session keys are encrypted with DES calls. (And the user session key
1130 * is unencrypted) */
1135 typedef [public,bitmap32bit
] bitmap
{
1136 NETLOGON_NEG_ACCOUNT_LOCKOUT
= 0x00000001,
1137 NETLOGON_NEG_PERSISTENT_SAMREPL
= 0x00000002,
1138 NETLOGON_NEG_ARCFOUR
= 0x00000004,
1139 NETLOGON_NEG_PROMOTION_COUNT
= 0x00000008,
1140 NETLOGON_NEG_CHANGELOG_BDC
= 0x00000010,
1141 NETLOGON_NEG_FULL_SYNC_REPL
= 0x00000020,
1142 NETLOGON_NEG_MULTIPLE_SIDS
= 0x00000040,
1143 NETLOGON_NEG_REDO
= 0x00000080,
1144 NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL
= 0x00000100,
1145 NETLOGON_NEG_SEND_PASSWORD_INFO_PDC
= 0x00000200,
1146 NETLOGON_NEG_GENERIC_PASSTHROUGH
= 0x00000400,
1147 NETLOGON_NEG_CONCURRENT_RPC
= 0x00000800,
1148 NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL
= 0x00001000,
1149 NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL
= 0x00002000,
1150 NETLOGON_NEG_STRONG_KEYS
= 0x00004000,
1151 NETLOGON_NEG_TRANSITIVE_TRUSTS
= 0x00008000,
1152 NETLOGON_NEG_DNS_DOMAIN_TRUSTS
= 0x00010000,
1153 NETLOGON_NEG_PASSWORD_SET2
= 0x00020000,
1154 NETLOGON_NEG_GETDOMAININFO
= 0x00040000,
1155 NETLOGON_NEG_CROSS_FOREST_TRUSTS
= 0x00080000,
1156 NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION
= 0x00100000,
1157 NETLOGON_NEG_RODC_PASSTHROUGH
= 0x00200000,
1158 NETLOGON_NEG_SUPPORTS_AES_SHA2
= 0x00400000,
1159 NETLOGON_NEG_SUPPORTS_AES
= 0x01000000,
1160 NETLOGON_NEG_AUTHENTICATED_RPC_LSASS
= 0x20000000,
1161 NETLOGON_NEG_AUTHENTICATED_RPC
= 0x40000000,
1162 NETLOGON_NEG_SUPPORTS_KERBEROS_AUTH
= 0x80000000
1163 } netr_NegotiateFlags
;
1165 const uint32 NETLOGON_NEG_128BIT
= NETLOGON_NEG_STRONG_KEYS
;
1166 const uint32 NETLOGON_NEG_SCHANNEL
= NETLOGON_NEG_AUTHENTICATED_RPC
;
1168 NTSTATUS netr_ServerAuthenticate2
(
1169 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1170 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1171 [in] netr_SchannelType secure_channel_type
,
1172 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1173 [in,ref] netr_Credential
*credentials
,
1174 [out,ref] netr_Credential
*return_credentials
,
1175 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
1183 SYNCSTATE_NORMAL_STATE
= 0,
1184 SYNCSTATE_DOMAIN_STATE
= 1,
1185 SYNCSTATE_GROUP_STATE
= 2,
1186 SYNCSTATE_UAS_BUILT_IN_GROUP_STATE
= 3,
1187 SYNCSTATE_USER_STATE
= 4,
1188 SYNCSTATE_GROUP_MEMBER_STATE
= 5,
1189 SYNCSTATE_ALIAS_STATE
= 6,
1190 SYNCSTATE_ALIAS_MEMBER_STATE
= 7,
1191 SYNCSTATE_SAM_DONE_STATE
= 8
1194 NTSTATUS netr_DatabaseSync2
(
1195 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1196 [in] [string,charset
(UTF16
)] uint16
*computername
,
1197 [in,ref] netr_Authenticator
*credential
,
1198 [in,out,ref] netr_Authenticator
*return_authenticator
,
1199 [in] netr_SamDatabaseID database_id
,
1200 [in] SyncStateEnum restart_state
,
1201 [in,out,ref] uint32
*sync_context
,
1202 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
1203 [in] uint32 preferredmaximumlength
1210 /* i'm not at all sure how this call works */
1212 typedef [bitmap16bit
] bitmap
{
1213 NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED
= 0x0001,
1214 NETR_CHANGELOG_CHANGED_PASSWORD
= 0x0002,
1215 NETR_CHANGELOG_SID_INCLUDED
= 0x0004,
1216 NETR_CHANGELOG_NAME_INCLUDED
= 0x0008,
1217 NETR_CHANGELOG_FIRST_PROMOTION_OBJ
= 0x0010
1218 } netr_ChangeLogFlags
;
1220 typedef [nodiscriminant
] union {
1221 [case(NETR_CHANGELOG_SID_INCLUDED
)] dom_sid object_sid
;
1222 [case(NETR_CHANGELOG_NAME_INCLUDED
)] nstring object_name
;
1224 } netr_ChangeLogObject
;
1226 typedef [public,gensize
] struct {
1227 uint32 serial_number1
;
1228 uint32 serial_number2
;
1230 netr_ChangeLogFlags flags
;
1231 netr_SamDatabaseID8Bit db_index
;
1232 netr_DeltaEnum8Bit delta_type
;
1233 [switch_is(flags
& (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED
))] netr_ChangeLogObject
object;
1234 } netr_ChangeLogEntry
;
1236 NTSTATUS netr_DatabaseRedo
(
1237 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1238 [in] [string,charset
(UTF16
)] uint16
*computername
,
1239 [in] netr_Authenticator
*credential
,
1240 [in,out,ref] netr_Authenticator
*return_authenticator
,
1242 * we cannot use subcontext_size() here, as
1243 * change_log_entry_size is encoded after the subcontext
1245 [in] [subcontext
(4)/*,subcontext_size(change_log_entry_size)*/]
1246 netr_ChangeLogEntry change_log_entry
,
1247 [in] [value
(ndr_size_netr_ChangeLogEntry
(&change_log_entry
,
1249 uint32 change_log_entry_size
,
1250 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1257 WERROR netr_LogonControl2Ex
(
1258 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1259 [in] netr_LogonControlCode function_code
,
1261 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1262 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1269 [size_is(length
)] uint8
*data
;
1272 NTSTATUS netr_NetrEnumerateTrustedDomains
(
1273 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1274 [out,ref] netr_Blob
*trusted_domains_blob
1280 /* one unknown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1282 const int DSGETDC_VALID_FLAGS
= (DS_FORCE_REDISCOVERY |
1283 DS_DIRECTORY_SERVICE_REQUIRED |
1284 DS_DIRECTORY_SERVICE_PREFERRED |
1285 DS_GC_SERVER_REQUIRED |
1287 DS_BACKGROUND_ONLY |
1290 DS_TIMESERV_REQUIRED |
1291 DS_WRITABLE_REQUIRED |
1292 DS_GOOD_TIMESERV_PREFERRED |
1294 DS_ONLY_LDAP_NEEDED |
1297 DS_TRY_NEXTCLOSEST_SITE |
1298 DS_DIRECTORY_SERVICE_6_REQUIRED |
1299 DS_WEB_SERVICE_REQUIRED |
1300 DS_DIRECTORY_SERVICE_8_REQUIRED |
1301 DS_DIRECTORY_SERVICE_9_REQUIRED |
1302 DS_DIRECTORY_SERVICE_10_REQUIRED |
1303 DS_RETURN_FLAT_NAME |
1304 DS_RETURN_DNS_NAME
);
1306 typedef [bitmap32bit
] bitmap
{
1307 DS_FORCE_REDISCOVERY
= 0x00000001,
1308 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
1309 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
1310 DS_GC_SERVER_REQUIRED
= 0x00000040,
1311 DS_PDC_REQUIRED
= 0x00000080,
1312 DS_BACKGROUND_ONLY
= 0x00000100,
1313 DS_IP_REQUIRED
= 0x00000200,
1314 DS_KDC_REQUIRED
= 0x00000400,
1315 DS_TIMESERV_REQUIRED
= 0x00000800,
1316 DS_WRITABLE_REQUIRED
= 0x00001000,
1317 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
1318 DS_AVOID_SELF
= 0x00004000,
1319 DS_ONLY_LDAP_NEEDED
= 0x00008000,
1320 DS_IS_FLAT_NAME
= 0x00010000,
1321 DS_IS_DNS_NAME
= 0x00020000,
1322 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
1323 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000, /* 2008 */
1324 DS_WEB_SERVICE_REQUIRED
= 0x00100000,
1325 DS_DIRECTORY_SERVICE_8_REQUIRED
= 0x00200000, /* 2012 */
1326 DS_DIRECTORY_SERVICE_9_REQUIRED
= 0x00400000, /* 2012R2 */
1327 DS_DIRECTORY_SERVICE_10_REQUIRED
= 0x00800000, /* 2016 */
1328 DS_RETURN_DNS_NAME
= 0x40000000,
1329 DS_RETURN_FLAT_NAME
= 0x80000000
1330 } netr_DsRGetDCName_flags
;
1332 typedef [v1_enum] enum {
1333 DS_ADDRESS_TYPE_INET
= 1,
1334 DS_ADDRESS_TYPE_NETBIOS
= 2
1335 } netr_DsRGetDCNameInfo_AddressType
;
1337 typedef [public] struct {
1338 [string,charset
(UTF16
)] uint16
*dc_unc
;
1339 [string,charset
(UTF16
)] uint16
*dc_address
;
1340 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1342 [string,charset
(UTF16
)] uint16
*domain_name
;
1343 [string,charset
(UTF16
)] uint16
*forest_name
;
1344 nbt_server_type dc_flags
;
1345 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1346 [string,charset
(UTF16
)] uint16
*client_site_name
;
1347 } netr_DsRGetDCNameInfo
;
1349 WERROR netr_DsRGetDCName
(
1350 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1351 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1352 [in,unique] GUID
*domain_guid
,
1353 [in,unique] GUID
*site_guid
,
1354 [in] netr_DsRGetDCName_flags flags
,
1355 [out,ref] netr_DsRGetDCNameInfo
**info
1360 typedef [switch_type(uint32
)] union {
1361 [case(1)] netr_NegotiateFlags server_capabilities
;
1362 [case(2)] netr_NegotiateFlags requested_flags
;
1363 } netr_Capabilities
;
1365 NTSTATUS netr_LogonGetCapabilities
(
1366 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1367 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1368 [in,ref] netr_Authenticator
*credential
,
1369 [in,out,ref] netr_Authenticator
*return_authenticator
,
1370 [in] uint32 query_level
,
1371 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1376 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1380 WERROR netr_LogonGetTrustRid
(
1381 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1382 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1383 [out,ref] uint32
*rid
1388 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1392 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1396 [public] NTSTATUS netr_ServerAuthenticate3
(
1397 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1398 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1399 [in] netr_SchannelType secure_channel_type
,
1400 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1401 [in,ref] netr_Credential
*credentials
,
1402 [out,ref] netr_Credential
*return_credentials
,
1403 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1404 [out,ref] uint32
*rid
1410 WERROR netr_DsRGetDCNameEx
(
1411 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1412 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1413 [in,unique] GUID
*domain_guid
,
1414 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1415 [in] netr_DsRGetDCName_flags flags
,
1416 [out,ref] netr_DsRGetDCNameInfo
**info
1422 WERROR netr_DsRGetSiteName
(
1423 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1424 [out,ref] [string,charset
(UTF16
)] uint16
**site
1429 typedef [public,bitmap32bit
] bitmap
{
1430 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1431 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1432 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1433 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1434 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1435 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1436 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1437 NETR_TRUST_FLAG_AES
= 0x00000100
1440 typedef [bitmap32bit
] bitmap
{
1441 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1442 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1443 } netr_WorkstationFlags
;
1445 typedef [bitmap16bit
] bitmap
{
1446 NETR_VER_SUITE_BACKOFFICE
= 0x0004,
1447 NETR_VER_SUITE_BLADE
= 0x0400,
1448 NETR_VER_SUITE_COMPUTE_SERVER
= 0x4000,
1449 NETR_VER_SUITE_DATACENTER
= 0x0080,
1450 NETR_VER_SUITE_ENTERPRISE
= 0x0002,
1451 NETR_VER_SUITE_EMBEDDEDNT
= 0x0040,
1452 NETR_VER_SUITE_PERSONAL
= 0x0200,
1453 NETR_VER_SUITE_SINGLEUSERTS
= 0x0100,
1454 NETR_VER_SUITE_SMALLBUSINESS
= 0x0001,
1455 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED
= 0x0020,
1456 NETR_VER_SUITE_STORAGE_SERVER
= 0x2000,
1457 NETR_VER_SUITE_TERMINAL
= 0x0010,
1458 NETR_VER_SUITE_WH_SERVER
= 0x8000
1461 typedef [bitmap8bit
] bitmap
{
1462 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1463 NETR_VER_NT_SERVER
= 0x03,
1464 NETR_VER_NT_WORKSTATION
= 0x01
1469 [size_is(policy_size
)] uint8
*policy
;
1470 } netr_LsaPolicyInformation
;
1473 [value
(284)] uint32 OSVersionInfoSize
;
1475 * [MS-NRPC] 2.2.1.3.15 NL_OSVERSIONINFO_V1
1477 * 4 The operating system is Windows NT 4.0.
1478 * 5 The operating system is
1481 * Windows Server 2003, or
1482 * Windows Server 2003 R2 operating system.
1483 * 6 The operating system is
1484 * Windows Vista, Windows Server 2008,
1485 * Windows 7, Windows Server 2008 R2,
1486 * Windows 8, Windows Server 2012,
1487 * Windows 8.1, or Windows Server 2012 R2.
1488 * 10 The operating system is
1489 * Windows 10 and later.
1491 uint32 MajorVersion
;
1493 * [MS-NRPC] 2.2.1.3.15 NL_OSVERSIONINFO_V1
1495 * 0 The operating system is
1496 * Windows NT 4.0, Windows 2000,
1497 * Windows Vista, Windows Server 2008,
1498 * Windows 10, Windows Server 2016, and later.
1499 * 1 The operating system is
1500 * Windows XP, Windows 7, or Windows Server 2008 R2.
1501 * 2 The operating system is
1502 * Windows XP Professional x64 Edition operating system,
1503 * Windows Server 2003, Windows Server 2003 R2,
1504 * Windows 8, or Windows Server 2012.
1505 * 3 The operating system is
1506 * Windows 8.1 or Windows Server 2012 R2.
1508 * I guess this results in:
1510 * Windows Server 2022 => 10.0 (20348)
1511 * Windows Server 2019 => 10.0
1512 * Windows Server operating system => 10.0
1513 * Windows 10 and Windows Server 2016 => 10.0 (14393)
1514 * Windows 8.1 and Windows Server 2012 R2 => 6.3 (9600)
1515 * Windows 8 and Windows Server 2012 => 6.2
1516 * Windows 7 and Windows Server 2008 R2 => 6.1 (7600)
1517 * Windows Vista and Windows Server 2008 => 6.0
1518 * Windows XP operating system Service Pack 1 (SP1) => 5.2
1519 * Windows XP and Windows Server 2003 => 5.1
1520 * Windows 2000 => 5.0
1521 * Windows NT 4.0 => 4.0
1523 uint32 MinorVersion
;
1525 * From [MS-RPRN] 7 Appendix B: Product Behavior:
1527 * Windows Server 2019 >= 17633
1528 * Windows Server operating system >= 16299
1529 * Windows 10 and Windows Server 2016 >= 10586
1530 * Windows 8.1 and Windows Server 2012 R2 >= 9431
1531 * Windows 8 and Windows Server 2012 >= 9200
1532 * Windows 7 and Windows Server 2008 R2 >= 7007
1533 * Windows Vista operating system with Service Pack 1 (SP1) and
1534 * Windows Server 2008 >= 6001
1535 * Windows Vista and Windows Server 2008 >= 6000
1536 * Windows XP operating system Service Pack 1 (SP1) >= 2196
1537 * Windows XP and Windows Server 2003 >= 2196
1538 * Windows 2000 >= 1382
1539 * Windows NT 4.0 >= 1381
1542 * Windows Server 2022 => 10.0 (20348)
1546 [subcontext
(0),subcontext_size
(256)] nstring CSDVersion
;
1547 uint16 ServicePackMajor
;
1548 uint16 ServicePackMinor
;
1549 netr_SuiteMask SuiteMask
;
1550 netr_ProductType ProductType
;
1552 } netr_OsVersionInfoEx
;
1555 /* these first 3 values come from the fact windows
1556 actually encodes this structure as a UNICODE_STRING
1557 - see MS-NRPC section 2.2.1.3.9 */
1558 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1559 [value
(142)] uint3264 length
;
1560 [value
(0)] uint3264 dummy
;
1561 [value
(142)] uint3264 size
;
1562 [subcontext
(0),subcontext_size
(size
*2)]
1563 netr_OsVersionInfoEx os
;
1567 /* value is 284 when info != os, otherwise 0 (for length and
1569 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1570 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1572 } netr_OsVersionContainer
;
1575 netr_LsaPolicyInformation lsa_policy
;
1576 [string,charset
(UTF16
)] uint16
*dns_hostname
;
1577 [string,charset
(UTF16
)] uint16
*sitename
;
1578 [string,charset
(UTF16
)] uint16
*dummy1
;
1579 [string,charset
(UTF16
)] uint16
*dummy2
;
1580 [string,charset
(UTF16
)] uint16
*dummy3
;
1581 [string,charset
(UTF16
)] uint16
*dummy4
;
1582 netr_OsVersionContainer os_version
;
1584 lsa_String dummy_string3
;
1585 lsa_String dummy_string4
;
1586 netr_WorkstationFlags workstation_flags
;
1587 kerb_EncTypes supported_enc_types
;
1590 } netr_WorkstationInformation
;
1593 [case(1)] netr_WorkstationInformation
*workstation_info
;
1594 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1595 } netr_WorkstationInfo
;
1598 netr_TrustFlags flags
;
1599 uint32 parent_index
;
1600 lsa_TrustType trust_type
;
1601 lsa_TrustAttributes trust_attributes
;
1602 } netr_trust_extension_info
;
1605 /* these first 3 values come from the fact windows
1606 actually encodes this structure as a UNICODE_STRING
1607 - see MS-NRPC section 2.2.1.3.9 */
1608 [value
(8)] uint3264 length
;
1609 [value
(0)] uint3264 dummy
;
1610 [value
(8)] uint3264 size
;
1611 [subcontext
(0),subcontext_size
(size
*2)]
1612 netr_trust_extension_info info
;
1613 } netr_trust_extension
;
1616 /* value is 16 when info != NULL, otherwise 0 */
1617 [value
(info
== NULL ?
0 : 16)] uint16 length
;
1618 [value
(info
== NULL ?
0 : 16)] uint16 size
;
1619 netr_trust_extension
*info
;
1620 } netr_trust_extension_container
;
1623 lsa_StringLarge domainname
;
1624 lsa_StringLarge dns_domainname
;
1625 lsa_StringLarge dns_forestname
;
1627 dom_sid2
*domain_sid
;
1628 netr_trust_extension_container trust_extension
;
1629 lsa_StringLarge dummy_string2
;
1630 lsa_StringLarge dummy_string3
;
1631 lsa_StringLarge dummy_string4
;
1636 } netr_OneDomainInfo
;
1639 netr_OneDomainInfo primary_domain
;
1640 uint32 trusted_domain_count
;
1641 [size_is(trusted_domain_count
)] netr_OneDomainInfo
*trusted_domains
;
1642 netr_LsaPolicyInformation lsa_policy
;
1643 lsa_StringLarge dns_hostname
;
1644 lsa_StringLarge dummy_string2
;
1645 lsa_StringLarge dummy_string3
;
1646 lsa_StringLarge dummy_string4
;
1647 netr_WorkstationFlags workstation_flags
;
1648 kerb_EncTypes supported_enc_types
;
1651 } netr_DomainInformation
;
1654 [case(1)] netr_DomainInformation
*domain_info
;
1655 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
1658 [public] NTSTATUS netr_LogonGetDomainInfo
(
1659 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1660 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1661 [in,ref] netr_Authenticator
*credential
,
1662 [in,out,ref] netr_Authenticator
*return_authenticator
,
1664 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1665 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1671 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1673 /* someone's birthday ? */
1674 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT
= 0x02231968;
1677 uint32 ReservedField
;
1678 uint32 PasswordVersionNumber
;
1679 uint32 PasswordVersionPresent
;
1680 } NL_PASSWORD_VERSION
;
1682 typedef [public,flag
(NDR_PAHEX
)] struct {
1683 [flag
(NDR_SECRET
)] uint8 data
[512];
1685 } netr_CryptPassword
;
1687 NTSTATUS netr_ServerPasswordSet2
(
1688 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1689 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1690 [in] netr_SchannelType secure_channel_type
,
1691 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1692 [in,ref] netr_Authenticator
*credential
,
1693 [out,ref] netr_Authenticator
*return_authenticator
,
1694 [in,ref] netr_CryptPassword
*new_password
1699 NTSTATUS netr_ServerPasswordGet
(
1700 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1701 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1702 [in] netr_SchannelType secure_channel_type
,
1703 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1704 [in,ref] netr_Authenticator
*credential
,
1705 [out,ref] netr_Authenticator
*return_authenticator
,
1706 [out,ref] samr_Password
*password
1709 typedef [public] enum {
1710 SendToSamUpdatePassword
= 0,
1711 SendToSamResetBadPasswordCount
= 1,
1712 SendToSamUpdatePasswordForward
= 2,
1713 SendToSamUpdateLastLogonTimestamp
= 3,
1714 SendToSamResetSmartCardPassword
= 4
1715 } netr_SendToSamType
;
1719 } netr_SendToSamResetBadPasswordCount
;
1721 typedef [nodiscriminant
, public,switch_type(netr_SendToSamType
)] union {
1722 /* TODO Implement other SendToSam message types
1723 * [case(SendToSamUpdatePassword)] netr_SendToSamUpdatePassword ...; */
1724 [case(SendToSamResetBadPasswordCount
)] netr_SendToSamResetBadPasswordCount reset_bad_password
;
1726 * [case(SendToSamUpdatePasswordForward)] netrSendToSamUpdatePasswordForward ...;
1727 * [case(SendToSamUpdateLastLogonTimestamp)] netrSendToSamUpdateLastLogonTimestamp ...;
1728 * [case(SendToSamResetSmartCardPassword)] netrSendToSamResetSmartCardPassword ...;
1731 } netr_SendToSamMessage
;
1733 typedef [public] struct {
1734 netr_SendToSamType message_type
;
1735 uint32 message_size
;
1736 [switch_is(message_type
), subcontext
(0), subcontext_size
(message_size
)] netr_SendToSamMessage
message;
1737 } netr_SendToSamBase
;
1741 NTSTATUS netr_NetrLogonSendToSam
(
1742 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1743 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1744 [in,ref] netr_Authenticator
*credential
,
1745 [out,ref] netr_Authenticator
*return_authenticator
,
1746 [in,ref] [size_is(buffer_len
)][flag
(NDR_SECRET
)] uint8
*opaque_buffer
,
1747 [in] uint32 buffer_len
1754 [size_is(count
)] lsa_String
*sitename
;
1755 } netr_DsRAddressToSitenamesWCtr
;
1758 [size_is(size
)] uint8
*buffer
;
1762 WERROR netr_DsRAddressToSitenamesW
(
1763 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1764 [in] [range(0,32000)] uint32 count
,
1765 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1766 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1771 WERROR netr_DsRGetDCNameEx2
(
1772 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1773 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1774 [in] samr_AcctFlags mask
,
1775 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1776 [in,unique] GUID
*domain_guid
,
1777 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1778 [in] netr_DsRGetDCName_flags flags
,
1779 [out,ref] netr_DsRGetDCNameInfo
**info
1784 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1789 typedef [public] struct {
1790 [string,charset
(UTF16
)] uint16
*netbios_name
;
1791 [string,charset
(UTF16
)] uint16
*dns_name
;
1792 netr_TrustFlags trust_flags
;
1793 uint32 parent_index
;
1794 lsa_TrustType trust_type
;
1795 lsa_TrustAttributes trust_attributes
;
1800 typedef [public] struct {
1802 [size_is(count
)] netr_DomainTrust
*array
;
1803 } netr_DomainTrustList
;
1805 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1806 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1807 [out,ref] netr_DomainTrustList
*dom_trust_list
1814 [size_is(count
)] lsa_String
*sitename
;
1815 [size_is(count
)] lsa_String
*subnetname
;
1816 } netr_DsRAddressToSitenamesExWCtr
;
1818 WERROR netr_DsRAddressToSitenamesExW
(
1819 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1820 [in] [range(0,32000)] uint32 count
,
1821 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1822 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1830 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1833 WERROR netr_DsrGetDcSiteCoverageW
(
1834 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1835 [out,ref] DcSitesCtr
**ctr
1840 typedef [public,bitmap32bit
] bitmap
{
1841 /* Request MUST be passed to the domain controller at the root of the forest. */
1842 NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT
= 0x00000001,
1843 /* Request MUST be passed to the DC at the end of the first hop over a cross-forest trust. */
1844 NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP
= 0x00000002,
1845 /* Request was passed by an RODC to a DC in a different domain. */
1846 NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN
= 0x00000004,
1847 /* Request is an NTLM authentication package request passed by an RODC. */
1848 NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST
= 0x00000008
1849 } netr_LogonSamLogon_flags
;
1851 NTSTATUS netr_LogonSamLogonEx
(
1852 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1853 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1854 [in] netr_LogonInfoClass logon_level
,
1855 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1856 [in] uint16 validation_level
,
1857 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1858 [out,ref] uint8
*authoritative
,
1859 [in,out,ref] netr_LogonSamLogon_flags
*flags
1865 WERROR netr_DsrEnumerateDomainTrusts
(
1866 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1867 [in] netr_TrustFlags trust_flags
,
1868 [out,ref] netr_DomainTrustList
*trusts
1874 WERROR netr_DsrDeregisterDNSHostRecords
(
1875 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1876 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1877 [in,unique] GUID
*domain_guid
,
1878 [in,unique] GUID
*dsa_guid
,
1879 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1884 NTSTATUS netr_ServerTrustPasswordsGet
(
1885 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1886 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1887 [in] netr_SchannelType secure_channel_type
,
1888 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1889 [in,ref] netr_Authenticator
*credential
,
1890 [out,ref] netr_Authenticator
*return_authenticator
,
1891 [out,ref] samr_Password
*new_owf_password
,
1892 [out,ref] samr_Password
*old_owf_password
1898 const int DS_GFTI_UPDATE_TDO
= 0x1;
1900 WERROR netr_DsRGetForestTrustInformation
(
1901 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1902 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1904 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1909 NTSTATUS netr_GetForestTrustInformation
(
1910 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1911 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1912 [in,ref] netr_Authenticator
*credential
,
1913 [out,ref] netr_Authenticator
*return_authenticator
,
1915 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1921 /* this is the ADS variant. I don't yet know what the "flags" are for */
1922 NTSTATUS netr_LogonSamLogonWithFlags
(
1923 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1924 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1925 [in,unique] netr_Authenticator
*credential
,
1926 [in,out,unique] netr_Authenticator
*return_authenticator
,
1927 [in] netr_LogonInfoClass logon_level
,
1928 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1929 [in] uint16 validation_level
,
1930 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1931 [out,ref] uint8
*authoritative
,
1932 [in,out,ref] netr_LogonSamLogon_flags
*flags
1940 [size_is(count
)] uint32
*data
;
1942 [size_is(count
)] lsa_String
*entries
;
1945 NTSTATUS netr_ServerGetTrustInfo
(
1946 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1947 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1948 [in] netr_SchannelType secure_channel_type
,
1949 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1950 [in,ref] netr_Authenticator
*credential
,
1951 [out,ref] netr_Authenticator
*return_authenticator
,
1952 [out,ref] samr_Password
*new_owf_password
,
1953 [out,ref] samr_Password
*old_owf_password
,
1954 [out,ref] netr_TrustInfo
**trust_info
1960 NTSTATUS netr_Unused47
(void);
1967 NlDnsLdapAtSite
= 22,
1970 NlDnsKdcAtSite
= 30,
1972 NlDnsRfc1510KdcAtSite
= 34,
1973 NlDnsGenericGcAtSite
= 36
1977 NlDnsInfoTypeNone
= 0,
1978 NlDnsDomainName
= 1,
1979 NlDnsDomainNameAlias
= 2,
1980 NlDnsForestName
= 3,
1981 NlDnsForestNameAlias
= 4,
1982 NlDnsNdncDomainName
= 5,
1984 } netr_DnsDomainInfoType
;
1988 [string,charset
(UTF16
)] uint16
*dns_domain_info
;
1989 netr_DnsDomainInfoType dns_domain_info_type
;
1993 boolean32 dns_register
;
1997 typedef [public] struct {
1999 [size_is(count
)] NL_DNS_NAME_INFO
*names
;
2000 } NL_DNS_NAME_INFO_ARRAY
;
2002 NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords
(
2003 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2004 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
2005 [in, ref] netr_Authenticator
*credential
,
2006 [out,ref] netr_Authenticator
*return_authenticator
,
2007 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
2008 [in] uint32 dns_ttl
,
2009 [in,out,ref] NL_DNS_NAME_INFO_ARRAY
*dns_names
2012 [todo
] void netr_Opnum49NotUsedOnWire
(void);
2013 [todo
] void netr_Opnum50NotUsedOnWire
(void);
2014 [todo
] void netr_Opnum51NotUsedOnWire
(void);
2015 [todo
] void netr_Opnum52NotUsedOnWire
(void);
2016 [todo
] void netr_Opnum53NotUsedOnWire
(void);
2018 /**********************/
2019 /* Function 0x36 (54) */
2020 /* from wireshark: */
2021 /* This is documented as 49 (0x31) but it's 54) */
2022 [todo
] NTSTATUS netr_ChainSetClientAttributes
();
2024 [todo
] void netr_Opnum55NotUsedOnWire
(void);
2025 [todo
] void netr_Opnum56NotUsedOnWire
(void);
2026 [todo
] void netr_Opnum57NotUsedOnWire
(void);
2027 [todo
] void netr_Opnum58NotUsedOnWire
(void);
2030 /* Function 0x3b (59) */
2031 [public] NTSTATUS netr_ServerAuthenticateKerberos
(
2032 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2033 [in] [string,charset
(UTF16
)] uint16
*account_name
,
2034 [in] netr_SchannelType account_type
,
2035 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
2036 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
2037 [out,ref] uint32
*rid