3 much of this was derived from the ethereal sources - thanks to everyone
7 import
"misc.idl", "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
11 cpp_quote
("#define netr_DeltaEnum8Bit netr_DeltaEnum")
12 cpp_quote
("#define netr_SamDatabaseID8Bit netr_SamDatabaseID")
15 uuid("12345678-1234-abcd-ef00-01234567cffb"),
17 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
18 helper
("../librpc/ndr/ndr_netlogon.h"),
19 pointer_default(unique)
24 typedef bitmap samr_AcctFlags samr_AcctFlags
;
25 typedef bitmap samr_GroupAttrs samr_GroupAttrs
;
26 typedef enum netr_DeltaEnum8Bit netr_DeltaEnum8Bit
;
27 typedef enum netr_SamDatabaseID8Bit netr_SamDatabaseID8Bit
;
33 [string,charset
(UTF16
)] uint16
*account_name
;
44 time_t pw_must_change
;
45 [string,charset
(UTF16
)] uint16
*computer
;
46 [string,charset
(UTF16
)] uint16
*domain
;
47 [string,charset
(UTF16
)] uint16
*script_path
;
51 WERROR netr_LogonUasLogon
(
52 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
53 [in] [string,charset
(UTF16
)] uint16
*account_name
,
54 [in] [string,charset
(UTF16
)] uint16
*workstation
,
55 [out,ref] netr_UasInfo
**info
67 WERROR netr_LogonUasLogoff
(
68 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
69 [in] [string,charset
(UTF16
)] uint16
*account_name
,
70 [in] [string,charset
(UTF16
)] uint16
*workstation
,
71 [out,ref] netr_UasLogoffInfo
*info
78 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
79 that the structure of the bindata looks like this:
81 dlong lockout_duration;
83 uint32 bad_attempt_lockout;
86 but it doesn't look as though this structure is reflected at the
87 NDR level. Maybe it is left to the application to decode the bindata array.
89 typedef [public] struct {
90 dlong lockout_duration
;
92 uint32 bad_attempt_lockout
;
96 /* - MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
97 * sets the NETLOGON_SERVER_TRUST_ACCOUNT user_flag
98 * - MSV1_0_UPDATE_LOGON_STATISTICS
99 * sets the logon time on network logon
100 * - MSV1_0_RETURN_USER_PARAMETERS
101 * sets the user parameters in the driveletter
102 * - MSV1_0_RETURN_PROFILE_PATH
103 * returns the profilepath in the driveletter and
104 * sets LOGON_PROFILE_PATH_RETURNED user_flag
107 typedef [public,bitmap32bit
] bitmap
{
108 MSV1_0_CLEARTEXT_PASSWORD_ALLOWED
= 0x00000002,
109 MSV1_0_UPDATE_LOGON_STATISTICS
= 0x00000004,
110 MSV1_0_RETURN_USER_PARAMETERS
= 0x00000008,
111 MSV1_0_DONT_TRY_GUEST_ACCOUNT
= 0x00000010,
112 MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
= 0x00000020,
113 MSV1_0_RETURN_PASSWORD_EXPIRY
= 0x00000040,
114 MSV1_0_USE_CLIENT_CHALLENGE
= 0x00000080,
115 MSV1_0_TRY_GUEST_ACCOUNT_ONLY
= 0x00000100,
116 MSV1_0_RETURN_PROFILE_PATH
= 0x00000200,
117 MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY
= 0x00000400,
118 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
= 0x00000800,
119 MSV1_0_DISABLE_PERSONAL_FALLBACK
= 0x00001000,
120 MSV1_0_ALLOW_FORCE_GUEST
= 0x00002000,
121 MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED
= 0x00004000,
122 MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY
= 0x00008000,
123 MSV1_0_ALLOW_MSVCHAPV2
= 0x00010000,
124 MSV1_0_S4U2SELF
= 0x00020000,
125 MSV1_0_CHECK_LOGONHOURS_FOR_S4U
= 0x00040000,
126 MSV1_0_SUBAUTHENTICATION_DLL_EX
= 0x00100000
127 } netr_LogonParameterControl
;
130 lsa_String domain_name
;
131 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
133 uint32 logon_id_high
;
134 lsa_String account_name
;
135 lsa_String workstation
;
139 netr_IdentityInfo identity_info
;
140 samr_Password lmpassword
;
141 samr_Password ntpassword
;
144 typedef [flag
(NDR_PAHEX
)] struct {
146 [value
(length
)] uint16 size
;
147 [size_is(length
),length_is(length
)] uint8
*data
;
148 } netr_ChallengeResponse
;
150 typedef [flag
(NDR_PAHEX
)] struct {
151 netr_IdentityInfo identity_info
;
153 netr_ChallengeResponse nt
;
154 netr_ChallengeResponse lm
;
157 typedef [flag
(NDR_PAHEX
)] struct {
158 netr_IdentityInfo identity_info
;
159 lsa_String package_name
;
161 [size_is(length
)] uint8
*data
;
165 NetlogonInteractiveInformation
= 1,
166 NetlogonNetworkInformation
= 2,
167 NetlogonServiceInformation
= 3,
168 NetlogonGenericInformation
= 4,
169 NetlogonInteractiveTransitiveInformation
= 5,
170 NetlogonNetworkTransitiveInformation
= 6,
171 NetlogonServiceTransitiveInformation
= 7
172 } netr_LogonInfoClass
;
174 typedef [public,switch_type(netr_LogonInfoClass
)] union {
175 [case(NetlogonInteractiveInformation
)] netr_PasswordInfo
*password
;
176 [case(NetlogonNetworkInformation
)] netr_NetworkInfo
*network
;
177 [case(NetlogonServiceInformation
)] netr_PasswordInfo
*password
;
178 [case(NetlogonGenericInformation
)] netr_GenericInfo
*generic
;
179 [case(NetlogonInteractiveTransitiveInformation
)] netr_PasswordInfo
*password
;
180 [case(NetlogonNetworkTransitiveInformation
)] netr_NetworkInfo
*network
;
181 [case(NetlogonServiceTransitiveInformation
)] netr_PasswordInfo
*password
;
184 typedef [public,flag
(NDR_PAHEX
)] struct {
186 } netr_UserSessionKey
;
188 typedef [public,flag
(NDR_PAHEX
)] struct {
192 /* Flags for user_flags below */
193 typedef [public,bitmap32bit
] bitmap
{
194 NETLOGON_GUEST
= 0x00000001,
195 NETLOGON_NOENCRYPTION
= 0x00000002,
196 NETLOGON_CACHED_ACCOUNT
= 0x00000004,
197 NETLOGON_USED_LM_PASSWORD
= 0x00000008,
198 NETLOGON_EXTRA_SIDS
= 0x00000020,
199 NETLOGON_SUBAUTH_SESSION_KEY
= 0x00000040,
200 NETLOGON_SERVER_TRUST_ACCOUNT
= 0x00000080,
201 NETLOGON_NTLMV2_ENABLED
= 0x00000100,
202 NETLOGON_RESOURCE_GROUPS
= 0x00000200,
203 NETLOGON_PROFILE_PATH_RETURNED
= 0x00000400,
204 NETLOGON_GRACE_LOGON
= 0x01000000
211 NTTIME last_password_change
;
212 NTTIME allow_password_change
;
213 NTTIME force_password_change
;
214 lsa_String account_name
;
215 lsa_String full_name
;
216 lsa_String logon_script
;
217 lsa_String profile_path
;
218 lsa_String home_directory
;
219 lsa_String home_drive
;
221 uint16 bad_password_count
;
224 samr_RidWithAttributeArray groups
;
225 netr_UserFlags user_flags
;
226 netr_UserSessionKey key
;
227 lsa_StringLarge logon_server
;
228 lsa_StringLarge domain
;
229 dom_sid2
*domain_sid
;
230 netr_LMSessionKey LMSessKey
;
231 samr_AcctFlags acct_flags
;
236 netr_SamBaseInfo base
;
241 samr_GroupAttrs attributes
;
244 typedef [public] struct {
245 netr_SamBaseInfo base
;
247 [size_is(sidcount
)] netr_SidAttr
*sids
;
251 netr_SamBaseInfo base
;
253 [size_is(sidcount
)] netr_SidAttr
*sids
;
255 lsa_String principle
;
261 [size_is(pac_size
)] uint8
*pac
;
262 lsa_String logon_domain
;
263 lsa_String logon_server
;
264 lsa_String principal_name
;
266 [size_is(auth_size
)] uint8
*auth
;
267 netr_UserSessionKey user_session_key
;
268 uint32 expansionroom
[10];
275 typedef [flag
(NDR_PAHEX
)] struct {
277 [size_is(length
)] uint8
*data
;
281 NetlogonValidationUasInfo
= 1,
282 NetlogonValidationSamInfo
= 2,
283 NetlogonValidationSamInfo2
= 3,
284 NetlogonValidationGenericInfo2
= 5,
285 NetlogonValidationSamInfo4
= 6
286 } netr_ValidationInfoClass
;
288 typedef [public,switch_type(uint16
)] union {
289 [case(NetlogonValidationSamInfo
)] netr_SamInfo2
*sam2
;
290 [case(NetlogonValidationSamInfo2
)] netr_SamInfo3
*sam3
;
291 [case(4)] netr_PacInfo
*pac
;
292 [case(NetlogonValidationGenericInfo2
)] netr_GenericInfo2
*generic
;
293 [case(NetlogonValidationSamInfo4
)] netr_SamInfo6
*sam6
;
296 typedef [public, flag
(NDR_PAHEX
)] struct {
300 typedef [public] struct {
301 netr_Credential cred
;
303 } netr_Authenticator
;
305 NTSTATUS netr_LogonSamLogon
(
306 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
307 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
308 [in,unique] netr_Authenticator
*credential
,
309 [in,out,unique] netr_Authenticator
*return_authenticator
,
310 [in] netr_LogonInfoClass logon_level
,
311 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
312 [in] uint16 validation_level
,
313 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
314 [out,ref] uint8
*authoritative
321 NTSTATUS netr_LogonSamLogoff
(
322 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
323 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
324 [in,unique] netr_Authenticator
*credential
,
325 [in,out,unique] netr_Authenticator
*return_authenticator
,
326 [in] netr_LogonInfoClass logon_level
,
327 [in] [switch_is(logon_level
)] netr_LogonLevel logon
335 [public] NTSTATUS netr_ServerReqChallenge
(
336 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
337 [in,string,charset
(UTF16
)] uint16
*computer_name
,
338 [in,ref] netr_Credential
*credentials
,
339 [out,ref] netr_Credential
*return_credentials
346 typedef enum netr_SchannelType netr_SchannelType
;
348 NTSTATUS netr_ServerAuthenticate
(
349 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
350 [in,string,charset
(UTF16
)] uint16
*account_name
,
351 [in] netr_SchannelType secure_channel_type
,
352 [in,string,charset
(UTF16
)] uint16
*computer_name
,
353 [in,ref] netr_Credential
*credentials
,
354 [out,ref] netr_Credential
*return_credentials
361 NTSTATUS netr_ServerPasswordSet
(
362 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
363 [in] [string,charset
(UTF16
)] uint16
*account_name
,
364 [in] netr_SchannelType secure_channel_type
,
365 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
366 [in,ref] netr_Authenticator
*credential
,
367 [out,ref] netr_Authenticator
*return_authenticator
,
368 [in,ref] samr_Password
*new_password
375 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
378 [string,charset
(UTF16
)] uint16
*account_name
;
387 } netr_DELTA_DELETE_USER
;
391 [value
(length
)] uint16 size
;
398 [value
(nt_length
)] uint16 nt_size
;
401 [value
(lm_length
)] uint16 lm_size
;
403 uint8 nt_history
[nt_length
];
404 uint8 lm_history
[lm_length
];
405 } netr_PasswordHistory
;
408 netr_USER_KEY16 lmpassword
;
409 netr_USER_KEY16 ntpassword
;
410 netr_PasswordHistory history
;
413 typedef struct { /* TODO: make this a union! */
414 netr_USER_KEYS2 keys2
;
415 } netr_USER_KEY_UNION
;
417 typedef [public] struct {
419 netr_USER_KEY_UNION keys
;
423 boolean8 SensitiveDataFlag
;
426 /* netr_USER_KEYS encrypted with the session key */
427 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
428 } netr_USER_PRIVATE_INFO
;
431 lsa_String account_name
;
432 lsa_String full_name
;
435 lsa_String home_directory
;
436 lsa_String home_drive
;
437 lsa_String logon_script
;
438 lsa_String description
;
439 lsa_String workstations
;
442 samr_LogonHours logon_hours
;
443 uint16 bad_password_count
;
445 NTTIME last_password_change
;
447 samr_AcctFlags acct_flags
;
448 samr_Password lmpassword
;
449 samr_Password ntpassword
;
450 boolean8 nt_password_present
;
451 boolean8 lm_password_present
;
452 boolean8 password_expired
;
454 lsa_BinaryString parameters
;
457 netr_USER_PRIVATE_INFO user_private_info
;
458 uint32 SecurityInformation
;
460 lsa_String profile_path
;
471 lsa_String domain_name
;
472 lsa_String oem_information
; /* comment */
473 dlong force_logoff_time
;
474 uint16 min_password_length
;
475 uint16 password_history_length
;
476 /* yes, these are signed. They are in negative 100ns */
477 dlong max_password_age
;
478 dlong min_password_age
;
480 NTTIME domain_create_time
;
481 uint32 SecurityInformation
;
483 lsa_BinaryString account_lockout
;
487 uint32 logon_to_chgpass
;
494 lsa_String group_name
;
497 lsa_String description
;
498 uint32 SecurityInformation
;
524 [size_is(num_rids
)] uint32
*rids
;
525 [size_is(num_rids
)] uint32
*attribs
;
531 } netr_DELTA_GROUP_MEMBER
;
534 lsa_String alias_name
;
536 uint32 SecurityInformation
;
538 lsa_String description
;
554 } netr_DELTA_ALIAS_MEMBER
;
557 uint32 pagedpoollimit
;
558 uint32 nonpagedpoollimit
;
559 uint32 minimumworkingsetsize
;
560 uint32 maximumworkingsetsize
;
561 uint32 pagefilelimit
;
567 NTTIME auditretentionperiod
;
568 boolean8 auditingmode
;
569 uint32 maxauditeventcount
;
570 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
571 lsa_String primary_domain_name
;
573 netr_QUOTA_LIMITS quota_limits
;
575 NTTIME db_create_time
;
576 uint32 SecurityInformation
;
589 lsa_String domain_name
;
590 uint32 num_controllers
;
591 [size_is(num_controllers
)] lsa_String
*controller_names
;
592 uint32 SecurityInformation
;
602 } netr_DELTA_TRUSTED_DOMAIN
;
606 } netr_DELTA_DELETE_TRUST
;
609 uint32 privilege_entries
;
610 uint32 privilege_control
;
611 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
612 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
613 netr_QUOTA_LIMITS quotalimits
;
615 uint32 SecurityInformation
;
625 } netr_DELTA_ACCOUNT
;
629 } netr_DELTA_DELETE_ACCOUNT
;
633 } netr_DELTA_DELETE_SECRET
;
638 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
642 netr_CIPHER_VALUE current_cipher
;
643 NTTIME current_cipher_set_time
;
644 netr_CIPHER_VALUE old_cipher
;
645 NTTIME old_cipher_set_time
;
646 uint32 SecurityInformation
;
659 NETR_DELTA_DOMAIN
= 1,
660 NETR_DELTA_GROUP
= 2,
661 NETR_DELTA_DELETE_GROUP
= 3,
662 NETR_DELTA_RENAME_GROUP
= 4,
664 NETR_DELTA_DELETE_USER
= 6,
665 NETR_DELTA_RENAME_USER
= 7,
666 NETR_DELTA_GROUP_MEMBER
= 8,
667 NETR_DELTA_ALIAS
= 9,
668 NETR_DELTA_DELETE_ALIAS
= 10,
669 NETR_DELTA_RENAME_ALIAS
= 11,
670 NETR_DELTA_ALIAS_MEMBER
= 12,
671 NETR_DELTA_POLICY
= 13,
672 NETR_DELTA_TRUSTED_DOMAIN
= 14,
673 NETR_DELTA_DELETE_TRUST
= 15,
674 NETR_DELTA_ACCOUNT
= 16,
675 NETR_DELTA_DELETE_ACCOUNT
= 17,
676 NETR_DELTA_SECRET
= 18,
677 NETR_DELTA_DELETE_SECRET
= 19,
678 NETR_DELTA_DELETE_GROUP2
= 20,
679 NETR_DELTA_DELETE_USER2
= 21,
680 NETR_DELTA_MODIFY_COUNT
= 22
683 typedef [switch_type(netr_DeltaEnum
)] union {
684 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
685 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
686 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
687 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
688 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
689 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
690 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
691 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
692 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
693 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
694 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
695 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
696 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
697 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
698 [case(NETR_DELTA_DELETE_TRUST
)] netr_DELTA_DELETE_TRUST delete_trust
;
699 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
700 [case(NETR_DELTA_DELETE_ACCOUNT
)] netr_DELTA_DELETE_ACCOUNT delete_account
;
701 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
702 [case(NETR_DELTA_DELETE_SECRET
)] netr_DELTA_DELETE_SECRET delete_secret
;
703 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
704 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
705 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
708 typedef [switch_type(netr_DeltaEnum
)] union {
709 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
710 [case(NETR_DELTA_GROUP
)] uint32 rid
;
711 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
712 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
713 [case(NETR_DELTA_USER
)] uint32 rid
;
714 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
715 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
716 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
717 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
718 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
719 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
720 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
721 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
722 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
723 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
724 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
725 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
726 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
727 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
728 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
729 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
730 [case(NETR_DELTA_MODIFY_COUNT
)] ;
731 } netr_DELTA_ID_UNION
;
734 netr_DeltaEnum delta_type
;
735 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
736 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
741 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
742 } netr_DELTA_ENUM_ARRAY
;
744 NTSTATUS netr_DatabaseDeltas
(
745 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
746 [in] [string,charset
(UTF16
)] uint16
*computername
,
747 [in,ref] netr_Authenticator
*credential
,
748 [in,out,ref] netr_Authenticator
*return_authenticator
,
749 [in] netr_SamDatabaseID database_id
,
750 [in,out,ref] udlong
*sequence_num
,
751 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
752 [in] uint32 preferredmaximumlength
759 NTSTATUS netr_DatabaseSync
(
760 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
761 [in] [string,charset
(UTF16
)] uint16
*computername
,
762 [in,ref] netr_Authenticator
*credential
,
763 [in,out,ref] netr_Authenticator
*return_authenticator
,
764 [in] netr_SamDatabaseID database_id
,
765 [in,out,ref] uint32
*sync_context
,
766 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
767 [in] uint32 preferredmaximumlength
774 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
776 typedef [flag
(NDR_PAHEX
)] struct {
777 uint8 computer_name
[16];
779 uint32 serial_number
;
783 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
784 } netr_AccountBuffer
;
786 NTSTATUS netr_AccountDeltas
(
787 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
788 [in] [string,charset
(UTF16
)] uint16
*computername
,
789 [in] netr_Authenticator credential
,
790 [in,out,ref] netr_Authenticator
*return_authenticator
,
791 [in] netr_UAS_INFO_0 uas
,
794 [in] uint32 buffersize
,
795 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
796 [out,ref] uint32
*count_returned
,
797 [out,ref] uint32
*total_entries
,
798 [out,ref] netr_UAS_INFO_0
*recordid
805 NTSTATUS netr_AccountSync
(
806 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
807 [in] [string,charset
(UTF16
)] uint16
*computername
,
808 [in] netr_Authenticator credential
,
809 [in,out,ref] netr_Authenticator
*return_authenticator
,
810 [in] uint32 reference
,
812 [in] uint32 buffersize
,
813 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
814 [out,ref] uint32
*count_returned
,
815 [out,ref] uint32
*total_entries
,
816 [out,ref] uint32
*next_reference
,
817 [in,out,ref] netr_UAS_INFO_0
*recordid
824 WERROR netr_GetDcName
(
825 [in] [string,charset
(UTF16
)] uint16
*logon_server
,
826 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
827 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
833 typedef [bitmap32bit
] bitmap
{
834 NETLOGON_CTRL_REPL_NEEDED
= 0x0001,
835 NETLOGON_CTRL_REPL_IN_PROGRESS
= 0x0002,
836 NETLOGON_CTRL_REPL_FULL_SYNC
= 0x0004
840 netr_InfoFlags flags
;
841 uint32 pdc_connection_status
;
842 } netr_NETLOGON_INFO_1
;
845 netr_InfoFlags flags
;
846 uint32 pdc_connection_status
;
847 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
848 uint32 tc_connection_status
;
849 } netr_NETLOGON_INFO_2
;
852 netr_InfoFlags flags
;
853 uint32 logon_attempts
;
859 } netr_NETLOGON_INFO_3
;
862 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
863 [string,charset
(UTF16
)] uint16
*trusted_domain_name
;
864 } netr_NETLOGON_INFO_4
;
867 [case(1)] netr_NETLOGON_INFO_1
*info1
;
868 [case(2)] netr_NETLOGON_INFO_2
*info2
;
869 [case(3)] netr_NETLOGON_INFO_3
*info3
;
870 [case(4)] netr_NETLOGON_INFO_4
*info4
;
871 } netr_CONTROL_QUERY_INFORMATION
;
873 /* function_code values */
874 typedef [v1_enum] enum {
875 NETLOGON_CONTROL_QUERY
= 0x00000001,
876 NETLOGON_CONTROL_REPLICATE
= 0x00000002,
877 NETLOGON_CONTROL_SYNCHRONIZE
= 0x00000003,
878 NETLOGON_CONTROL_PDC_REPLICATE
= 0x00000004,
879 NETLOGON_CONTROL_REDISCOVER
= 0x00000005,
880 NETLOGON_CONTROL_TC_QUERY
= 0x00000006,
881 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 0x00000007,
882 NETLOGON_CONTROL_FIND_USER
= 0x00000008,
883 NETLOGON_CONTROL_CHANGE_PASSWORD
= 0x00000009,
884 NETLOGON_CONTROL_TC_VERIFY
= 0x0000000A,
885 NETLOGON_CONTROL_FORCE_DNS_REG
= 0x0000000B,
886 NETLOGON_CONTROL_QUERY_DNS_REG
= 0x0000000C,
887 NETLOGON_CONTROL_BACKUP_CHANGE_LOG
= 0x0000FFFC,
888 NETLOGON_CONTROL_TRUNCATE_LOG
= 0x0000FFFD,
889 NETLOGON_CONTROL_SET_DBFLAG
= 0x0000FFFE,
890 NETLOGON_CONTROL_BREAKPOINT
= 0x0000FFFF
891 } netr_LogonControlCode
;
893 WERROR netr_LogonControl
(
894 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
895 [in] netr_LogonControlCode function_code
,
897 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
904 WERROR netr_GetAnyDCName
(
905 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
906 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
907 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
915 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
916 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
917 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
918 [case(NETLOGON_CONTROL_CHANGE_PASSWORD
)] [string,charset
(UTF16
)] uint16
*domain
;
919 [case(NETLOGON_CONTROL_TC_VERIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
920 [case(NETLOGON_CONTROL_FIND_USER
)] [string,charset
(UTF16
)] uint16
*user
;
921 [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
,
1045 [in] [subcontext
(4),subcontext_size
(change_log_entry_size
)] netr_ChangeLogEntry change_log_entry
,
1046 [in] [value
(ndr_size_netr_ChangeLogEntry
(&change_log_entry
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 change_log_entry_size
,
1047 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1054 WERROR netr_LogonControl2Ex
(
1055 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1056 [in] netr_LogonControlCode function_code
,
1058 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1059 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1066 [size_is(length
)] uint8
*data
;
1069 WERROR netr_NetrEnumerateTrustedDomains
(
1070 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1071 [out,ref] netr_Blob
*trusted_domains_blob
1077 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1079 const int DSGETDC_VALID_FLAGS
= (DS_FORCE_REDISCOVERY |
1080 DS_DIRECTORY_SERVICE_REQUIRED |
1081 DS_DIRECTORY_SERVICE_PREFERRED |
1082 DS_GC_SERVER_REQUIRED |
1084 DS_BACKGROUND_ONLY |
1087 DS_TIMESERV_REQUIRED |
1088 DS_WRITABLE_REQUIRED |
1089 DS_GOOD_TIMESERV_PREFERRED |
1091 DS_ONLY_LDAP_NEEDED |
1094 DS_RETURN_FLAT_NAME |
1095 DS_RETURN_DNS_NAME
);
1097 typedef [bitmap32bit
] bitmap
{
1098 DS_FORCE_REDISCOVERY
= 0x00000001,
1099 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
1100 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
1101 DS_GC_SERVER_REQUIRED
= 0x00000040,
1102 DS_PDC_REQUIRED
= 0x00000080,
1103 DS_BACKGROUND_ONLY
= 0x00000100,
1104 DS_IP_REQUIRED
= 0x00000200,
1105 DS_KDC_REQUIRED
= 0x00000400,
1106 DS_TIMESERV_REQUIRED
= 0x00000800,
1107 DS_WRITABLE_REQUIRED
= 0x00001000,
1108 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
1109 DS_AVOID_SELF
= 0x00004000,
1110 DS_ONLY_LDAP_NEEDED
= 0x00008000,
1111 DS_IS_FLAT_NAME
= 0x00010000,
1112 DS_IS_DNS_NAME
= 0x00020000,
1113 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
1114 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000,
1115 DS_RETURN_DNS_NAME
= 0x40000000,
1116 DS_RETURN_FLAT_NAME
= 0x80000000
1117 } netr_DsRGetDCName_flags
;
1119 typedef [v1_enum] enum {
1120 DS_ADDRESS_TYPE_INET
= 1,
1121 DS_ADDRESS_TYPE_NETBIOS
= 2
1122 } netr_DsRGetDCNameInfo_AddressType
;
1124 typedef [bitmap32bit
] bitmap
{
1125 DS_SERVER_PDC
= NBT_SERVER_PDC
,
1126 DS_SERVER_GC
= NBT_SERVER_GC
,
1127 DS_SERVER_LDAP
= NBT_SERVER_LDAP
,
1128 DS_SERVER_DS
= NBT_SERVER_DS
,
1129 DS_SERVER_KDC
= NBT_SERVER_KDC
,
1130 DS_SERVER_TIMESERV
= NBT_SERVER_TIMESERV
,
1131 DS_SERVER_CLOSEST
= NBT_SERVER_CLOSEST
,
1132 DS_SERVER_WRITABLE
= NBT_SERVER_WRITABLE
,
1133 DS_SERVER_GOOD_TIMESERV
= NBT_SERVER_GOOD_TIMESERV
,
1134 DS_SERVER_NDNC
= NBT_SERVER_NDNC
,
1135 DS_SERVER_SELECT_SECRET_DOMAIN_6
= NBT_SERVER_SELECT_SECRET_DOMAIN_6
,
1136 DS_SERVER_FULL_SECRET_DOMAIN_6
= NBT_SERVER_FULL_SECRET_DOMAIN_6
,
1137 DS_DNS_CONTROLLER
= 0x20000000,
1138 DS_DNS_DOMAIN
= 0x40000000,
1139 DS_DNS_FOREST
= 0x80000000
1142 typedef [public] struct {
1143 [string,charset
(UTF16
)] uint16
*dc_unc
;
1144 [string,charset
(UTF16
)] uint16
*dc_address
;
1145 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1147 [string,charset
(UTF16
)] uint16
*domain_name
;
1148 [string,charset
(UTF16
)] uint16
*forest_name
;
1149 netr_DsR_DcFlags dc_flags
;
1150 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1151 [string,charset
(UTF16
)] uint16
*client_site_name
;
1152 } netr_DsRGetDCNameInfo
;
1154 WERROR netr_DsRGetDCName
(
1155 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1156 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1157 [in,unique] GUID
*domain_guid
,
1158 [in,unique] GUID
*site_guid
,
1159 [in] netr_DsRGetDCName_flags flags
,
1160 [out,ref] netr_DsRGetDCNameInfo
**info
1165 typedef [switch_type(uint32
)] union {
1166 [case(1)] netr_NegotiateFlags server_capabilities
;
1167 } netr_Capabilities
;
1169 NTSTATUS netr_LogonGetCapabilities
(
1170 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1171 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1172 [in,ref] netr_Authenticator
*credential
,
1173 [in,out,ref] netr_Authenticator
*return_authenticator
,
1174 [in] uint32 query_level
,
1175 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1180 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1184 WERROR netr_LogonGetTrustRid
(
1185 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1186 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1187 [out,ref] uint32
*rid
1192 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1196 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1200 [public] NTSTATUS netr_ServerAuthenticate3
(
1201 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1202 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1203 [in] netr_SchannelType secure_channel_type
,
1204 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1205 [in,ref] netr_Credential
*credentials
,
1206 [out,ref] netr_Credential
*return_credentials
,
1207 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1208 [out,ref] uint32
*rid
1214 WERROR netr_DsRGetDCNameEx
(
1215 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1216 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1217 [in,unique] GUID
*domain_guid
,
1218 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1219 [in] netr_DsRGetDCName_flags flags
,
1220 [out,ref] netr_DsRGetDCNameInfo
**info
1226 WERROR netr_DsRGetSiteName
(
1227 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1228 [out,ref] [string,charset
(UTF16
)] uint16
**site
1233 typedef [bitmap32bit
] bitmap
{
1234 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1235 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1236 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1237 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1238 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1239 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1240 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1241 NETR_TRUST_FLAG_AES
= 0x00000100
1244 typedef [bitmap32bit
] bitmap
{
1245 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1246 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1247 } netr_WorkstationFlags
;
1249 typedef [bitmap16bit
] bitmap
{
1250 NETR_VER_SUITE_BACKOFFICE
= 0x0004,
1251 NETR_VER_SUITE_BLADE
= 0x0400,
1252 NETR_VER_SUITE_COMPUTE_SERVER
= 0x4000,
1253 NETR_VER_SUITE_DATACENTER
= 0x0080,
1254 NETR_VER_SUITE_ENTERPRISE
= 0x0002,
1255 NETR_VER_SUITE_EMBEDDEDNT
= 0x0040,
1256 NETR_VER_SUITE_PERSONAL
= 0x0200,
1257 NETR_VER_SUITE_SINGLEUSERTS
= 0x0100,
1258 NETR_VER_SUITE_SMALLBUSINESS
= 0x0001,
1259 NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED
= 0x0020,
1260 NETR_VER_SUITE_STORAGE_SERVER
= 0x2000,
1261 NETR_VER_SUITE_TERMINAL
= 0x0010,
1262 NETR_VER_SUITE_WH_SERVER
= 0x8000
1265 typedef [bitmap8bit
] bitmap
{
1266 NETR_VER_NT_DOMAIN_CONTROLLER
= 0x02,
1267 NETR_VER_NT_SERVER
= 0x03,
1268 NETR_VER_NT_WORKSTATION
= 0x01
1273 [size_is(policy_size
)] uint8
*policy
;
1274 } netr_LsaPolicyInformation
;
1277 [value
(284)] uint32 OSVersionInfoSize
;
1278 uint32 MajorVersion
;
1279 uint32 MinorVersion
;
1282 [charset
(UTF16
)] uint16 CSDVersion
[128];
1283 uint16 ServicePackMajor
;
1284 uint16 ServicePackMinor
;
1285 netr_SuiteMask SuiteMask
;
1286 netr_ProductType ProductType
;
1288 } netr_OsVersionInfoEx
;
1291 /* these first 3 values come from the fact windows
1292 actually encodes this structure as a UNICODE_STRING
1293 - see MS-NRPC section 2.2.1.3.9 */
1294 /* 142 * 2 = 284 (length of structure "netr_OsVersionInfoEx") */
1295 [value
(142)] uint32 length
;
1296 [value
(0)] uint32 dummy
;
1297 [value
(142)] uint32 size
;
1298 netr_OsVersionInfoEx os
;
1302 /* value is 284 when info != os, otherwise 0 (for length and
1304 [value
(os
== NULL ?
0 : 284)] uint16 length
;
1305 [value
(os
== NULL ?
0 : 284)] uint16 size
;
1307 } netr_OsVersionContainer
;
1310 netr_LsaPolicyInformation lsa_policy
;
1311 [string,charset
(UTF16
)] uint16
*dns_hostname
;
1312 [string,charset
(UTF16
)] uint16
*sitename
;
1313 [string,charset
(UTF16
)] uint16
*dummy1
;
1314 [string,charset
(UTF16
)] uint16
*dummy2
;
1315 [string,charset
(UTF16
)] uint16
*dummy3
;
1316 [string,charset
(UTF16
)] uint16
*dummy4
;
1317 netr_OsVersionContainer os_version
;
1319 lsa_String dummy_string3
;
1320 lsa_String dummy_string4
;
1321 netr_WorkstationFlags workstation_flags
;
1325 } netr_WorkstationInformation
;
1328 [case(1)] netr_WorkstationInformation
*workstation_info
;
1329 [case(2)] netr_WorkstationInformation
*lsa_policy_info
;
1330 } netr_WorkstationInfo
;
1333 /* these first 3 values come from the fact windows
1334 actually encodes this structure as a UNICODE_STRING
1335 - see MS-NRPC section 2.2.1.3.9 */
1336 [value
(8)] uint32 length
;
1337 [value
(0)] uint32 dummy
;
1338 [value
(8)] uint32 size
;
1339 netr_TrustFlags flags
;
1340 uint32 parent_index
;
1342 uint32 trust_attributes
;
1343 } netr_trust_extension
;
1346 uint16 length
; /* value is 16 when info != NULL, otherwise 0 */
1347 [value
(length
)] uint16 size
; /* value is 16 when info != NULL, otherwise 0 */
1348 netr_trust_extension
*info
;
1349 } netr_trust_extension_container
;
1352 lsa_String domainname
;
1353 lsa_String dns_domainname
;
1354 lsa_String dns_forestname
;
1356 dom_sid2
*domain_sid
;
1357 netr_trust_extension_container trust_extension
;
1358 lsa_String dummy_string2
;
1359 lsa_String dummy_string3
;
1360 lsa_String dummy_string4
;
1365 } netr_OneDomainInfo
;
1368 netr_OneDomainInfo primary_domain
;
1369 uint32 trusted_domain_count
;
1370 [size_is(trusted_domain_count
)] netr_OneDomainInfo
*trusted_domains
;
1371 netr_LsaPolicyInformation lsa_policy
;
1372 lsa_String dns_hostname
;
1373 lsa_String dummy_string2
;
1374 lsa_String dummy_string3
;
1375 lsa_String dummy_string4
;
1376 netr_WorkstationFlags workstation_flags
;
1377 uint32 supported_enc_types
;
1380 } netr_DomainInformation
;
1383 [case(1)] netr_DomainInformation
*domain_info
;
1384 [case(2)] netr_LsaPolicyInformation
*lsa_policy_info
;
1387 NTSTATUS netr_LogonGetDomainInfo
(
1388 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1389 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1390 [in,ref] netr_Authenticator
*credential
,
1391 [in,out,ref] netr_Authenticator
*return_authenticator
,
1393 [in,ref,switch_is(level
)] netr_WorkstationInfo
*query
,
1394 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1399 typedef [flag
(NDR_PAHEX
)] struct {
1402 } netr_CryptPassword
;
1404 NTSTATUS netr_ServerPasswordSet2
(
1405 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1406 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1407 [in] netr_SchannelType secure_channel_type
,
1408 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1409 [in,ref] netr_Authenticator
*credential
,
1410 [out,ref] netr_Authenticator
*return_authenticator
,
1411 [in,ref] netr_CryptPassword
*new_password
1416 WERROR netr_ServerPasswordGet
(
1417 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1418 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1419 [in] netr_SchannelType secure_channel_type
,
1420 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1421 [in,ref] netr_Authenticator
*credential
,
1422 [out,ref] netr_Authenticator
*return_authenticator
,
1423 [out,ref] samr_Password
*password
1428 [todo
] WERROR netr_NETRLOGONSENDTOSAM
();
1434 [size_is(count
)] lsa_String
*sitename
;
1435 } netr_DsRAddressToSitenamesWCtr
;
1438 [size_is(size
)] uint8
*buffer
;
1442 WERROR netr_DsRAddressToSitenamesW
(
1443 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1444 [in] [range(0,32000)] uint32 count
,
1445 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1446 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1451 WERROR netr_DsRGetDCNameEx2
(
1452 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1453 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1454 [in] samr_AcctFlags mask
,
1455 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1456 [in,unique] GUID
*domain_guid
,
1457 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1458 [in] netr_DsRGetDCName_flags flags
,
1459 [out,ref] netr_DsRGetDCNameInfo
**info
1464 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1469 typedef [v1_enum] enum {
1470 NETR_TRUST_TYPE_DOWNLEVEL
= 1,
1471 NETR_TRUST_TYPE_UPLEVEL
= 2,
1472 NETR_TRUST_TYPE_MIT
= 3,
1473 NETR_TRUST_TYPE_DCE
= 4
1476 typedef [bitmap32bit
] bitmap
{
1477 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
1478 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
1479 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
1480 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
1481 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
1482 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
1483 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040
1484 } netr_TrustAttributes
;
1487 [string,charset
(UTF16
)] uint16
*netbios_name
;
1488 [string,charset
(UTF16
)] uint16
*dns_name
;
1489 netr_TrustFlags trust_flags
;
1490 uint32 parent_index
;
1491 netr_TrustType trust_type
;
1492 netr_TrustAttributes trust_attributes
;
1499 [size_is(count
)] netr_DomainTrust
*array
;
1500 } netr_DomainTrustList
;
1502 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1503 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1504 [out,ref] netr_DomainTrustList
*dom_trust_list
1511 [size_is(count
)] lsa_String
*sitename
;
1512 [size_is(count
)] lsa_String
*subnetname
;
1513 } netr_DsRAddressToSitenamesExWCtr
;
1515 WERROR netr_DsRAddressToSitenamesExW
(
1516 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1517 [in] [range(0,32000)] uint32 count
,
1518 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1519 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1527 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1530 WERROR netr_DsrGetDcSiteCoverageW
(
1531 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1532 [out,ref] DcSitesCtr
**ctr
1537 NTSTATUS netr_LogonSamLogonEx
(
1538 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1539 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1540 [in] netr_LogonInfoClass logon_level
,
1541 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1542 [in] uint16 validation_level
,
1543 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1544 [out,ref] uint8
*authoritative
,
1545 [in,out,ref] uint32
*flags
1551 WERROR netr_DsrEnumerateDomainTrusts
(
1552 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1553 [in] netr_TrustFlags trust_flags
,
1554 [out,ref] netr_DomainTrustList
*trusts
1560 WERROR netr_DsrDeregisterDNSHostRecords
(
1561 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1562 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1563 [in,unique] GUID
*domain_guid
,
1564 [in,unique] GUID
*dsa_guid
,
1565 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1570 NTSTATUS netr_ServerTrustPasswordsGet
(
1571 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1572 [in] [string,charset
(UTF16
)] uint16
*account_name
,
1573 [in] netr_SchannelType secure_channel_type
,
1574 [in] [string,charset
(UTF16
)] uint16
*computer_name
,
1575 [in,ref] netr_Authenticator
*credential
,
1576 [out,ref] netr_Authenticator
*return_authenticator
,
1577 [out,ref] samr_Password
*password
,
1578 [out,ref] samr_Password
*password2
1584 const int DS_GFTI_UPDATE_TDO
= 0x1;
1586 WERROR netr_DsRGetForestTrustInformation
(
1587 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1588 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1590 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1595 WERROR netr_GetForestTrustInformation
(
1596 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1597 [in,ref] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1598 [in,ref] netr_Authenticator
*credential
,
1599 [out,ref] netr_Authenticator
*return_authenticator
,
1601 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1607 /* this is the ADS varient. I don't yet know what the "flags" are for */
1608 NTSTATUS netr_LogonSamLogonWithFlags
(
1609 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1610 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1611 [in,unique] netr_Authenticator
*credential
,
1612 [in,out,unique] netr_Authenticator
*return_authenticator
,
1613 [in] netr_LogonInfoClass logon_level
,
1614 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1615 [in] uint16 validation_level
,
1616 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1617 [out,ref] uint8
*authoritative
,
1618 [in,out,ref] uint32
*flags
1626 [size_is(count
)] uint32
*data
;
1628 [size_is(count
)] lsa_String
*entries
;
1631 NTSTATUS netr_ServerGetTrustInfo
(
1632 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1633 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1634 [in] netr_SchannelType secure_channel_type
,
1635 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1636 [in,ref] netr_Authenticator
*credential
,
1637 [out,ref] netr_Authenticator
*return_authenticator
,
1638 [out,ref] samr_Password
*new_owf_password
,
1639 [out,ref] samr_Password
*old_owf_password
,
1640 [out,ref] netr_TrustInfo
**trust_info