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_ALLOW_SERVER_TRUST_ACCOUNT
= 0x00000020,
112 MSV1_0_RETURN_PROFILE_PATH
= 0x00000200,
113 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
= 0x00000800
114 } netr_LogonParameterControl
;
117 lsa_String domain_name
;
118 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
120 uint32 logon_id_high
;
121 lsa_String account_name
;
122 lsa_String workstation
;
126 netr_IdentityInfo identity_info
;
127 samr_Password lmpassword
;
128 samr_Password ntpassword
;
131 typedef [flag
(NDR_PAHEX
)] struct {
133 [value
(length
)] uint16 size
;
134 [size_is(length
),length_is(length
)] uint8
*data
;
135 } netr_ChallengeResponse
;
137 typedef [flag
(NDR_PAHEX
)] struct {
138 netr_IdentityInfo identity_info
;
140 netr_ChallengeResponse nt
;
141 netr_ChallengeResponse lm
;
144 typedef [flag
(NDR_PAHEX
)] struct {
145 netr_IdentityInfo identity_info
;
146 lsa_String package_name
;
148 [size_is(length
)] uint8
*data
;
152 NetlogonInteractiveInformation
= 1,
153 NetlogonNetworkInformation
= 2,
154 NetlogonServiceInformation
= 3,
155 NetlogonGenericInformation
= 4,
156 NetlogonInteractiveTransitiveInformation
= 5,
157 NetlogonNetworkTransitiveInformation
= 6,
158 NetlogonServiceTransitiveInformation
= 7
159 } netr_LogonInfoClass
;
161 typedef [public,switch_type(netr_LogonInfoClass
)] union {
162 [case(NetlogonInteractiveInformation
)] netr_PasswordInfo
*password
;
163 [case(NetlogonNetworkInformation
)] netr_NetworkInfo
*network
;
164 [case(NetlogonServiceInformation
)] netr_PasswordInfo
*password
;
165 [case(NetlogonGenericInformation
)] netr_GenericInfo
*generic
;
166 [case(NetlogonInteractiveTransitiveInformation
)] netr_PasswordInfo
*password
;
167 [case(NetlogonNetworkTransitiveInformation
)] netr_NetworkInfo
*network
;
168 [case(NetlogonServiceTransitiveInformation
)] netr_PasswordInfo
*password
;
171 typedef [public,flag
(NDR_PAHEX
)] struct {
173 } netr_UserSessionKey
;
175 typedef [public,flag
(NDR_PAHEX
)] struct {
179 /* Flags for user_flags below */
180 typedef [public,bitmap32bit
] bitmap
{
181 NETLOGON_GUEST
= 0x00000001,
182 NETLOGON_NOENCRYPTION
= 0x00000002,
183 NETLOGON_CACHED_ACCOUNT
= 0x00000004,
184 NETLOGON_USED_LM_PASSWORD
= 0x00000008,
185 NETLOGON_EXTRA_SIDS
= 0x00000020,
186 NETLOGON_SUBAUTH_SESSION_KEY
= 0x00000040,
187 NETLOGON_SERVER_TRUST_ACCOUNT
= 0x00000080,
188 NETLOGON_NTLMV2_ENABLED
= 0x00000100,
189 NETLOGON_RESOURCE_GROUPS
= 0x00000200,
190 NETLOGON_PROFILE_PATH_RETURNED
= 0x00000400,
191 NETLOGON_GRACE_LOGON
= 0x01000000
198 NTTIME last_password_change
;
199 NTTIME allow_password_change
;
200 NTTIME force_password_change
;
201 lsa_String account_name
;
202 lsa_String full_name
;
203 lsa_String logon_script
;
204 lsa_String profile_path
;
205 lsa_String home_directory
;
206 lsa_String home_drive
;
208 uint16 bad_password_count
;
211 samr_RidWithAttributeArray groups
;
212 netr_UserFlags user_flags
;
213 netr_UserSessionKey key
;
214 lsa_StringLarge logon_server
;
215 lsa_StringLarge domain
;
216 dom_sid2
*domain_sid
;
217 netr_LMSessionKey LMSessKey
;
218 samr_AcctFlags acct_flags
;
223 netr_SamBaseInfo base
;
228 samr_GroupAttrs attributes
;
231 typedef [public] struct {
232 netr_SamBaseInfo base
;
234 [size_is(sidcount
)] netr_SidAttr
*sids
;
238 netr_SamBaseInfo base
;
240 [size_is(sidcount
)] netr_SidAttr
*sids
;
242 lsa_String principle
;
248 [size_is(pac_size
)] uint8
*pac
;
249 lsa_String logon_domain
;
250 lsa_String logon_server
;
251 lsa_String principal_name
;
253 [size_is(auth_size
)] uint8
*auth
;
254 netr_UserSessionKey user_session_key
;
255 uint32 expansionroom
[10];
262 typedef [flag
(NDR_PAHEX
)] struct {
264 [size_is(length
)] uint8
*data
;
268 NetlogonValidationUasInfo
= 1,
269 NetlogonValidationSamInfo
= 2,
270 NetlogonValidationSamInfo2
= 3,
271 NetlogonValidationGenericInfo2
= 5,
272 NetlogonValidationSamInfo4
= 6
273 } netr_ValidationInfoClass
;
275 typedef [public,switch_type(uint16
)] union {
276 [case(NetlogonValidationSamInfo
)] netr_SamInfo2
*sam2
;
277 [case(NetlogonValidationSamInfo2
)] netr_SamInfo3
*sam3
;
278 [case(4)] netr_PacInfo
*pac
;
279 [case(NetlogonValidationGenericInfo2
)] netr_GenericInfo2
*generic
;
280 [case(NetlogonValidationSamInfo4
)] netr_SamInfo6
*sam6
;
283 typedef [public, flag
(NDR_PAHEX
)] struct {
287 typedef [public] struct {
288 netr_Credential cred
;
290 } netr_Authenticator
;
292 NTSTATUS netr_LogonSamLogon
(
293 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
294 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
295 [in,unique] netr_Authenticator
*credential
,
296 [in,out,unique] netr_Authenticator
*return_authenticator
,
297 [in] netr_LogonInfoClass logon_level
,
298 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
299 [in] uint16 validation_level
,
300 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
301 [out,ref] uint8
*authoritative
308 NTSTATUS netr_LogonSamLogoff
(
309 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
310 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
311 [in,unique] netr_Authenticator
*credential
,
312 [in,out,unique] netr_Authenticator
*return_authenticator
,
313 [in] netr_LogonInfoClass logon_level
,
314 [in] [switch_is(logon_level
)] netr_LogonLevel logon
322 [public] NTSTATUS netr_ServerReqChallenge
(
323 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
324 [in,string,charset
(UTF16
)] uint16 computer_name
[],
325 [in,ref] netr_Credential
*credentials
,
326 [out,ref] netr_Credential
*return_credentials
333 typedef enum netr_SchannelType netr_SchannelType
;
335 NTSTATUS netr_ServerAuthenticate
(
336 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
337 [in,string,charset
(UTF16
)] uint16 account_name
[],
338 [in] netr_SchannelType secure_channel_type
,
339 [in,string,charset
(UTF16
)] uint16 computer_name
[],
340 [in,ref] netr_Credential
*credentials
,
341 [out,ref] netr_Credential
*return_credentials
348 NTSTATUS netr_ServerPasswordSet
(
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_Authenticator
*credential
,
354 [out,ref] netr_Authenticator
*return_authenticator
,
355 [in,ref] samr_Password
*new_password
362 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
365 [string,charset
(UTF16
)] uint16
*account_name
;
374 } netr_DELTA_DELETE_USER
;
378 [value
(length
)] uint16 size
;
385 [value
(nt_length
)] uint16 nt_size
;
388 [value
(lm_length
)] uint16 lm_size
;
390 uint8 nt_history
[nt_length
];
391 uint8 lm_history
[lm_length
];
392 } netr_PasswordHistory
;
395 netr_USER_KEY16 lmpassword
;
396 netr_USER_KEY16 ntpassword
;
397 netr_PasswordHistory history
;
400 typedef struct { /* TODO: make this a union! */
401 netr_USER_KEYS2 keys2
;
402 } netr_USER_KEY_UNION
;
404 typedef [public] struct {
406 netr_USER_KEY_UNION keys
;
410 boolean8 SensitiveDataFlag
;
413 /* netr_USER_KEYS encrypted with the session key */
414 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
415 } netr_USER_PRIVATE_INFO
;
418 lsa_String account_name
;
419 lsa_String full_name
;
422 lsa_String home_directory
;
423 lsa_String home_drive
;
424 lsa_String logon_script
;
425 lsa_String description
;
426 lsa_String workstations
;
429 samr_LogonHours logon_hours
;
430 uint16 bad_password_count
;
432 NTTIME last_password_change
;
434 samr_AcctFlags acct_flags
;
435 samr_Password lmpassword
;
436 samr_Password ntpassword
;
437 boolean8 nt_password_present
;
438 boolean8 lm_password_present
;
439 boolean8 password_expired
;
441 lsa_BinaryString parameters
;
444 netr_USER_PRIVATE_INFO user_private_info
;
445 uint32 SecurityInformation
;
447 lsa_String profile_path
;
458 lsa_String domain_name
;
459 lsa_String oem_information
; /* comment */
460 dlong force_logoff_time
;
461 uint16 min_password_length
;
462 uint16 password_history_length
;
463 /* yes, these are signed. They are in negative 100ns */
464 dlong max_password_age
;
465 dlong min_password_age
;
467 NTTIME domain_create_time
;
468 uint32 SecurityInformation
;
470 lsa_BinaryString account_lockout
;
474 uint32 logon_to_chgpass
;
481 lsa_String group_name
;
484 lsa_String description
;
485 uint32 SecurityInformation
;
511 [size_is(num_rids
)] uint32
*rids
;
512 [size_is(num_rids
)] uint32
*attribs
;
518 } netr_DELTA_GROUP_MEMBER
;
521 lsa_String alias_name
;
523 uint32 SecurityInformation
;
525 lsa_String description
;
541 } netr_DELTA_ALIAS_MEMBER
;
544 uint32 pagedpoollimit
;
545 uint32 nonpagedpoollimit
;
546 uint32 minimumworkingsetsize
;
547 uint32 maximumworkingsetsize
;
548 uint32 pagefilelimit
;
554 NTTIME auditretentionperiod
;
555 boolean8 auditingmode
;
556 uint32 maxauditeventcount
;
557 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
558 lsa_String primary_domain_name
;
560 netr_QUOTA_LIMITS quota_limits
;
562 NTTIME db_create_time
;
563 uint32 SecurityInformation
;
576 lsa_String domain_name
;
577 uint32 num_controllers
;
578 [size_is(num_controllers
)] lsa_String
*controller_names
;
579 uint32 SecurityInformation
;
589 } netr_DELTA_TRUSTED_DOMAIN
;
593 } netr_DELTA_DELETE_TRUST
;
596 uint32 privilege_entries
;
597 uint32 privilege_control
;
598 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
599 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
600 netr_QUOTA_LIMITS quotalimits
;
602 uint32 SecurityInformation
;
612 } netr_DELTA_ACCOUNT
;
616 } netr_DELTA_DELETE_ACCOUNT
;
620 } netr_DELTA_DELETE_SECRET
;
625 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
629 netr_CIPHER_VALUE current_cipher
;
630 NTTIME current_cipher_set_time
;
631 netr_CIPHER_VALUE old_cipher
;
632 NTTIME old_cipher_set_time
;
633 uint32 SecurityInformation
;
646 NETR_DELTA_DOMAIN
= 1,
647 NETR_DELTA_GROUP
= 2,
648 NETR_DELTA_DELETE_GROUP
= 3,
649 NETR_DELTA_RENAME_GROUP
= 4,
651 NETR_DELTA_DELETE_USER
= 6,
652 NETR_DELTA_RENAME_USER
= 7,
653 NETR_DELTA_GROUP_MEMBER
= 8,
654 NETR_DELTA_ALIAS
= 9,
655 NETR_DELTA_DELETE_ALIAS
= 10,
656 NETR_DELTA_RENAME_ALIAS
= 11,
657 NETR_DELTA_ALIAS_MEMBER
= 12,
658 NETR_DELTA_POLICY
= 13,
659 NETR_DELTA_TRUSTED_DOMAIN
= 14,
660 NETR_DELTA_DELETE_TRUST
= 15,
661 NETR_DELTA_ACCOUNT
= 16,
662 NETR_DELTA_DELETE_ACCOUNT
= 17,
663 NETR_DELTA_SECRET
= 18,
664 NETR_DELTA_DELETE_SECRET
= 19,
665 NETR_DELTA_DELETE_GROUP2
= 20,
666 NETR_DELTA_DELETE_USER2
= 21,
667 NETR_DELTA_MODIFY_COUNT
= 22
670 typedef [switch_type(netr_DeltaEnum
)] union {
671 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
672 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
673 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
674 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
675 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
676 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
677 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
678 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
679 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
680 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
681 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
682 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
683 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
684 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
685 [case(NETR_DELTA_DELETE_TRUST
)] netr_DELTA_DELETE_TRUST delete_trust
;
686 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
687 [case(NETR_DELTA_DELETE_ACCOUNT
)] netr_DELTA_DELETE_ACCOUNT delete_account
;
688 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
689 [case(NETR_DELTA_DELETE_SECRET
)] netr_DELTA_DELETE_SECRET delete_secret
;
690 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
691 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
692 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
695 typedef [switch_type(netr_DeltaEnum
)] union {
696 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
697 [case(NETR_DELTA_GROUP
)] uint32 rid
;
698 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
699 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
700 [case(NETR_DELTA_USER
)] uint32 rid
;
701 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
702 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
703 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
704 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
705 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
706 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
707 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
708 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
709 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
710 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
711 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
712 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
713 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
714 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
715 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
716 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
717 [case(NETR_DELTA_MODIFY_COUNT
)] ;
718 } netr_DELTA_ID_UNION
;
721 netr_DeltaEnum delta_type
;
722 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
723 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
728 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
729 } netr_DELTA_ENUM_ARRAY
;
732 NTSTATUS netr_DatabaseDeltas
(
733 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
734 [in] [string,charset
(UTF16
)] uint16 computername
[],
735 [in,ref] netr_Authenticator
*credential
,
736 [in,out,ref] netr_Authenticator
*return_authenticator
,
737 [in] netr_SamDatabaseID database_id
,
738 [in,out,ref] udlong
*sequence_num
,
739 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
740 [in] uint32 preferredmaximumlength
747 NTSTATUS netr_DatabaseSync
(
748 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
749 [in] [string,charset
(UTF16
)] uint16 computername
[],
750 [in,ref] netr_Authenticator
*credential
,
751 [in,out,ref] netr_Authenticator
*return_authenticator
,
752 [in] netr_SamDatabaseID database_id
,
753 [in,out,ref] uint32
*sync_context
,
754 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
755 [in] uint32 preferredmaximumlength
762 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
764 typedef [flag
(NDR_PAHEX
)] struct {
765 uint8 computer_name
[16];
767 uint32 serial_number
;
771 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
772 } netr_AccountBuffer
;
774 NTSTATUS netr_AccountDeltas
(
775 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
776 [in] [string,charset
(UTF16
)] uint16 computername
[],
777 [in] netr_Authenticator credential
,
778 [in,out,ref] netr_Authenticator
*return_authenticator
,
779 [in] netr_UAS_INFO_0 uas
,
782 [in] uint32 buffersize
,
783 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
784 [out,ref] uint32
*count_returned
,
785 [out,ref] uint32
*total_entries
,
786 [out,ref] netr_UAS_INFO_0
*recordid
793 NTSTATUS netr_AccountSync
(
794 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
795 [in] [string,charset
(UTF16
)] uint16 computername
[],
796 [in] netr_Authenticator credential
,
797 [in,out,ref] netr_Authenticator
*return_authenticator
,
798 [in] uint32 reference
,
800 [in] uint32 buffersize
,
801 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
802 [out,ref] uint32
*count_returned
,
803 [out,ref] uint32
*total_entries
,
804 [out,ref] uint32
*next_reference
,
805 [in,out,ref] netr_UAS_INFO_0
*recordid
812 WERROR netr_GetDcName
(
813 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
814 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
815 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
821 typedef [bitmap32bit
] bitmap
{
822 NETLOGON_CTRL_REPL_NEEDED
= 0x0001,
823 NETLOGON_CTRL_REPL_IN_PROGRESS
= 0x0002,
824 NETLOGON_CTRL_REPL_FULL_SYNC
= 0x0004
828 netr_InfoFlags flags
;
829 uint32 pdc_connection_status
;
830 } netr_NETLOGON_INFO_1
;
833 netr_InfoFlags flags
;
834 uint32 pdc_connection_status
;
835 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
836 uint32 tc_connection_status
;
837 } netr_NETLOGON_INFO_2
;
840 netr_InfoFlags flags
;
841 uint32 logon_attempts
;
847 } netr_NETLOGON_INFO_3
;
850 [string,charset
(UTF16
)] uint16
*trusted_dc_name
;
851 [string,charset
(UTF16
)] uint16
*trusted_domain_name
;
852 } netr_NETLOGON_INFO_4
;
855 [case(1)] netr_NETLOGON_INFO_1
*info1
;
856 [case(2)] netr_NETLOGON_INFO_2
*info2
;
857 [case(3)] netr_NETLOGON_INFO_3
*info3
;
858 [case(4)] netr_NETLOGON_INFO_4
*info4
;
859 } netr_CONTROL_QUERY_INFORMATION
;
861 /* function_code values */
862 typedef [v1_enum] enum {
863 NETLOGON_CONTROL_QUERY
= 0x00000001,
864 NETLOGON_CONTROL_REPLICATE
= 0x00000002,
865 NETLOGON_CONTROL_SYNCHRONIZE
= 0x00000003,
866 NETLOGON_CONTROL_PDC_REPLICATE
= 0x00000004,
867 NETLOGON_CONTROL_REDISCOVER
= 0x00000005,
868 NETLOGON_CONTROL_TC_QUERY
= 0x00000006,
869 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 0x00000007,
870 NETLOGON_CONTROL_FIND_USER
= 0x00000008,
871 NETLOGON_CONTROL_CHANGE_PASSWORD
= 0x00000009,
872 NETLOGON_CONTROL_TC_VERIFY
= 0x0000000A,
873 NETLOGON_CONTROL_FORCE_DNS_REG
= 0x0000000B,
874 NETLOGON_CONTROL_QUERY_DNS_REG
= 0x0000000C,
875 NETLOGON_CONTROL_BACKUP_CHANGE_LOG
= 0x0000FFFC,
876 NETLOGON_CONTROL_TRUNCATE_LOG
= 0x0000FFFD,
877 NETLOGON_CONTROL_SET_DBFLAG
= 0x0000FFFE,
878 NETLOGON_CONTROL_BREAKPOINT
= 0x0000FFFF
879 } netr_LogonControlCode
;
881 WERROR netr_LogonControl
(
882 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
883 [in] netr_LogonControlCode function_code
,
885 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*info
892 WERROR netr_GetAnyDCName
(
893 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
894 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
895 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
903 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
904 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
905 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
906 [case(NETLOGON_CONTROL_CHANGE_PASSWORD
)] [string,charset
(UTF16
)] uint16
*domain
;
907 [case(NETLOGON_CONTROL_TC_VERIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
908 [case(NETLOGON_CONTROL_FIND_USER
)] [string,charset
(UTF16
)] uint16
*user
;
909 [case(NETLOGON_CONTROL_SET_DBFLAG
)] uint32 debug_level
;
910 } netr_CONTROL_DATA_INFORMATION
;
912 WERROR netr_LogonControl2
(
913 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
914 [in] netr_LogonControlCode function_code
,
916 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
917 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
921 /* If NETLOGON_NEG_ARCFOUR flag is not set, then the passwords and LM
922 * session keys are encrypted with DES calls. (And the user session key
928 typedef [bitmap32bit
] bitmap
{
929 NETLOGON_NEG_ACCOUNT_LOCKOUT
= 0x00000001,
930 NETLOGON_NEG_PERSISTENT_SAMREPL
= 0x00000002,
931 NETLOGON_NEG_ARCFOUR
= 0x00000004,
932 NETLOGON_NEG_PROMOTION_COUNT
= 0x00000008,
933 NETLOGON_NEG_CHANGELOG_BDC
= 0x00000010,
934 NETLOGON_NEG_FULL_SYNC_REPL
= 0x00000020,
935 NETLOGON_NEG_MULTIPLE_SIDS
= 0x00000040,
936 NETLOGON_NEG_REDO
= 0x00000080,
937 NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL
= 0x00000100,
938 NETLOGON_NEG_SEND_PASSWORD_INFO_PDC
= 0x00000200,
939 NETLOGON_NEG_GENERIC_PASSTHROUGH
= 0x00000400,
940 NETLOGON_NEG_CONCURRENT_RPC
= 0x00000800,
941 NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL
= 0x00001000,
942 NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL
= 0x00002000,
943 NETLOGON_NEG_STRONG_KEYS
= 0x00004000,
944 NETLOGON_NEG_TRANSITIVE_TRUSTS
= 0x00008000,
945 NETLOGON_NEG_DNS_DOMAIN_TRUSTS
= 0x00010000,
946 NETLOGON_NEG_PASSWORD_SET2
= 0x00020000,
947 NETLOGON_NEG_GETDOMAININFO
= 0x00040000,
948 NETLOGON_NEG_CROSS_FOREST_TRUSTS
= 0x00080000,
949 NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION
= 0x00100000,
950 NETLOGON_NEG_RODC_PASSTHROUGH
= 0x00200000,
951 NETLOGON_NEG_SUPPORTS_AES_SHA2
= 0x00400000,
952 NETLOGON_NEG_AUTHENTICATED_RPC_LSASS
= 0x20000000,
953 NETLOGON_NEG_AUTHENTICATED_RPC
= 0x40000000
954 } netr_NegotiateFlags
;
956 const uint32 NETLOGON_NEG_128BIT
= NETLOGON_NEG_STRONG_KEYS
;
957 const uint32 NETLOGON_NEG_SCHANNEL
= NETLOGON_NEG_AUTHENTICATED_RPC
;
959 NTSTATUS netr_ServerAuthenticate2
(
960 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
961 [in] [string,charset
(UTF16
)] uint16 account_name
[],
962 [in] netr_SchannelType secure_channel_type
,
963 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
964 [in,ref] netr_Credential
*credentials
,
965 [out,ref] netr_Credential
*return_credentials
,
966 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
973 NTSTATUS netr_DatabaseSync2
(
974 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
975 [in] [string,charset
(UTF16
)] uint16 computername
[],
976 [in,ref] netr_Authenticator
*credential
,
977 [in,out,ref] netr_Authenticator
*return_authenticator
,
978 [in] netr_SamDatabaseID database_id
,
979 [in] uint16 restart_state
,
980 [in,out,ref] uint32
*sync_context
,
981 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
982 [in] uint32 preferredmaximumlength
989 /* i'm not at all sure how this call works */
991 typedef [bitmap16bit
] bitmap
{
992 NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED
= 0x0001,
993 NETR_CHANGELOG_CHANGED_PASSWORD
= 0x0002,
994 NETR_CHANGELOG_SID_INCLUDED
= 0x0004,
995 NETR_CHANGELOG_NAME_INCLUDED
= 0x0008,
996 NETR_CHANGELOG_FIRST_PROMOTION_OBJ
= 0x0010
997 } netr_ChangeLogFlags
;
999 typedef [nodiscriminant
] union {
1000 [case(NETR_CHANGELOG_SID_INCLUDED
)] dom_sid object_sid
;
1001 [case(NETR_CHANGELOG_NAME_INCLUDED
)] nstring object_name
;
1003 } netr_ChangeLogObject
;
1005 typedef [public,gensize
] struct {
1006 uint32 serial_number1
;
1007 uint32 serial_number2
;
1009 netr_ChangeLogFlags flags
;
1010 netr_SamDatabaseID8Bit db_index
;
1011 netr_DeltaEnum8Bit delta_type
;
1012 [switch_is(flags
& (NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED
))] netr_ChangeLogObject
object;
1013 } netr_ChangeLogEntry
;
1015 NTSTATUS netr_DatabaseRedo
(
1016 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
1017 [in] [string,charset
(UTF16
)] uint16 computername
[],
1018 [in] netr_Authenticator
*credential
,
1019 [in,out,ref] netr_Authenticator
*return_authenticator
,
1020 [in] [subcontext
(4),subcontext_size
(change_log_entry_size
)] netr_ChangeLogEntry change_log_entry
,
1021 [in] [value
(ndr_size_netr_ChangeLogEntry
(&change_log_entry
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 change_log_entry_size
,
1022 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
1029 WERROR netr_LogonControl2Ex
(
1030 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
1031 [in] netr_LogonControlCode function_code
,
1033 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
1034 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
1041 [size_is(length
)] uint8
*data
;
1044 WERROR netr_NetrEnumerateTrustedDomains
(
1045 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1046 [out,ref] netr_Blob
*trusted_domains_blob
1052 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
1054 const int DSGETDC_VALID_FLAGS
= (DS_FORCE_REDISCOVERY |
1055 DS_DIRECTORY_SERVICE_REQUIRED |
1056 DS_DIRECTORY_SERVICE_PREFERRED |
1057 DS_GC_SERVER_REQUIRED |
1059 DS_BACKGROUND_ONLY |
1062 DS_TIMESERV_REQUIRED |
1063 DS_WRITABLE_REQUIRED |
1064 DS_GOOD_TIMESERV_PREFERRED |
1066 DS_ONLY_LDAP_NEEDED |
1069 DS_RETURN_FLAT_NAME |
1070 DS_RETURN_DNS_NAME
);
1072 typedef [bitmap32bit
] bitmap
{
1073 DS_FORCE_REDISCOVERY
= 0x00000001,
1074 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
1075 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
1076 DS_GC_SERVER_REQUIRED
= 0x00000040,
1077 DS_PDC_REQUIRED
= 0x00000080,
1078 DS_BACKGROUND_ONLY
= 0x00000100,
1079 DS_IP_REQUIRED
= 0x00000200,
1080 DS_KDC_REQUIRED
= 0x00000400,
1081 DS_TIMESERV_REQUIRED
= 0x00000800,
1082 DS_WRITABLE_REQUIRED
= 0x00001000,
1083 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
1084 DS_AVOID_SELF
= 0x00004000,
1085 DS_ONLY_LDAP_NEEDED
= 0x00008000,
1086 DS_IS_FLAT_NAME
= 0x00010000,
1087 DS_IS_DNS_NAME
= 0x00020000,
1088 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
1089 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000,
1090 DS_RETURN_DNS_NAME
= 0x40000000,
1091 DS_RETURN_FLAT_NAME
= 0x80000000
1092 } netr_DsRGetDCName_flags
;
1094 typedef [v1_enum] enum {
1095 DS_ADDRESS_TYPE_INET
= 1,
1096 DS_ADDRESS_TYPE_NETBIOS
= 2
1097 } netr_DsRGetDCNameInfo_AddressType
;
1099 typedef [bitmap32bit
] bitmap
{
1100 DS_SERVER_PDC
= NBT_SERVER_PDC
,
1101 DS_SERVER_GC
= NBT_SERVER_GC
,
1102 DS_SERVER_LDAP
= NBT_SERVER_LDAP
,
1103 DS_SERVER_DS
= NBT_SERVER_DS
,
1104 DS_SERVER_KDC
= NBT_SERVER_KDC
,
1105 DS_SERVER_TIMESERV
= NBT_SERVER_TIMESERV
,
1106 DS_SERVER_CLOSEST
= NBT_SERVER_CLOSEST
,
1107 DS_SERVER_WRITABLE
= NBT_SERVER_WRITABLE
,
1108 DS_SERVER_GOOD_TIMESERV
= NBT_SERVER_GOOD_TIMESERV
,
1109 DS_SERVER_NDNC
= NBT_SERVER_NDNC
,
1110 DS_SERVER_SELECT_SECRET_DOMAIN_6
= NBT_SERVER_SELECT_SECRET_DOMAIN_6
,
1111 DS_SERVER_FULL_SECRET_DOMAIN_6
= NBT_SERVER_FULL_SECRET_DOMAIN_6
,
1112 DS_DNS_CONTROLLER
= 0x20000000,
1113 DS_DNS_DOMAIN
= 0x40000000,
1114 DS_DNS_FOREST
= 0x80000000
1117 typedef [public] struct {
1118 [string,charset
(UTF16
)] uint16
*dc_unc
;
1119 [string,charset
(UTF16
)] uint16
*dc_address
;
1120 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
1122 [string,charset
(UTF16
)] uint16
*domain_name
;
1123 [string,charset
(UTF16
)] uint16
*forest_name
;
1124 netr_DsR_DcFlags dc_flags
;
1125 [string,charset
(UTF16
)] uint16
*dc_site_name
;
1126 [string,charset
(UTF16
)] uint16
*client_site_name
;
1127 } netr_DsRGetDCNameInfo
;
1129 WERROR netr_DsRGetDCName
(
1130 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1131 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1132 [in,unique] GUID
*domain_guid
,
1133 [in,unique] GUID
*site_guid
,
1134 [in] netr_DsRGetDCName_flags flags
,
1135 [out,ref] netr_DsRGetDCNameInfo
**info
1140 typedef [switch_type(uint32
)] union {
1141 [case(1)] netr_NegotiateFlags server_capabilities
;
1142 } netr_Capabilities
;
1144 NTSTATUS netr_LogonGetCapabilities
(
1145 [in] [string,charset
(UTF16
)] uint16 server_name
[],
1146 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1147 [in,ref] netr_Authenticator
*credential
,
1148 [in,out,ref] netr_Authenticator
*return_authenticator
,
1149 [in] uint32 query_level
,
1150 [out,ref,switch_is(query_level
)] netr_Capabilities
*capabilities
1155 [todo
] WERROR netr_NETRLOGONSETSERVICEBITS
();
1159 WERROR netr_LogonGetTrustRid
(
1160 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1161 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1162 [out,ref] uint32
*rid
1167 [todo
] WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1171 [todo
] WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1175 [public] NTSTATUS netr_ServerAuthenticate3
(
1176 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1177 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1178 [in] netr_SchannelType secure_channel_type
,
1179 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1180 [in,ref] netr_Credential
*credentials
,
1181 [out,ref] netr_Credential
*return_credentials
,
1182 [in,out,ref] netr_NegotiateFlags
*negotiate_flags
,
1183 [out,ref] uint32
*rid
1189 WERROR netr_DsRGetDCNameEx
(
1190 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1191 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1192 [in,unique] GUID
*domain_guid
,
1193 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1194 [in] netr_DsRGetDCName_flags flags
,
1195 [out,ref] netr_DsRGetDCNameInfo
**info
1201 WERROR netr_DsRGetSiteName
(
1202 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1203 [out,ref] [string,charset
(UTF16
)] uint16
**site
1208 typedef [bitmap32bit
] bitmap
{
1209 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1210 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1211 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1212 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1213 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1214 NETR_TRUST_FLAG_INBOUND
= 0x00000020,
1215 NETR_TRUST_FLAG_MIT_KRB5
= 0x00000080,
1216 NETR_TRUST_FLAG_AES
= 0x00000100
1221 [string,charset
(UTF16
)] uint16
*workstation_domain
;
1222 [string,charset
(UTF16
)] uint16
*workstation_site
;
1223 [string,charset
(UTF16
)] uint16
*unknown1
;
1224 [string,charset
(UTF16
)] uint16
*unknown2
;
1225 [string,charset
(UTF16
)] uint16
*unknown3
;
1226 [string,charset
(UTF16
)] uint16
*unknown4
;
1227 lsa_BinaryString blob2
;
1229 lsa_String unknown5
;
1230 lsa_String unknown6
;
1232 } netr_DomainQuery1
;
1235 [case(1)] netr_DomainQuery1
*query1
;
1236 [case(2)] netr_DomainQuery1
*query1
;
1240 /* these first 3 values come from the fact windows
1241 actually encodes this structure as a UNICODE_STRING
1242 - see MS-NRPC section 2.2.1.3.9 */
1243 [value
(8)] uint32 length
;
1244 [value
(0)] uint32 dummy
;
1245 [value
(8)] uint32 size
;
1246 netr_TrustFlags flags
;
1247 uint32 parent_index
;
1249 uint32 trust_attributes
;
1250 } netr_trust_extension
;
1253 uint16 length
; /* value is 16 when info != NULL, otherwise 0 */
1254 [value
(length
)] uint16 size
; /* value is 16 when info != NULL, otherwise 0 */
1255 netr_trust_extension
*info
;
1256 } netr_trust_extension_container
;
1259 lsa_String domainname
;
1260 lsa_String fulldomainname
;
1264 netr_trust_extension_container trust_extension
;
1265 lsa_String dummystring
[3];
1267 } netr_DomainTrustInfo
;
1271 [size_is(policy_size
)] uint8
*policy
;
1272 } netr_LsaPolicyInfo
;
1274 typedef [public,bitmap32bit
] bitmap
{
1275 NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS
= 0x00000001,
1276 NETR_WS_FLAG_HANDLES_SPN_UPDATE
= 0x00000002
1277 } netr_WorkstationFlags
;
1280 netr_DomainTrustInfo domaininfo
;
1282 [size_is(num_trusts
)] netr_DomainTrustInfo
*trusts
;
1283 netr_LsaPolicyInfo lsa_policy
;
1284 lsa_String dns_hostname
;
1285 lsa_String dummystring
[3];
1286 netr_WorkstationFlags workstation_flags
;
1287 uint32 supported_enc_types
;
1292 [case(1)] netr_DomainInfo1
*info1
;
1293 [case(2)] netr_DomainInfo1
*info2
;
1296 NTSTATUS netr_LogonGetDomainInfo
(
1297 [in] [string,charset
(UTF16
)] uint16 server_name
[],
1298 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1299 [in,ref] netr_Authenticator
*credential
,
1300 [in,out,ref] netr_Authenticator
*return_authenticator
,
1302 [in,switch_is(level
)] netr_DomainQuery query
,
1303 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1306 typedef [flag
(NDR_PAHEX
)] struct {
1309 } netr_CryptPassword
;
1313 NTSTATUS netr_ServerPasswordSet2
(
1314 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1315 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1316 [in] netr_SchannelType secure_channel_type
,
1317 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1318 [in,ref] netr_Authenticator
*credential
,
1319 [out,ref] netr_Authenticator
*return_authenticator
,
1320 [in,ref] netr_CryptPassword
*new_password
1325 WERROR netr_ServerPasswordGet
(
1326 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1327 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1328 [in] netr_SchannelType secure_channel_type
,
1329 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1330 [in,ref] netr_Authenticator
*credential
,
1331 [out,ref] netr_Authenticator
*return_authenticator
,
1332 [out,ref] samr_Password
*password
1337 [todo
] WERROR netr_NETRLOGONSENDTOSAM
();
1343 [size_is(count
)] lsa_String
*sitename
;
1344 } netr_DsRAddressToSitenamesWCtr
;
1347 [size_is(size
)] uint8
*buffer
;
1351 WERROR netr_DsRAddressToSitenamesW
(
1352 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1353 [in] [range(0,32000)] uint32 count
,
1354 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1355 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1360 WERROR netr_DsRGetDCNameEx2
(
1361 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1362 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1363 [in] samr_AcctFlags mask
,
1364 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1365 [in,unique] GUID
*domain_guid
,
1366 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1367 [in] netr_DsRGetDCName_flags flags
,
1368 [out,ref] netr_DsRGetDCNameInfo
**info
1373 [todo
] WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1378 typedef [v1_enum] enum {
1379 NETR_TRUST_TYPE_DOWNLEVEL
= 1,
1380 NETR_TRUST_TYPE_UPLEVEL
= 2,
1381 NETR_TRUST_TYPE_MIT
= 3,
1382 NETR_TRUST_TYPE_DCE
= 4
1385 typedef [bitmap32bit
] bitmap
{
1386 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
1387 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
1388 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
1389 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
1390 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
1391 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
1392 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040
1393 } netr_TrustAttributes
;
1396 [string,charset
(UTF16
)] uint16
*netbios_name
;
1397 [string,charset
(UTF16
)] uint16
*dns_name
;
1398 netr_TrustFlags trust_flags
;
1399 uint32 parent_index
;
1400 netr_TrustType trust_type
;
1401 netr_TrustAttributes trust_attributes
;
1408 [size_is(count
)] netr_DomainTrust
*array
;
1409 } netr_DomainTrustList
;
1411 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1412 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1413 [out,ref] netr_DomainTrustList
*dom_trust_list
1420 [size_is(count
)] lsa_String
*sitename
;
1421 [size_is(count
)] lsa_String
*subnetname
;
1422 } netr_DsRAddressToSitenamesExWCtr
;
1424 WERROR netr_DsRAddressToSitenamesExW
(
1425 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1426 [in] [range(0,32000)] uint32 count
,
1427 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1428 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1436 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1439 WERROR netr_DsrGetDcSiteCoverageW
(
1440 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1441 [out,ref] DcSitesCtr
**ctr
1446 NTSTATUS netr_LogonSamLogonEx
(
1447 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1448 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1449 [in] netr_LogonInfoClass logon_level
,
1450 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1451 [in] uint16 validation_level
,
1452 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1453 [out,ref] uint8
*authoritative
,
1454 [in,out,ref] uint32
*flags
1460 WERROR netr_DsrEnumerateDomainTrusts
(
1461 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1462 [in] netr_TrustFlags trust_flags
,
1463 [out,ref] netr_DomainTrustList
*trusts
1469 WERROR netr_DsrDeregisterDNSHostRecords
(
1470 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1471 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1472 [in,unique] GUID
*domain_guid
,
1473 [in,unique] GUID
*dsa_guid
,
1474 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1479 NTSTATUS netr_ServerTrustPasswordsGet
(
1480 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1481 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1482 [in] netr_SchannelType secure_channel_type
,
1483 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1484 [in,ref] netr_Authenticator
*credential
,
1485 [out,ref] netr_Authenticator
*return_authenticator
,
1486 [out,ref] samr_Password
*password
,
1487 [out,ref] samr_Password
*password2
1493 const int DS_GFTI_UPDATE_TDO
= 0x1;
1495 WERROR netr_DsRGetForestTrustInformation
(
1496 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1497 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1499 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1504 WERROR netr_GetForestTrustInformation
(
1505 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1506 [in,ref] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1507 [in,ref] netr_Authenticator
*credential
,
1508 [out,ref] netr_Authenticator
*return_authenticator
,
1510 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1516 /* this is the ADS varient. I don't yet know what the "flags" are for */
1517 NTSTATUS netr_LogonSamLogonWithFlags
(
1518 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1519 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1520 [in,unique] netr_Authenticator
*credential
,
1521 [in,out,unique] netr_Authenticator
*return_authenticator
,
1522 [in] netr_LogonInfoClass logon_level
,
1523 [in,ref] [switch_is(logon_level
)] netr_LogonLevel
*logon
,
1524 [in] uint16 validation_level
,
1525 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1526 [out,ref] uint8
*authoritative
,
1527 [in,out,ref] uint32
*flags
1535 [size_is(count
)] uint32
*data
;
1537 [size_is(count
)] lsa_String
*entries
;
1540 NTSTATUS netr_ServerGetTrustInfo
(
1541 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1542 [in,ref] [string,charset
(UTF16
)] uint16
*account_name
,
1543 [in] netr_SchannelType secure_channel_type
,
1544 [in,ref] [string,charset
(UTF16
)] uint16
*computer_name
,
1545 [in,ref] netr_Authenticator
*credential
,
1546 [out,ref] netr_Authenticator
*return_authenticator
,
1547 [out,ref] samr_Password
*new_owf_password
,
1548 [out,ref] samr_Password
*old_owf_password
,
1549 [out,ref] netr_TrustInfo
**trust_info