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")
15 uuid("12345678-1234-abcd-ef00-01234567cffb"),
17 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
18 helper
("../librpc/ndr/ndr_netlogon.h"),
20 pointer_default(unique)
25 typedef bitmap samr_AcctFlags samr_AcctFlags
;
26 typedef bitmap samr_GroupAttrs samr_GroupAttrs
;
27 typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit
;
28 typedef enum netr_SamDatabaseID8Bit netr_SamDatabaseID8Bit
;
34 [string,charset
(UTF16
)] uint16
*account_name
;
45 time_t pw_must_change
;
46 [string,charset
(UTF16
)] uint16
*computer
;
47 [string,charset
(UTF16
)] uint16
*domain
;
48 [string,charset
(UTF16
)] uint16
*script_path
;
52 WERROR netr_LogonUasLogon
(
53 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
54 [in] [string,charset
(UTF16
)] uint16
*account_name
,
55 [in] [string,charset
(UTF16
)] uint16
*workstation
,
56 [out,ref] netr_UasInfo
**info
68 WERROR netr_LogonUasLogoff
(
69 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
70 [in] [string,charset
(UTF16
)] uint16
*account_name
,
71 [in] [string,charset
(UTF16
)] uint16
*workstation
,
72 [out,ref] netr_UasLogoffInfo
*info
79 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
80 that the structure of the bindata looks like this:
82 dlong lockout_duration;
84 uint32 bad_attempt_lockout;
87 but it doesn't look as though this structure is reflected at the
88 NDR level. Maybe it is left to the application to decode the bindata array.
90 typedef [public] struct {
91 dlong lockout_duration
;
93 uint32 bad_attempt_lockout
;
97 /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
98 * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
99 * - MSV1_0_UPDATE_LOGON_STATISTICS
100 * sets the logon time on network logon
101 * - MSV1_0_RETURN_USER_PARAMETERS
102 * sets the user parameters in the driveletter
103 * - MSV1_0_RETURN_PROFILE_PATH
104 * returns the profilepath in the driveletter and
105 * sets LOGON_PROFILE_PATH_RETURNED user_flag
108 typedef [public,bitmap32bit
] bitmap
{
109 MSV1_0_CLEARTEXT_PASSWORD_ALLOWED
= 0x00000002,
110 MSV1_0_UPDATE_LOGON_STATISTICS
= 0x00000004,
111 MSV1_0_RETURN_USER_PARAMETERS
= 0x00000008,
112 MSV1_0_DONT_TRY_GUEST_ACCOUNT
= 0x00000010,
113 MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
= 0x00000020,
114 MSV1_0_RETURN_PASSWORD_EXPIRY
= 0x00000040,
115 MSV1_0_USE_CLIENT_CHALLENGE
= 0x00000080,
116 MSV1_0_TRY_GUEST_ACCOUNT_ONLY
= 0x00000100,
117 MSV1_0_RETURN_PROFILE_PATH
= 0x00000200,
118 MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY
= 0x00000400,
119 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
= 0x00000800,
120 MSV1_0_DISABLE_PERSONAL_FALLBACK
= 0x00001000,
121 MSV1_0_ALLOW_FORCE_GUEST
= 0x00002000,
122 MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED
= 0x00004000,
123 MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY
= 0x00008000,
124 MSV1_0_ALLOW_MSVCHAPV2
= 0x00010000,
125 MSV1_0_S4U2SELF
= 0x00020000,
126 MSV1_0_CHECK_LOGONHOURS_FOR_S4U
= 0x00040000,
127 MSV1_0_SUBAUTHENTICATION_DLL_EX
= 0x00100000
128 } netr_LogonParameterControl
;
131 lsa_String domain_name
;
132 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
134 uint32 logon_id_high
;
135 lsa_String account_name
;
136 lsa_String workstation
;
140 netr_IdentityInfo identity_info
;
141 samr_Password lmpassword
;
142 samr_Password ntpassword
;
145 typedef [flag
(NDR_PAHEX
)] struct {
147 [value
(length
)] uint16 size
;
148 [size_is(length
),length_is(length
)] uint8
*data
;
149 } netr_ChallengeResponse
;
151 typedef [flag
(NDR_PAHEX
)] struct {
152 netr_IdentityInfo identity_info
;
154 netr_ChallengeResponse nt
;
155 netr_ChallengeResponse lm
;
158 typedef [flag
(NDR_PAHEX
)] struct {
159 netr_IdentityInfo identity_info
;
160 lsa_String package_name
;
162 [size_is(length
)] uint8
*data
;
166 NetlogonInteractiveInformation
= 1,
167 NetlogonNetworkInformation
= 2,
168 NetlogonServiceInformation
= 3,
169 NetlogonGenericInformation
= 4,
170 NetlogonInteractiveTransitiveInformation
= 5,
171 NetlogonNetworkTransitiveInformation
= 6,
172 NetlogonServiceTransitiveInformation
= 7
173 } netr_LogonInfoClass
;
175 typedef [public,switch_type(netr_LogonInfoClass
)] union {
176 [case(NetlogonInteractiveInformation
)] netr_PasswordInfo
*password
;
177 [case(NetlogonNetworkInformation
)] netr_NetworkInfo
*network
;
178 [case(NetlogonServiceInformation
)] netr_PasswordInfo
*password
;
179 [case(NetlogonGenericInformation
)] netr_GenericInfo
*generic
;
180 [case(NetlogonInteractiveTransitiveInformation
)] netr_PasswordInfo
*password
;
181 [case(NetlogonNetworkTransitiveInformation
)] netr_NetworkInfo
*network
;
182 [case(NetlogonServiceTransitiveInformation
)] netr_PasswordInfo
*password
;
186 typedef [public,flag
(NDR_PAHEX
)] struct {
188 } netr_UserSessionKey
;
190 typedef [public,flag
(NDR_PAHEX
)] struct {
194 /* Flags for user_flags below */
195 typedef [public,bitmap32bit
] bitmap
{
196 NETLOGON_GUEST
= 0x00000001,
197 NETLOGON_NOENCRYPTION
= 0x00000002,
198 NETLOGON_CACHED_ACCOUNT
= 0x00000004,
199 NETLOGON_USED_LM_PASSWORD
= 0x00000008,
200 NETLOGON_EXTRA_SIDS
= 0x00000020,
201 NETLOGON_SUBAUTH_SESSION_KEY
= 0x00000040,
202 NETLOGON_SERVER_TRUST_ACCOUNT
= 0x00000080,
203 NETLOGON_NTLMV2_ENABLED
= 0x00000100,
204 NETLOGON_RESOURCE_GROUPS
= 0x00000200,
205 NETLOGON_PROFILE_PATH_RETURNED
= 0x00000400,
206 NETLOGON_GRACE_LOGON
= 0x01000000
213 NTTIME last_password_change
;
214 NTTIME allow_password_change
;
215 NTTIME force_password_change
;
216 lsa_String account_name
;
217 lsa_String full_name
;
218 lsa_String logon_script
;
219 lsa_String profile_path
;
220 lsa_String home_directory
;
221 lsa_String home_drive
;
223 uint16 bad_password_count
;
226 samr_RidWithAttributeArray groups
;
227 netr_UserFlags user_flags
;
228 netr_UserSessionKey key
;
229 lsa_StringLarge logon_server
;
230 lsa_StringLarge domain
;
231 dom_sid2
*domain_sid
;
232 netr_LMSessionKey LMSessKey
;
233 samr_AcctFlags acct_flags
;
238 netr_SamBaseInfo base
;
243 samr_GroupAttrs attributes
;
246 typedef [public] struct {
247 netr_SamBaseInfo base
;
249 [size_is(sidcount
)] netr_SidAttr
*sids
;
253 netr_SamBaseInfo base
;
255 [size_is(sidcount
)] netr_SidAttr
*sids
;
256 lsa_String dns_domainname
;
257 lsa_String principle
;
263 [size_is(pac_size
)] uint8
*pac
;
264 lsa_String logon_domain
;
265 lsa_String logon_server
;
266 lsa_String principal_name
;
268 [size_is(auth_size
)] uint8
*auth
;
269 netr_UserSessionKey user_session_key
;
270 uint32 expansionroom
[10];
277 typedef [flag
(NDR_PAHEX
)] struct {
279 [size_is(length
)] uint8
*data
;
283 NetlogonValidationUasInfo
= 1,
284 NetlogonValidationSamInfo
= 2,
285 NetlogonValidationSamInfo2
= 3,
286 NetlogonValidationGenericInfo2
= 5,
287 NetlogonValidationSamInfo4
= 6
288 } netr_ValidationInfoClass
;
290 typedef [public,switch_type(uint16
)] union {
291 [case(NetlogonValidationSamInfo
)] netr_SamInfo2
*sam2
;
292 [case(NetlogonValidationSamInfo2
)] netr_SamInfo3
*sam3
;
293 [case(4)] netr_PacInfo
*pac
;
294 [case(NetlogonValidationGenericInfo2
)] netr_GenericInfo2
*generic
;
295 [case(NetlogonValidationSamInfo4
)] netr_SamInfo6
*sam6
;
299 typedef [public, flag
(NDR_PAHEX
)] struct {
303 typedef [public] struct {
304 netr_Credential cred
;
306 } netr_Authenticator
;
308 [public] NTSTATUS netr_LogonSamLogon
(
309 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
310 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
311 [in,unique] netr_Authenticator
*credential
,
312 [in,out,unique] netr_Authenticator
*return_authenticator
,
313 [in] netr_LogonInfoClass logon_level
,
314 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
315 [in] uint16 validation_level
,
316 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
317 [out,ref] uint8
*authoritative
324 NTSTATUS netr_LogonSamLogoff
(
325 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
326 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
327 [in,unique] netr_Authenticator
*credential
,
328 [in,out,unique] netr_Authenticator
*return_authenticator
,
329 [in] netr_LogonInfoClass logon_level
,
330 [in] [switch_is(logon_level
)] netr_LogonLevel logon
338 [public] NTSTATUS netr_ServerReqChallenge
(
339 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
340 [in,string,charset
(UTF16
)] uint16
*computer_name
,
341 [in,ref] netr_Credential
*credentials
,
342 [out,ref] netr_Credential
*return_credentials
349 typedef enum netr_SchannelType netr_SchannelType
;
351 NTSTATUS netr_ServerAuthenticate
(
352 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
353 [in,string,charset
(UTF16
)] uint16
*account_name
,
354 [in] netr_SchannelType secure_channel_type
,
355 [in,string,charset
(UTF16
)] uint16
*computer_name
,
356 [in,ref] netr_Credential
*credentials
,
357 [out,ref] netr_Credential
*return_credentials
364 NTSTATUS netr_ServerPasswordSet
(
365 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
366 [in] [string,charset
(UTF16
)] uint16
*account_name
,
367 [in] netr_SchannelType secure_channel_type
,
368 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
369 [in,ref] netr_Authenticator
*credential
,
370 [out,ref] netr_Authenticator
*return_authenticator
,
371 [in,ref] samr_Password
*new_password
378 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
381 [string,charset
(UTF16
)] uint16
*account_name
;
390 } netr_DELTA_DELETE_USER
;
394 [value
(length
)] uint16 size
;
401 [value
(nt_length
)] uint16 nt_size
;
404 [value
(lm_length
)] uint16 lm_size
;
406 uint8 nt_history
[nt_length
];
407 uint8 lm_history
[lm_length
];
408 } netr_PasswordHistory
;
411 netr_USER_KEY16 lmpassword
;
412 netr_USER_KEY16 ntpassword
;
413 netr_PasswordHistory history
;
416 typedef struct { /* TODO: make this a union! */
417 netr_USER_KEYS2 keys2
;
418 } netr_USER_KEY_UNION
;
420 typedef [public] struct {
422 netr_USER_KEY_UNION keys
;
426 boolean8 SensitiveDataFlag
;
429 /* netr_USER_KEYS encrypted with the session key */
430 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
431 } netr_USER_PRIVATE_INFO
;
434 lsa_String account_name
;
435 lsa_String full_name
;
438 lsa_String home_directory
;
439 lsa_String home_drive
;
440 lsa_String logon_script
;
441 lsa_String description
;
442 lsa_String workstations
;
445 samr_LogonHours logon_hours
;
446 uint16 bad_password_count
;
448 NTTIME last_password_change
;
450 samr_AcctFlags acct_flags
;
451 samr_Password lmpassword
;
452 samr_Password ntpassword
;
453 boolean8 nt_password_present
;
454 boolean8 lm_password_present
;
455 boolean8 password_expired
;
457 lsa_BinaryString parameters
;
460 netr_USER_PRIVATE_INFO user_private_info
;
461 uint32 SecurityInformation
;
463 lsa_String profile_path
;
474 lsa_String domain_name
;
475 lsa_String oem_information
; /* comment */
476 dlong force_logoff_time
;
477 uint16 min_password_length
;
478 uint16 password_history_length
;
479 /* yes, these are signed. They are in negative 100ns */
480 dlong max_password_age
;
481 dlong min_password_age
;
483 NTTIME domain_create_time
;
484 uint32 SecurityInformation
;
486 lsa_BinaryString account_lockout
;
490 uint32 logon_to_chgpass
;
497 lsa_String group_name
;
500 lsa_String description
;
501 uint32 SecurityInformation
;
527 [size_is(num_rids
)] uint32
*rids
;
528 [size_is(num_rids
)] uint32
*attribs
;
534 } netr_DELTA_GROUP_MEMBER
;
537 lsa_String alias_name
;
539 uint32 SecurityInformation
;
541 lsa_String description
;
557 } netr_DELTA_ALIAS_MEMBER
;
560 uint32 pagedpoollimit
;
561 uint32 nonpagedpoollimit
;
562 uint32 minimumworkingsetsize
;
563 uint32 maximumworkingsetsize
;
564 uint32 pagefilelimit
;
570 NTTIME auditretentionperiod
;
571 boolean8 auditingmode
;
572 uint32 maxauditeventcount
;
573 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
574 lsa_String primary_domain_name
;
576 netr_QUOTA_LIMITS quota_limits
;
578 NTTIME db_create_time
;
579 uint32 SecurityInformation
;
592 lsa_String domain_name
;
593 uint32 num_controllers
;
594 [size_is(num_controllers
)] lsa_String
*controller_names
;
595 uint32 SecurityInformation
;
605 } netr_DELTA_TRUSTED_DOMAIN
;
608 uint32 privilege_entries
;
609 uint32 privilege_control
;
610 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
611 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
612 netr_QUOTA_LIMITS quotalimits
;
614 uint32 SecurityInformation
;
624 } netr_DELTA_ACCOUNT
;
629 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
633 netr_CIPHER_VALUE current_cipher
;
634 NTTIME current_cipher_set_time
;
635 netr_CIPHER_VALUE old_cipher
;
636 NTTIME old_cipher_set_time
;
637 uint32 SecurityInformation
;
650 NETR_DELTA_DOMAIN
= 1,
651 NETR_DELTA_GROUP
= 2,
652 NETR_DELTA_DELETE_GROUP
= 3,
653 NETR_DELTA_RENAME_GROUP
= 4,
655 NETR_DELTA_DELETE_USER
= 6,
656 NETR_DELTA_RENAME_USER
= 7,
657 NETR_DELTA_GROUP_MEMBER
= 8,
658 NETR_DELTA_ALIAS
= 9,
659 NETR_DELTA_DELETE_ALIAS
= 10,
660 NETR_DELTA_RENAME_ALIAS
= 11,
661 NETR_DELTA_ALIAS_MEMBER
= 12,
662 NETR_DELTA_POLICY
= 13,
663 NETR_DELTA_TRUSTED_DOMAIN
= 14,
664 NETR_DELTA_DELETE_TRUST
= 15,
665 NETR_DELTA_ACCOUNT
= 16,
666 NETR_DELTA_DELETE_ACCOUNT
= 17,
667 NETR_DELTA_SECRET
= 18,
668 NETR_DELTA_DELETE_SECRET
= 19,
669 NETR_DELTA_DELETE_GROUP2
= 20,
670 NETR_DELTA_DELETE_USER2
= 21,
671 NETR_DELTA_MODIFY_COUNT
= 22
674 typedef [switch_type(netr_DeltaEnum
)] union {
675 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
676 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
677 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
678 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
679 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
680 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
681 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
682 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
683 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
684 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
685 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
686 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
687 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
688 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
689 [case(NETR_DELTA_DELETE_TRUST
)] ; /* sid only */
690 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
691 [case(NETR_DELTA_DELETE_ACCOUNT
)] ; /* sid only */
692 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
693 [case(NETR_DELTA_DELETE_SECRET
)] ; /* name only */
694 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
695 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
696 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
700 typedef [switch_type(netr_DeltaEnum
)] union {
701 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
702 [case(NETR_DELTA_GROUP
)] uint32 rid
;
703 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
704 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
705 [case(NETR_DELTA_USER
)] uint32 rid
;
706 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
707 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
708 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
709 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
710 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
711 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
712 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
713 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
714 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
715 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
716 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
717 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
718 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
719 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
720 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
721 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
722 [case(NETR_DELTA_MODIFY_COUNT
)] ;
724 } netr_DELTA_ID_UNION
;
727 netr_DeltaEnum delta_type
;
728 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
729 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
734 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
735 } netr_DELTA_ENUM_ARRAY
;
737 NTSTATUS netr_DatabaseDeltas
(
738 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
739 [in] [string,charset
(UTF16
)] uint16
*computername
,
740 [in,ref] netr_Authenticator
*credential
,
741 [in,out,ref] netr_Authenticator
*return_authenticator
,
742 [in] netr_SamDatabaseID database_id
,
743 [in,out,ref] udlong
*sequence_num
,
744 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
745 [in] uint32 preferredmaximumlength
752 NTSTATUS netr_DatabaseSync
(
753 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
754 [in] [string,charset
(UTF16
)] uint16
*computername
,
755 [in,ref] netr_Authenticator
*credential
,
756 [in,out,ref] netr_Authenticator
*return_authenticator
,
757 [in] netr_SamDatabaseID database_id
,
758 [in,out,ref] uint32
*sync_context
,
759 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
760 [in] uint32 preferredmaximumlength
767 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
769 typedef [flag
(NDR_PAHEX
)] struct {
770 uint8 computer_name
[16];
772 uint32 serial_number
;
776 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
777 } netr_AccountBuffer
;
779 NTSTATUS netr_AccountDeltas
(
780 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
781 [in] [string,charset
(UTF16
)] uint16
*computername
,
782 [in] netr_Authenticator credential
,
783 [in,out,ref] netr_Authenticator
*return_authenticator
,
784 [in] netr_UAS_INFO_0 uas
,
787 [in] uint32 buffersize
,
788 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
789 [out,ref] uint32
*count_returned
,
790 [out,ref] uint32
*total_entries
,
791 [out,ref] netr_UAS_INFO_0
*recordid
798 NTSTATUS netr_AccountSync
(
799 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
800 [in] [string,charset
(UTF16
)] uint16
*computername
,
801 [in] netr_Authenticator credential
,
802 [in,out,ref] netr_Authenticator
*return_authenticator
,
803 [in] uint32 reference
,
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] uint32
*next_reference
,
810 [in,out,ref] netr_UAS_INFO_0
*recordid
817 WERROR netr_GetDcName
(
818 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
819 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
820 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
826 typedef [bitmap32bit
] bitmap
{
827 NETLOGON_REPLICATION_NEEDED
= 0x00000001,
828 NETLOGON_REPLICATION_IN_PROGRESS
= 0x00000002,
829 NETLOGON_FULL_SYNC_REPLICATION
= 0x00000004,
830 NETLOGON_REDO_NEEDED
= 0x00000008,
831 NETLOGON_HAS_IP
= 0x00000010,
832 NETLOGON_HAS_TIMESERV
= 0x00000020,
833 NETLOGON_DNS_UPDATE_FAILURE
= 0x00000040,
834 NETLOGON_VERIFY_STATUS_RETURNED
= 0x00000080
838 netr_InfoFlags flags
;
839 WERROR pdc_connection_status
;
840 } netr_NETLOGON_INFO_1
;
843 netr_InfoFlags flags
;
844 WERROR pdc_connection_status
;
845 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
846 WERROR tc_connection_status
;
847 } netr_NETLOGON_INFO_2
;
850 netr_InfoFlags flags
;
851 uint32 logon_attempts
;
857 } netr_NETLOGON_INFO_3
;
860 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
861 [string,charset
(UTF16
)] uint16
*trusted_domain_name
;
862 } netr_NETLOGON_INFO_4
;
865 [case(1)] netr_NETLOGON_INFO_1
*info1
;
866 [case(2)] netr_NETLOGON_INFO_2
*info2
;
867 [case(3)] netr_NETLOGON_INFO_3
*info3
;
868 [case(4)] netr_NETLOGON_INFO_4
*info4
;
870 } netr_CONTROL_QUERY_INFORMATION
;
872 /* function_code values */
873 typedef [v1_enum] enum {
874 NETLOGON_CONTROL_QUERY
= 0x00000001,
875 NETLOGON_CONTROL_REPLICATE
= 0x00000002,
876 NETLOGON_CONTROL_SYNCHRONIZE
= 0x00000003,
877 NETLOGON_CONTROL_PDC_REPLICATE
= 0x00000004,
878 NETLOGON_CONTROL_REDISCOVER
= 0x00000005,
879 NETLOGON_CONTROL_TC_QUERY
= 0x00000006,
880 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 0x00000007,
881 NETLOGON_CONTROL_FIND_USER
= 0x00000008,
882 NETLOGON_CONTROL_CHANGE_PASSWORD
= 0x00000009,
883 NETLOGON_CONTROL_TC_VERIFY
= 0x0000000A,
884 NETLOGON_CONTROL_FORCE_DNS_REG
= 0x0000000B,
885 NETLOGON_CONTROL_QUERY_DNS_REG
= 0x0000000C,
886 NETLOGON_CONTROL_BACKUP_CHANGE_LOG
= 0x0000FFFC,
887 NETLOGON_CONTROL_TRUNCATE_LOG
= 0x0000FFFD,
888 NETLOGON_CONTROL_SET_DBFLAG
= 0x0000FFFE,
889 NETLOGON_CONTROL_BREAKPOINT
= 0x0000FFFF
890 } netr_LogonControlCode
;
892 WERROR netr_LogonControl
(
893 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
894 [in] netr_LogonControlCode function_code
,
896 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
903 WERROR netr_GetAnyDCName
(
904 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
905 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
906 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
914 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
915 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
916 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
917 [case(NETLOGON_CONTROL_CHANGE_PASSWORD
)] [string,charset
(UTF16
)] uint16
*domain
;
918 [case(NETLOGON_CONTROL_TC_VERIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
919 [case(NETLOGON_CONTROL_FIND_USER
)] [string,charset
(UTF16
)] uint16
*user
;
920 [case(NETLOGON_CONTROL_SET_DBFLAG
)] uint32 debug_level
;
922 } netr_CONTROL_DATA_INFORMATION
;
924 WERROR netr_LogonControl2
(
925 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
926 [in] netr_LogonControlCode function_code
,
928 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
929 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
933 /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
934 * session keys are encrypted with DES calls. (And the user session key
940 typedef [public,bitmap32bit
] bitmap
{
941 NETLOGON_NEG_ACCOUNT_LOCKOUT
= 0x00000001,
942 NETLOGON_NEG_PERSISTENT_SAMREPL
= 0x00000002,
943 NETLOGON_NEG_ARCFOUR
= 0x00000004,
944 NETLOGON_NEG_PROMOTION_COUNT
= 0x00000008,
945 NETLOGON_NEG_CHANGELOG_BDC
= 0x00000010,
946 NETLOGON_NEG_FULL_SYNC_REPL
= 0x00000020,
947 NETLOGON_NEG_MULTIPLE_SIDS
= 0x00000040,
948 NETLOGON_NEG_REDO
= 0x00000080,
949 NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL
= 0x00000100,
950 NETLOGON_NEG_SEND_PASSWORD_INFO_PDC
= 0x00000200,
951 NETLOGON_NEG_GENERIC_PASSTHROUGH
= 0x00000400,
952 NETLOGON_NEG_CONCURRENT_RPC
= 0x00000800,
953 NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL
= 0x00001000,
954 NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL
= 0x00002000,
955 NETLOGON_NEG_STRONG_KEYS
= 0x00004000,
956 NETLOGON_NEG_TRANSITIVE_TRUSTS
= 0x00008000,
957 NETLOGON_NEG_DNS_DOMAIN_TRUSTS
= 0x00010000,
958 NETLOGON_NEG_PASSWORD_SET2
= 0x00020000,
959 NETLOGON_NEG_GETDOMAININFO
= 0x00040000,
960 NETLOGON_NEG_CROSS_FOREST_TRUSTS
= 0x00080000,
961 NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION
= 0x00100000,
962 NETLOGON_NEG_RODC_PASSTHROUGH
= 0x00200000,
963 NETLOGON_NEG_SUPPORTS_AES_SHA2
= 0x00400000,
964 NETLOGON_NEG_SUPPORTS_AES
= 0x01000000,
965 NETLOGON_NEG_AUTHENTICATED_RPC_LSASS
= 0x20000000,
966 NETLOGON_NEG_AUTHENTICATED_RPC
= 0x40000000
967 } netr_NegotiateFlags
;
969 const uint32 NETLOGON_NEG_128BIT
= NETLOGON_NEG_STRONG_KEYS
;
970 const uint32 NETLOGON_NEG_SCHANNEL
= NETLOGON_NEG_AUTHENTICATED_RPC
;
972 NTSTATUS netr_ServerAuthenticate2
(
973 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
974 [in] [string,charset
(UTF16
)] uint16
*account_name
,
975 [in] netr_SchannelType secure_channel_type
,
976 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
977 [in,ref] netr_Credential
*credentials
,
978 [out,ref] netr_Credential
*return_credentials
,
979 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
987 SYNCSTATE_NORMAL_STATE
= 0,
988 SYNCSTATE_DOMAIN_STATE
= 1,
989 SYNCSTATE_GROUP_STATE
= 2,
990 SYNCSTATE_UAS_BUILT_IN_GROUP_STATE
= 3,
991 SYNCSTATE_USER_STATE
= 4,
992 SYNCSTATE_GROUP_MEMBER_STATE
= 5,
993 SYNCSTATE_ALIAS_STATE
= 6,
994 SYNCSTATE_ALIAS_MEMBER_STATE
= 7,
995 SYNCSTATE_SAM_DONE_STATE
= 8
998 NTSTATUS netr_DatabaseSync2
(
999 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1000 [in] [string,charset
(UTF16
)] uint16
*computername
,
1001 [in,ref] netr_Authenticator
*credential
,
1002 [in,out,ref] netr_Authenticator
*return_authenticator
,
1003 [in] netr_SamDatabaseID database_id
,
1004 [in] SyncStateEnum restart_state
,
1005 [in,out,ref] uint32
*sync_context
,
1006 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
1007 [in] uint32 preferredmaximumlength
1014 /* i'm not at all sure how this call works */
1016 typedef [bitmap16bit
] bitmap
{
1017 NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED
= 0x0001,
1018 NETR_CHANGELOG_CHANGED_PASSWORD
= 0x0002,
1019 NETR_CHANGELOG_SID_INCLUDED
= 0x0004,
1020 NETR_CHANGELOG_NAME_INCLUDED
= 0x0008,
1021 NETR_CHANGELOG_FIRST_PROMOTION_OBJ
= 0x0010
1022 } netr_ChangeLogFlags
;
1024 typedef [nodiscriminant
] union {
1025 [case(NETR_CHANGELOG_SID_INCLUDED
)] dom_sid object_sid
;
1026 [case(NETR_CHANGELOG_NAME_INCLUDED
)] nstring object_name
;
1028 } netr_ChangeLogObject
;
1030 typedef [public,gensize
] struct {
1031 uint32 serial_number1
;
1032 uint32 serial_number2
;
1034 netr_ChangeLogFlags flags
;
1035 netr_SamDatabaseID8Bit db_index
;
1036 netr_DeltaEnum8Bit delta_type
;
1037 [switch_is(flags
& (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED
))] netr_ChangeLogObject
object;
1038 } netr_ChangeLogEntry
;
1040 NTSTATUS netr_DatabaseRedo
(
1041 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1042 [in] [string,charset
(UTF16
)] uint16
*computername
,
1043 [in] netr_Authenticator
*credential
,
1044 [in,out,ref] netr_Authenticator
*return_authenticator
,
1046 * we cannot use subcontext_size() here, as
1047 * change_log_entry_size is encoded after the subcontext
1049 [in] [subcontext
(4)/*,subcontext_size(change_log_entry_size)*/]
1050 netr_ChangeLogEntry change_log_entry
,
1051 [in] [value
(ndr_size_netr_ChangeLogEntry
(&change_log_entry
,
1053 uint32 change_log_entry_size
,
1054 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1061 WERROR netr_LogonControl2Ex
(
1062 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1063 [in] netr_LogonControlCode function_code
,
1065 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1066 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1073 [size_is(length
)] uint8
*data
;
1076 NTSTATUS netr_NetrEnumerateTrustedDomains
(
1077 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1078 [out,ref] netr_Blob
*trusted_domains_blob
1084 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1086 const int DSGETDC_VALID_FLAGS
= (DS_FORCE_REDISCOVERY |
1087 DS_DIRECTORY_SERVICE_REQUIRED |
1088 DS_DIRECTORY_SERVICE_PREFERRED |
1089 DS_GC_SERVER_REQUIRED |
1091 DS_BACKGROUND_ONLY |
1094 DS_TIMESERV_REQUIRED |
1095 DS_WRITABLE_REQUIRED |
1096 DS_GOOD_TIMESERV_PREFERRED |
1098 DS_ONLY_LDAP_NEEDED |
1101 DS_TRY_NEXTCLOSEST_SITE |
1102 DS_DIRECTORY_SERVICE_6_REQUIRED |
1103 DS_WEB_SERVICE_REQUIRED |
1104 DS_RETURN_FLAT_NAME |
1105 DS_RETURN_DNS_NAME
);
1107 typedef [bitmap32bit
] bitmap
{
1108 DS_FORCE_REDISCOVERY
= 0x00000001,
1109 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
1110 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
1111 DS_GC_SERVER_REQUIRED
= 0x00000040,
1112 DS_PDC_REQUIRED
= 0x00000080,
1113 DS_BACKGROUND_ONLY
= 0x00000100,
1114 DS_IP_REQUIRED
= 0x00000200,
1115 DS_KDC_REQUIRED
= 0x00000400,
1116 DS_TIMESERV_REQUIRED
= 0x00000800,
1117 DS_WRITABLE_REQUIRED
= 0x00001000,
1118 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
1119 DS_AVOID_SELF
= 0x00004000,
1120 DS_ONLY_LDAP_NEEDED
= 0x00008000,
1121 DS_IS_FLAT_NAME
= 0x00010000,
1122 DS_IS_DNS_NAME
= 0x00020000,
1123 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
1124 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000,
1125 DS_WEB_SERVICE_REQUIRED
= 0x00100000,
1126 DS_RETURN_DNS_NAME
= 0x40000000,
1127 DS_RETURN_FLAT_NAME
= 0x80000000
1128 } netr_DsRGetDCName_flags
;
1130 typedef [v1_enum] enum {
1131 DS_ADDRESS_TYPE_INET
= 1,
1132 DS_ADDRESS_TYPE_NETBIOS
= 2
1133 } netr_DsRGetDCNameInfo_AddressType
;
1135 typedef [bitmap32bit
] bitmap
{
1136 DS_SERVER_PDC
= 0x00000001,
1137 DS_SERVER_GC
= 0x00000004,
1138 DS_SERVER_LDAP
= 0x00000008,
1139 DS_SERVER_DS
= 0x00000010,
1140 DS_SERVER_KDC
= 0x00000020,
1141 DS_SERVER_TIMESERV
= 0x00000040,
1142 DS_SERVER_CLOSEST
= 0x00000080,
1143 DS_SERVER_WRITABLE
= 0x00000100,
1144 DS_SERVER_GOOD_TIMESERV
= 0x00000200,
1145 DS_SERVER_NDNC
= 0x00000400,
1146 DS_SERVER_SELECT_SECRET_DOMAIN_6
= 0x00000800,
1147 DS_SERVER_FULL_SECRET_DOMAIN_6
= 0x00001000,
1148 DS_DNS_CONTROLLER
= 0x20000000,
1149 DS_DNS_DOMAIN
= 0x40000000,
1150 DS_DNS_FOREST_ROOT
= 0x80000000
1153 typedef [public] struct {
1154 [string,charset
(UTF16
)] uint16
*dc_unc
;
1155 [string,charset
(UTF16
)] uint16
*dc_address
;
1156 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1158 [string,charset
(UTF16
)] uint16
*domain_name
;
1159 [string,charset
(UTF16
)] uint16
*forest_name
;
1160 netr_DsR_DcFlags dc_flags
;
1161 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1162 [string,charset
(UTF16
)] uint16
*client_site_name
;
1163 } netr_DsRGetDCNameInfo
;
1165 WERROR netr_DsRGetDCName
(
1166 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1167 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1168 [in,unique] GUID
*domain_guid
,
1169 [in,unique] GUID
*site_guid
,
1170 [in] netr_DsRGetDCName_flags flags
,
1171 [out,ref] netr_DsRGetDCNameInfo
**info
1176 typedef [switch_type(uint32
)] union {
1177 [case(1)] netr_NegotiateFlags server_capabilities
;
1178 } netr_Capabilities
;
1180 NTSTATUS netr_LogonGetCapabilities
(
1181 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1182 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1183 [in,ref] netr_Authenticator
*credential
,
1184 [in,out,ref] netr_Authenticator
*return_authenticator
,
1185 [in] uint32 query_level
,
1186 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1191 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1195 WERROR netr_LogonGetTrustRid
(
1196 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1197 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1198 [out,ref] uint32
*rid
1203 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1207 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1211 [public] NTSTATUS netr_ServerAuthenticate3
(
1212 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1213 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1214 [in] netr_SchannelType secure_channel_type
,
1215 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1216 [in,ref] netr_Credential
*credentials
,
1217 [out,ref] netr_Credential
*return_credentials
,
1218 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1219 [out,ref] uint32
*rid
1225 WERROR netr_DsRGetDCNameEx
(
1226 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1227 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1228 [in,unique] GUID
*domain_guid
,
1229 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1230 [in] netr_DsRGetDCName_flags flags
,
1231 [out,ref] netr_DsRGetDCNameInfo
**info
1237 WERROR netr_DsRGetSiteName
(
1238 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1239 [out,ref] [string,charset
(UTF16
)] uint16
**site
1244 typedef [bitmap32bit
] bitmap
{
1245 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1246 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1247 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1248 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1249 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1250 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1251 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1252 NETR_TRUST_FLAG_AES
= 0x00000100
1255 typedef [bitmap32bit
] bitmap
{
1256 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1257 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1258 } netr_WorkstationFlags
;
1260 typedef [bitmap16bit
] bitmap
{
1261 NETR_VER_SUITE_BACKOFFICE
= 0x0004,
1262 NETR_VER_SUITE_BLADE
= 0x0400,
1263 NETR_VER_SUITE_COMPUTE_SERVER
= 0x4000,
1264 NETR_VER_SUITE_DATACENTER
= 0x0080,
1265 NETR_VER_SUITE_ENTERPRISE
= 0x0002,
1266 NETR_VER_SUITE_EMBEDDEDNT
= 0x0040,
1267 NETR_VER_SUITE_PERSONAL
= 0x0200,
1268 NETR_VER_SUITE_SINGLEUSERTS
= 0x0100,
1269 NETR_VER_SUITE_SMALLBUSINESS
= 0x0001,
1270 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED
= 0x0020,
1271 NETR_VER_SUITE_STORAGE_SERVER
= 0x2000,
1272 NETR_VER_SUITE_TERMINAL
= 0x0010,
1273 NETR_VER_SUITE_WH_SERVER
= 0x8000
1276 typedef [bitmap8bit
] bitmap
{
1277 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1278 NETR_VER_NT_SERVER
= 0x03,
1279 NETR_VER_NT_WORKSTATION
= 0x01
1284 [size_is(policy_size
)] uint8
*policy
;
1285 } netr_LsaPolicyInformation
;
1288 [value
(284)] uint32 OSVersionInfoSize
;
1289 uint32 MajorVersion
;
1290 uint32 MinorVersion
;
1293 [subcontext
(0),subcontext_size
(256)] nstring CSDVersion
;
1294 uint16 ServicePackMajor
;
1295 uint16 ServicePackMinor
;
1296 netr_SuiteMask SuiteMask
;
1297 netr_ProductType ProductType
;
1299 } netr_OsVersionInfoEx
;
1302 /* these first 3 values come from the fact windows
1303 actually encodes this structure as a UNICODE_STRING
1304 - see MS-NRPC section 2.2.1.3.9 */
1305 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1306 [value
(142)] uint32 length
;
1307 [value
(0)] uint32 dummy
;
1308 [value
(142)] uint32 size
;
1309 netr_OsVersionInfoEx os
;
1313 /* value is 284 when info != os, otherwise 0 (for length and
1315 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1316 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1318 } netr_OsVersionContainer
;
1321 netr_LsaPolicyInformation lsa_policy
;
1322 [string,charset
(UTF16
)] uint16
*dns_hostname
;
1323 [string,charset
(UTF16
)] uint16
*sitename
;
1324 [string,charset
(UTF16
)] uint16
*dummy1
;
1325 [string,charset
(UTF16
)] uint16
*dummy2
;
1326 [string,charset
(UTF16
)] uint16
*dummy3
;
1327 [string,charset
(UTF16
)] uint16
*dummy4
;
1328 netr_OsVersionContainer os_version
;
1330 lsa_String dummy_string3
;
1331 lsa_String dummy_string4
;
1332 netr_WorkstationFlags workstation_flags
;
1336 } netr_WorkstationInformation
;
1339 [case(1)] netr_WorkstationInformation
*workstation_info
;
1340 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1341 } netr_WorkstationInfo
;
1344 /* these first 3 values come from the fact windows
1345 actually encodes this structure as a UNICODE_STRING
1346 - see MS-NRPC section 2.2.1.3.9 */
1347 [value
(8)] uint32 length
;
1348 [value
(0)] uint32 dummy
;
1349 [value
(8)] uint32 size
;
1350 netr_TrustFlags flags
;
1351 uint32 parent_index
;
1353 uint32 trust_attributes
;
1354 } netr_trust_extension
;
1357 uint16 length
; /* value is 16 when info != NULL, otherwise 0 */
1358 [value
(length
)] uint16 size
; /* value is 16 when info != NULL, otherwise 0 */
1359 netr_trust_extension
*info
;
1360 } netr_trust_extension_container
;
1363 lsa_StringLarge domainname
;
1364 lsa_StringLarge dns_domainname
;
1365 lsa_StringLarge dns_forestname
;
1367 dom_sid2
*domain_sid
;
1368 netr_trust_extension_container trust_extension
;
1369 lsa_StringLarge dummy_string2
;
1370 lsa_StringLarge dummy_string3
;
1371 lsa_StringLarge dummy_string4
;
1376 } netr_OneDomainInfo
;
1378 typedef [public,bitmap32bit
] bitmap
{
1379 ENC_CRC32
= 0x00000001,
1380 ENC_RSA_MD5
= 0x00000002,
1381 ENC_RC4_HMAC_MD5
= 0x00000004,
1382 ENC_HMAC_SHA1_96_AES128
= 0x00000008,
1383 ENC_HMAC_SHA1_96_AES256
= 0x00000010
1384 } netr_SupportedEncTypes
;
1387 netr_OneDomainInfo primary_domain
;
1388 uint32 trusted_domain_count
;
1389 [size_is(trusted_domain_count
)] netr_OneDomainInfo
*trusted_domains
;
1390 netr_LsaPolicyInformation lsa_policy
;
1391 lsa_StringLarge dns_hostname
;
1392 lsa_StringLarge dummy_string2
;
1393 lsa_StringLarge dummy_string3
;
1394 lsa_StringLarge dummy_string4
;
1395 netr_WorkstationFlags workstation_flags
;
1396 netr_SupportedEncTypes supported_enc_types
;
1399 } netr_DomainInformation
;
1402 [case(1)] netr_DomainInformation
*domain_info
;
1403 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
1406 NTSTATUS netr_LogonGetDomainInfo
(
1407 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1408 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1409 [in,ref] netr_Authenticator
*credential
,
1410 [in,out,ref] netr_Authenticator
*return_authenticator
,
1412 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1413 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1419 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1421 /* someone's birthday ? */
1422 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT
= 0x02231968;
1425 uint32 ReservedField
;
1426 uint32 PasswordVersionNumber
;
1427 uint32 PasswordVersionPresent
;
1428 } NL_PASSWORD_VERSION
;
1430 typedef [flag
(NDR_PAHEX
)] struct {
1433 } netr_CryptPassword
;
1435 NTSTATUS netr_ServerPasswordSet2
(
1436 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1437 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1438 [in] netr_SchannelType secure_channel_type
,
1439 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1440 [in,ref] netr_Authenticator
*credential
,
1441 [out,ref] netr_Authenticator
*return_authenticator
,
1442 [in,ref] netr_CryptPassword
*new_password
1447 WERROR netr_ServerPasswordGet
(
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 [out,ref] samr_Password
*password
1459 [todo
] WERROR netr_NETRLOGONSENDTOSAM
();
1465 [size_is(count
)] lsa_String
*sitename
;
1466 } netr_DsRAddressToSitenamesWCtr
;
1469 [size_is(size
)] uint8
*buffer
;
1473 WERROR netr_DsRAddressToSitenamesW
(
1474 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1475 [in] [range(0,32000)] uint32 count
,
1476 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1477 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1482 WERROR netr_DsRGetDCNameEx2
(
1483 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1484 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1485 [in] samr_AcctFlags mask
,
1486 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1487 [in,unique] GUID
*domain_guid
,
1488 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1489 [in] netr_DsRGetDCName_flags flags
,
1490 [out,ref] netr_DsRGetDCNameInfo
**info
1495 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1500 typedef [v1_enum] enum {
1501 NETR_TRUST_TYPE_DOWNLEVEL
= 1,
1502 NETR_TRUST_TYPE_UPLEVEL
= 2,
1503 NETR_TRUST_TYPE_MIT
= 3,
1504 NETR_TRUST_TYPE_DCE
= 4
1507 typedef [bitmap32bit
] bitmap
{
1508 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
1509 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
1510 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
1511 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
1512 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
1513 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
1514 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040
1515 } netr_TrustAttributes
;
1518 [string,charset
(UTF16
)] uint16
*netbios_name
;
1519 [string,charset
(UTF16
)] uint16
*dns_name
;
1520 netr_TrustFlags trust_flags
;
1521 uint32 parent_index
;
1522 netr_TrustType trust_type
;
1523 netr_TrustAttributes trust_attributes
;
1530 [size_is(count
)] netr_DomainTrust
*array
;
1531 } netr_DomainTrustList
;
1533 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1534 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1535 [out,ref] netr_DomainTrustList
*dom_trust_list
1542 [size_is(count
)] lsa_String
*sitename
;
1543 [size_is(count
)] lsa_String
*subnetname
;
1544 } netr_DsRAddressToSitenamesExWCtr
;
1546 WERROR netr_DsRAddressToSitenamesExW
(
1547 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1548 [in] [range(0,32000)] uint32 count
,
1549 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1550 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1558 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1561 WERROR netr_DsrGetDcSiteCoverageW
(
1562 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1563 [out,ref] DcSitesCtr
**ctr
1568 NTSTATUS netr_LogonSamLogonEx
(
1569 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1570 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1571 [in] netr_LogonInfoClass logon_level
,
1572 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1573 [in] uint16 validation_level
,
1574 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1575 [out,ref] uint8
*authoritative
,
1576 [in,out,ref] uint32
*flags
1582 WERROR netr_DsrEnumerateDomainTrusts
(
1583 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1584 [in] netr_TrustFlags trust_flags
,
1585 [out,ref] netr_DomainTrustList
*trusts
1591 WERROR netr_DsrDeregisterDNSHostRecords
(
1592 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1593 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1594 [in,unique] GUID
*domain_guid
,
1595 [in,unique] GUID
*dsa_guid
,
1596 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1601 NTSTATUS netr_ServerTrustPasswordsGet
(
1602 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1603 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1604 [in] netr_SchannelType secure_channel_type
,
1605 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1606 [in,ref] netr_Authenticator
*credential
,
1607 [out,ref] netr_Authenticator
*return_authenticator
,
1608 [out,ref] samr_Password
*password
,
1609 [out,ref] samr_Password
*password2
1615 const int DS_GFTI_UPDATE_TDO
= 0x1;
1617 WERROR netr_DsRGetForestTrustInformation
(
1618 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1619 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1621 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1626 NTSTATUS netr_GetForestTrustInformation
(
1627 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1628 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1629 [in,ref] netr_Authenticator
*credential
,
1630 [out,ref] netr_Authenticator
*return_authenticator
,
1632 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1638 /* this is the ADS varient. I don't yet know what the "flags" are for */
1639 NTSTATUS netr_LogonSamLogonWithFlags
(
1640 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1641 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1642 [in,unique] netr_Authenticator
*credential
,
1643 [in,out,unique] netr_Authenticator
*return_authenticator
,
1644 [in] netr_LogonInfoClass logon_level
,
1645 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1646 [in] uint16 validation_level
,
1647 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1648 [out,ref] uint8
*authoritative
,
1649 [in,out,ref] uint32
*flags
1657 [size_is(count
)] uint32
*data
;
1659 [size_is(count
)] lsa_String
*entries
;
1662 NTSTATUS netr_ServerGetTrustInfo
(
1663 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1664 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1665 [in] netr_SchannelType secure_channel_type
,
1666 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1667 [in,ref] netr_Authenticator
*credential
,
1668 [out,ref] netr_Authenticator
*return_authenticator
,
1669 [out,ref] samr_Password
*new_owf_password
,
1670 [out,ref] samr_Password
*old_owf_password
,
1671 [out,ref] netr_TrustInfo
**trust_info
1677 NTSTATUS netr_Unused47
(void);
1684 NlDnsLdapAtSite
= 22,
1687 NlDnsKdcAtSite
= 30,
1689 NlDnsRfc1510KdcAtSite
= 34,
1690 NlDnsGenericGcAtSite
= 36
1694 NlDnsInfoTypeNone
= 0,
1695 NlDnsDomainName
= 1,
1696 NlDnsDomainNameAlias
= 2,
1697 NlDnsForestName
= 3,
1698 NlDnsForestNameAlias
= 4,
1699 NlDnsNdncDomainName
= 5,
1701 } netr_DnsDomainInfoType
;
1705 [string,charset
(UTF16
)] uint16
*dns_domain_info
;
1706 netr_DnsDomainInfoType dns_domain_info_type
;
1710 boolean32 dns_register
;
1714 typedef [public] struct {
1716 [size_is(count
)] NL_DNS_NAME_INFO
*names
;
1717 } NL_DNS_NAME_INFO_ARRAY
;
1719 NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords
(
1720 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1721 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1722 [in, ref] netr_Authenticator
*credential
,
1723 [out,ref] netr_Authenticator
*return_authenticator
,
1724 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1725 [in] uint32 dns_ttl
,
1726 [in,out,ref] NL_DNS_NAME_INFO_ARRAY
*dns_names