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_DNS_CONTROLLER
= 0x20000000,
1154 DS_DNS_DOMAIN
= 0x40000000,
1155 DS_DNS_FOREST_ROOT
= 0x80000000
1158 typedef [public] struct {
1159 [string,charset
(UTF16
)] uint16
*dc_unc
;
1160 [string,charset
(UTF16
)] uint16
*dc_address
;
1161 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1163 [string,charset
(UTF16
)] uint16
*domain_name
;
1164 [string,charset
(UTF16
)] uint16
*forest_name
;
1165 netr_DsR_DcFlags dc_flags
;
1166 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1167 [string,charset
(UTF16
)] uint16
*client_site_name
;
1168 } netr_DsRGetDCNameInfo
;
1170 WERROR netr_DsRGetDCName
(
1171 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1172 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1173 [in,unique] GUID
*domain_guid
,
1174 [in,unique] GUID
*site_guid
,
1175 [in] netr_DsRGetDCName_flags flags
,
1176 [out,ref] netr_DsRGetDCNameInfo
**info
1181 typedef [switch_type(uint32
)] union {
1182 [case(1)] netr_NegotiateFlags server_capabilities
;
1183 } netr_Capabilities
;
1185 NTSTATUS netr_LogonGetCapabilities
(
1186 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1187 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1188 [in,ref] netr_Authenticator
*credential
,
1189 [in,out,ref] netr_Authenticator
*return_authenticator
,
1190 [in] uint32 query_level
,
1191 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1196 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1200 WERROR netr_LogonGetTrustRid
(
1201 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1202 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1203 [out,ref] uint32
*rid
1208 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1212 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1216 [public] NTSTATUS netr_ServerAuthenticate3
(
1217 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1218 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1219 [in] netr_SchannelType secure_channel_type
,
1220 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1221 [in,ref] netr_Credential
*credentials
,
1222 [out,ref] netr_Credential
*return_credentials
,
1223 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1224 [out,ref] uint32
*rid
1230 WERROR netr_DsRGetDCNameEx
(
1231 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1232 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1233 [in,unique] GUID
*domain_guid
,
1234 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1235 [in] netr_DsRGetDCName_flags flags
,
1236 [out,ref] netr_DsRGetDCNameInfo
**info
1242 WERROR netr_DsRGetSiteName
(
1243 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1244 [out,ref] [string,charset
(UTF16
)] uint16
**site
1249 typedef [bitmap32bit
] bitmap
{
1250 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1251 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1252 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1253 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1254 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1255 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1256 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1257 NETR_TRUST_FLAG_AES
= 0x00000100
1260 typedef [bitmap32bit
] bitmap
{
1261 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1262 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1263 } netr_WorkstationFlags
;
1265 typedef [bitmap16bit
] bitmap
{
1266 NETR_VER_SUITE_BACKOFFICE
= 0x0004,
1267 NETR_VER_SUITE_BLADE
= 0x0400,
1268 NETR_VER_SUITE_COMPUTE_SERVER
= 0x4000,
1269 NETR_VER_SUITE_DATACENTER
= 0x0080,
1270 NETR_VER_SUITE_ENTERPRISE
= 0x0002,
1271 NETR_VER_SUITE_EMBEDDEDNT
= 0x0040,
1272 NETR_VER_SUITE_PERSONAL
= 0x0200,
1273 NETR_VER_SUITE_SINGLEUSERTS
= 0x0100,
1274 NETR_VER_SUITE_SMALLBUSINESS
= 0x0001,
1275 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED
= 0x0020,
1276 NETR_VER_SUITE_STORAGE_SERVER
= 0x2000,
1277 NETR_VER_SUITE_TERMINAL
= 0x0010,
1278 NETR_VER_SUITE_WH_SERVER
= 0x8000
1281 typedef [bitmap8bit
] bitmap
{
1282 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1283 NETR_VER_NT_SERVER
= 0x03,
1284 NETR_VER_NT_WORKSTATION
= 0x01
1289 [size_is(policy_size
)] uint8
*policy
;
1290 } netr_LsaPolicyInformation
;
1293 [value
(284)] uint32 OSVersionInfoSize
;
1294 uint32 MajorVersion
;
1295 uint32 MinorVersion
;
1298 [subcontext
(0),subcontext_size
(256)] nstring CSDVersion
;
1299 uint16 ServicePackMajor
;
1300 uint16 ServicePackMinor
;
1301 netr_SuiteMask SuiteMask
;
1302 netr_ProductType ProductType
;
1304 } netr_OsVersionInfoEx
;
1307 /* these first 3 values come from the fact windows
1308 actually encodes this structure as a UNICODE_STRING
1309 - see MS-NRPC section 2.2.1.3.9 */
1310 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1311 [value
(142)] uint32 length
;
1312 [value
(0)] uint32 dummy
;
1313 [value
(142)] uint32 size
;
1314 netr_OsVersionInfoEx os
;
1318 /* value is 284 when info != os, otherwise 0 (for length and
1320 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1321 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1323 } netr_OsVersionContainer
;
1326 netr_LsaPolicyInformation lsa_policy
;
1327 [string,charset
(UTF16
)] uint16
*dns_hostname
;
1328 [string,charset
(UTF16
)] uint16
*sitename
;
1329 [string,charset
(UTF16
)] uint16
*dummy1
;
1330 [string,charset
(UTF16
)] uint16
*dummy2
;
1331 [string,charset
(UTF16
)] uint16
*dummy3
;
1332 [string,charset
(UTF16
)] uint16
*dummy4
;
1333 netr_OsVersionContainer os_version
;
1335 lsa_String dummy_string3
;
1336 lsa_String dummy_string4
;
1337 netr_WorkstationFlags workstation_flags
;
1341 } netr_WorkstationInformation
;
1344 [case(1)] netr_WorkstationInformation
*workstation_info
;
1345 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1346 } netr_WorkstationInfo
;
1349 /* these first 3 values come from the fact windows
1350 actually encodes this structure as a UNICODE_STRING
1351 - see MS-NRPC section 2.2.1.3.9 */
1352 [value
(8)] uint32 length
;
1353 [value
(0)] uint32 dummy
;
1354 [value
(8)] uint32 size
;
1355 netr_TrustFlags flags
;
1356 uint32 parent_index
;
1358 uint32 trust_attributes
;
1359 } netr_trust_extension
;
1362 uint16 length
; /* value is 16 when info != NULL, otherwise 0 */
1363 [value
(length
)] uint16 size
; /* value is 16 when info != NULL, otherwise 0 */
1364 netr_trust_extension
*info
;
1365 } netr_trust_extension_container
;
1368 lsa_StringLarge domainname
;
1369 lsa_StringLarge dns_domainname
;
1370 lsa_StringLarge dns_forestname
;
1372 dom_sid2
*domain_sid
;
1373 netr_trust_extension_container trust_extension
;
1374 lsa_StringLarge dummy_string2
;
1375 lsa_StringLarge dummy_string3
;
1376 lsa_StringLarge dummy_string4
;
1381 } netr_OneDomainInfo
;
1383 typedef [public,bitmap32bit
] bitmap
{
1384 ENC_CRC32
= 0x00000001,
1385 ENC_RSA_MD5
= 0x00000002,
1386 ENC_RC4_HMAC_MD5
= 0x00000004,
1387 ENC_HMAC_SHA1_96_AES128
= 0x00000008,
1388 ENC_HMAC_SHA1_96_AES256
= 0x00000010
1389 } netr_SupportedEncTypes
;
1392 netr_OneDomainInfo primary_domain
;
1393 uint32 trusted_domain_count
;
1394 [size_is(trusted_domain_count
)] netr_OneDomainInfo
*trusted_domains
;
1395 netr_LsaPolicyInformation lsa_policy
;
1396 lsa_StringLarge dns_hostname
;
1397 lsa_StringLarge dummy_string2
;
1398 lsa_StringLarge dummy_string3
;
1399 lsa_StringLarge dummy_string4
;
1400 netr_WorkstationFlags workstation_flags
;
1401 netr_SupportedEncTypes supported_enc_types
;
1404 } netr_DomainInformation
;
1407 [case(1)] netr_DomainInformation
*domain_info
;
1408 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
1411 NTSTATUS netr_LogonGetDomainInfo
(
1412 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1413 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1414 [in,ref] netr_Authenticator
*credential
,
1415 [in,out,ref] netr_Authenticator
*return_authenticator
,
1417 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1418 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1424 /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
1426 /* someone's birthday ? */
1427 const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT
= 0x02231968;
1430 uint32 ReservedField
;
1431 uint32 PasswordVersionNumber
;
1432 uint32 PasswordVersionPresent
;
1433 } NL_PASSWORD_VERSION
;
1435 typedef [flag
(NDR_PAHEX
)] struct {
1438 } netr_CryptPassword
;
1440 NTSTATUS netr_ServerPasswordSet2
(
1441 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1442 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1443 [in] netr_SchannelType secure_channel_type
,
1444 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1445 [in,ref] netr_Authenticator
*credential
,
1446 [out,ref] netr_Authenticator
*return_authenticator
,
1447 [in,ref] netr_CryptPassword
*new_password
1452 WERROR netr_ServerPasswordGet
(
1453 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1454 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1455 [in] netr_SchannelType secure_channel_type
,
1456 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1457 [in,ref] netr_Authenticator
*credential
,
1458 [out,ref] netr_Authenticator
*return_authenticator
,
1459 [out,ref] samr_Password
*password
1464 [todo
] WERROR netr_NETRLOGONSENDTOSAM
();
1470 [size_is(count
)] lsa_String
*sitename
;
1471 } netr_DsRAddressToSitenamesWCtr
;
1474 [size_is(size
)] uint8
*buffer
;
1478 WERROR netr_DsRAddressToSitenamesW
(
1479 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1480 [in] [range(0,32000)] uint32 count
,
1481 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1482 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1487 WERROR netr_DsRGetDCNameEx2
(
1488 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1489 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1490 [in] samr_AcctFlags mask
,
1491 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1492 [in,unique] GUID
*domain_guid
,
1493 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1494 [in] netr_DsRGetDCName_flags flags
,
1495 [out,ref] netr_DsRGetDCNameInfo
**info
1500 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1505 typedef [v1_enum] enum {
1506 NETR_TRUST_TYPE_DOWNLEVEL
= 1,
1507 NETR_TRUST_TYPE_UPLEVEL
= 2,
1508 NETR_TRUST_TYPE_MIT
= 3,
1509 NETR_TRUST_TYPE_DCE
= 4
1512 typedef [bitmap32bit
] bitmap
{
1513 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
1514 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
1515 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
1516 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
1517 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
1518 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
1519 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040
1520 } netr_TrustAttributes
;
1523 [string,charset
(UTF16
)] uint16
*netbios_name
;
1524 [string,charset
(UTF16
)] uint16
*dns_name
;
1525 netr_TrustFlags trust_flags
;
1526 uint32 parent_index
;
1527 netr_TrustType trust_type
;
1528 netr_TrustAttributes trust_attributes
;
1535 [size_is(count
)] netr_DomainTrust
*array
;
1536 } netr_DomainTrustList
;
1538 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1539 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1540 [out,ref] netr_DomainTrustList
*dom_trust_list
1547 [size_is(count
)] lsa_String
*sitename
;
1548 [size_is(count
)] lsa_String
*subnetname
;
1549 } netr_DsRAddressToSitenamesExWCtr
;
1551 WERROR netr_DsRAddressToSitenamesExW
(
1552 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1553 [in] [range(0,32000)] uint32 count
,
1554 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1555 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1563 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1566 WERROR netr_DsrGetDcSiteCoverageW
(
1567 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1568 [out,ref] DcSitesCtr
**ctr
1573 NTSTATUS netr_LogonSamLogonEx
(
1574 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1575 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1576 [in] netr_LogonInfoClass logon_level
,
1577 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1578 [in] uint16 validation_level
,
1579 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1580 [out,ref] uint8
*authoritative
,
1581 [in,out,ref] uint32
*flags
1587 WERROR netr_DsrEnumerateDomainTrusts
(
1588 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1589 [in] netr_TrustFlags trust_flags
,
1590 [out,ref] netr_DomainTrustList
*trusts
1596 WERROR netr_DsrDeregisterDNSHostRecords
(
1597 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1598 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1599 [in,unique] GUID
*domain_guid
,
1600 [in,unique] GUID
*dsa_guid
,
1601 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1606 NTSTATUS netr_ServerTrustPasswordsGet
(
1607 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1608 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1609 [in] netr_SchannelType secure_channel_type
,
1610 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1611 [in,ref] netr_Authenticator
*credential
,
1612 [out,ref] netr_Authenticator
*return_authenticator
,
1613 [out,ref] samr_Password
*password
,
1614 [out,ref] samr_Password
*password2
1620 const int DS_GFTI_UPDATE_TDO
= 0x1;
1622 WERROR netr_DsRGetForestTrustInformation
(
1623 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1624 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1626 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1631 NTSTATUS netr_GetForestTrustInformation
(
1632 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1633 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1634 [in,ref] netr_Authenticator
*credential
,
1635 [out,ref] netr_Authenticator
*return_authenticator
,
1637 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1643 /* this is the ADS varient. I don't yet know what the "flags" are for */
1644 NTSTATUS netr_LogonSamLogonWithFlags
(
1645 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1646 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1647 [in,unique] netr_Authenticator
*credential
,
1648 [in,out,unique] netr_Authenticator
*return_authenticator
,
1649 [in] netr_LogonInfoClass logon_level
,
1650 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1651 [in] uint16 validation_level
,
1652 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1653 [out,ref] uint8
*authoritative
,
1654 [in,out,ref] uint32
*flags
1662 [size_is(count
)] uint32
*data
;
1664 [size_is(count
)] lsa_String
*entries
;
1667 NTSTATUS netr_ServerGetTrustInfo
(
1668 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1669 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1670 [in] netr_SchannelType secure_channel_type
,
1671 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1672 [in,ref] netr_Authenticator
*credential
,
1673 [out,ref] netr_Authenticator
*return_authenticator
,
1674 [out,ref] samr_Password
*new_owf_password
,
1675 [out,ref] samr_Password
*old_owf_password
,
1676 [out,ref] netr_TrustInfo
**trust_info
1682 NTSTATUS netr_Unused47
(void);
1689 NlDnsLdapAtSite
= 22,
1692 NlDnsKdcAtSite
= 30,
1694 NlDnsRfc1510KdcAtSite
= 34,
1695 NlDnsGenericGcAtSite
= 36
1699 NlDnsInfoTypeNone
= 0,
1700 NlDnsDomainName
= 1,
1701 NlDnsDomainNameAlias
= 2,
1702 NlDnsForestName
= 3,
1703 NlDnsForestNameAlias
= 4,
1704 NlDnsNdncDomainName
= 5,
1706 } netr_DnsDomainInfoType
;
1710 [string,charset
(UTF16
)] uint16
*dns_domain_info
;
1711 netr_DnsDomainInfoType dns_domain_info_type
;
1715 boolean32 dns_register
;
1719 typedef [public] struct {
1721 [size_is(count
)] NL_DNS_NAME_INFO
*names
;
1722 } NL_DNS_NAME_INFO_ARRAY
;
1724 NTSTATUS netr_DsrUpdateReadOnlyServerDnsRecords
(
1725 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1726 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1727 [in, ref] netr_Authenticator
*credential
,
1728 [out,ref] netr_Authenticator
*return_authenticator
,
1729 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1730 [in] uint32 dns_ttl
,
1731 [in,out,ref] NL_DNS_NAME_INFO_ARRAY
*dns_names