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),
21 declare bitmap samr_AcctFlags;
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] [string,charset(UTF16)] uint16 *server_name,
47 [in] [string,charset(UTF16)] uint16 account_name[],
48 [in] [string,charset(UTF16)] uint16 workstation[],
49 [out] netr_UasInfo *info
61 WERROR netr_LogonUasLogoff(
62 [in] [string,charset(UTF16)] uint16 *server_name,
63 [in] [string,charset(UTF16)] uint16 account_name[],
64 [in] [string,charset(UTF16)] uint16 workstation[],
65 [out] 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 const int MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x002;
90 const int MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x020;
91 const int MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x800;
94 lsa_String domain_name;
95 uint32 parameter_control; /* see MSV1_0_* */
98 lsa_String account_name;
99 lsa_String workstation;
103 netr_IdentityInfo identity_info;
104 samr_Password lmpassword;
105 samr_Password ntpassword;
108 typedef [flag(NDR_PAHEX)] struct {
110 [value(length)] uint16 size;
111 [size_is(length),length_is(length)] uint8 *data;
112 } netr_ChallengeResponse;
114 typedef [flag(NDR_PAHEX)] struct {
115 netr_IdentityInfo identity_info;
117 netr_ChallengeResponse nt;
118 netr_ChallengeResponse lm;
121 typedef [public,switch_type(uint16)] union {
122 [case(1)] netr_PasswordInfo *password;
123 [case(2)] netr_NetworkInfo *network;
124 [case(3)] netr_PasswordInfo *password;
125 [case(5)] netr_PasswordInfo *password;
126 [case(6)] netr_NetworkInfo *network;
129 typedef [public] struct {
132 } netr_GroupMembership;
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 = 0x0001,
145 NETLOGON_NOENCRYPTION = 0x0002,
146 NETLOGON_CACHED_ACCOUNT = 0x0004,
147 NETLOGON_USED_LM_PASSWORD = 0x0008,
148 NETLOGON_EXTRA_SIDS = 0x0020,
149 NETLOGON_SUBAUTH_SESSION_KEY = 0x0040,
150 NETLOGON_SERVER_TRUST_ACCOUNT = 0x0080,
151 NETLOGON_NTLMV2_ENABLED = 0x0100,
152 NETLOGON_RESOURCE_GROUPS = 0x0200,
153 NETLOGON_PROFILE_PATH_RETURNED = 0x0400
160 NTTIME last_password_change;
161 NTTIME allow_password_change;
162 NTTIME force_password_change;
163 lsa_String account_name;
164 lsa_String full_name;
165 lsa_String logon_script;
166 lsa_String profile_path;
167 lsa_String home_directory;
168 lsa_String home_drive;
170 uint16 bad_password_count;
173 samr_RidWithAttributeArray groups;
174 netr_UserFlags user_flags;
175 netr_UserSessionKey key;
176 lsa_StringLarge logon_server;
177 lsa_StringLarge domain;
178 dom_sid2 *domain_sid;
179 netr_LMSessionKey LMSessKey;
180 samr_AcctFlags acct_flags;
185 netr_SamBaseInfo base;
193 typedef [public] struct {
194 netr_SamBaseInfo base;
196 [size_is(sidcount)] netr_SidAttr *sids;
200 netr_SamBaseInfo base;
202 [size_is(sidcount)] netr_SidAttr *sids;
204 lsa_String principle;
210 [size_is(pac_size)] uint8 *pac;
211 lsa_String logon_domain;
212 lsa_String logon_server;
213 lsa_String principal_name;
215 [size_is(auth_size)] uint8 *auth;
216 netr_UserSessionKey user_session_key;
217 uint32 expansionroom[10];
224 typedef [public,switch_type(uint16)] union {
225 [case(2)] netr_SamInfo2 *sam2;
226 [case(3)] netr_SamInfo3 *sam3;
227 [case(4)] netr_PacInfo *pac;
228 [case(5)] netr_PacInfo *pac;
229 [case(6)] netr_SamInfo6 *sam6;
232 typedef [public, flag(NDR_PAHEX)] struct {
236 typedef [public] struct {
237 netr_Credential cred;
239 } netr_Authenticator;
241 NTSTATUS netr_LogonSamLogon(
242 [in] [string,charset(UTF16)] uint16 *server_name,
243 [in] [string,charset(UTF16)] uint16 *computer_name,
244 [in] netr_Authenticator *credential,
245 [in][out] netr_Authenticator *return_authenticator,
246 [in] uint16 logon_level,
247 [in] [switch_is(logon_level)] netr_LogonLevel logon,
248 [in] uint16 validation_level,
249 [out] [switch_is(validation_level)] netr_Validation validation,
250 [out] uint8 authoritative
257 NTSTATUS netr_LogonSamLogoff(
258 [in] [string,charset(UTF16)] uint16 *server_name,
259 [in] [string,charset(UTF16)] uint16 *computer_name,
260 [in] netr_Authenticator *credential,
261 [in][out] netr_Authenticator *return_authenticator,
262 [in] uint16 logon_level,
263 [in] [switch_is(logon_level)] netr_LogonLevel logon
271 NTSTATUS netr_ServerReqChallenge(
272 [in,string,charset(UTF16)] uint16 *server_name,
273 [in,string,charset(UTF16)] uint16 computer_name[],
274 [in,out,ref] netr_Credential *credentials
281 declare enum netr_SchannelType;
283 NTSTATUS netr_ServerAuthenticate(
284 [in,string,charset(UTF16)] uint16 *server_name,
285 [in,string,charset(UTF16)] uint16 account_name[],
286 [in] netr_SchannelType secure_channel_type,
287 [in,string,charset(UTF16)] uint16 computer_name[],
288 [in,out,ref] netr_Credential *credentials
295 NTSTATUS netr_ServerPasswordSet(
296 [in] [string,charset(UTF16)] uint16 *server_name,
297 [in] [string,charset(UTF16)] uint16 account_name[],
298 [in] netr_SchannelType secure_channel_type,
299 [in] [string,charset(UTF16)] uint16 computer_name[],
300 [in] netr_Authenticator credential,
301 [in] samr_Password new_password,
302 [out] netr_Authenticator return_authenticator
309 declare enum netr_SamDatabaseID;
312 [string,charset(UTF16)] uint16 *account_name;
321 } netr_DELTA_DELETE_USER;
325 [value(length)] uint16 size;
337 uint8 nt_history[nt_length];
338 uint8 lm_history[lm_length];
339 } netr_PasswordHistory;
342 netr_USER_KEY16 lmpassword;
343 netr_USER_KEY16 ntpassword;
344 netr_PasswordHistory lmhistory;
348 netr_USER_KEYS2 keys2;
349 } netr_USER_KEY_UNION;
351 typedef [public] struct {
353 netr_USER_KEY_UNION keys;
357 boolean8 SensitiveDataFlag;
360 /* netr_USER_KEYS encrypted with the session key */
361 [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
362 } netr_USER_PRIVATE_INFO;
365 lsa_String account_name;
366 lsa_String full_name;
369 lsa_String home_directory;
370 lsa_String home_drive;
371 lsa_String logon_script;
372 lsa_String description;
373 lsa_String workstations;
376 samr_LogonHours logon_hours;
377 uint16 bad_password_count;
379 NTTIME last_password_change;
381 samr_AcctFlags acct_flags;
382 samr_Password lmpassword;
383 samr_Password ntpassword;
384 boolean8 nt_password_present;
385 boolean8 lm_password_present;
386 boolean8 password_expired;
388 lsa_String parameters;
391 netr_USER_PRIVATE_INFO user_private_info;
392 uint32 SecurityInformation;
394 lsa_String profile_path;
405 lsa_String domain_name;
407 dlong force_logoff_time;
408 uint16 min_password_length;
409 uint16 password_history_length;
410 /* yes, these are signed. They are in negative 100ns */
411 dlong max_password_age;
412 dlong min_password_age;
414 NTTIME domain_create_time;
415 uint32 SecurityInformation;
417 netr_AcctLockStr account_lockout;
421 uint32 logon_to_chgpass;
428 lsa_String group_name;
431 lsa_String description;
432 uint32 SecurityInformation;
458 [size_is(num_rids)] uint32 *rids;
459 [size_is(num_rids)] uint32 *attribs;
465 } netr_DELTA_GROUP_MEMBER;
468 lsa_String alias_name;
470 uint32 SecurityInformation;
472 lsa_String description;
488 } netr_DELTA_ALIAS_MEMBER;
491 uint32 pagedpoollimit;
492 uint32 nonpagedpoollimit;
493 uint32 minimumworkingsetsize;
494 uint32 maximumworkingsetsize;
495 uint32 pagefilelimit;
501 NTTIME auditretentionperiod;
502 boolean8 auditingmode;
503 uint32 maxauditeventcount;
504 [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
505 lsa_String primary_domain_name;
507 netr_QUOTA_LIMITS quota_limits;
509 NTTIME db_create_time;
510 uint32 SecurityInformation;
523 lsa_String domain_name;
524 uint32 num_controllers;
525 [size_is(num_controllers)] lsa_String *controller_names;
526 uint32 SecurityInformation;
536 } netr_DELTA_TRUSTED_DOMAIN;
540 } netr_DELTA_DELETE_TRUST;
543 uint32 privilege_entries;
544 uint32 privilege_control;
545 [size_is(privilege_entries)] uint32 *privilege_attrib;
546 [size_is(privilege_entries)] lsa_String *privilege_name;
547 netr_QUOTA_LIMITS quotalimits;
549 uint32 SecurityInformation;
559 } netr_DELTA_ACCOUNT;
563 } netr_DELTA_DELETE_ACCOUNT;
567 } netr_DELTA_DELETE_SECRET;
572 [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
576 netr_CIPHER_VALUE current_cipher;
577 NTTIME current_cipher_set_time;
578 netr_CIPHER_VALUE old_cipher;
579 NTTIME old_cipher_set_time;
580 uint32 SecurityInformation;
593 NETR_DELTA_DOMAIN = 1,
594 NETR_DELTA_GROUP = 2,
595 NETR_DELTA_DELETE_GROUP = 3,
596 NETR_DELTA_RENAME_GROUP = 4,
598 NETR_DELTA_DELETE_USER = 6,
599 NETR_DELTA_RENAME_USER = 7,
600 NETR_DELTA_GROUP_MEMBER = 8,
601 NETR_DELTA_ALIAS = 9,
602 NETR_DELTA_DELETE_ALIAS = 10,
603 NETR_DELTA_RENAME_ALIAS = 11,
604 NETR_DELTA_ALIAS_MEMBER = 12,
605 NETR_DELTA_POLICY = 13,
606 NETR_DELTA_TRUSTED_DOMAIN = 14,
607 NETR_DELTA_DELETE_TRUST = 15,
608 NETR_DELTA_ACCOUNT = 16,
609 NETR_DELTA_DELETE_ACCOUNT = 17,
610 NETR_DELTA_SECRET = 18,
611 NETR_DELTA_DELETE_SECRET = 19,
612 NETR_DELTA_DELETE_GROUP2 = 20,
613 NETR_DELTA_DELETE_USER2 = 21,
614 NETR_DELTA_MODIFY_COUNT = 22
617 typedef [switch_type(netr_DeltaEnum)] union {
618 [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
619 [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
620 [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
621 [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
622 [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
623 [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
624 [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
625 [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
626 [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
627 [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
628 [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
629 [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
630 [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
631 [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
632 [case(NETR_DELTA_DELETE_TRUST)] netr_DELTA_DELETE_TRUST delete_trust;
633 [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
634 [case(NETR_DELTA_DELETE_ACCOUNT)] netr_DELTA_DELETE_ACCOUNT delete_account;
635 [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
636 [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret;
637 [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
638 [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
639 [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
642 typedef [switch_type(netr_DeltaEnum)] union {
643 [case(NETR_DELTA_DOMAIN)] uint32 rid;
644 [case(NETR_DELTA_GROUP)] uint32 rid;
645 [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
646 [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
647 [case(NETR_DELTA_USER)] uint32 rid;
648 [case(NETR_DELTA_DELETE_USER)] uint32 rid;
649 [case(NETR_DELTA_RENAME_USER)] uint32 rid;
650 [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
651 [case(NETR_DELTA_ALIAS)] uint32 rid;
652 [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
653 [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
654 [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
655 [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
656 [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
657 [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
658 [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
659 [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
660 [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
661 [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
662 [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
663 [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
664 [case(NETR_DELTA_MODIFY_COUNT)] ;
665 } netr_DELTA_ID_UNION;
668 netr_DeltaEnum delta_type;
669 [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
670 [switch_is(delta_type)] netr_DELTA_UNION delta_union;
675 [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
676 } netr_DELTA_ENUM_ARRAY;
679 NTSTATUS netr_DatabaseDeltas(
680 [in] [string,charset(UTF16)] uint16 logon_server[],
681 [in] [string,charset(UTF16)] uint16 computername[],
682 [in] netr_Authenticator credential,
683 [in,out] netr_Authenticator return_authenticator,
684 [in] netr_SamDatabaseID database_id,
685 [in,out] udlong sequence_num,
686 [in] uint32 preferredmaximumlength,
687 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
694 NTSTATUS netr_DatabaseSync(
695 [in] [string,charset(UTF16)] uint16 logon_server[],
696 [in] [string,charset(UTF16)] uint16 computername[],
697 [in] netr_Authenticator credential,
698 [in,out] netr_Authenticator return_authenticator,
699 [in] netr_SamDatabaseID database_id,
700 [in,out] uint32 sync_context,
701 [in] uint32 preferredmaximumlength,
702 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
709 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
711 typedef [flag(NDR_PAHEX)] struct {
712 uint8 computer_name[16];
714 uint32 serial_number;
718 [flag(NDR_REMAINING)] DATA_BLOB blob;
719 } netr_AccountBuffer;
721 NTSTATUS netr_AccountDeltas(
722 [in] [string,charset(UTF16)] uint16 *logon_server,
723 [in] [string,charset(UTF16)] uint16 computername[],
724 [in] netr_Authenticator credential,
725 [in,out] netr_Authenticator return_authenticator,
726 [in] netr_UAS_INFO_0 uas,
729 [in] uint32 buffersize,
730 [out,subcontext(4)] netr_AccountBuffer buffer,
731 [out] uint32 count_returned,
732 [out] uint32 total_entries,
733 [out] netr_UAS_INFO_0 recordid
740 NTSTATUS netr_AccountSync(
741 [in] [string,charset(UTF16)] uint16 *logon_server,
742 [in] [string,charset(UTF16)] uint16 computername[],
743 [in] netr_Authenticator credential,
744 [in,out] netr_Authenticator return_authenticator,
745 [in] uint32 reference,
747 [in] uint32 buffersize,
748 [out,subcontext(4)] netr_AccountBuffer buffer,
749 [out] uint32 count_returned,
750 [out] uint32 total_entries,
751 [out] uint32 next_reference,
752 [in,out] netr_UAS_INFO_0 recordid
759 NTSTATUS netr_GetDcName(
760 [in] [string,charset(UTF16)] uint16 logon_server[],
761 [in] [string,charset(UTF16)] uint16 *domainname,
762 [out] [string,charset(UTF16)] uint16 *dcname
770 uint32 pdc_connection_status;
771 } netr_NETLOGON_INFO_1;
775 uint32 pdc_connection_status;
776 [string,charset(UTF16)] uint16 trusted_dc_name[];
777 uint32 tc_connection_status;
778 } netr_NETLOGON_INFO_2;
782 uint32 logon_attempts;
788 } netr_NETLOGON_INFO_3;
791 [case(1)] netr_NETLOGON_INFO_1 *info1;
792 [case(2)] netr_NETLOGON_INFO_2 *info2;
793 [case(3)] netr_NETLOGON_INFO_3 *info3;
794 } netr_CONTROL_QUERY_INFORMATION;
796 /* function_code values */
797 typedef [v1_enum] enum {
798 NETLOGON_CONTROL_REDISCOVER = 5,
799 NETLOGON_CONTROL_TC_QUERY = 6,
800 NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
801 NETLOGON_CONTROL_SET_DBFLAG = 65534
802 } netr_LogonControlCode;
804 WERROR netr_LogonControl(
805 [in] [string,charset(UTF16)] uint16 *logon_server,
806 [in] netr_LogonControlCode function_code,
808 [out,switch_is(level)] netr_CONTROL_QUERY_INFORMATION info
815 WERROR netr_GetAnyDCName(
816 [in] [string,charset(UTF16)] uint16 *logon_server,
817 [in] [string,charset(UTF16)] uint16 *domainname,
818 [out] [string,charset(UTF16)] uint16 *dcname
826 [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
827 [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
828 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
829 [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
830 } netr_CONTROL_DATA_INFORMATION;
832 WERROR netr_LogonControl2(
833 [in] [string,charset(UTF16)] uint16 *logon_server,
834 [in] uint32 function_code,
836 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
837 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
841 /* If this flag is not set, then the passwords and LM session keys are
842 * encrypted with DES calls. (And the user session key is
844 const int NETLOGON_NEG_ARCFOUR = 0x00000004;
845 const int NETLOGON_NEG_128BIT = 0x00004000;
846 const int NETLOGON_NEG_SCHANNEL = 0x40000000;
851 NTSTATUS netr_ServerAuthenticate2(
852 [in] [string,charset(UTF16)] uint16 *server_name,
853 [in] [string,charset(UTF16)] uint16 account_name[],
854 [in] netr_SchannelType secure_channel_type,
855 [in] [string,charset(UTF16)] uint16 computer_name[],
856 [in,out,ref] netr_Credential *credentials,
857 [in,out,ref] uint32 *negotiate_flags
864 NTSTATUS netr_DatabaseSync2(
865 [in] [string,charset(UTF16)] uint16 logon_server[],
866 [in] [string,charset(UTF16)] uint16 computername[],
867 [in] netr_Authenticator credential,
868 [in,out] netr_Authenticator return_authenticator,
869 [in] netr_SamDatabaseID database_id,
870 [in] uint16 restart_state,
871 [in,out] uint32 sync_context,
872 [in] uint32 preferredmaximumlength,
873 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
880 /* i'm not at all sure how this call works */
882 NTSTATUS netr_DatabaseRedo(
883 [in] [string,charset(UTF16)] uint16 logon_server[],
884 [in] [string,charset(UTF16)] uint16 computername[],
885 [in] netr_Authenticator credential,
886 [in,out] netr_Authenticator return_authenticator,
887 [in][size_is(change_log_entry_size)] uint8 *change_log_entry,
888 [in] uint32 change_log_entry_size,
889 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
896 WERROR netr_LogonControl2Ex(
897 [in] [string,charset(UTF16)] uint16 *logon_server,
898 [in] uint32 function_code,
900 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
901 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
906 WERROR netr_NETRENUMERATETRUSTEDDOMAINS() ;
911 [string,charset(UTF16)] uint16 *dc_unc;
912 [string,charset(UTF16)] uint16 *dc_address;
913 int32 dc_address_type;
915 [string,charset(UTF16)] uint16 *domain_name;
916 [string,charset(UTF16)] uint16 *forest_name;
918 [string,charset(UTF16)] uint16 *dc_site_name;
919 [string,charset(UTF16)] uint16 *client_site_name;
920 } netr_DsRGetDCNameInfo;
922 WERROR netr_DsRGetDCName(
923 [in] [string,charset(UTF16)] uint16 *server_unc,
924 [in] [string,charset(UTF16)] uint16 *domain_name,
925 [in] GUID *domain_guid,
926 [in] GUID *site_guid,
928 [out] netr_DsRGetDCNameInfo *info
933 WERROR netr_NETRLOGONDUMMYROUTINE1();
937 WERROR netr_NETRLOGONSETSERVICEBITS();
941 WERROR netr_NETRLOGONGETTRUSTRID();
945 WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
949 WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
953 NTSTATUS netr_ServerAuthenticate3(
954 [in] [string,charset(UTF16)] uint16 *server_name,
955 [in] [string,charset(UTF16)] uint16 account_name[],
956 [in] netr_SchannelType secure_channel_type,
957 [in] [string,charset(UTF16)] uint16 computer_name[],
958 [in,out,ref] netr_Credential *credentials,
959 [in,out,ref] uint32 *negotiate_flags,
960 [out,ref] uint32 *rid
966 WERROR netr_DsRGetDCNameEx(
967 [in] [string,charset(UTF16)] uint16 *server_unc,
968 [in] [string,charset(UTF16)] uint16 *domain_name,
969 [in] GUID *domain_guid,
970 [in] [string,charset(UTF16)] uint16 *site_name,
972 [out] netr_DsRGetDCNameInfo *info
977 WERROR netr_DsRGetSiteName(
978 [in] [string,charset(UTF16)] uint16 *computer_name,
979 [out] [string,charset(UTF16)] uint16 *site
987 [size_is(length)] uint8 *data;
990 typedef [flag(NDR_PAHEX)] struct {
993 [size_is(size/2),length_is(length/2)] uint16 *data;
998 [string,charset(UTF16)] uint16 *workstation_domain;
999 [string,charset(UTF16)] uint16 *workstation_site;
1000 [string,charset(UTF16)] uint16 *unknown1;
1001 [string,charset(UTF16)] uint16 *unknown2;
1002 [string,charset(UTF16)] uint16 *unknown3;
1003 [string,charset(UTF16)] uint16 *unknown4;
1004 netr_BinaryString blob2;
1006 lsa_String unknown5;
1007 lsa_String unknown6;
1009 } netr_DomainQuery1;
1012 [case(1)] netr_DomainQuery1 *query1;
1013 [case(2)] netr_DomainQuery1 *query1;
1017 lsa_String domainname;
1018 lsa_String fulldomainname;
1022 netr_BinaryString unknown1[4];
1024 } netr_DomainTrustInfo;
1027 netr_DomainTrustInfo domaininfo;
1029 [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
1030 uint32 unknown[14]; /* room for expansion? */
1034 [case(1)] netr_DomainInfo1 *info1;
1035 [case(2)] netr_DomainInfo1 *info1;
1038 NTSTATUS netr_LogonGetDomainInfo(
1039 [in] [string,charset(UTF16)] uint16 server_name[],
1040 [in] [string,charset(UTF16)] uint16 *computer_name,
1041 [in,ref] netr_Authenticator *credential,
1042 [in,out,ref] netr_Authenticator *return_authenticator,
1044 [in,switch_is(level)] netr_DomainQuery query,
1045 [out,switch_is(level)] netr_DomainInfo info
1048 typedef [flag(NDR_PAHEX)] struct {
1051 } netr_CryptPassword;
1055 NTSTATUS netr_ServerPasswordSet2(
1056 [in] [string,charset(UTF16)] uint16 *server_name,
1057 [in] [string,charset(UTF16)] uint16 account_name[],
1058 [in] netr_SchannelType secure_channel_type,
1059 [in] [string,charset(UTF16)] uint16 computer_name[],
1060 [in] netr_Authenticator credential,
1061 [in] netr_CryptPassword new_password,
1062 [out] netr_Authenticator return_authenticator
1067 WERROR netr_NETRSERVERPASSWORDGET();
1071 WERROR netr_NETRLOGONSENDTOSAM();
1075 WERROR netr_DSRADDRESSTOSITENAMESW();
1079 WERROR netr_DsRGetDCNameEx2(
1080 [in] [string,charset(UTF16)] uint16 *server_unc,
1081 [in] [string,charset(UTF16)] uint16 *client_account,
1083 [in] [string,charset(UTF16)] uint16 *domain_name,
1084 [in] GUID *domain_guid,
1085 [in] [string,charset(UTF16)] uint16 *site_name,
1087 [out] netr_DsRGetDCNameInfo *info
1092 WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
1096 WERROR netr_NETRENUMERATETRUSTEDDOMAINSEX();
1100 WERROR netr_DSRADDRESSTOSITENAMESEXW();
1104 WERROR netr_DSRGETDCSITECOVERAGEW();
1108 NTSTATUS netr_LogonSamLogonEx(
1109 [in] [string,charset(UTF16)] uint16 *server_name,
1110 [in] [string,charset(UTF16)] uint16 *computer_name,
1111 [in] uint16 logon_level,
1112 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1113 [in] uint16 validation_level,
1114 [out] [switch_is(validation_level)] netr_Validation validation,
1115 [out] uint8 authoritative,
1116 [in,out] uint32 flags
1122 typedef [bitmap32bit] bitmap {
1123 NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
1124 NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
1125 NETR_TRUST_FLAG_TREEROOT = 0x00000004,
1126 NETR_TRUST_FLAG_PRIMARY = 0x00000008,
1127 NETR_TRUST_FLAG_NATIVE = 0x00000010,
1128 NETR_TRUST_FLAG_INBOUND = 0x00000020
1131 typedef [v1_enum] enum {
1132 NETR_TRUST_TYPE_DOWNLEVEL = 1,
1133 NETR_TRUST_TYPE_UPLEVEL = 2,
1134 NETR_TRUST_TYPE_MIT = 3,
1135 NETR_TRUST_TYPE_DCE = 4
1138 typedef [bitmap32bit] bitmap {
1139 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
1140 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
1141 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
1142 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
1143 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
1144 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
1145 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040
1146 } netr_TrustAttributes;
1149 [string,charset(UTF16)] uint16 *netbios_name;
1150 [string,charset(UTF16)] uint16 *dns_name;
1151 netr_TrustFlags trust_flags;
1152 uint32 parent_index;
1153 netr_TrustType trust_type;
1154 netr_TrustAttributes trust_attributes;
1159 WERROR netr_DsrEnumerateDomainTrusts(
1160 [in] [string,charset(UTF16)] uint16 *server_name,
1161 [in] netr_TrustFlags trust_flags,
1163 [out,size_is(count)] netr_DomainTrust *trusts
1169 WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
1173 WERROR netr_NETRSERVERTRUSTPASSWORDSGET();
1177 WERROR netr_DSRGETFORESTTRUSTINFORMATION();
1181 WERROR netr_NETRGETFORESTTRUSTINFORMATION();
1186 /* this is the ADS varient. I don't yet know what the "flags" are for */
1187 NTSTATUS netr_LogonSamLogonWithFlags(
1188 [in] [string,charset(UTF16)] uint16 *server_name,
1189 [in] [string,charset(UTF16)] uint16 *computer_name,
1190 [in] netr_Authenticator *credential,
1191 [in][out] netr_Authenticator *return_authenticator,
1192 [in] uint16 logon_level,
1193 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1194 [in] uint16 validation_level,
1195 [out] [switch_is(validation_level)] netr_Validation validation,
1196 [out] uint8 authoritative,
1197 [in,out] uint32 flags
1202 WERROR netr_NETRSERVERGETTRUSTINFO();