3 much of this was derived from the ethereal sources - thanks to everyone
7 import
"misc.idl", "lsa.idl", "samr.idl", "security.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")
21 uuid("12345678-1234-abcd-ef00-01234567cffb"),
23 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
24 helper
("../librpc/ndr/ndr_netlogon.h"),
26 pointer_default(unique)
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
;
40 [string,charset
(UTF16
)] uint16
*account_name
;
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
;
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
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
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;
90 uint32 bad_attempt_lockout;
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
;
99 uint32 bad_attempt_lockout
;
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
;
137 lsa_String domain_name
;
138 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
140 uint32 logon_id_high
;
141 lsa_String account_name
;
142 lsa_String workstation
;
146 netr_IdentityInfo identity_info
;
147 samr_Password lmpassword
;
148 samr_Password ntpassword
;
151 typedef [flag
(NDR_PAHEX
)] struct {
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
;
160 netr_ChallengeResponse nt
;
161 netr_ChallengeResponse lm
;
164 typedef [flag
(NDR_PAHEX
)] struct {
165 netr_IdentityInfo identity_info
;
166 lsa_String package_name
;
168 [size_is(length
)] uint8
*data
;
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
;
192 typedef [public,flag
(NDR_PAHEX
)] struct {
194 } netr_UserSessionKey
;
196 typedef [public,flag
(NDR_PAHEX
)] struct {
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
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
;
229 uint16 bad_password_count
;
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
;
248 netr_SamBaseInfo base
;
251 typedef [public] struct {
253 samr_GroupAttrs attributes
;
256 typedef [public] struct {
257 netr_SamBaseInfo base
;
259 [size_is(sidcount
)] netr_SidAttr
*sids
;
263 netr_SamBaseInfo base
;
265 [size_is(sidcount
)] netr_SidAttr
*sids
;
268 * Should pointer values be allocated
269 * of sids[*].sid before the following ones?
271 * That's at least the case for
274 lsa_String dns_domainname
;
275 lsa_String principal_name
;
281 [size_is(pac_size
)] uint8
*pac
;
282 lsa_String logon_domain
;
283 lsa_String logon_server
;
284 lsa_String principal_name
;
286 [size_is(auth_size
)] uint8
*auth
;
287 netr_UserSessionKey user_session_key
;
288 uint32 expansionroom
[10];
295 typedef [flag
(NDR_PAHEX
)] struct {
297 [size_is(length
)] uint8
*data
;
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
;
317 typedef [public, flag
(NDR_PAHEX
)] struct {
321 typedef [public] struct {
322 netr_Credential cred
;
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
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
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
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
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
396 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
399 [string,charset
(UTF16
)] uint16
*account_name
;
408 } netr_DELTA_DELETE_USER
;
412 [value
(length
)] uint16 size
;
419 [value
(nt_length
)] uint16 nt_size
;
422 [value
(lm_length
)] uint16 lm_size
;
424 uint8 nt_history
[nt_length
];
425 uint8 lm_history
[lm_length
];
426 } netr_PasswordHistory
;
429 netr_USER_KEY16 lmpassword
;
430 netr_USER_KEY16 ntpassword
;
431 netr_PasswordHistory history
;
434 typedef struct { /* TODO: make this a union! */
435 netr_USER_KEYS2 keys2
;
436 } netr_USER_KEY_UNION
;
438 typedef [public] struct {
440 netr_USER_KEY_UNION keys
;
444 boolean8 SensitiveDataFlag
;
447 /* netr_USER_KEYS encrypted with the session key */
448 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
449 } netr_USER_PRIVATE_INFO
;
452 lsa_String account_name
;
453 lsa_String full_name
;
456 lsa_String home_directory
;
457 lsa_String home_drive
;
458 lsa_String logon_script
;
459 lsa_String description
;
460 lsa_String workstations
;
463 samr_LogonHours logon_hours
;
464 uint16 bad_password_count
;
466 NTTIME last_password_change
;
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
;
475 lsa_BinaryString parameters
;
478 netr_USER_PRIVATE_INFO user_private_info
;
479 uint32 SecurityInformation
;
481 lsa_String profile_path
;
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
;
501 NTTIME domain_create_time
;
502 uint32 SecurityInformation
;
504 lsa_BinaryString account_lockout
;
508 uint32 logon_to_chgpass
;
515 lsa_String group_name
;
518 lsa_String description
;
519 uint32 SecurityInformation
;
545 [size_is(num_rids
)] uint32
*rids
;
546 [size_is(num_rids
)] uint32
*attribs
;
552 } netr_DELTA_GROUP_MEMBER
;
555 lsa_String alias_name
;
557 uint32 SecurityInformation
;
559 lsa_String description
;
575 } netr_DELTA_ALIAS_MEMBER
;
578 uint32 pagedpoollimit
;
579 uint32 nonpagedpoollimit
;
580 uint32 minimumworkingsetsize
;
581 uint32 maximumworkingsetsize
;
582 uint32 pagefilelimit
;
588 NTTIME auditretentionperiod
;
589 boolean8 auditingmode
;
590 uint32 maxauditeventcount
;
591 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
592 lsa_String primary_domain_name
;
594 netr_QUOTA_LIMITS quota_limits
;
596 NTTIME db_create_time
;
597 uint32 SecurityInformation
;
610 lsa_String domain_name
;
611 uint32 num_controllers
;
612 [size_is(num_controllers
)] lsa_String
*controller_names
;
613 uint32 SecurityInformation
;
623 } netr_DELTA_TRUSTED_DOMAIN
;
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
;
632 uint32 SecurityInformation
;
642 } netr_DELTA_ACCOUNT
;
647 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
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
;
668 NETR_DELTA_DOMAIN
= 1,
669 NETR_DELTA_GROUP
= 2,
670 NETR_DELTA_DELETE_GROUP
= 3,
671 NETR_DELTA_RENAME_GROUP
= 4,
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
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
;
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
)] ;
742 } netr_DELTA_ID_UNION
;
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
;
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
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
785 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
787 typedef [flag
(NDR_PAHEX
)] struct {
788 uint8 computer_name
[16];
790 uint32 serial_number
;
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
,
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
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
,
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
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
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
856 netr_InfoFlags flags
;
857 WERROR pdc_connection_status
;
858 } netr_NETLOGON_INFO_1
;
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
;
868 netr_InfoFlags flags
;
869 uint32 logon_attempts
;
875 } netr_NETLOGON_INFO_3
;
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
;
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
,
914 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
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
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
;
940 } netr_CONTROL_DATA_INFORMATION
;
942 WERROR netr_LogonControl2
(
943 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
944 [in] netr_LogonControlCode function_code
,
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
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
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
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
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
;
1046 } netr_ChangeLogObject
;
1048 typedef [public,gensize
] struct {
1049 uint32 serial_number1
;
1050 uint32 serial_number2
;
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
,
1071 uint32 change_log_entry_size
,
1072 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1079 WERROR netr_LogonControl2Ex
(
1080 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1081 [in] netr_LogonControlCode function_code
,
1083 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1084 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1091 [size_is(length
)] uint8
*data
;
1094 NTSTATUS netr_NetrEnumerateTrustedDomains
(
1095 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1096 [out,ref] netr_Blob
*trusted_domains_blob
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 |
1109 DS_BACKGROUND_ONLY |
1112 DS_TIMESERV_REQUIRED |
1113 DS_WRITABLE_REQUIRED |
1114 DS_GOOD_TIMESERV_PREFERRED |
1116 DS_ONLY_LDAP_NEEDED |
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
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
;
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
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
1211 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
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
1223 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1227 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
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
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
1257 WERROR netr_DsRGetSiteName
(
1258 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1259 [out,ref] [string,charset
(UTF16
)] uint16
**site
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
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
1296 typedef [bitmap8bit
] bitmap
{
1297 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1298 NETR_VER_NT_SERVER
= 0x03,
1299 NETR_VER_NT_WORKSTATION
= 0x01
1304 [size_is(policy_size
)] uint8
*policy
;
1305 } netr_LsaPolicyInformation
;
1308 [value
(284)] uint32 OSVersionInfoSize
;
1309 uint32 MajorVersion
;
1310 uint32 MinorVersion
;
1313 [subcontext
(0),subcontext_size
(256)] nstring CSDVersion
;
1314 uint16 ServicePackMajor
;
1315 uint16 ServicePackMinor
;
1316 netr_SuiteMask SuiteMask
;
1317 netr_ProductType ProductType
;
1319 } netr_OsVersionInfoEx
;
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
;
1333 /* value is 284 when info != os, otherwise 0 (for length and
1335 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1336 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1338 } netr_OsVersionContainer
;
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
;
1350 lsa_String dummy_string3
;
1351 lsa_String dummy_string4
;
1352 netr_WorkstationFlags workstation_flags
;
1353 kerb_EncTypes supported_enc_types
;
1356 } netr_WorkstationInformation
;
1359 [case(1)] netr_WorkstationInformation
*workstation_info
;
1360 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1361 } netr_WorkstationInfo
;
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
;
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
;
1383 lsa_StringLarge domainname
;
1384 lsa_StringLarge dns_domainname
;
1385 lsa_StringLarge dns_forestname
;
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
;
1396 } netr_OneDomainInfo
;
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
;
1411 } netr_DomainInformation
;
1414 [case(1)] netr_DomainInformation
*domain_info
;
1415 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
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
,
1424 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1425 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1431 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1433 /* someone's birthday ? */
1434 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT
= 0x02231968;
1437 uint32 ReservedField
;
1438 uint32 PasswordVersionNumber
;
1439 uint32 PasswordVersionPresent
;
1440 } NL_PASSWORD_VERSION
;
1442 typedef [flag
(NDR_PAHEX
)] struct {
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
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
;
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 ...;
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
;
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
1514 [size_is(count
)] lsa_String
*sitename
;
1515 } netr_DsRAddressToSitenamesWCtr
;
1518 [size_is(size
)] uint8
*buffer
;
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
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
1544 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
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
;
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
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
1590 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1593 WERROR netr_DsrGetDcSiteCoverageW
(
1594 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1595 [out,ref] DcSitesCtr
**ctr
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
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
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
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
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
,
1664 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
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
,
1675 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
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
1700 [size_is(count
)] uint32
*data
;
1702 [size_is(count
)] lsa_String
*entries
;
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
1720 NTSTATUS netr_Unused47
(void);
1727 NlDnsLdapAtSite
= 22,
1730 NlDnsKdcAtSite
= 30,
1732 NlDnsRfc1510KdcAtSite
= 34,
1733 NlDnsGenericGcAtSite
= 36
1737 NlDnsInfoTypeNone
= 0,
1738 NlDnsDomainName
= 1,
1739 NlDnsDomainNameAlias
= 2,
1740 NlDnsForestName
= 3,
1741 NlDnsForestNameAlias
= 4,
1742 NlDnsNdncDomainName
= 5,
1744 } netr_DnsDomainInfoType
;
1748 [string,charset
(UTF16
)] uint16
*dns_domain_info
;
1749 netr_DnsDomainInfoType dns_domain_info_type
;
1753 boolean32 dns_register
;
1757 typedef [public] struct {
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