3 much of this was derived from the ethereal sources - thanks to everyone
7 import
"lsa.idl", "samr.idl", "security.idl";
12 uuid("12345678-1234-abcd-ef00-01234567cffb"),
14 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
15 pointer_default(unique)
20 typedef bitmap samr_AcctFlags samr_AcctFlags
;
21 typedef bitmap samr_GroupAttrs samr_GroupAttrs
;
27 [string,charset
(UTF16
)] uint16
*account_name
;
38 time_t pw_must_change
;
39 [string,charset
(UTF16
)] uint16
*computer
;
40 [string,charset
(UTF16
)] uint16
*domain
;
41 [string,charset
(UTF16
)] uint16
*script_path
;
45 WERROR netr_LogonUasLogon
(
46 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
47 [in] [string,charset
(UTF16
)] uint16 account_name
[],
48 [in] [string,charset
(UTF16
)] uint16 workstation
[],
49 [out,ref] netr_UasInfo
*info
61 WERROR netr_LogonUasLogoff
(
62 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
63 [in] [string,charset
(UTF16
)] uint16 account_name
[],
64 [in] [string,charset
(UTF16
)] uint16 workstation
[],
65 [out,ref] netr_UasLogoffInfo
*info
72 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
73 that the structure of the bindata looks like this:
75 dlong lockout_duration;
77 uint32 bad_attempt_lockout;
80 but it doesn't look as though this structure is reflected at the
81 NDR level. Maybe it is left to the application to decode the bindata array.
86 [size_is(size
/2),length_is(length
/2)] uint16
*bindata
;
89 typedef [public,bitmap32bit
] bitmap
{
90 MSV1_0_CLEARTEXT_PASSWORD_ALLOWED
= 0x00000002,
91 MSV1_0_UPDATE_LOGON_STATISTICS
= 0x00000004,
92 MSV1_0_RETURN_USER_PARAMETERS
= 0x00000008,
93 MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
= 0x00000020,
94 MSV1_0_RETURN_PROFILE_PATH
= 0x00000200,
95 MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT
= 0x00000800
96 } netr_LogonParameterControl
;
99 lsa_String domain_name
;
100 netr_LogonParameterControl parameter_control
; /* see MSV1_0_* */
102 uint32 logon_id_high
;
103 lsa_String account_name
;
104 lsa_String workstation
;
108 netr_IdentityInfo identity_info
;
109 samr_Password lmpassword
;
110 samr_Password ntpassword
;
113 typedef [flag
(NDR_PAHEX
)] struct {
115 [value
(length
)] uint16 size
;
116 [size_is(length
),length_is(length
)] uint8
*data
;
117 } netr_ChallengeResponse
;
119 typedef [flag
(NDR_PAHEX
)] struct {
120 netr_IdentityInfo identity_info
;
122 netr_ChallengeResponse nt
;
123 netr_ChallengeResponse lm
;
126 typedef [public,switch_type(uint16
)] union {
127 [case(1)] netr_PasswordInfo
*password
;
128 [case(2)] netr_NetworkInfo
*network
;
129 [case(3)] netr_PasswordInfo
*password
;
130 [case(5)] netr_PasswordInfo
*password
;
131 [case(6)] netr_NetworkInfo
*network
;
134 typedef [public,flag
(NDR_PAHEX
)] struct {
136 } netr_UserSessionKey
;
138 typedef [public,flag
(NDR_PAHEX
)] struct {
142 /* Flags for user_flags below */
143 typedef [public,bitmap32bit
] bitmap
{
144 NETLOGON_GUEST
= 0x00000001,
145 NETLOGON_NOENCRYPTION
= 0x00000002,
146 NETLOGON_CACHED_ACCOUNT
= 0x00000004,
147 NETLOGON_USED_LM_PASSWORD
= 0x00000008,
148 NETLOGON_EXTRA_SIDS
= 0x00000020,
149 NETLOGON_SUBAUTH_SESSION_KEY
= 0x00000040,
150 NETLOGON_SERVER_TRUST_ACCOUNT
= 0x00000080,
151 NETLOGON_NTLMV2_ENABLED
= 0x00000100,
152 NETLOGON_RESOURCE_GROUPS
= 0x00000200,
153 NETLOGON_PROFILE_PATH_RETURNED
= 0x00000400,
154 NETLOGON_GRACE_LOGON
= 0x01000000
161 NTTIME last_password_change
;
162 NTTIME allow_password_change
;
163 NTTIME force_password_change
;
164 lsa_String account_name
;
165 lsa_String full_name
;
166 lsa_String logon_script
;
167 lsa_String profile_path
;
168 lsa_String home_directory
;
169 lsa_String home_drive
;
171 uint16 bad_password_count
;
174 samr_RidWithAttributeArray groups
;
175 netr_UserFlags user_flags
;
176 netr_UserSessionKey key
;
177 lsa_StringLarge logon_server
;
178 lsa_StringLarge domain
;
179 dom_sid2
*domain_sid
;
180 netr_LMSessionKey LMSessKey
;
181 samr_AcctFlags acct_flags
;
186 netr_SamBaseInfo base
;
191 samr_GroupAttrs attributes
;
194 typedef [public] struct {
195 netr_SamBaseInfo base
;
197 [size_is(sidcount
)] netr_SidAttr
*sids
;
201 netr_SamBaseInfo base
;
203 [size_is(sidcount
)] netr_SidAttr
*sids
;
205 lsa_String principle
;
211 [size_is(pac_size
)] uint8
*pac
;
212 lsa_String logon_domain
;
213 lsa_String logon_server
;
214 lsa_String principal_name
;
216 [size_is(auth_size
)] uint8
*auth
;
217 netr_UserSessionKey user_session_key
;
218 uint32 expansionroom
[10];
225 typedef [public,switch_type(uint16
)] union {
226 [case(2)] netr_SamInfo2
*sam2
;
227 [case(3)] netr_SamInfo3
*sam3
;
228 [case(4)] netr_PacInfo
*pac
;
229 [case(5)] netr_PacInfo
*pac
;
230 [case(6)] netr_SamInfo6
*sam6
;
233 typedef [public, flag
(NDR_PAHEX
)] struct {
237 typedef [public] struct {
238 netr_Credential cred
;
240 } netr_Authenticator
;
242 NTSTATUS netr_LogonSamLogon
(
243 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
244 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
245 [in,unique] netr_Authenticator
*credential
,
246 [in,out,unique] netr_Authenticator
*return_authenticator
,
247 [in] uint16 logon_level
,
248 [in] [switch_is(logon_level
)] netr_LogonLevel logon
,
249 [in] uint16 validation_level
,
250 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
251 [out,ref] uint8
*authoritative
258 NTSTATUS netr_LogonSamLogoff
(
259 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
260 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
261 [in,unique] netr_Authenticator
*credential
,
262 [in,out,unique] netr_Authenticator
*return_authenticator
,
263 [in] uint16 logon_level
,
264 [in] [switch_is(logon_level
)] netr_LogonLevel logon
272 NTSTATUS netr_ServerReqChallenge
(
273 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
274 [in,string,charset
(UTF16
)] uint16 computer_name
[],
275 [in,out,ref] netr_Credential
*credentials
282 typedef enum netr_SchannelType netr_SchannelType
;
284 NTSTATUS netr_ServerAuthenticate
(
285 [in,unique,string,charset
(UTF16
)] uint16
*server_name
,
286 [in,string,charset
(UTF16
)] uint16 account_name
[],
287 [in] netr_SchannelType secure_channel_type
,
288 [in,string,charset
(UTF16
)] uint16 computer_name
[],
289 [in,out,ref] netr_Credential
*credentials
296 NTSTATUS netr_ServerPasswordSet
(
297 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
298 [in] [string,charset
(UTF16
)] uint16 account_name
[],
299 [in] netr_SchannelType secure_channel_type
,
300 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
301 [in,ref] netr_Authenticator
*credential
,
302 [out,ref] netr_Authenticator
*return_authenticator
,
303 [in,ref] samr_Password
*new_password
310 typedef enum netr_SamDatabaseID netr_SamDatabaseID
;
313 [string,charset
(UTF16
)] uint16
*account_name
;
322 } netr_DELTA_DELETE_USER
;
326 [value
(length
)] uint16 size
;
333 [value
(nt_length
)] uint16 nt_size
;
336 [value
(lm_length
)] uint16 lm_size
;
338 uint8 nt_history
[nt_length
];
339 uint8 lm_history
[lm_length
];
340 } netr_PasswordHistory
;
343 netr_USER_KEY16 lmpassword
;
344 netr_USER_KEY16 ntpassword
;
345 netr_PasswordHistory history
;
348 typedef struct { /* TODO: make this a union! */
349 netr_USER_KEYS2 keys2
;
350 } netr_USER_KEY_UNION
;
352 typedef [public] struct {
354 netr_USER_KEY_UNION keys
;
358 boolean8 SensitiveDataFlag
;
361 /* netr_USER_KEYS encrypted with the session key */
362 [size_is(DataLength
)][flag
(NDR_PAHEX
)] uint8
*SensitiveData
;
363 } netr_USER_PRIVATE_INFO
;
366 lsa_String account_name
;
367 lsa_String full_name
;
370 lsa_String home_directory
;
371 lsa_String home_drive
;
372 lsa_String logon_script
;
373 lsa_String description
;
374 lsa_String workstations
;
377 samr_LogonHours logon_hours
;
378 uint16 bad_password_count
;
380 NTTIME last_password_change
;
382 samr_AcctFlags acct_flags
;
383 samr_Password lmpassword
;
384 samr_Password ntpassword
;
385 boolean8 nt_password_present
;
386 boolean8 lm_password_present
;
387 boolean8 password_expired
;
389 lsa_String parameters
;
392 netr_USER_PRIVATE_INFO user_private_info
;
393 uint32 SecurityInformation
;
395 lsa_String profile_path
;
406 lsa_String domain_name
;
408 dlong force_logoff_time
;
409 uint16 min_password_length
;
410 uint16 password_history_length
;
411 /* yes, these are signed. They are in negative 100ns */
412 dlong max_password_age
;
413 dlong min_password_age
;
415 NTTIME domain_create_time
;
416 uint32 SecurityInformation
;
418 netr_AcctLockStr account_lockout
;
422 uint32 logon_to_chgpass
;
429 lsa_String group_name
;
432 lsa_String description
;
433 uint32 SecurityInformation
;
459 [size_is(num_rids
)] uint32
*rids
;
460 [size_is(num_rids
)] uint32
*attribs
;
466 } netr_DELTA_GROUP_MEMBER
;
469 lsa_String alias_name
;
471 uint32 SecurityInformation
;
473 lsa_String description
;
489 } netr_DELTA_ALIAS_MEMBER
;
492 uint32 pagedpoollimit
;
493 uint32 nonpagedpoollimit
;
494 uint32 minimumworkingsetsize
;
495 uint32 maximumworkingsetsize
;
496 uint32 pagefilelimit
;
502 NTTIME auditretentionperiod
;
503 boolean8 auditingmode
;
504 uint32 maxauditeventcount
;
505 [size_is(maxauditeventcount
+1)] uint32
*eventauditoptions
;
506 lsa_String primary_domain_name
;
508 netr_QUOTA_LIMITS quota_limits
;
510 NTTIME db_create_time
;
511 uint32 SecurityInformation
;
524 lsa_String domain_name
;
525 uint32 num_controllers
;
526 [size_is(num_controllers
)] lsa_String
*controller_names
;
527 uint32 SecurityInformation
;
537 } netr_DELTA_TRUSTED_DOMAIN
;
541 } netr_DELTA_DELETE_TRUST
;
544 uint32 privilege_entries
;
545 uint32 privilege_control
;
546 [size_is(privilege_entries
)] uint32
*privilege_attrib
;
547 [size_is(privilege_entries
)] lsa_String
*privilege_name
;
548 netr_QUOTA_LIMITS quotalimits
;
550 uint32 SecurityInformation
;
560 } netr_DELTA_ACCOUNT
;
564 } netr_DELTA_DELETE_ACCOUNT
;
568 } netr_DELTA_DELETE_SECRET
;
573 [size_is(maxlen
)][length_is(len
)] uint8
*cipher_data
;
577 netr_CIPHER_VALUE current_cipher
;
578 NTTIME current_cipher_set_time
;
579 netr_CIPHER_VALUE old_cipher
;
580 NTTIME old_cipher_set_time
;
581 uint32 SecurityInformation
;
594 NETR_DELTA_DOMAIN
= 1,
595 NETR_DELTA_GROUP
= 2,
596 NETR_DELTA_DELETE_GROUP
= 3,
597 NETR_DELTA_RENAME_GROUP
= 4,
599 NETR_DELTA_DELETE_USER
= 6,
600 NETR_DELTA_RENAME_USER
= 7,
601 NETR_DELTA_GROUP_MEMBER
= 8,
602 NETR_DELTA_ALIAS
= 9,
603 NETR_DELTA_DELETE_ALIAS
= 10,
604 NETR_DELTA_RENAME_ALIAS
= 11,
605 NETR_DELTA_ALIAS_MEMBER
= 12,
606 NETR_DELTA_POLICY
= 13,
607 NETR_DELTA_TRUSTED_DOMAIN
= 14,
608 NETR_DELTA_DELETE_TRUST
= 15,
609 NETR_DELTA_ACCOUNT
= 16,
610 NETR_DELTA_DELETE_ACCOUNT
= 17,
611 NETR_DELTA_SECRET
= 18,
612 NETR_DELTA_DELETE_SECRET
= 19,
613 NETR_DELTA_DELETE_GROUP2
= 20,
614 NETR_DELTA_DELETE_USER2
= 21,
615 NETR_DELTA_MODIFY_COUNT
= 22
618 typedef [switch_type(netr_DeltaEnum
)] union {
619 [case(NETR_DELTA_DOMAIN
)] netr_DELTA_DOMAIN
*domain
;
620 [case(NETR_DELTA_GROUP
)] netr_DELTA_GROUP
*group
;
621 [case(NETR_DELTA_DELETE_GROUP
)] ; /* rid only */
622 [case(NETR_DELTA_RENAME_GROUP
)] netr_DELTA_RENAME
*rename_group
;
623 [case(NETR_DELTA_USER
)] netr_DELTA_USER
*user
;
624 [case(NETR_DELTA_DELETE_USER
)] ; /* rid only */
625 [case(NETR_DELTA_RENAME_USER
)] netr_DELTA_RENAME
*rename_user
;
626 [case(NETR_DELTA_GROUP_MEMBER
)] netr_DELTA_GROUP_MEMBER
*group_member
;
627 [case(NETR_DELTA_ALIAS
)] netr_DELTA_ALIAS
*alias
;
628 [case(NETR_DELTA_DELETE_ALIAS
)] ; /* rid only */
629 [case(NETR_DELTA_RENAME_ALIAS
)] netr_DELTA_RENAME
*rename_alias
;
630 [case(NETR_DELTA_ALIAS_MEMBER
)] netr_DELTA_ALIAS_MEMBER
*alias_member
;
631 [case(NETR_DELTA_POLICY
)] netr_DELTA_POLICY
*policy
;
632 [case(NETR_DELTA_TRUSTED_DOMAIN
)] netr_DELTA_TRUSTED_DOMAIN
*trusted_domain
;
633 [case(NETR_DELTA_DELETE_TRUST
)] netr_DELTA_DELETE_TRUST delete_trust
;
634 [case(NETR_DELTA_ACCOUNT
)] netr_DELTA_ACCOUNT
*account
;
635 [case(NETR_DELTA_DELETE_ACCOUNT
)] netr_DELTA_DELETE_ACCOUNT delete_account
;
636 [case(NETR_DELTA_SECRET
)] netr_DELTA_SECRET
*secret
;
637 [case(NETR_DELTA_DELETE_SECRET
)] netr_DELTA_DELETE_SECRET delete_secret
;
638 [case(NETR_DELTA_DELETE_GROUP2
)] netr_DELTA_DELETE_USER
*delete_group
;
639 [case(NETR_DELTA_DELETE_USER2
)] netr_DELTA_DELETE_USER
*delete_user
;
640 [case(NETR_DELTA_MODIFY_COUNT
)] udlong
*modified_count
;
643 typedef [switch_type(netr_DeltaEnum
)] union {
644 [case(NETR_DELTA_DOMAIN
)] uint32 rid
;
645 [case(NETR_DELTA_GROUP
)] uint32 rid
;
646 [case(NETR_DELTA_DELETE_GROUP
)] uint32 rid
;
647 [case(NETR_DELTA_RENAME_GROUP
)] uint32 rid
;
648 [case(NETR_DELTA_USER
)] uint32 rid
;
649 [case(NETR_DELTA_DELETE_USER
)] uint32 rid
;
650 [case(NETR_DELTA_RENAME_USER
)] uint32 rid
;
651 [case(NETR_DELTA_GROUP_MEMBER
)] uint32 rid
;
652 [case(NETR_DELTA_ALIAS
)] uint32 rid
;
653 [case(NETR_DELTA_DELETE_ALIAS
)] uint32 rid
;
654 [case(NETR_DELTA_RENAME_ALIAS
)] uint32 rid
;
655 [case(NETR_DELTA_ALIAS_MEMBER
)] uint32 rid
;
656 [case(NETR_DELTA_POLICY
)] dom_sid2
*sid
;
657 [case(NETR_DELTA_TRUSTED_DOMAIN
)] dom_sid2
*sid
;
658 [case(NETR_DELTA_DELETE_TRUST
)] dom_sid2
*sid
;
659 [case(NETR_DELTA_ACCOUNT
)] dom_sid2
*sid
;
660 [case(NETR_DELTA_DELETE_ACCOUNT
)] dom_sid2
*sid
;
661 [case(NETR_DELTA_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
662 [case(NETR_DELTA_DELETE_SECRET
)] [string,charset
(UTF16
)] uint16
*name
;
663 [case(NETR_DELTA_DELETE_GROUP2
)] uint32 rid
;
664 [case(NETR_DELTA_DELETE_USER2
)] uint32 rid
;
665 [case(NETR_DELTA_MODIFY_COUNT
)] ;
666 } netr_DELTA_ID_UNION
;
669 netr_DeltaEnum delta_type
;
670 [switch_is(delta_type
)] netr_DELTA_ID_UNION delta_id_union
;
671 [switch_is(delta_type
)] netr_DELTA_UNION delta_union
;
676 [size_is(num_deltas
)] netr_DELTA_ENUM
*delta_enum
;
677 } netr_DELTA_ENUM_ARRAY
;
680 NTSTATUS netr_DatabaseDeltas
(
681 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
682 [in] [string,charset
(UTF16
)] uint16 computername
[],
683 [in,ref] netr_Authenticator
*credential
,
684 [in,out,ref] netr_Authenticator
*return_authenticator
,
685 [in] netr_SamDatabaseID database_id
,
686 [in,out,ref] udlong
*sequence_num
,
687 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
688 [in] uint32 preferredmaximumlength
695 NTSTATUS netr_DatabaseSync
(
696 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
697 [in] [string,charset
(UTF16
)] uint16 computername
[],
698 [in] netr_Authenticator credential
,
699 [in,out,ref] netr_Authenticator
*return_authenticator
,
700 [in] netr_SamDatabaseID database_id
,
701 [in,out,ref] uint32
*sync_context
,
702 [in] uint32 preferredmaximumlength
,
703 [out,ref] netr_DELTA_ENUM_ARRAY
*delta_enum_array
710 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
712 typedef [flag
(NDR_PAHEX
)] struct {
713 uint8 computer_name
[16];
715 uint32 serial_number
;
719 [flag
(NDR_REMAINING
)] DATA_BLOB blob
;
720 } netr_AccountBuffer
;
722 NTSTATUS netr_AccountDeltas
(
723 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
724 [in] [string,charset
(UTF16
)] uint16 computername
[],
725 [in] netr_Authenticator credential
,
726 [in,out,ref] netr_Authenticator
*return_authenticator
,
727 [in] netr_UAS_INFO_0 uas
,
730 [in] uint32 buffersize
,
731 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
732 [out,ref] uint32
*count_returned
,
733 [out,ref] uint32
*total_entries
,
734 [out,ref] netr_UAS_INFO_0
*recordid
741 NTSTATUS netr_AccountSync
(
742 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
743 [in] [string,charset
(UTF16
)] uint16 computername
[],
744 [in] netr_Authenticator credential
,
745 [in,out,ref] netr_Authenticator
*return_authenticator
,
746 [in] uint32 reference
,
748 [in] uint32 buffersize
,
749 [out,ref,subcontext
(4)] netr_AccountBuffer
*buffer
,
750 [out,ref] uint32
*count_returned
,
751 [out,ref] uint32
*total_entries
,
752 [out,ref] uint32
*next_reference
,
753 [in,out,ref] netr_UAS_INFO_0
*recordid
760 WERROR netr_GetDcName
(
761 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
762 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
763 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
771 uint32 pdc_connection_status
;
772 } netr_NETLOGON_INFO_1
;
776 uint32 pdc_connection_status
;
777 [string,charset
(UTF16
)] uint16 trusted_dc_name
[];
778 uint32 tc_connection_status
;
779 } netr_NETLOGON_INFO_2
;
783 uint32 logon_attempts
;
789 } netr_NETLOGON_INFO_3
;
792 [case(1)] netr_NETLOGON_INFO_1
*info1
;
793 [case(2)] netr_NETLOGON_INFO_2
*info2
;
794 [case(3)] netr_NETLOGON_INFO_3
*info3
;
795 } netr_CONTROL_QUERY_INFORMATION
;
797 /* function_code values */
798 typedef [v1_enum] enum {
799 NETLOGON_CONTROL_REDISCOVER
= 5,
800 NETLOGON_CONTROL_TC_QUERY
= 6,
801 NETLOGON_CONTROL_TRANSPORT_NOTIFY
= 7,
802 NETLOGON_CONTROL_SET_DBFLAG
= 65534
803 } netr_LogonControlCode
;
805 WERROR netr_LogonControl
(
806 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
807 [in] netr_LogonControlCode function_code
,
809 [out,ref,switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*info
816 WERROR netr_GetAnyDCName
(
817 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
818 [in,unique] [string,charset
(UTF16
)] uint16
*domainname
,
819 [out,ref] [string,charset
(UTF16
)] uint16
**dcname
827 [case(NETLOGON_CONTROL_REDISCOVER
)] [string,charset
(UTF16
)] uint16
*domain
;
828 [case(NETLOGON_CONTROL_TC_QUERY
)] [string,charset
(UTF16
)] uint16
*domain
;
829 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY
)] [string,charset
(UTF16
)] uint16
*domain
;
830 [case(NETLOGON_CONTROL_SET_DBFLAG
)] uint32 debug_level
;
831 } netr_CONTROL_DATA_INFORMATION
;
833 WERROR netr_LogonControl2
(
834 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
835 [in] uint32 function_code
,
837 [in,ref][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION
*data
,
838 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
842 /* If this flag is not set, then the passwords and LM session keys are
843 * encrypted with DES calls. (And the user session key is
845 const int NETLOGON_NEG_ARCFOUR
= 0x00000004;
846 const int NETLOGON_NEG_128BIT
= 0x00004000;
847 const int NETLOGON_NEG_SCHANNEL
= 0x40000000;
852 NTSTATUS netr_ServerAuthenticate2
(
853 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
854 [in] [string,charset
(UTF16
)] uint16 account_name
[],
855 [in] netr_SchannelType secure_channel_type
,
856 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
857 [in,out,ref] netr_Credential
*credentials
,
858 [in,out,ref] uint32
*negotiate_flags
865 NTSTATUS netr_DatabaseSync2
(
866 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
867 [in] [string,charset
(UTF16
)] uint16 computername
[],
868 [in] netr_Authenticator
*credential
,
869 [in,out,ref] netr_Authenticator
*return_authenticator
,
870 [in] netr_SamDatabaseID database_id
,
871 [in] uint16 restart_state
,
872 [in,out,ref] uint32
*sync_context
,
873 [out,ref] netr_DELTA_ENUM_ARRAY
**delta_enum_array
,
874 [in] uint32 preferredmaximumlength
881 /* i'm not at all sure how this call works */
883 NTSTATUS netr_DatabaseRedo
(
884 [in] [string,charset
(UTF16
)] uint16 logon_server
[],
885 [in] [string,charset
(UTF16
)] uint16 computername
[],
886 [in] netr_Authenticator credential
,
887 [in,out,ref] netr_Authenticator
*return_authenticator
,
888 [in,unique][size_is(change_log_entry_size
)] uint8
*change_log_entry
,
889 [in] uint32 change_log_entry_size
,
890 [out,ref] netr_DELTA_ENUM_ARRAY
*delta_enum_array
897 WERROR netr_LogonControl2Ex
(
898 [in,unique] [string,charset
(UTF16
)] uint16
*logon_server
,
899 [in] uint32 function_code
,
901 [in][switch_is(function_code
)] netr_CONTROL_DATA_INFORMATION data
,
902 [out,ref][switch_is(level
)] netr_CONTROL_QUERY_INFORMATION
*query
909 [size_is(length
)] uint8
*data
;
912 WERROR netr_NetrEnumerateTrustedDomains
(
913 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
914 [out,ref] netr_Blob
*trusted_domains_blob
920 /* one unkown bit still: DS_IP_VERSION_AGNOSTIC - gd*/
922 typedef [bitmap32bit
] bitmap
{
923 DS_FORCE_REDISCOVERY
= 0x00000001,
924 DS_DIRECTORY_SERVICE_REQUIRED
= 0x00000010,
925 DS_DIRECTORY_SERVICE_PREFERRED
= 0x00000020,
926 DS_GC_SERVER_REQUIRED
= 0x00000040,
927 DS_PDC_REQUIRED
= 0x00000080,
928 DS_BACKGROUND_ONLY
= 0x00000100,
929 DS_IP_REQUIRED
= 0x00000200,
930 DS_KDC_REQUIRED
= 0x00000400,
931 DS_TIMESERV_REQUIRED
= 0x00000800,
932 DS_WRITABLE_REQUIRED
= 0x00001000,
933 DS_GOOD_TIMESERV_PREFERRED
= 0x00002000,
934 DS_AVOID_SELF
= 0x00004000,
935 DS_ONLY_LDAP_NEEDED
= 0x00008000,
936 DS_IS_FLAT_NAME
= 0x00010000,
937 DS_IS_DNS_NAME
= 0x00020000,
938 DS_TRY_NEXTCLOSEST_SITE
= 0x00040000,
939 DS_DIRECTORY_SERVICE_6_REQUIRED
= 0x00080000,
940 DS_RETURN_DNS_NAME
= 0x40000000,
941 DS_RETURN_FLAT_NAME
= 0x80000000
942 } netr_DsRGetDCName_flags
;
944 typedef [v1_enum] enum {
945 DS_ADDRESS_TYPE_INET
= 1,
946 DS_ADDRESS_TYPE_NETBIOS
= 2
947 } netr_DsRGetDCNameInfo_AddressType
;
949 typedef [bitmap32bit
] bitmap
{
950 DS_SERVER_PDC
= 0x00000001 /* NBT_SERVER_PDC */,
951 DS_SERVER_GC
= 0x00000004 /* NBT_SERVER_GC */,
952 DS_SERVER_LDAP
= 0x00000008 /* NBT_SERVER_LDAP */,
953 DS_SERVER_DS
= 0x00000010 /* NBT_SERVER_DS */,
954 DS_SERVER_KDC
= 0x00000020 /* NBT_SERVER_KDC */,
955 DS_SERVER_TIMESERV
= 0x00000040 /* NBT_SERVER_TIMESERV */,
956 DS_SERVER_CLOSEST
= 0x00000080 /* NBT_SERVER_CLOSEST */,
957 DS_SERVER_WRITABLE
= 0x00000100 /* NBT_SERVER_WRITABLE */,
958 DS_SERVER_GOOD_TIMESERV
= 0x00000200 /* NBT_SERVER_GOOD_TIMESERV */,
959 DS_SERVER_NDNC
= 0x00000400,
960 DS_SERVER_SELECT_SECRET_DOMAIN_6
= 0x00000800,
961 DS_SERVER_FULL_SECRET_DOMAIN_6
= 0x00001000,
962 DS_DNS_CONTROLLER
= 0x20000000,
963 DS_DNS_DOMAIN
= 0x40000000,
964 DS_DNS_FOREST
= 0x80000000
968 [string,charset
(UTF16
)] uint16
*dc_unc
;
969 [string,charset
(UTF16
)] uint16
*dc_address
;
970 netr_DsRGetDCNameInfo_AddressType dc_address_type
;
972 [string,charset
(UTF16
)] uint16
*domain_name
;
973 [string,charset
(UTF16
)] uint16
*forest_name
;
974 netr_DsR_DcFlags dc_flags
;
975 [string,charset
(UTF16
)] uint16
*dc_site_name
;
976 [string,charset
(UTF16
)] uint16
*client_site_name
;
977 } netr_DsRGetDCNameInfo
;
979 WERROR netr_DsRGetDCName
(
980 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
981 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
982 [in,unique] GUID
*domain_guid
,
983 [in,unique] GUID
*site_guid
,
984 [in] netr_DsRGetDCName_flags flags
,
985 [out,ref] netr_DsRGetDCNameInfo
**info
990 WERROR netr_NETRLOGONDUMMYROUTINE1
();
994 WERROR netr_NETRLOGONSETSERVICEBITS
();
998 WERROR netr_LogonGetTrustRid
(
999 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1000 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1001 [out,ref] uint32
*rid
1006 WERROR netr_NETRLOGONCOMPUTESERVERDIGEST
();
1010 WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST
();
1014 NTSTATUS netr_ServerAuthenticate3
(
1015 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1016 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1017 [in] netr_SchannelType secure_channel_type
,
1018 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1019 [in,out,ref] netr_Credential
*credentials
,
1020 [in,out,ref] uint32
*negotiate_flags
,
1021 [out,ref] uint32
*rid
1027 WERROR netr_DsRGetDCNameEx
(
1028 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1029 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1030 [in,unique] GUID
*domain_guid
,
1031 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1032 [in] netr_DsRGetDCName_flags flags
,
1033 [out,ref] netr_DsRGetDCNameInfo
**info
1038 WERROR netr_DsRGetSiteName
(
1039 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1040 [out,ref] [string,charset
(UTF16
)] uint16
**site
1046 typedef [flag
(NDR_PAHEX
)] struct {
1049 [size_is(size
/2),length_is(length
/2)] uint16
*data
;
1050 } netr_BinaryString
;
1054 [string,charset
(UTF16
)] uint16
*workstation_domain
;
1055 [string,charset
(UTF16
)] uint16
*workstation_site
;
1056 [string,charset
(UTF16
)] uint16
*unknown1
;
1057 [string,charset
(UTF16
)] uint16
*unknown2
;
1058 [string,charset
(UTF16
)] uint16
*unknown3
;
1059 [string,charset
(UTF16
)] uint16
*unknown4
;
1060 netr_BinaryString blob2
;
1062 lsa_String unknown5
;
1063 lsa_String unknown6
;
1065 } netr_DomainQuery1
;
1068 [case(1)] netr_DomainQuery1
*query1
;
1069 [case(2)] netr_DomainQuery1
*query1
;
1073 lsa_String domainname
;
1074 lsa_String fulldomainname
;
1078 netr_BinaryString unknown1
[4];
1080 } netr_DomainTrustInfo
;
1083 netr_DomainTrustInfo domaininfo
;
1085 [size_is(num_trusts
)] netr_DomainTrustInfo
*trusts
;
1086 uint32 unknown
[14]; /* room for expansion? */
1090 [case(1)] netr_DomainInfo1
*info1
;
1091 [case(2)] netr_DomainInfo1
*info1
;
1094 NTSTATUS netr_LogonGetDomainInfo
(
1095 [in] [string,charset
(UTF16
)] uint16 server_name
[],
1096 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1097 [in,ref] netr_Authenticator
*credential
,
1098 [in,out,ref] netr_Authenticator
*return_authenticator
,
1100 [in,switch_is(level
)] netr_DomainQuery query
,
1101 [out,ref,switch_is(level
)] netr_DomainInfo
*info
1104 typedef [flag
(NDR_PAHEX
)] struct {
1107 } netr_CryptPassword
;
1111 NTSTATUS netr_ServerPasswordSet2
(
1112 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1113 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1114 [in] netr_SchannelType secure_channel_type
,
1115 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1116 [in] netr_Authenticator credential
,
1117 [in] netr_CryptPassword new_password
,
1118 [out,ref] netr_Authenticator
*return_authenticator
1123 WERROR netr_ServerPasswordGet
(
1124 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1125 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1126 [in] netr_SchannelType secure_channel_type
,
1127 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1128 [in,ref] netr_Authenticator
*credential
,
1129 [out,ref] netr_Authenticator
*return_authenticator
,
1130 [out,ref] samr_Password
*password
1135 WERROR netr_NETRLOGONSENDTOSAM
();
1141 [size_is(count
)] lsa_String
*sitename
;
1142 } netr_DsRAddressToSitenamesWCtr
;
1145 [size_is(size
)] uint8
*buffer
;
1149 WERROR netr_DsRAddressToSitenamesW
(
1150 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1151 [in] [range(0,32000)] uint32 count
,
1152 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1153 [out] [ref] netr_DsRAddressToSitenamesWCtr
**ctr
1158 WERROR netr_DsRGetDCNameEx2
(
1159 [in,unique] [string,charset
(UTF16
)] uint16
*server_unc
,
1160 [in,unique] [string,charset
(UTF16
)] uint16
*client_account
,
1161 [in] samr_AcctFlags mask
,
1162 [in,unique] [string,charset
(UTF16
)] uint16
*domain_name
,
1163 [in,unique] GUID
*domain_guid
,
1164 [in,unique] [string,charset
(UTF16
)] uint16
*site_name
,
1165 [in] netr_DsRGetDCName_flags flags
,
1166 [out,ref] netr_DsRGetDCNameInfo
**info
1171 WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN
();
1175 typedef [bitmap32bit
] bitmap
{
1176 NETR_TRUST_FLAG_IN_FOREST
= 0x00000001,
1177 NETR_TRUST_FLAG_OUTBOUND
= 0x00000002,
1178 NETR_TRUST_FLAG_TREEROOT
= 0x00000004,
1179 NETR_TRUST_FLAG_PRIMARY
= 0x00000008,
1180 NETR_TRUST_FLAG_NATIVE
= 0x00000010,
1181 NETR_TRUST_FLAG_INBOUND
= 0x00000020
1184 typedef [v1_enum] enum {
1185 NETR_TRUST_TYPE_DOWNLEVEL
= 1,
1186 NETR_TRUST_TYPE_UPLEVEL
= 2,
1187 NETR_TRUST_TYPE_MIT
= 3,
1188 NETR_TRUST_TYPE_DCE
= 4
1191 typedef [bitmap32bit
] bitmap
{
1192 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE
= 0x00000001,
1193 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY
= 0x00000002,
1194 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN
= 0x00000004,
1195 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
= 0x00000008,
1196 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION
= 0x00000010,
1197 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST
= 0x00000020,
1198 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL
= 0x00000040
1199 } netr_TrustAttributes
;
1202 [string,charset
(UTF16
)] uint16
*netbios_name
;
1203 [string,charset
(UTF16
)] uint16
*dns_name
;
1204 netr_TrustFlags trust_flags
;
1205 uint32 parent_index
;
1206 netr_TrustType trust_type
;
1207 netr_TrustAttributes trust_attributes
;
1214 [size_is(count
)] netr_DomainTrust
*array
;
1215 } netr_DomainTrustList
;
1217 WERROR netr_NetrEnumerateTrustedDomainsEx
(
1218 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1219 [out,ref] netr_DomainTrustList
*dom_trust_list
1226 [size_is(count
)] lsa_String
*sitename
;
1227 [size_is(count
)] lsa_String
*subnetname
;
1228 } netr_DsRAddressToSitenamesExWCtr
;
1230 WERROR netr_DsRAddressToSitenamesExW
(
1231 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1232 [in] [range(0,32000)] uint32 count
,
1233 [in] [size_is(count
)] [ref] netr_DsRAddress
*addresses
,
1234 [out] [ref] netr_DsRAddressToSitenamesExWCtr
**ctr
1242 [size_is(num_sites
)] [unique] lsa_String
*sites
;
1245 WERROR netr_DsrGetDcSiteCoverageW
(
1246 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1247 [out,ref] DcSitesCtr
*ctr
1252 NTSTATUS netr_LogonSamLogonEx
(
1253 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1254 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1255 [in] uint16 logon_level
,
1256 [in] [switch_is(logon_level
)] netr_LogonLevel logon
,
1257 [in] uint16 validation_level
,
1258 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1259 [out,ref] uint8
*authoritative
,
1260 [in,out,ref] uint32
*flags
1266 WERROR netr_DsrEnumerateDomainTrusts
(
1267 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1268 [in] netr_TrustFlags trust_flags
,
1269 [out,ref] netr_DomainTrustList
*trusts
1275 WERROR netr_DsrDeregisterDNSHostRecords
(
1276 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1277 [in,unique] [string,charset
(UTF16
)] uint16
*domain
,
1278 [in,unique] GUID
*domain_guid
,
1279 [in,unique] GUID
*dsa_guid
,
1280 [in,ref] [string,charset
(UTF16
)] uint16
*dns_host
1285 NTSTATUS netr_ServerTrustPasswordsGet
(
1286 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1287 [in] [string,charset
(UTF16
)] uint16 account_name
[],
1288 [in] netr_SchannelType secure_channel_type
,
1289 [in] [string,charset
(UTF16
)] uint16 computer_name
[],
1290 [in,ref] netr_Authenticator
*credential
,
1291 [out,ref] netr_Authenticator
*return_authenticator
,
1292 [out,ref] samr_Password
*password
,
1293 [out,ref] samr_Password
*password2
1299 const int DS_GFTI_UPDATE_TDO
= 0x1;
1301 WERROR netr_DsRGetForestTrustInformation
(
1302 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1303 [in,unique] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1305 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1310 WERROR netr_GetForestTrustInformation
(
1311 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1312 [in,ref] [string,charset
(UTF16
)] uint16
*trusted_domain_name
,
1313 [in,ref] netr_Authenticator
*credential
,
1314 [out,ref] netr_Authenticator
*return_authenticator
,
1316 [out,ref] lsa_ForestTrustInformation
**forest_trust_info
1322 /* this is the ADS varient. I don't yet know what the "flags" are for */
1323 NTSTATUS netr_LogonSamLogonWithFlags
(
1324 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
1325 [in,unique] [string,charset
(UTF16
)] uint16
*computer_name
,
1326 [in,unique] netr_Authenticator
*credential
,
1327 [in,out,unique] netr_Authenticator
*return_authenticator
,
1328 [in] uint16 logon_level
,
1329 [in] [switch_is(logon_level
)] netr_LogonLevel logon
,
1330 [in] uint16 validation_level
,
1331 [out,ref] [switch_is(validation_level
)] netr_Validation
*validation
,
1332 [out,ref] uint8
*authoritative
,
1333 [in,out,ref] uint32
*flags
1338 WERROR netr_NETRSERVERGETTRUSTINFO
();