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 logon_domain
;
231 dom_sid2
*domain_sid
;
232 netr_LMSessionKey LMSessKey
;
233 samr_AcctFlags acct_flags
;
234 uint32 sub_auth_status
;
235 NTTIME last_successful_logon
;
236 NTTIME last_failed_logon
;
237 uint32 failed_logon_count
;
242 netr_SamBaseInfo base
;
247 samr_GroupAttrs attributes
;
250 typedef [public] struct {
251 netr_SamBaseInfo base
;
253 [size_is(sidcount
)] netr_SidAttr
*sids
;
257 netr_SamBaseInfo base
;
259 [size_is(sidcount
)] netr_SidAttr
*sids
;
260 lsa_String dns_domainname
;
261 lsa_String principle
;
267 [size_is(pac_size
)] uint8
*pac
;
268 lsa_String logon_domain
;
269 lsa_String logon_server
;
270 lsa_String principal_name
;
272 [size_is(auth_size
)] uint8
*auth
;
273 netr_UserSessionKey user_session_key
;
274 uint32 expansionroom
[10];
281 typedef [flag
(NDR_PAHEX
)] struct {
283 [size_is(length
)] uint8
*data
;
287 NetlogonValidationUasInfo
= 1,
288 NetlogonValidationSamInfo
= 2,
289 NetlogonValidationSamInfo2
= 3,
290 NetlogonValidationGenericInfo2
= 5,
291 NetlogonValidationSamInfo4
= 6
292 } netr_ValidationInfoClass
;
294 typedef [public,switch_type(uint16
)] union {
295 [case(NetlogonValidationSamInfo
)] netr_SamInfo2
*sam2
;
296 [case(NetlogonValidationSamInfo2
)] netr_SamInfo3
*sam3
;
297 [case(4)] netr_PacInfo
*pac
;
298 [case(NetlogonValidationGenericInfo2
)] netr_GenericInfo2
*generic
;
299 [case(NetlogonValidationSamInfo4
)] netr_SamInfo6
*sam6
;
303 typedef [public, flag
(NDR_PAHEX
)] struct {
307 typedef [public] struct {
308 netr_Credential cred
;
310 } netr_Authenticator
;
312 [public] NTSTATUS netr_LogonSamLogon
(
313 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
314 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
315 [in,unique] netr_Authenticator
*credential
,
316 [in,out,unique] netr_Authenticator
*return_authenticator
,
317 [in] netr_LogonInfoClass logon_level
,
318 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
319 [in] uint16 validation_level
,
320 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
321 [out,ref] uint8
*authoritative
328 NTSTATUS netr_LogonSamLogoff
(
329 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
330 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
331 [in,unique] netr_Authenticator
*credential
,
332 [in,out,unique] netr_Authenticator
*return_authenticator
,
333 [in] netr_LogonInfoClass logon_level
,
334 [in] [switch_is(logon_level
)] netr_LogonLevel logon
342 [public] NTSTATUS netr_ServerReqChallenge
(
343 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
344 [in,string,charset
(UTF16
)] uint16
*computer_name
,
345 [in,ref] netr_Credential
*credentials
,
346 [out,ref] netr_Credential
*return_credentials
353 typedef enum netr_SchannelType netr_SchannelType
;
355 NTSTATUS netr_ServerAuthenticate
(
356 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
357 [in,string,charset
(UTF16
)] uint16
*account_name
,
358 [in] netr_SchannelType secure_channel_type
,
359 [in,string,charset
(UTF16
)] uint16
*computer_name
,
360 [in,ref] netr_Credential
*credentials
,
361 [out,ref] netr_Credential
*return_credentials
368 NTSTATUS netr_ServerPasswordSet
(
369 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
370 [in] [string,charset
(UTF16
)] uint16
*account_name
,
371 [in] netr_SchannelType secure_channel_type
,
372 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
373 [in,ref] netr_Authenticator
*credential
,
374 [out,ref] netr_Authenticator
*return_authenticator
,
375 [in,ref] samr_Password
*new_password
382 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
385 [string,charset
(UTF16
)] uint16
*account_name
;
394 } netr_DELTA_DELETE_USER
;
398 [value
(length
)] uint16 size
;
405 [value
(nt_length
)] uint16 nt_size
;
408 [value
(lm_length
)] uint16 lm_size
;
410 uint8 nt_history
[nt_length
];
411 uint8 lm_history
[lm_length
];
412 } netr_PasswordHistory
;
415 netr_USER_KEY16 lmpassword
;
416 netr_USER_KEY16 ntpassword
;
417 netr_PasswordHistory history
;
420 typedef struct { /* TODO: make this a union! */
421 netr_USER_KEYS2 keys2
;
422 } netr_USER_KEY_UNION
;
424 typedef [public] struct {
426 netr_USER_KEY_UNION keys
;
430 boolean8 SensitiveDataFlag
;
433 /* netr_USER_KEYS encrypted with the session key */
434 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
435 } netr_USER_PRIVATE_INFO
;
438 lsa_String account_name
;
439 lsa_String full_name
;
442 lsa_String home_directory
;
443 lsa_String home_drive
;
444 lsa_String logon_script
;
445 lsa_String description
;
446 lsa_String workstations
;
449 samr_LogonHours logon_hours
;
450 uint16 bad_password_count
;
452 NTTIME last_password_change
;
454 samr_AcctFlags acct_flags
;
455 samr_Password lmpassword
;
456 samr_Password ntpassword
;
457 boolean8 nt_password_present
;
458 boolean8 lm_password_present
;
459 boolean8 password_expired
;
461 lsa_BinaryString parameters
;
464 netr_USER_PRIVATE_INFO user_private_info
;
465 uint32 SecurityInformation
;
467 lsa_String profile_path
;
478 lsa_String domain_name
;
479 lsa_String oem_information
; /* comment */
480 dlong force_logoff_time
;
481 uint16 min_password_length
;
482 uint16 password_history_length
;
483 /* yes, these are signed. They are in negative 100ns */
484 dlong max_password_age
;
485 dlong min_password_age
;
487 NTTIME domain_create_time
;
488 uint32 SecurityInformation
;
490 lsa_BinaryString account_lockout
;
494 uint32 logon_to_chgpass
;
501 lsa_String group_name
;
504 lsa_String description
;
505 uint32 SecurityInformation
;
531 [size_is(num_rids
)] uint32
*rids
;
532 [size_is(num_rids
)] uint32
*attribs
;
538 } netr_DELTA_GROUP_MEMBER
;
541 lsa_String alias_name
;
543 uint32 SecurityInformation
;
545 lsa_String description
;
561 } netr_DELTA_ALIAS_MEMBER
;
564 uint32 pagedpoollimit
;
565 uint32 nonpagedpoollimit
;
566 uint32 minimumworkingsetsize
;
567 uint32 maximumworkingsetsize
;
568 uint32 pagefilelimit
;
574 NTTIME auditretentionperiod
;
575 boolean8 auditingmode
;
576 uint32 maxauditeventcount
;
577 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
578 lsa_String primary_domain_name
;
580 netr_QUOTA_LIMITS quota_limits
;
582 NTTIME db_create_time
;
583 uint32 SecurityInformation
;
596 lsa_String domain_name
;
597 uint32 num_controllers
;
598 [size_is(num_controllers
)] lsa_String
*controller_names
;
599 uint32 SecurityInformation
;
609 } netr_DELTA_TRUSTED_DOMAIN
;
612 uint32 privilege_entries
;
613 uint32 privilege_control
;
614 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
615 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
616 netr_QUOTA_LIMITS quotalimits
;
618 uint32 SecurityInformation
;
628 } netr_DELTA_ACCOUNT
;
633 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
637 netr_CIPHER_VALUE current_cipher
;
638 NTTIME current_cipher_set_time
;
639 netr_CIPHER_VALUE old_cipher
;
640 NTTIME old_cipher_set_time
;
641 uint32 SecurityInformation
;
654 NETR_DELTA_DOMAIN
= 1,
655 NETR_DELTA_GROUP
= 2,
656 NETR_DELTA_DELETE_GROUP
= 3,
657 NETR_DELTA_RENAME_GROUP
= 4,
659 NETR_DELTA_DELETE_USER
= 6,
660 NETR_DELTA_RENAME_USER
= 7,
661 NETR_DELTA_GROUP_MEMBER
= 8,
662 NETR_DELTA_ALIAS
= 9,
663 NETR_DELTA_DELETE_ALIAS
= 10,
664 NETR_DELTA_RENAME_ALIAS
= 11,
665 NETR_DELTA_ALIAS_MEMBER
= 12,
666 NETR_DELTA_POLICY
= 13,
667 NETR_DELTA_TRUSTED_DOMAIN
= 14,
668 NETR_DELTA_DELETE_TRUST
= 15,
669 NETR_DELTA_ACCOUNT
= 16,
670 NETR_DELTA_DELETE_ACCOUNT
= 17,
671 NETR_DELTA_SECRET
= 18,
672 NETR_DELTA_DELETE_SECRET
= 19,
673 NETR_DELTA_DELETE_GROUP2
= 20,
674 NETR_DELTA_DELETE_USER2
= 21,
675 NETR_DELTA_MODIFY_COUNT
= 22
678 typedef [switch_type(netr_DeltaEnum
)] union {
679 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
680 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
681 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
682 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
683 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
684 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
685 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
686 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
687 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
688 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
689 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
690 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
691 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
692 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
693 [case(NETR_DELTA_DELETE_TRUST
)] ; /* sid only */
694 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
695 [case(NETR_DELTA_DELETE_ACCOUNT
)] ; /* sid only */
696 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
697 [case(NETR_DELTA_DELETE_SECRET
)] ; /* name only */
698 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
699 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
700 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
704 typedef [switch_type(netr_DeltaEnum
)] union {
705 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
706 [case(NETR_DELTA_GROUP
)] uint32 rid
;
707 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
708 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
709 [case(NETR_DELTA_USER
)] uint32 rid
;
710 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
711 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
712 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
713 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
714 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
715 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
716 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
717 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
718 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
719 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
720 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
721 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
722 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
723 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
724 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
725 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
726 [case(NETR_DELTA_MODIFY_COUNT
)] ;
728 } netr_DELTA_ID_UNION
;
731 netr_DeltaEnum delta_type
;
732 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
733 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
738 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
739 } netr_DELTA_ENUM_ARRAY
;
741 NTSTATUS netr_DatabaseDeltas
(
742 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
743 [in] [string,charset
(UTF16
)] uint16
*computername
,
744 [in,ref] netr_Authenticator
*credential
,
745 [in,out,ref] netr_Authenticator
*return_authenticator
,
746 [in] netr_SamDatabaseID database_id
,
747 [in,out,ref] udlong
*sequence_num
,
748 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
749 [in] uint32 preferredmaximumlength
756 NTSTATUS netr_DatabaseSync
(
757 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
758 [in] [string,charset
(UTF16
)] uint16
*computername
,
759 [in,ref] netr_Authenticator
*credential
,
760 [in,out,ref] netr_Authenticator
*return_authenticator
,
761 [in] netr_SamDatabaseID database_id
,
762 [in,out,ref] uint32
*sync_context
,
763 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
764 [in] uint32 preferredmaximumlength
771 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
773 typedef [flag
(NDR_PAHEX
)] struct {
774 uint8 computer_name
[16];
776 uint32 serial_number
;
780 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
781 } netr_AccountBuffer
;
783 NTSTATUS netr_AccountDeltas
(
784 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
785 [in] [string,charset
(UTF16
)] uint16
*computername
,
786 [in] netr_Authenticator credential
,
787 [in,out,ref] netr_Authenticator
*return_authenticator
,
788 [in] netr_UAS_INFO_0 uas
,
791 [in] uint32 buffersize
,
792 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
793 [out,ref] uint32
*count_returned
,
794 [out,ref] uint32
*total_entries
,
795 [out,ref] netr_UAS_INFO_0
*recordid
802 NTSTATUS netr_AccountSync
(
803 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
804 [in] [string,charset
(UTF16
)] uint16
*computername
,
805 [in] netr_Authenticator credential
,
806 [in,out,ref] netr_Authenticator
*return_authenticator
,
807 [in] uint32 reference
,
809 [in] uint32 buffersize
,
810 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
811 [out,ref] uint32
*count_returned
,
812 [out,ref] uint32
*total_entries
,
813 [out,ref] uint32
*next_reference
,
814 [in,out,ref] netr_UAS_INFO_0
*recordid
821 WERROR netr_GetDcName
(
822 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
823 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
824 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
830 typedef [bitmap32bit
] bitmap
{
831 NETLOGON_REPLICATION_NEEDED
= 0x00000001,
832 NETLOGON_REPLICATION_IN_PROGRESS
= 0x00000002,
833 NETLOGON_FULL_SYNC_REPLICATION
= 0x00000004,
834 NETLOGON_REDO_NEEDED
= 0x00000008,
835 NETLOGON_HAS_IP
= 0x00000010,
836 NETLOGON_HAS_TIMESERV
= 0x00000020,
837 NETLOGON_DNS_UPDATE_FAILURE
= 0x00000040,
838 NETLOGON_VERIFY_STATUS_RETURNED
= 0x00000080
842 netr_InfoFlags flags
;
843 WERROR pdc_connection_status
;
844 } netr_NETLOGON_INFO_1
;
847 netr_InfoFlags flags
;
848 WERROR pdc_connection_status
;
849 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
850 WERROR tc_connection_status
;
851 } netr_NETLOGON_INFO_2
;
854 netr_InfoFlags flags
;
855 uint32 logon_attempts
;
861 } netr_NETLOGON_INFO_3
;
864 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
865 [string,charset
(UTF16
)] uint16
*trusted_domain_name
;
866 } netr_NETLOGON_INFO_4
;
869 [case(1)] netr_NETLOGON_INFO_1
*info1
;
870 [case(2)] netr_NETLOGON_INFO_2
*info2
;
871 [case(3)] netr_NETLOGON_INFO_3
*info3
;
872 [case(4)] netr_NETLOGON_INFO_4
*info4
;
874 } netr_CONTROL_QUERY_INFORMATION
;
876 /* function_code values */
877 typedef [v1_enum] enum {
878 NETLOGON_CONTROL_QUERY
= 0x00000001,
879 NETLOGON_CONTROL_REPLICATE
= 0x00000002,
880 NETLOGON_CONTROL_SYNCHRONIZE
= 0x00000003,
881 NETLOGON_CONTROL_PDC_REPLICATE
= 0x00000004,
882 NETLOGON_CONTROL_REDISCOVER
= 0x00000005,
883 NETLOGON_CONTROL_TC_QUERY
= 0x00000006,
884 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 0x00000007,
885 NETLOGON_CONTROL_FIND_USER
= 0x00000008,
886 NETLOGON_CONTROL_CHANGE_PASSWORD
= 0x00000009,
887 NETLOGON_CONTROL_TC_VERIFY
= 0x0000000A,
888 NETLOGON_CONTROL_FORCE_DNS_REG
= 0x0000000B,
889 NETLOGON_CONTROL_QUERY_DNS_REG
= 0x0000000C,
890 NETLOGON_CONTROL_BACKUP_CHANGE_LOG
= 0x0000FFFC,
891 NETLOGON_CONTROL_TRUNCATE_LOG
= 0x0000FFFD,
892 NETLOGON_CONTROL_SET_DBFLAG
= 0x0000FFFE,
893 NETLOGON_CONTROL_BREAKPOINT
= 0x0000FFFF
894 } netr_LogonControlCode
;
896 WERROR netr_LogonControl
(
897 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
898 [in] netr_LogonControlCode function_code
,
900 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
907 WERROR netr_GetAnyDCName
(
908 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
909 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
910 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
918 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
919 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
920 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
921 [case(NETLOGON_CONTROL_CHANGE_PASSWORD
)] [string,charset
(UTF16
)] uint16
*domain
;
922 [case(NETLOGON_CONTROL_TC_VERIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
923 [case(NETLOGON_CONTROL_FIND_USER
)] [string,charset
(UTF16
)] uint16
*user
;
924 [case(NETLOGON_CONTROL_SET_DBFLAG
)] uint32 debug_level
;
926 } netr_CONTROL_DATA_INFORMATION
;
928 WERROR netr_LogonControl2
(
929 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
930 [in] netr_LogonControlCode function_code
,
932 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
933 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
937 /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
938 * session keys are encrypted with DES calls. (And the user session key
944 typedef [public,bitmap32bit
] bitmap
{
945 NETLOGON_NEG_ACCOUNT_LOCKOUT
= 0x00000001,
946 NETLOGON_NEG_PERSISTENT_SAMREPL
= 0x00000002,
947 NETLOGON_NEG_ARCFOUR
= 0x00000004,
948 NETLOGON_NEG_PROMOTION_COUNT
= 0x00000008,
949 NETLOGON_NEG_CHANGELOG_BDC
= 0x00000010,
950 NETLOGON_NEG_FULL_SYNC_REPL
= 0x00000020,
951 NETLOGON_NEG_MULTIPLE_SIDS
= 0x00000040,
952 NETLOGON_NEG_REDO
= 0x00000080,
953 NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL
= 0x00000100,
954 NETLOGON_NEG_SEND_PASSWORD_INFO_PDC
= 0x00000200,
955 NETLOGON_NEG_GENERIC_PASSTHROUGH
= 0x00000400,
956 NETLOGON_NEG_CONCURRENT_RPC
= 0x00000800,
957 NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL
= 0x00001000,
958 NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL
= 0x00002000,
959 NETLOGON_NEG_STRONG_KEYS
= 0x00004000,
960 NETLOGON_NEG_TRANSITIVE_TRUSTS
= 0x00008000,
961 NETLOGON_NEG_DNS_DOMAIN_TRUSTS
= 0x00010000,
962 NETLOGON_NEG_PASSWORD_SET2
= 0x00020000,
963 NETLOGON_NEG_GETDOMAININFO
= 0x00040000,
964 NETLOGON_NEG_CROSS_FOREST_TRUSTS
= 0x00080000,
965 NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION
= 0x00100000,
966 NETLOGON_NEG_RODC_PASSTHROUGH
= 0x00200000,
967 NETLOGON_NEG_SUPPORTS_AES_SHA2
= 0x00400000,
968 NETLOGON_NEG_SUPPORTS_AES
= 0x01000000,
969 NETLOGON_NEG_AUTHENTICATED_RPC_LSASS
= 0x20000000,
970 NETLOGON_NEG_AUTHENTICATED_RPC
= 0x40000000
971 } netr_NegotiateFlags
;
973 const uint32 NETLOGON_NEG_128BIT
= NETLOGON_NEG_STRONG_KEYS
;
974 const uint32 NETLOGON_NEG_SCHANNEL
= NETLOGON_NEG_AUTHENTICATED_RPC
;
976 NTSTATUS netr_ServerAuthenticate2
(
977 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
978 [in] [string,charset
(UTF16
)] uint16
*account_name
,
979 [in] netr_SchannelType secure_channel_type
,
980 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
981 [in,ref] netr_Credential
*credentials
,
982 [out,ref] netr_Credential
*return_credentials
,
983 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
991 SYNCSTATE_NORMAL_STATE
= 0,
992 SYNCSTATE_DOMAIN_STATE
= 1,
993 SYNCSTATE_GROUP_STATE
= 2,
994 SYNCSTATE_UAS_BUILT_IN_GROUP_STATE
= 3,
995 SYNCSTATE_USER_STATE
= 4,
996 SYNCSTATE_GROUP_MEMBER_STATE
= 5,
997 SYNCSTATE_ALIAS_STATE
= 6,
998 SYNCSTATE_ALIAS_MEMBER_STATE
= 7,
999 SYNCSTATE_SAM_DONE_STATE
= 8
1002 NTSTATUS netr_DatabaseSync2
(
1003 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1004 [in] [string,charset
(UTF16
)] uint16
*computername
,
1005 [in,ref] netr_Authenticator
*credential
,
1006 [in,out,ref] netr_Authenticator
*return_authenticator
,
1007 [in] netr_SamDatabaseID database_id
,
1008 [in] SyncStateEnum restart_state
,
1009 [in,out,ref] uint32
*sync_context
,
1010 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
1011 [in] uint32 preferredmaximumlength
1018 /* i'm not at all sure how this call works */
1020 typedef [bitmap16bit
] bitmap
{
1021 NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED
= 0x0001,
1022 NETR_CHANGELOG_CHANGED_PASSWORD
= 0x0002,
1023 NETR_CHANGELOG_SID_INCLUDED
= 0x0004,
1024 NETR_CHANGELOG_NAME_INCLUDED
= 0x0008,
1025 NETR_CHANGELOG_FIRST_PROMOTION_OBJ
= 0x0010
1026 } netr_ChangeLogFlags
;
1028 typedef [nodiscriminant
] union {
1029 [case(NETR_CHANGELOG_SID_INCLUDED
)] dom_sid object_sid
;
1030 [case(NETR_CHANGELOG_NAME_INCLUDED
)] nstring object_name
;
1032 } netr_ChangeLogObject
;
1034 typedef [public,gensize
] struct {
1035 uint32 serial_number1
;
1036 uint32 serial_number2
;
1038 netr_ChangeLogFlags flags
;
1039 netr_SamDatabaseID8Bit db_index
;
1040 netr_DeltaEnum8Bit delta_type
;
1041 [switch_is(flags
& (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED
))] netr_ChangeLogObject
object;
1042 } netr_ChangeLogEntry
;
1044 NTSTATUS netr_DatabaseRedo
(
1045 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
1046 [in] [string,charset
(UTF16
)] uint16
*computername
,
1047 [in] netr_Authenticator
*credential
,
1048 [in,out,ref] netr_Authenticator
*return_authenticator
,
1050 * we cannot use subcontext_size() here, as
1051 * change_log_entry_size is encoded after the subcontext
1053 [in] [subcontext
(4)/*,subcontext_size(change_log_entry_size)*/]
1054 netr_ChangeLogEntry change_log_entry
,
1055 [in] [value
(ndr_size_netr_ChangeLogEntry
(&change_log_entry
,
1057 uint32 change_log_entry_size
,
1058 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1065 WERROR netr_LogonControl2Ex
(
1066 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1067 [in] netr_LogonControlCode function_code
,
1069 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1070 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1077 [size_is(length
)] uint8
*data
;
1080 NTSTATUS netr_NetrEnumerateTrustedDomains
(
1081 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1082 [out,ref] netr_Blob
*trusted_domains_blob
1088 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1090 const int DSGETDC_VALID_FLAGS
= (DS_FORCE_REDISCOVERY |
1091 DS_DIRECTORY_SERVICE_REQUIRED |
1092 DS_DIRECTORY_SERVICE_PREFERRED |
1093 DS_GC_SERVER_REQUIRED |
1095 DS_BACKGROUND_ONLY |
1098 DS_TIMESERV_REQUIRED |
1099 DS_WRITABLE_REQUIRED |
1100 DS_GOOD_TIMESERV_PREFERRED |
1102 DS_ONLY_LDAP_NEEDED |
1105 DS_TRY_NEXTCLOSEST_SITE |
1106 DS_DIRECTORY_SERVICE_6_REQUIRED |
1107 DS_WEB_SERVICE_REQUIRED |
1108 DS_RETURN_FLAT_NAME |
1109 DS_RETURN_DNS_NAME
);
1111 typedef [bitmap32bit
] bitmap
{
1112 DS_FORCE_REDISCOVERY
= 0x00000001,
1113 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
1114 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
1115 DS_GC_SERVER_REQUIRED
= 0x00000040,
1116 DS_PDC_REQUIRED
= 0x00000080,
1117 DS_BACKGROUND_ONLY
= 0x00000100,
1118 DS_IP_REQUIRED
= 0x00000200,
1119 DS_KDC_REQUIRED
= 0x00000400,
1120 DS_TIMESERV_REQUIRED
= 0x00000800,
1121 DS_WRITABLE_REQUIRED
= 0x00001000,
1122 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
1123 DS_AVOID_SELF
= 0x00004000,
1124 DS_ONLY_LDAP_NEEDED
= 0x00008000,
1125 DS_IS_FLAT_NAME
= 0x00010000,
1126 DS_IS_DNS_NAME
= 0x00020000,
1127 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
1128 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000,
1129 DS_WEB_SERVICE_REQUIRED
= 0x00100000,
1130 DS_RETURN_DNS_NAME
= 0x40000000,
1131 DS_RETURN_FLAT_NAME
= 0x80000000
1132 } netr_DsRGetDCName_flags
;
1134 typedef [v1_enum] enum {
1135 DS_ADDRESS_TYPE_INET
= 1,
1136 DS_ADDRESS_TYPE_NETBIOS
= 2
1137 } netr_DsRGetDCNameInfo_AddressType
;
1139 typedef [bitmap32bit
] bitmap
{
1140 DS_SERVER_PDC
= 0x00000001,
1141 DS_SERVER_GC
= 0x00000004,
1142 DS_SERVER_LDAP
= 0x00000008,
1143 DS_SERVER_DS
= 0x00000010,
1144 DS_SERVER_KDC
= 0x00000020,
1145 DS_SERVER_TIMESERV
= 0x00000040,
1146 DS_SERVER_CLOSEST
= 0x00000080,
1147 DS_SERVER_WRITABLE
= 0x00000100,
1148 DS_SERVER_GOOD_TIMESERV
= 0x00000200,
1149 DS_SERVER_NDNC
= 0x00000400,
1150 DS_SERVER_SELECT_SECRET_DOMAIN_6
= 0x00000800,
1151 DS_SERVER_FULL_SECRET_DOMAIN_6
= 0x00001000,
1152 DS_SERVER_WEBSERV
= 0x00002000,
1153 DS_SERVER_DS_8
= 0x00004000,
1154 DS_DNS_CONTROLLER
= 0x20000000,
1155 DS_DNS_DOMAIN
= 0x40000000,
1156 DS_DNS_FOREST_ROOT
= 0x80000000
1159 typedef [public] struct {
1160 [string,charset
(UTF16
)] uint16
*dc_unc
;
1161 [string,charset
(UTF16
)] uint16
*dc_address
;
1162 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1164 [string,charset
(UTF16
)] uint16
*domain_name
;
1165 [string,charset
(UTF16
)] uint16
*forest_name
;
1166 netr_DsR_DcFlags dc_flags
;
1167 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1168 [string,charset
(UTF16
)] uint16
*client_site_name
;
1169 } netr_DsRGetDCNameInfo
;
1171 WERROR netr_DsRGetDCName
(
1172 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1173 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1174 [in,unique] GUID
*domain_guid
,
1175 [in,unique] GUID
*site_guid
,
1176 [in] netr_DsRGetDCName_flags flags
,
1177 [out,ref] netr_DsRGetDCNameInfo
**info
1182 typedef [switch_type(uint32
)] union {
1183 [case(1)] netr_NegotiateFlags server_capabilities
;
1184 } netr_Capabilities
;
1186 NTSTATUS netr_LogonGetCapabilities
(
1187 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1188 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1189 [in,ref] netr_Authenticator
*credential
,
1190 [in,out,ref] netr_Authenticator
*return_authenticator
,
1191 [in] uint32 query_level
,
1192 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1197 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1201 WERROR netr_LogonGetTrustRid
(
1202 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1203 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1204 [out,ref] uint32
*rid
1209 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1213 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1217 [public] NTSTATUS netr_ServerAuthenticate3
(
1218 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1219 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1220 [in] netr_SchannelType secure_channel_type
,
1221 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1222 [in,ref] netr_Credential
*credentials
,
1223 [out,ref] netr_Credential
*return_credentials
,
1224 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1225 [out,ref] uint32
*rid
1231 WERROR netr_DsRGetDCNameEx
(
1232 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1233 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1234 [in,unique] GUID
*domain_guid
,
1235 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1236 [in] netr_DsRGetDCName_flags flags
,
1237 [out,ref] netr_DsRGetDCNameInfo
**info
1243 WERROR netr_DsRGetSiteName
(
1244 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1245 [out,ref] [string,charset
(UTF16
)] uint16
**site
1250 typedef [bitmap32bit
] bitmap
{
1251 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1252 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1253 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1254 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1255 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1256 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1257 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1258 NETR_TRUST_FLAG_AES
= 0x00000100
1261 typedef [bitmap32bit
] bitmap
{
1262 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1263 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1264 } netr_WorkstationFlags
;
1266 typedef [bitmap16bit
] bitmap
{
1267 NETR_VER_SUITE_BACKOFFICE
= 0x0004,
1268 NETR_VER_SUITE_BLADE
= 0x0400,
1269 NETR_VER_SUITE_COMPUTE_SERVER
= 0x4000,
1270 NETR_VER_SUITE_DATACENTER
= 0x0080,
1271 NETR_VER_SUITE_ENTERPRISE
= 0x0002,
1272 NETR_VER_SUITE_EMBEDDEDNT
= 0x0040,
1273 NETR_VER_SUITE_PERSONAL
= 0x0200,
1274 NETR_VER_SUITE_SINGLEUSERTS
= 0x0100,
1275 NETR_VER_SUITE_SMALLBUSINESS
= 0x0001,
1276 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED
= 0x0020,
1277 NETR_VER_SUITE_STORAGE_SERVER
= 0x2000,
1278 NETR_VER_SUITE_TERMINAL
= 0x0010,
1279 NETR_VER_SUITE_WH_SERVER
= 0x8000
1282 typedef [bitmap8bit
] bitmap
{
1283 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1284 NETR_VER_NT_SERVER
= 0x03,
1285 NETR_VER_NT_WORKSTATION
= 0x01
1290 [size_is(policy_size
)] uint8
*policy
;
1291 } netr_LsaPolicyInformation
;
1294 [value
(284)] uint32 OSVersionInfoSize
;
1295 uint32 MajorVersion
;
1296 uint32 MinorVersion
;
1299 [subcontext
(0),subcontext_size
(256)] nstring CSDVersion
;
1300 uint16 ServicePackMajor
;
1301 uint16 ServicePackMinor
;
1302 netr_SuiteMask SuiteMask
;
1303 netr_ProductType ProductType
;
1305 } netr_OsVersionInfoEx
;
1308 /* these first 3 values come from the fact windows
1309 actually encodes this structure as a UNICODE_STRING
1310 - see MS-NRPC section 2.2.1.3.9 */
1311 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1312 [value
(142)] uint32 length
;
1313 [value
(0)] uint32 dummy
;
1314 [value
(142)] uint32 size
;
1315 netr_OsVersionInfoEx os
;
1319 /* value is 284 when info != os, otherwise 0 (for length and
1321 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1322 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1324 } netr_OsVersionContainer
;
1327 netr_LsaPolicyInformation lsa_policy
;
1328 [string,charset
(UTF16
)] uint16
*dns_hostname
;
1329 [string,charset
(UTF16
)] uint16
*sitename
;
1330 [string,charset
(UTF16
)] uint16
*dummy1
;
1331 [string,charset
(UTF16
)] uint16
*dummy2
;
1332 [string,charset
(UTF16
)] uint16
*dummy3
;
1333 [string,charset
(UTF16
)] uint16
*dummy4
;
1334 netr_OsVersionContainer os_version
;
1336 lsa_String dummy_string3
;
1337 lsa_String dummy_string4
;
1338 netr_WorkstationFlags workstation_flags
;
1342 } netr_WorkstationInformation
;
1345 [case(1)] netr_WorkstationInformation
*workstation_info
;
1346 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1347 } netr_WorkstationInfo
;
1350 /* these first 3 values come from the fact windows
1351 actually encodes this structure as a UNICODE_STRING
1352 - see MS-NRPC section 2.2.1.3.9 */
1353 [value
(8)] uint32 length
;
1354 [value
(0)] uint32 dummy
;
1355 [value
(8)] uint32 size
;
1356 netr_TrustFlags flags
;
1357 uint32 parent_index
;
1359 uint32 trust_attributes
;
1360 } netr_trust_extension
;
1363 uint16 length
; /* value is 16 when info != NULL, otherwise 0 */
1364 [value
(length
)] uint16 size
; /* value is 16 when info != NULL, otherwise 0 */
1365 netr_trust_extension
*info
;
1366 } netr_trust_extension_container
;
1369 lsa_StringLarge domainname
;
1370 lsa_StringLarge dns_domainname
;
1371 lsa_StringLarge dns_forestname
;
1373 dom_sid2
*domain_sid
;
1374 netr_trust_extension_container trust_extension
;
1375 lsa_StringLarge dummy_string2
;
1376 lsa_StringLarge dummy_string3
;
1377 lsa_StringLarge dummy_string4
;
1382 } netr_OneDomainInfo
;
1384 typedef [public,bitmap32bit
] bitmap
{
1385 ENC_CRC32
= 0x00000001,
1386 ENC_RSA_MD5
= 0x00000002,
1387 ENC_RC4_HMAC_MD5
= 0x00000004,
1388 ENC_HMAC_SHA1_96_AES128
= 0x00000008,
1389 ENC_HMAC_SHA1_96_AES256
= 0x00000010
1390 } netr_SupportedEncTypes
;
1393 netr_OneDomainInfo primary_domain
;
1394 uint32 trusted_domain_count
;
1395 [size_is(trusted_domain_count
)] netr_OneDomainInfo
*trusted_domains
;
1396 netr_LsaPolicyInformation lsa_policy
;
1397 lsa_StringLarge dns_hostname
;
1398 lsa_StringLarge dummy_string2
;
1399 lsa_StringLarge dummy_string3
;
1400 lsa_StringLarge dummy_string4
;
1401 netr_WorkstationFlags workstation_flags
;
1402 netr_SupportedEncTypes supported_enc_types
;
1405 } netr_DomainInformation
;
1408 [case(1)] netr_DomainInformation
*domain_info
;
1409 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
1412 NTSTATUS netr_LogonGetDomainInfo
(
1413 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1414 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1415 [in,ref] netr_Authenticator
*credential
,
1416 [in,out,ref] netr_Authenticator
*return_authenticator
,
1418 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1419 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1425 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1427 /* someone's birthday ? */
1428 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT
= 0x02231968;
1431 uint32 ReservedField
;
1432 uint32 PasswordVersionNumber
;
1433 uint32 PasswordVersionPresent
;
1434 } NL_PASSWORD_VERSION
;
1436 typedef [flag
(NDR_PAHEX
)] struct {
1439 } netr_CryptPassword
;
1441 NTSTATUS netr_ServerPasswordSet2
(
1442 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1443 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1444 [in] netr_SchannelType secure_channel_type
,
1445 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1446 [in,ref] netr_Authenticator
*credential
,
1447 [out,ref] netr_Authenticator
*return_authenticator
,
1448 [in,ref] netr_CryptPassword
*new_password
1453 WERROR netr_ServerPasswordGet
(
1454 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1455 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1456 [in] netr_SchannelType secure_channel_type
,
1457 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1458 [in,ref] netr_Authenticator
*credential
,
1459 [out,ref] netr_Authenticator
*return_authenticator
,
1460 [out,ref] samr_Password
*password
1465 [todo
] WERROR netr_NETRLOGONSENDTOSAM
();
1471 [size_is(count
)] lsa_String
*sitename
;
1472 } netr_DsRAddressToSitenamesWCtr
;
1475 [size_is(size
)] uint8
*buffer
;
1479 WERROR netr_DsRAddressToSitenamesW
(
1480 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1481 [in] [range(0,32000)] uint32 count
,
1482 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1483 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1488 WERROR netr_DsRGetDCNameEx2
(
1489 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1490 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1491 [in] samr_AcctFlags mask
,
1492 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1493 [in,unique] GUID
*domain_guid
,
1494 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1495 [in] netr_DsRGetDCName_flags flags
,
1496 [out,ref] netr_DsRGetDCNameInfo
**info
1501 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1507 [string,charset
(UTF16
)] uint16
*netbios_name
;
1508 [string,charset
(UTF16
)] uint16
*dns_name
;
1509 netr_TrustFlags trust_flags
;
1510 uint32 parent_index
;
1511 lsa_TrustType trust_type
;
1512 lsa_TrustAttributes trust_attributes
;
1519 [size_is(count
)] netr_DomainTrust
*array
;
1520 } netr_DomainTrustList
;
1522 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1523 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1524 [out,ref] netr_DomainTrustList
*dom_trust_list
1531 [size_is(count
)] lsa_String
*sitename
;
1532 [size_is(count
)] lsa_String
*subnetname
;
1533 } netr_DsRAddressToSitenamesExWCtr
;
1535 WERROR netr_DsRAddressToSitenamesExW
(
1536 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1537 [in] [range(0,32000)] uint32 count
,
1538 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1539 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1547 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1550 WERROR netr_DsrGetDcSiteCoverageW
(
1551 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1552 [out,ref] DcSitesCtr
**ctr
1557 NTSTATUS netr_LogonSamLogonEx
(
1558 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1559 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1560 [in] netr_LogonInfoClass logon_level
,
1561 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1562 [in] uint16 validation_level
,
1563 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1564 [out,ref] uint8
*authoritative
,
1565 [in,out,ref] uint32
*flags
1571 WERROR netr_DsrEnumerateDomainTrusts
(
1572 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1573 [in] netr_TrustFlags trust_flags
,
1574 [out,ref] netr_DomainTrustList
*trusts
1580 WERROR netr_DsrDeregisterDNSHostRecords
(
1581 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1582 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1583 [in,unique] GUID
*domain_guid
,
1584 [in,unique] GUID
*dsa_guid
,
1585 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1590 NTSTATUS netr_ServerTrustPasswordsGet
(
1591 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1592 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1593 [in] netr_SchannelType secure_channel_type
,
1594 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1595 [in,ref] netr_Authenticator
*credential
,
1596 [out,ref] netr_Authenticator
*return_authenticator
,
1597 [out,ref] samr_Password
*password
,
1598 [out,ref] samr_Password
*password2
1604 const int DS_GFTI_UPDATE_TDO
= 0x1;
1606 WERROR netr_DsRGetForestTrustInformation
(
1607 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1608 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1610 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1615 NTSTATUS netr_GetForestTrustInformation
(
1616 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1617 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1618 [in,ref] netr_Authenticator
*credential
,
1619 [out,ref] netr_Authenticator
*return_authenticator
,
1621 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1627 /* this is the ADS varient. I don't yet know what the "flags" are for */
1628 NTSTATUS netr_LogonSamLogonWithFlags
(
1629 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1630 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1631 [in,unique] netr_Authenticator
*credential
,
1632 [in,out,unique] netr_Authenticator
*return_authenticator
,
1633 [in] netr_LogonInfoClass logon_level
,
1634 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1635 [in] uint16 validation_level
,
1636 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1637 [out,ref] uint8
*authoritative
,
1638 [in,out,ref] uint32
*flags
1646 [size_is(count
)] uint32
*data
;
1648 [size_is(count
)] lsa_String
*entries
;
1651 NTSTATUS netr_ServerGetTrustInfo
(
1652 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1653 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1654 [in] netr_SchannelType secure_channel_type
,
1655 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1656 [in,ref] netr_Authenticator
*credential
,
1657 [out,ref] netr_Authenticator
*return_authenticator
,
1658 [out,ref] samr_Password
*new_owf_password
,
1659 [out,ref] samr_Password
*old_owf_password
,
1660 [out,ref] netr_TrustInfo
**trust_info
1666 NTSTATUS netr_Unused47
(void);
1673 NlDnsLdapAtSite
= 22,
1676 NlDnsKdcAtSite
= 30,
1678 NlDnsRfc1510KdcAtSite
= 34,
1679 NlDnsGenericGcAtSite
= 36
1683 NlDnsInfoTypeNone
= 0,
1684 NlDnsDomainName
= 1,
1685 NlDnsDomainNameAlias
= 2,
1686 NlDnsForestName
= 3,
1687 NlDnsForestNameAlias
= 4,
1688 NlDnsNdncDomainName
= 5,
1690 } netr_DnsDomainInfoType
;
1694 [string,charset
(UTF16
)] uint16
*dns_domain_info
;
1695 netr_DnsDomainInfoType dns_domain_info_type
;
1699 boolean32 dns_register
;
1703 typedef [public] struct {
1705 [size_is(count
)] NL_DNS_NAME_INFO
*names
;
1706 } NL_DNS_NAME_INFO_ARRAY
;
1708 NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords
(
1709 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1710 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1711 [in, ref] netr_Authenticator
*credential
,
1712 [out,ref] netr_Authenticator
*return_authenticator
,
1713 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1714 [in] uint32 dns_ttl
,
1715 [in,out,ref] NL_DNS_NAME_INFO_ARRAY
*dns_names