3 much of this was derived from the ethereal sources - thanks to everyone
10 uuid("12345678-1234-abcd-ef00-01234567cffb"),
12 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
13 pointer_default(unique),
14 pointer_default_top(unique),
15 depends(lsa,samr,security)
20 declare bitmap samr_AcctFlags;
26 [string,charset(UTF16)] uint16 *account_name;
37 time_t pw_must_change;
38 [string,charset(UTF16)] uint16 *computer;
39 [string,charset(UTF16)] uint16 *domain;
40 [string,charset(UTF16)] uint16 *script_path;
44 WERROR netr_LogonUasLogon(
45 [in] [string,charset(UTF16)] uint16 *server_name,
46 [in] [string,charset(UTF16)] uint16 account_name[],
47 [in] [string,charset(UTF16)] uint16 workstation[],
48 [out] netr_UasInfo *info
60 WERROR netr_LogonUasLogoff(
61 [in] [string,charset(UTF16)] uint16 *server_name,
62 [in] [string,charset(UTF16)] uint16 account_name[],
63 [in] [string,charset(UTF16)] uint16 workstation[],
64 [out] netr_UasLogoffInfo info
71 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
72 that the structure of the bindata looks like this:
74 dlong lockout_duration;
76 uint32 bad_attempt_lockout;
79 but it doesn't look as though this structure is reflected at the
80 NDR level. Maybe it is left to the application to decode the bindata array.
85 [size_is(size/2),length_is(length/2)] uint16 *bindata;
88 const int MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x002;
89 const int MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x020;
90 const int MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x800;
93 lsa_String domain_name;
94 uint32 parameter_control; /* see MSV1_0_* */
97 lsa_String account_name;
98 lsa_String workstation;
102 netr_IdentityInfo identity_info;
103 samr_Password lmpassword;
104 samr_Password ntpassword;
107 typedef [flag(NDR_PAHEX)] struct {
109 [value(length)] uint16 size;
110 [size_is(length),length_is(length)] uint8 *data;
111 } netr_ChallengeResponse;
113 typedef [flag(NDR_PAHEX)] struct {
114 netr_IdentityInfo identity_info;
116 netr_ChallengeResponse nt;
117 netr_ChallengeResponse lm;
120 typedef [public,switch_type(uint16)] union {
121 [case(1)] netr_PasswordInfo *password;
122 [case(2)] netr_NetworkInfo *network;
123 [case(3)] netr_PasswordInfo *password;
124 [case(5)] netr_PasswordInfo *password;
125 [case(6)] netr_NetworkInfo *network;
128 typedef [public] struct {
131 } netr_GroupMembership;
133 typedef [public,flag(NDR_PAHEX)] struct {
135 } netr_UserSessionKey;
137 typedef [public,flag(NDR_PAHEX)] struct {
141 /* Flags for user_flags below */
142 typedef [public,bitmap32bit] bitmap {
143 NETLOGON_GUEST = 0x0001,
144 NETLOGON_NOENCRYPTION = 0x0002,
145 NETLOGON_CACHED_ACCOUNT = 0x0004,
146 NETLOGON_USED_LM_PASSWORD = 0x0008,
147 NETLOGON_EXTRA_SIDS = 0x0020,
148 NETLOGON_SUBAUTH_SESSION_KEY = 0x0040,
149 NETLOGON_SERVER_TRUST_ACCOUNT = 0x0080,
150 NETLOGON_NTLMV2_ENABLED = 0x0100,
151 NETLOGON_RESOURCE_GROUPS = 0x0200,
152 NETLOGON_PROFILE_PATH_RETURNED = 0x0400
159 NTTIME last_password_change;
160 NTTIME allow_password_change;
161 NTTIME force_password_change;
162 lsa_String account_name;
163 lsa_String full_name;
164 lsa_String logon_script;
165 lsa_String profile_path;
166 lsa_String home_directory;
167 lsa_String home_drive;
169 uint16 bad_password_count;
172 samr_RidWithAttributeArray groups;
173 netr_UserFlags user_flags;
174 netr_UserSessionKey key;
175 lsa_StringLarge logon_server;
176 lsa_StringLarge domain;
177 dom_sid2 *domain_sid;
178 netr_LMSessionKey LMSessKey;
179 samr_AcctFlags acct_flags;
184 netr_SamBaseInfo base;
192 typedef [public] struct {
193 netr_SamBaseInfo base;
195 [size_is(sidcount)] netr_SidAttr *sids;
199 netr_SamBaseInfo base;
201 [size_is(sidcount)] netr_SidAttr *sids;
203 lsa_String principle;
209 [size_is(pac_size)] uint8 *pac;
210 lsa_String logon_domain;
211 lsa_String logon_server;
212 lsa_String principal_name;
214 [size_is(auth_size)] uint8 *auth;
215 netr_UserSessionKey user_session_key;
216 uint32 expansionroom[10];
223 typedef [public,switch_type(uint16)] union {
224 [case(2)] netr_SamInfo2 *sam2;
225 [case(3)] netr_SamInfo3 *sam3;
226 [case(4)] netr_PacInfo *pac;
227 [case(5)] netr_PacInfo *pac;
228 [case(6)] netr_SamInfo6 *sam6;
231 typedef [public, flag(NDR_PAHEX)] struct {
235 typedef [public] struct {
236 netr_Credential cred;
238 } netr_Authenticator;
240 NTSTATUS netr_LogonSamLogon(
241 [in] [string,charset(UTF16)] uint16 *server_name,
242 [in] [string,charset(UTF16)] uint16 *computer_name,
243 [in] netr_Authenticator *credential,
244 [in][out] netr_Authenticator *return_authenticator,
245 [in] uint16 logon_level,
246 [in] [switch_is(logon_level)] netr_LogonLevel logon,
247 [in] uint16 validation_level,
248 [out] [switch_is(validation_level)] netr_Validation validation,
249 [out] uint8 authoritative
256 NTSTATUS netr_LogonSamLogoff(
257 [in] [string,charset(UTF16)] uint16 *server_name,
258 [in] [string,charset(UTF16)] uint16 *computer_name,
259 [in] netr_Authenticator *credential,
260 [in][out] netr_Authenticator *return_authenticator,
261 [in] uint16 logon_level,
262 [in] [switch_is(logon_level)] netr_LogonLevel logon
270 NTSTATUS netr_ServerReqChallenge(
271 [in,string,charset(UTF16)] uint16 *server_name,
272 [in,string,charset(UTF16)] uint16 computer_name[],
273 [in,out,ref] netr_Credential *credentials
280 declare enum netr_SchannelType;
282 NTSTATUS netr_ServerAuthenticate(
283 [in,string,charset(UTF16)] uint16 *server_name,
284 [in,string,charset(UTF16)] uint16 account_name[],
285 [in] netr_SchannelType secure_channel_type,
286 [in,string,charset(UTF16)] uint16 computer_name[],
287 [in,out,ref] netr_Credential *credentials
294 NTSTATUS netr_ServerPasswordSet(
295 [in] [string,charset(UTF16)] uint16 *server_name,
296 [in] [string,charset(UTF16)] uint16 account_name[],
297 [in] netr_SchannelType secure_channel_type,
298 [in] [string,charset(UTF16)] uint16 computer_name[],
299 [in] netr_Authenticator credential,
300 [in] samr_Password new_password,
301 [out] netr_Authenticator return_authenticator
308 declare enum netr_SamDatabaseID;
311 [string,charset(UTF16)] uint16 *account_name;
320 } netr_DELTA_DELETE_USER;
324 [value(length)] uint16 size;
336 uint8 nt_history[nt_length];
337 uint8 lm_history[lm_length];
338 } netr_PasswordHistory;
341 netr_USER_KEY16 lmpassword;
342 netr_USER_KEY16 ntpassword;
343 netr_PasswordHistory lmhistory;
347 netr_USER_KEYS2 keys2;
348 } netr_USER_KEY_UNION;
350 typedef [public] struct {
352 netr_USER_KEY_UNION keys;
356 boolean8 SensitiveDataFlag;
359 /* netr_USER_KEYS encrypted with the session key */
360 [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
361 } netr_USER_PRIVATE_INFO;
364 lsa_String account_name;
365 lsa_String full_name;
368 lsa_String home_directory;
369 lsa_String home_drive;
370 lsa_String logon_script;
371 lsa_String description;
372 lsa_String workstations;
375 samr_LogonHours logon_hours;
376 uint16 bad_password_count;
378 NTTIME last_password_change;
380 samr_AcctFlags acct_flags;
381 samr_Password lmpassword;
382 samr_Password ntpassword;
383 boolean8 nt_password_present;
384 boolean8 lm_password_present;
385 boolean8 password_expired;
387 lsa_String parameters;
390 netr_USER_PRIVATE_INFO user_private_info;
391 uint32 SecurityInformation;
393 lsa_String profile_path;
404 lsa_String domain_name;
406 dlong force_logoff_time;
407 uint16 min_password_length;
408 uint16 password_history_length;
409 /* yes, these are signed. They are in negative 100ns */
410 dlong max_password_age;
411 dlong min_password_age;
413 NTTIME domain_create_time;
414 uint32 SecurityInformation;
416 netr_AcctLockStr account_lockout;
420 uint32 logon_to_chgpass;
427 lsa_String group_name;
430 lsa_String description;
431 uint32 SecurityInformation;
457 [size_is(num_rids)] uint32 *rids;
458 [size_is(num_rids)] uint32 *attribs;
464 } netr_DELTA_GROUP_MEMBER;
467 lsa_String alias_name;
469 uint32 SecurityInformation;
471 lsa_String description;
487 } netr_DELTA_ALIAS_MEMBER;
490 uint32 pagedpoollimit;
491 uint32 nonpagedpoollimit;
492 uint32 minimumworkingsetsize;
493 uint32 maximumworkingsetsize;
494 uint32 pagefilelimit;
500 NTTIME auditretentionperiod;
501 boolean8 auditingmode;
502 uint32 maxauditeventcount;
503 [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
504 lsa_String primary_domain_name;
506 netr_QUOTA_LIMITS quota_limits;
508 NTTIME db_create_time;
509 uint32 SecurityInformation;
522 lsa_String domain_name;
523 uint32 num_controllers;
524 [size_is(num_controllers)] lsa_String *controller_names;
525 uint32 SecurityInformation;
535 } netr_DELTA_TRUSTED_DOMAIN;
539 } netr_DELTA_DELETE_TRUST;
542 uint32 privilege_entries;
543 uint32 privilege_control;
544 [size_is(privilege_entries)] uint32 *privilege_attrib;
545 [size_is(privilege_entries)] lsa_String *privilege_name;
546 netr_QUOTA_LIMITS quotalimits;
548 uint32 SecurityInformation;
558 } netr_DELTA_ACCOUNT;
562 } netr_DELTA_DELETE_ACCOUNT;
566 } netr_DELTA_DELETE_SECRET;
571 [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
575 netr_CIPHER_VALUE current_cipher;
576 NTTIME current_cipher_set_time;
577 netr_CIPHER_VALUE old_cipher;
578 NTTIME old_cipher_set_time;
579 uint32 SecurityInformation;
592 NETR_DELTA_DOMAIN = 1,
593 NETR_DELTA_GROUP = 2,
594 NETR_DELTA_DELETE_GROUP = 3,
595 NETR_DELTA_RENAME_GROUP = 4,
597 NETR_DELTA_DELETE_USER = 6,
598 NETR_DELTA_RENAME_USER = 7,
599 NETR_DELTA_GROUP_MEMBER = 8,
600 NETR_DELTA_ALIAS = 9,
601 NETR_DELTA_DELETE_ALIAS = 10,
602 NETR_DELTA_RENAME_ALIAS = 11,
603 NETR_DELTA_ALIAS_MEMBER = 12,
604 NETR_DELTA_POLICY = 13,
605 NETR_DELTA_TRUSTED_DOMAIN = 14,
606 NETR_DELTA_DELETE_TRUST = 15,
607 NETR_DELTA_ACCOUNT = 16,
608 NETR_DELTA_DELETE_ACCOUNT = 17,
609 NETR_DELTA_SECRET = 18,
610 NETR_DELTA_DELETE_SECRET = 19,
611 NETR_DELTA_DELETE_GROUP2 = 20,
612 NETR_DELTA_DELETE_USER2 = 21,
613 NETR_DELTA_MODIFY_COUNT = 22
616 typedef [switch_type(netr_DeltaEnum)] union {
617 [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
618 [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
619 [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
620 [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
621 [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
622 [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
623 [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
624 [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
625 [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
626 [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
627 [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
628 [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
629 [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
630 [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
631 [case(NETR_DELTA_DELETE_TRUST)] netr_DELTA_DELETE_TRUST delete_trust;
632 [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
633 [case(NETR_DELTA_DELETE_ACCOUNT)] netr_DELTA_DELETE_ACCOUNT delete_account;
634 [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
635 [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret;
636 [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
637 [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
638 [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
641 typedef [switch_type(netr_DeltaEnum)] union {
642 [case(NETR_DELTA_DOMAIN)] uint32 rid;
643 [case(NETR_DELTA_GROUP)] uint32 rid;
644 [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
645 [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
646 [case(NETR_DELTA_USER)] uint32 rid;
647 [case(NETR_DELTA_DELETE_USER)] uint32 rid;
648 [case(NETR_DELTA_RENAME_USER)] uint32 rid;
649 [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
650 [case(NETR_DELTA_ALIAS)] uint32 rid;
651 [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
652 [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
653 [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
654 [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
655 [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
656 [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
657 [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
658 [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
659 [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
660 [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
661 [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
662 [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
663 [case(NETR_DELTA_MODIFY_COUNT)] ;
664 } netr_DELTA_ID_UNION;
667 netr_DeltaEnum delta_type;
668 [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
669 [switch_is(delta_type)] netr_DELTA_UNION delta_union;
674 [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
675 } netr_DELTA_ENUM_ARRAY;
678 NTSTATUS netr_DatabaseDeltas(
679 [in] [string,charset(UTF16)] uint16 logon_server[],
680 [in] [string,charset(UTF16)] uint16 computername[],
681 [in] netr_Authenticator credential,
682 [in,out] netr_Authenticator return_authenticator,
683 [in] netr_SamDatabaseID database_id,
684 [in,out] udlong sequence_num,
685 [in] uint32 preferredmaximumlength,
686 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
693 NTSTATUS netr_DatabaseSync(
694 [in] [string,charset(UTF16)] uint16 logon_server[],
695 [in] [string,charset(UTF16)] uint16 computername[],
696 [in] netr_Authenticator credential,
697 [in,out] netr_Authenticator return_authenticator,
698 [in] netr_SamDatabaseID database_id,
699 [in,out] uint32 sync_context,
700 [in] uint32 preferredmaximumlength,
701 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
708 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
710 typedef [flag(NDR_PAHEX)] struct {
711 uint8 computer_name[16];
713 uint32 serial_number;
717 [flag(NDR_REMAINING)] DATA_BLOB blob;
718 } netr_AccountBuffer;
720 NTSTATUS netr_AccountDeltas(
721 [in] [string,charset(UTF16)] uint16 *logon_server,
722 [in] [string,charset(UTF16)] uint16 computername[],
723 [in] netr_Authenticator credential,
724 [in,out] netr_Authenticator return_authenticator,
725 [in] netr_UAS_INFO_0 uas,
728 [in] uint32 buffersize,
729 [out,subcontext(4)] netr_AccountBuffer buffer,
730 [out] uint32 count_returned,
731 [out] uint32 total_entries,
732 [out] netr_UAS_INFO_0 recordid
739 NTSTATUS netr_AccountSync(
740 [in] [string,charset(UTF16)] uint16 *logon_server,
741 [in] [string,charset(UTF16)] uint16 computername[],
742 [in] netr_Authenticator credential,
743 [in,out] netr_Authenticator return_authenticator,
744 [in] uint32 reference,
746 [in] uint32 buffersize,
747 [out,subcontext(4)] netr_AccountBuffer buffer,
748 [out] uint32 count_returned,
749 [out] uint32 total_entries,
750 [out] uint32 next_reference,
751 [in,out] netr_UAS_INFO_0 recordid
758 NTSTATUS netr_GetDcName(
759 [in] [string,charset(UTF16)] uint16 logon_server[],
760 [in] [string,charset(UTF16)] uint16 *domainname,
761 [out] [string,charset(UTF16)] uint16 *dcname
769 uint32 pdc_connection_status;
770 } netr_NETLOGON_INFO_1;
774 uint32 pdc_connection_status;
775 [string,charset(UTF16)] uint16 trusted_dc_name[];
776 uint32 tc_connection_status;
777 } netr_NETLOGON_INFO_2;
781 uint32 logon_attempts;
787 } netr_NETLOGON_INFO_3;
790 [case(1)] netr_NETLOGON_INFO_1 *info1;
791 [case(2)] netr_NETLOGON_INFO_2 *info2;
792 [case(3)] netr_NETLOGON_INFO_3 *info3;
793 } netr_CONTROL_QUERY_INFORMATION;
795 /* function_code values */
796 typedef [v1_enum] enum {
797 NETLOGON_CONTROL_REDISCOVER = 5,
798 NETLOGON_CONTROL_TC_QUERY = 6,
799 NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
800 NETLOGON_CONTROL_SET_DBFLAG = 65534
801 } netr_LogonControlCode;
803 WERROR netr_LogonControl(
804 [in] [string,charset(UTF16)] uint16 *logon_server,
805 [in] netr_LogonControlCode function_code,
807 [out,switch_is(level)] netr_CONTROL_QUERY_INFORMATION info
814 WERROR netr_GetAnyDCName(
815 [in] [string,charset(UTF16)] uint16 *logon_server,
816 [in] [string,charset(UTF16)] uint16 *domainname,
817 [out] [string,charset(UTF16)] uint16 *dcname
825 [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
826 [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
827 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
828 [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
829 } netr_CONTROL_DATA_INFORMATION;
831 WERROR netr_LogonControl2(
832 [in] [string,charset(UTF16)] uint16 *logon_server,
833 [in] uint32 function_code,
835 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
836 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
840 /* If this flag is not set, then the passwords and LM session keys are
841 * encrypted with DES calls. (And the user session key is
843 const int NETLOGON_NEG_ARCFOUR = 0x00000004;
844 const int NETLOGON_NEG_128BIT = 0x00004000;
845 const int NETLOGON_NEG_SCHANNEL = 0x40000000;
850 NTSTATUS netr_ServerAuthenticate2(
851 [in] [string,charset(UTF16)] uint16 *server_name,
852 [in] [string,charset(UTF16)] uint16 account_name[],
853 [in] netr_SchannelType secure_channel_type,
854 [in] [string,charset(UTF16)] uint16 computer_name[],
855 [in,out,ref] netr_Credential *credentials,
856 [in,out,ref] uint32 *negotiate_flags
863 NTSTATUS netr_DatabaseSync2(
864 [in] [string,charset(UTF16)] uint16 logon_server[],
865 [in] [string,charset(UTF16)] uint16 computername[],
866 [in] netr_Authenticator credential,
867 [in,out] netr_Authenticator return_authenticator,
868 [in] netr_SamDatabaseID database_id,
869 [in] uint16 restart_state,
870 [in,out] uint32 sync_context,
871 [in] uint32 preferredmaximumlength,
872 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
879 /* i'm not at all sure how this call works */
881 NTSTATUS netr_DatabaseRedo(
882 [in] [string,charset(UTF16)] uint16 logon_server[],
883 [in] [string,charset(UTF16)] uint16 computername[],
884 [in] netr_Authenticator credential,
885 [in,out] netr_Authenticator return_authenticator,
886 [in][size_is(change_log_entry_size)] uint8 *change_log_entry,
887 [in] uint32 change_log_entry_size,
888 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
895 WERROR netr_LogonControl2Ex(
896 [in] [string,charset(UTF16)] uint16 *logon_server,
897 [in] uint32 function_code,
899 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
900 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
905 WERROR netr_NETRENUMERATETRUSTEDDOMAINS() ;
910 [string,charset(UTF16)] uint16 *dc_unc;
911 [string,charset(UTF16)] uint16 *dc_address;
912 int32 dc_address_type;
914 [string,charset(UTF16)] uint16 *domain_name;
915 [string,charset(UTF16)] uint16 *forest_name;
917 [string,charset(UTF16)] uint16 *dc_site_name;
918 [string,charset(UTF16)] uint16 *client_site_name;
919 } netr_DsRGetDCNameInfo;
921 WERROR netr_DsRGetDCName(
922 [in] [string,charset(UTF16)] uint16 *server_unc,
923 [in] [string,charset(UTF16)] uint16 *domain_name,
924 [in] GUID *domain_guid,
925 [in] GUID *site_guid,
927 [out] netr_DsRGetDCNameInfo *info
932 WERROR netr_NETRLOGONDUMMYROUTINE1();
936 WERROR netr_NETRLOGONSETSERVICEBITS();
940 WERROR netr_NETRLOGONGETTRUSTRID();
944 WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
948 WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
952 NTSTATUS netr_ServerAuthenticate3(
953 [in] [string,charset(UTF16)] uint16 *server_name,
954 [in] [string,charset(UTF16)] uint16 account_name[],
955 [in] netr_SchannelType secure_channel_type,
956 [in] [string,charset(UTF16)] uint16 computer_name[],
957 [in,out,ref] netr_Credential *credentials,
958 [in,out,ref] uint32 *negotiate_flags,
959 [out,ref] uint32 *rid
965 WERROR netr_DsRGetDCNameEx(
966 [in] [string,charset(UTF16)] uint16 *server_unc,
967 [in] [string,charset(UTF16)] uint16 *domain_name,
968 [in] GUID *domain_guid,
969 [in] [string,charset(UTF16)] uint16 *site_name,
971 [out] netr_DsRGetDCNameInfo *info
976 WERROR netr_DsRGetSiteName(
977 [in] [string,charset(UTF16)] uint16 *computer_name,
978 [out] [string,charset(UTF16)] uint16 *site
986 [size_is(length)] uint8 *data;
989 typedef [flag(NDR_PAHEX)] struct {
992 [size_is(size/2),length_is(length/2)] uint16 *data;
997 [string,charset(UTF16)] uint16 *workstation_domain;
998 [string,charset(UTF16)] uint16 *workstation_site;
999 [string,charset(UTF16)] uint16 *unknown1;
1000 [string,charset(UTF16)] uint16 *unknown2;
1001 [string,charset(UTF16)] uint16 *unknown3;
1002 [string,charset(UTF16)] uint16 *unknown4;
1003 netr_BinaryString blob2;
1005 lsa_String unknown5;
1006 lsa_String unknown6;
1008 } netr_DomainQuery1;
1011 [case(1)] netr_DomainQuery1 *query1;
1012 [case(2)] netr_DomainQuery1 *query1;
1016 lsa_String domainname;
1017 lsa_String fulldomainname;
1021 netr_BinaryString unknown1[4];
1023 } netr_DomainTrustInfo;
1026 netr_DomainTrustInfo domaininfo;
1028 [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
1029 uint32 unknown[14]; /* room for expansion? */
1033 [case(1)] netr_DomainInfo1 *info1;
1034 [case(2)] netr_DomainInfo1 *info1;
1037 NTSTATUS netr_LogonGetDomainInfo(
1038 [in] [string,charset(UTF16)] uint16 server_name[],
1039 [in] [string,charset(UTF16)] uint16 *computer_name,
1040 [in,ref] netr_Authenticator *credential,
1041 [in,out,ref] netr_Authenticator *return_authenticator,
1043 [in,switch_is(level)] netr_DomainQuery query,
1044 [out,switch_is(level)] netr_DomainInfo info
1047 typedef [flag(NDR_PAHEX)] struct {
1050 } netr_CryptPassword;
1054 NTSTATUS netr_ServerPasswordSet2(
1055 [in] [string,charset(UTF16)] uint16 *server_name,
1056 [in] [string,charset(UTF16)] uint16 account_name[],
1057 [in] netr_SchannelType secure_channel_type,
1058 [in] [string,charset(UTF16)] uint16 computer_name[],
1059 [in] netr_Authenticator credential,
1060 [in] netr_CryptPassword new_password,
1061 [out] netr_Authenticator return_authenticator
1066 WERROR netr_NETRSERVERPASSWORDGET();
1070 WERROR netr_NETRLOGONSENDTOSAM();
1074 WERROR netr_DSRADDRESSTOSITENAMESW();
1078 WERROR netr_DsRGetDCNameEx2(
1079 [in] [string,charset(UTF16)] uint16 *server_unc,
1080 [in] [string,charset(UTF16)] uint16 *client_account,
1082 [in] [string,charset(UTF16)] uint16 *domain_name,
1083 [in] GUID *domain_guid,
1084 [in] [string,charset(UTF16)] uint16 *site_name,
1086 [out] netr_DsRGetDCNameInfo *info
1091 WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
1095 WERROR netr_NETRENUMERATETRUSTEDDOMAINSEX();
1099 WERROR netr_DSRADDRESSTOSITENAMESEXW();
1103 WERROR netr_DSRGETDCSITECOVERAGEW();
1107 NTSTATUS netr_LogonSamLogonEx(
1108 [in] [string,charset(UTF16)] uint16 *server_name,
1109 [in] [string,charset(UTF16)] uint16 *computer_name,
1110 [in] uint16 logon_level,
1111 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1112 [in] uint16 validation_level,
1113 [out] [switch_is(validation_level)] netr_Validation validation,
1114 [out] uint8 authoritative,
1115 [in,out] uint32 flags
1121 typedef [bitmap32bit] bitmap {
1122 NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
1123 NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
1124 NETR_TRUST_FLAG_TREEROOT = 0x00000004,
1125 NETR_TRUST_FLAG_PRIMARY = 0x00000008,
1126 NETR_TRUST_FLAG_NATIVE = 0x00000010,
1127 NETR_TRUST_FLAG_INBOUND = 0x00000020
1130 typedef [v1_enum] enum {
1131 NETR_TRUST_TYPE_DOWNLEVEL = 1,
1132 NETR_TRUST_TYPE_UPLEVEL = 2,
1133 NETR_TRUST_TYPE_MIT = 3,
1134 NETR_TRUST_TYPE_DCE = 4
1137 typedef [bitmap32bit] bitmap {
1138 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
1139 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
1140 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
1141 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
1142 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
1143 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
1144 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040
1145 } netr_TrustAttributes;
1148 [string,charset(UTF16)] uint16 *netbios_name;
1149 [string,charset(UTF16)] uint16 *dns_name;
1150 netr_TrustFlags trust_flags;
1151 uint32 parent_index;
1152 netr_TrustType trust_type;
1153 netr_TrustAttributes trust_attributes;
1158 WERROR netr_DsrEnumerateDomainTrusts(
1159 [in] [string,charset(UTF16)] uint16 *server_name,
1160 [in] netr_TrustFlags trust_flags,
1162 [out,size_is(count)] netr_DomainTrust *trusts
1168 WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
1172 WERROR netr_NETRSERVERTRUSTPASSWORDSGET();
1176 WERROR netr_DSRGETFORESTTRUSTINFORMATION();
1180 WERROR netr_NETRGETFORESTTRUSTINFORMATION();
1185 /* this is the ADS varient. I don't yet know what the "flags" are for */
1186 NTSTATUS netr_LogonSamLogonWithFlags(
1187 [in] [string,charset(UTF16)] uint16 *server_name,
1188 [in] [string,charset(UTF16)] uint16 *computer_name,
1189 [in] netr_Authenticator *credential,
1190 [in][out] netr_Authenticator *return_authenticator,
1191 [in] uint16 logon_level,
1192 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1193 [in] uint16 validation_level,
1194 [out] [switch_is(validation_level)] netr_Validation validation,
1195 [out] uint8 authoritative,
1196 [in,out] uint32 flags
1201 WERROR netr_NETRSERVERGETTRUSTINFO();