3 much of this was derived from the ethereal sources - thanks to everyone
7 import "lsa.idl", "samr.idl", "security.idl", "nbt.idl";
12 uuid("12345678-1234-abcd-ef00-01234567cffb"),
14 endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
15 pointer_default(unique),
16 pointer_default_top(unique)
21 typedef bitmap samr_AcctFlags samr_AcctFlags;
22 typedef bitmap samr_GroupAttrs samr_GroupAttrs;
28 [string,charset(UTF16)] uint16 *account_name;
39 time_t pw_must_change;
40 [string,charset(UTF16)] uint16 *computer;
41 [string,charset(UTF16)] uint16 *domain;
42 [string,charset(UTF16)] uint16 *script_path;
46 WERROR netr_LogonUasLogon(
47 [in] [string,charset(UTF16)] uint16 *server_name,
48 [in] [string,charset(UTF16)] uint16 account_name[],
49 [in] [string,charset(UTF16)] uint16 workstation[],
50 [out] netr_UasInfo *info
62 WERROR netr_LogonUasLogoff(
63 [in] [string,charset(UTF16)] uint16 *server_name,
64 [in] [string,charset(UTF16)] uint16 account_name[],
65 [in] [string,charset(UTF16)] uint16 workstation[],
66 [out] netr_UasLogoffInfo info
73 /* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
74 that the structure of the bindata looks like this:
76 dlong lockout_duration;
78 uint32 bad_attempt_lockout;
81 but it doesn't look as though this structure is reflected at the
82 NDR level. Maybe it is left to the application to decode the bindata array.
87 [size_is(size/2),length_is(length/2)] uint16 *bindata;
90 const int MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = 0x002;
91 const int MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = 0x020;
92 const int MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = 0x800;
95 lsa_String domain_name;
96 uint32 parameter_control; /* see MSV1_0_* */
99 lsa_String account_name;
100 lsa_String workstation;
104 netr_IdentityInfo identity_info;
105 samr_Password lmpassword;
106 samr_Password ntpassword;
109 typedef [flag(NDR_PAHEX)] struct {
111 [value(length)] uint16 size;
112 [size_is(length),length_is(length)] uint8 *data;
113 } netr_ChallengeResponse;
115 typedef [flag(NDR_PAHEX)] struct {
116 netr_IdentityInfo identity_info;
118 netr_ChallengeResponse nt;
119 netr_ChallengeResponse lm;
122 typedef [public,switch_type(uint16)] union {
123 [case(1)] netr_PasswordInfo *password;
124 [case(2)] netr_NetworkInfo *network;
125 [case(3)] netr_PasswordInfo *password;
126 [case(5)] netr_PasswordInfo *password;
127 [case(6)] netr_NetworkInfo *network;
130 typedef [public,flag(NDR_PAHEX)] struct {
132 } netr_UserSessionKey;
134 typedef [public,flag(NDR_PAHEX)] struct {
138 /* Flags for user_flags below */
139 typedef [public,bitmap32bit] bitmap {
140 NETLOGON_GUEST = 0x0001,
141 NETLOGON_NOENCRYPTION = 0x0002,
142 NETLOGON_CACHED_ACCOUNT = 0x0004,
143 NETLOGON_USED_LM_PASSWORD = 0x0008,
144 NETLOGON_EXTRA_SIDS = 0x0020,
145 NETLOGON_SUBAUTH_SESSION_KEY = 0x0040,
146 NETLOGON_SERVER_TRUST_ACCOUNT = 0x0080,
147 NETLOGON_NTLMV2_ENABLED = 0x0100,
148 NETLOGON_RESOURCE_GROUPS = 0x0200,
149 NETLOGON_PROFILE_PATH_RETURNED = 0x0400
156 NTTIME last_password_change;
157 NTTIME allow_password_change;
158 NTTIME force_password_change;
159 lsa_String account_name;
160 lsa_String full_name;
161 lsa_String logon_script;
162 lsa_String profile_path;
163 lsa_String home_directory;
164 lsa_String home_drive;
166 uint16 bad_password_count;
169 samr_RidWithAttributeArray groups;
170 netr_UserFlags user_flags;
171 netr_UserSessionKey key;
172 lsa_StringLarge logon_server;
173 lsa_StringLarge domain;
174 dom_sid2 *domain_sid;
175 netr_LMSessionKey LMSessKey;
176 samr_AcctFlags acct_flags;
181 netr_SamBaseInfo base;
186 samr_GroupAttrs attributes;
189 typedef [public] struct {
190 netr_SamBaseInfo base;
192 [size_is(sidcount)] netr_SidAttr *sids;
196 netr_SamBaseInfo base;
198 [size_is(sidcount)] netr_SidAttr *sids;
200 lsa_String principle;
206 [size_is(pac_size)] uint8 *pac;
207 lsa_String logon_domain;
208 lsa_String logon_server;
209 lsa_String principal_name;
211 [size_is(auth_size)] uint8 *auth;
212 netr_UserSessionKey user_session_key;
213 uint32 expansionroom[10];
220 typedef [public,switch_type(uint16)] union {
221 [case(2)] netr_SamInfo2 *sam2;
222 [case(3)] netr_SamInfo3 *sam3;
223 [case(4)] netr_PacInfo *pac;
224 [case(5)] netr_PacInfo *pac;
225 [case(6)] netr_SamInfo6 *sam6;
228 typedef [public, flag(NDR_PAHEX)] struct {
232 typedef [public] struct {
233 netr_Credential cred;
235 } netr_Authenticator;
237 NTSTATUS netr_LogonSamLogon(
238 [in] [string,charset(UTF16)] uint16 *server_name,
239 [in] [string,charset(UTF16)] uint16 *computer_name,
240 [in] netr_Authenticator *credential,
241 [in][out] netr_Authenticator *return_authenticator,
242 [in] uint16 logon_level,
243 [in] [switch_is(logon_level)] netr_LogonLevel logon,
244 [in] uint16 validation_level,
245 [out] [switch_is(validation_level)] netr_Validation validation,
246 [out] uint8 authoritative
253 NTSTATUS netr_LogonSamLogoff(
254 [in] [string,charset(UTF16)] uint16 *server_name,
255 [in] [string,charset(UTF16)] uint16 *computer_name,
256 [in] netr_Authenticator *credential,
257 [in][out] netr_Authenticator *return_authenticator,
258 [in] uint16 logon_level,
259 [in] [switch_is(logon_level)] netr_LogonLevel logon
267 [public] NTSTATUS netr_ServerReqChallenge(
268 [in,string,charset(UTF16)] uint16 *server_name,
269 [in,string,charset(UTF16)] uint16 computer_name[],
270 [in,out,ref] netr_Credential *credentials
277 typedef enum netr_SchannelType netr_SchannelType;
279 NTSTATUS netr_ServerAuthenticate(
280 [in,string,charset(UTF16)] uint16 *server_name,
281 [in,string,charset(UTF16)] uint16 account_name[],
282 [in] netr_SchannelType secure_channel_type,
283 [in,string,charset(UTF16)] uint16 computer_name[],
284 [in,out,ref] netr_Credential *credentials
291 NTSTATUS netr_ServerPasswordSet(
292 [in] [string,charset(UTF16)] uint16 *server_name,
293 [in] [string,charset(UTF16)] uint16 account_name[],
294 [in] netr_SchannelType secure_channel_type,
295 [in] [string,charset(UTF16)] uint16 computer_name[],
296 [in] netr_Authenticator credential,
297 [in] samr_Password new_password,
298 [out] netr_Authenticator return_authenticator
305 typedef enum netr_SamDatabaseID netr_SamDatabaseID;
308 [string,charset(UTF16)] uint16 *account_name;
317 } netr_DELTA_DELETE_USER;
321 [value(length)] uint16 size;
328 [value(nt_length)] uint16 nt_size;
331 [value(lm_length)] uint16 lm_size;
333 uint8 nt_history[nt_length];
334 uint8 lm_history[lm_length];
335 } netr_PasswordHistory;
338 netr_USER_KEY16 lmpassword;
339 netr_USER_KEY16 ntpassword;
340 netr_PasswordHistory history;
343 typedef struct { /* TODO: make this a union! */
344 netr_USER_KEYS2 keys2;
345 } netr_USER_KEY_UNION;
347 typedef [public] struct {
349 netr_USER_KEY_UNION keys;
353 boolean8 SensitiveDataFlag;
356 /* netr_USER_KEYS encrypted with the session key */
357 [size_is(DataLength)][flag(NDR_PAHEX)] uint8 *SensitiveData;
358 } netr_USER_PRIVATE_INFO;
361 lsa_String account_name;
362 lsa_String full_name;
365 lsa_String home_directory;
366 lsa_String home_drive;
367 lsa_String logon_script;
368 lsa_String description;
369 lsa_String workstations;
372 samr_LogonHours logon_hours;
373 uint16 bad_password_count;
375 NTTIME last_password_change;
377 samr_AcctFlags acct_flags;
378 samr_Password lmpassword;
379 samr_Password ntpassword;
380 boolean8 nt_password_present;
381 boolean8 lm_password_present;
382 boolean8 password_expired;
384 lsa_String parameters;
387 netr_USER_PRIVATE_INFO user_private_info;
388 uint32 SecurityInformation;
390 lsa_String profile_path;
401 lsa_String domain_name;
403 dlong force_logoff_time;
404 uint16 min_password_length;
405 uint16 password_history_length;
406 /* yes, these are signed. They are in negative 100ns */
407 dlong max_password_age;
408 dlong min_password_age;
410 NTTIME domain_create_time;
411 uint32 SecurityInformation;
413 netr_AcctLockStr account_lockout;
417 uint32 logon_to_chgpass;
424 lsa_String group_name;
427 lsa_String description;
428 uint32 SecurityInformation;
454 [size_is(num_rids)] uint32 *rids;
455 [size_is(num_rids)] uint32 *attribs;
461 } netr_DELTA_GROUP_MEMBER;
464 lsa_String alias_name;
466 uint32 SecurityInformation;
468 lsa_String description;
484 } netr_DELTA_ALIAS_MEMBER;
487 uint32 pagedpoollimit;
488 uint32 nonpagedpoollimit;
489 uint32 minimumworkingsetsize;
490 uint32 maximumworkingsetsize;
491 uint32 pagefilelimit;
497 NTTIME auditretentionperiod;
498 boolean8 auditingmode;
499 uint32 maxauditeventcount;
500 [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
501 lsa_String primary_domain_name;
503 netr_QUOTA_LIMITS quota_limits;
505 NTTIME db_create_time;
506 uint32 SecurityInformation;
519 lsa_String domain_name;
520 uint32 num_controllers;
521 [size_is(num_controllers)] lsa_String *controller_names;
522 uint32 SecurityInformation;
532 } netr_DELTA_TRUSTED_DOMAIN;
536 } netr_DELTA_DELETE_TRUST;
539 uint32 privilege_entries;
540 uint32 privilege_control;
541 [size_is(privilege_entries)] uint32 *privilege_attrib;
542 [size_is(privilege_entries)] lsa_String *privilege_name;
543 netr_QUOTA_LIMITS quotalimits;
545 uint32 SecurityInformation;
555 } netr_DELTA_ACCOUNT;
559 } netr_DELTA_DELETE_ACCOUNT;
563 } netr_DELTA_DELETE_SECRET;
568 [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
572 netr_CIPHER_VALUE current_cipher;
573 NTTIME current_cipher_set_time;
574 netr_CIPHER_VALUE old_cipher;
575 NTTIME old_cipher_set_time;
576 uint32 SecurityInformation;
589 NETR_DELTA_DOMAIN = 1,
590 NETR_DELTA_GROUP = 2,
591 NETR_DELTA_DELETE_GROUP = 3,
592 NETR_DELTA_RENAME_GROUP = 4,
594 NETR_DELTA_DELETE_USER = 6,
595 NETR_DELTA_RENAME_USER = 7,
596 NETR_DELTA_GROUP_MEMBER = 8,
597 NETR_DELTA_ALIAS = 9,
598 NETR_DELTA_DELETE_ALIAS = 10,
599 NETR_DELTA_RENAME_ALIAS = 11,
600 NETR_DELTA_ALIAS_MEMBER = 12,
601 NETR_DELTA_POLICY = 13,
602 NETR_DELTA_TRUSTED_DOMAIN = 14,
603 NETR_DELTA_DELETE_TRUST = 15,
604 NETR_DELTA_ACCOUNT = 16,
605 NETR_DELTA_DELETE_ACCOUNT = 17,
606 NETR_DELTA_SECRET = 18,
607 NETR_DELTA_DELETE_SECRET = 19,
608 NETR_DELTA_DELETE_GROUP2 = 20,
609 NETR_DELTA_DELETE_USER2 = 21,
610 NETR_DELTA_MODIFY_COUNT = 22
613 typedef [switch_type(netr_DeltaEnum)] union {
614 [case(NETR_DELTA_DOMAIN)] netr_DELTA_DOMAIN *domain;
615 [case(NETR_DELTA_GROUP)] netr_DELTA_GROUP *group;
616 [case(NETR_DELTA_DELETE_GROUP)] ; /* rid only */
617 [case(NETR_DELTA_RENAME_GROUP)] netr_DELTA_RENAME *rename_group;
618 [case(NETR_DELTA_USER)] netr_DELTA_USER *user;
619 [case(NETR_DELTA_DELETE_USER)] ; /* rid only */
620 [case(NETR_DELTA_RENAME_USER)] netr_DELTA_RENAME *rename_user;
621 [case(NETR_DELTA_GROUP_MEMBER)] netr_DELTA_GROUP_MEMBER *group_member;
622 [case(NETR_DELTA_ALIAS)] netr_DELTA_ALIAS *alias;
623 [case(NETR_DELTA_DELETE_ALIAS)] ; /* rid only */
624 [case(NETR_DELTA_RENAME_ALIAS)] netr_DELTA_RENAME *rename_alias;
625 [case(NETR_DELTA_ALIAS_MEMBER)] netr_DELTA_ALIAS_MEMBER *alias_member;
626 [case(NETR_DELTA_POLICY)] netr_DELTA_POLICY *policy;
627 [case(NETR_DELTA_TRUSTED_DOMAIN)] netr_DELTA_TRUSTED_DOMAIN *trusted_domain;
628 [case(NETR_DELTA_DELETE_TRUST)] netr_DELTA_DELETE_TRUST delete_trust;
629 [case(NETR_DELTA_ACCOUNT)] netr_DELTA_ACCOUNT *account;
630 [case(NETR_DELTA_DELETE_ACCOUNT)] netr_DELTA_DELETE_ACCOUNT delete_account;
631 [case(NETR_DELTA_SECRET)] netr_DELTA_SECRET *secret;
632 [case(NETR_DELTA_DELETE_SECRET)] netr_DELTA_DELETE_SECRET delete_secret;
633 [case(NETR_DELTA_DELETE_GROUP2)] netr_DELTA_DELETE_USER *delete_group;
634 [case(NETR_DELTA_DELETE_USER2)] netr_DELTA_DELETE_USER *delete_user;
635 [case(NETR_DELTA_MODIFY_COUNT)] udlong *modified_count;
638 typedef [switch_type(netr_DeltaEnum)] union {
639 [case(NETR_DELTA_DOMAIN)] uint32 rid;
640 [case(NETR_DELTA_GROUP)] uint32 rid;
641 [case(NETR_DELTA_DELETE_GROUP)] uint32 rid;
642 [case(NETR_DELTA_RENAME_GROUP)] uint32 rid;
643 [case(NETR_DELTA_USER)] uint32 rid;
644 [case(NETR_DELTA_DELETE_USER)] uint32 rid;
645 [case(NETR_DELTA_RENAME_USER)] uint32 rid;
646 [case(NETR_DELTA_GROUP_MEMBER)] uint32 rid;
647 [case(NETR_DELTA_ALIAS)] uint32 rid;
648 [case(NETR_DELTA_DELETE_ALIAS)] uint32 rid;
649 [case(NETR_DELTA_RENAME_ALIAS)] uint32 rid;
650 [case(NETR_DELTA_ALIAS_MEMBER)] uint32 rid;
651 [case(NETR_DELTA_POLICY)] dom_sid2 *sid;
652 [case(NETR_DELTA_TRUSTED_DOMAIN)] dom_sid2 *sid;
653 [case(NETR_DELTA_DELETE_TRUST)] dom_sid2 *sid;
654 [case(NETR_DELTA_ACCOUNT)] dom_sid2 *sid;
655 [case(NETR_DELTA_DELETE_ACCOUNT)] dom_sid2 *sid;
656 [case(NETR_DELTA_SECRET)] [string,charset(UTF16)] uint16 *name;
657 [case(NETR_DELTA_DELETE_SECRET)] [string,charset(UTF16)] uint16 *name;
658 [case(NETR_DELTA_DELETE_GROUP2)] uint32 rid;
659 [case(NETR_DELTA_DELETE_USER2)] uint32 rid;
660 [case(NETR_DELTA_MODIFY_COUNT)] ;
661 } netr_DELTA_ID_UNION;
664 netr_DeltaEnum delta_type;
665 [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
666 [switch_is(delta_type)] netr_DELTA_UNION delta_union;
671 [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
672 } netr_DELTA_ENUM_ARRAY;
675 NTSTATUS netr_DatabaseDeltas(
676 [in] [string,charset(UTF16)] uint16 logon_server[],
677 [in] [string,charset(UTF16)] uint16 computername[],
678 [in] netr_Authenticator credential,
679 [in,out] netr_Authenticator return_authenticator,
680 [in] netr_SamDatabaseID database_id,
681 [in,out] udlong sequence_num,
682 [in] uint32 preferredmaximumlength,
683 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
690 NTSTATUS netr_DatabaseSync(
691 [in] [string,charset(UTF16)] uint16 logon_server[],
692 [in] [string,charset(UTF16)] uint16 computername[],
693 [in] netr_Authenticator credential,
694 [in,out] netr_Authenticator return_authenticator,
695 [in] netr_SamDatabaseID database_id,
696 [in,out] uint32 sync_context,
697 [in] uint32 preferredmaximumlength,
698 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
705 /* w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this call */
707 typedef [flag(NDR_PAHEX)] struct {
708 uint8 computer_name[16];
710 uint32 serial_number;
714 [flag(NDR_REMAINING)] DATA_BLOB blob;
715 } netr_AccountBuffer;
717 NTSTATUS netr_AccountDeltas(
718 [in] [string,charset(UTF16)] uint16 *logon_server,
719 [in] [string,charset(UTF16)] uint16 computername[],
720 [in] netr_Authenticator credential,
721 [in,out] netr_Authenticator return_authenticator,
722 [in] netr_UAS_INFO_0 uas,
725 [in] uint32 buffersize,
726 [out,subcontext(4)] netr_AccountBuffer buffer,
727 [out] uint32 count_returned,
728 [out] uint32 total_entries,
729 [out] netr_UAS_INFO_0 recordid
736 NTSTATUS netr_AccountSync(
737 [in] [string,charset(UTF16)] uint16 *logon_server,
738 [in] [string,charset(UTF16)] uint16 computername[],
739 [in] netr_Authenticator credential,
740 [in,out] netr_Authenticator return_authenticator,
741 [in] uint32 reference,
743 [in] uint32 buffersize,
744 [out,subcontext(4)] netr_AccountBuffer buffer,
745 [out] uint32 count_returned,
746 [out] uint32 total_entries,
747 [out] uint32 next_reference,
748 [in,out] netr_UAS_INFO_0 recordid
755 WERROR netr_GetDcName(
756 [in] [string,charset(UTF16)] uint16 logon_server[],
757 [in] [string,charset(UTF16)] uint16 *domainname,
758 [out] [string,charset(UTF16)] uint16 *dcname
766 uint32 pdc_connection_status;
767 } netr_NETLOGON_INFO_1;
771 uint32 pdc_connection_status;
772 [string,charset(UTF16)] uint16 trusted_dc_name[];
773 uint32 tc_connection_status;
774 } netr_NETLOGON_INFO_2;
778 uint32 logon_attempts;
784 } netr_NETLOGON_INFO_3;
787 [case(1)] netr_NETLOGON_INFO_1 *info1;
788 [case(2)] netr_NETLOGON_INFO_2 *info2;
789 [case(3)] netr_NETLOGON_INFO_3 *info3;
790 } netr_CONTROL_QUERY_INFORMATION;
792 /* function_code values */
793 typedef [v1_enum] enum {
794 NETLOGON_CONTROL_REDISCOVER = 5,
795 NETLOGON_CONTROL_TC_QUERY = 6,
796 NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7,
797 NETLOGON_CONTROL_SET_DBFLAG = 65534
798 } netr_LogonControlCode;
800 WERROR netr_LogonControl(
801 [in] [string,charset(UTF16)] uint16 *logon_server,
802 [in] netr_LogonControlCode function_code,
804 [out,switch_is(level)] netr_CONTROL_QUERY_INFORMATION info
811 WERROR netr_GetAnyDCName(
812 [in] [string,charset(UTF16)] uint16 *logon_server,
813 [in] [string,charset(UTF16)] uint16 *domainname,
814 [out] [string,charset(UTF16)] uint16 *dcname
822 [case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
823 [case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
824 [case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
825 [case(NETLOGON_CONTROL_SET_DBFLAG)] uint32 debug_level;
826 } netr_CONTROL_DATA_INFORMATION;
828 WERROR netr_LogonControl2(
829 [in] [string,charset(UTF16)] uint16 *logon_server,
830 [in] uint32 function_code,
832 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
833 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
837 /* If this flag is not set, then the passwords and LM session keys are
838 * encrypted with DES calls. (And the user session key is
840 const int NETLOGON_NEG_ARCFOUR = 0x00000004;
841 const int NETLOGON_NEG_128BIT = 0x00004000;
842 const int NETLOGON_NEG_SCHANNEL = 0x40000000;
847 NTSTATUS netr_ServerAuthenticate2(
848 [in] [string,charset(UTF16)] uint16 *server_name,
849 [in] [string,charset(UTF16)] uint16 account_name[],
850 [in] netr_SchannelType secure_channel_type,
851 [in] [string,charset(UTF16)] uint16 computer_name[],
852 [in,out,ref] netr_Credential *credentials,
853 [in,out,ref] uint32 *negotiate_flags
860 NTSTATUS netr_DatabaseSync2(
861 [in] [string,charset(UTF16)] uint16 logon_server[],
862 [in] [string,charset(UTF16)] uint16 computername[],
863 [in] netr_Authenticator credential,
864 [in,out] netr_Authenticator return_authenticator,
865 [in] netr_SamDatabaseID database_id,
866 [in] uint16 restart_state,
867 [in,out] uint32 sync_context,
868 [in] uint32 preferredmaximumlength,
869 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
876 /* i'm not at all sure how this call works */
878 NTSTATUS netr_DatabaseRedo(
879 [in] [string,charset(UTF16)] uint16 logon_server[],
880 [in] [string,charset(UTF16)] uint16 computername[],
881 [in] netr_Authenticator credential,
882 [in,out] netr_Authenticator return_authenticator,
883 [in][size_is(change_log_entry_size)] uint8 *change_log_entry,
884 [in] uint32 change_log_entry_size,
885 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
892 WERROR netr_LogonControl2Ex(
893 [in] [string,charset(UTF16)] uint16 *logon_server,
894 [in] uint32 function_code,
896 [in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
897 [out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
904 [size_is(length)] uint8 *data;
907 WERROR netr_NetrEnumerateTrustedDomains(
908 [in] [string,charset(UTF16)] uint16 *server_name,
909 [out,ref] netr_Blob *trusted_domains_blob
915 /* two unkown bits still: DS_IP_VERSION_AGNOSTIC and
916 * DS_TRY_NEXTCLOSEST_SITE - Guenther */
918 typedef [bitmap32bit] bitmap {
919 DS_FORCE_REDISCOVERY = 0x00000001,
920 DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
921 DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
922 DS_GC_SERVER_REQUIRED = 0x00000040,
923 DS_PDC_REQUIRED = 0x00000080,
924 DS_BACKGROUND_ONLY = 0x00000100,
925 DS_IP_REQUIRED = 0x00000200,
926 DS_KDC_REQUIRED = 0x00000400,
927 DS_TIMESERV_REQUIRED = 0x00000800,
928 DS_WRITABLE_REQUIRED = 0x00001000,
929 DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
930 DS_AVOID_SELF = 0x00004000,
931 DS_ONLY_LDAP_NEEDED = 0x00008000,
932 DS_IS_FLAT_NAME = 0x00010000,
933 DS_IS_DNS_NAME = 0x00020000,
934 DS_RETURN_DNS_NAME = 0x40000000,
935 DS_RETURN_FLAT_NAME = 0x80000000
936 } netr_DsRGetDCName_flags;
938 typedef [v1_enum] enum {
939 DS_ADDRESS_TYPE_INET = 1,
940 DS_ADDRESS_TYPE_NETBIOS = 2
941 } netr_DsRGetDCNameInfo_AddressType;
943 typedef [bitmap32bit] bitmap {
944 DS_SERVER_PDC = NBT_SERVER_PDC,
945 DS_SERVER_GC = NBT_SERVER_GC,
946 DS_SERVER_LDAP = NBT_SERVER_LDAP,
947 DS_SERVER_DS = NBT_SERVER_DS,
948 DS_SERVER_KDC = NBT_SERVER_KDC,
949 DS_SERVER_TIMESERV = NBT_SERVER_TIMESERV,
950 DS_SERVER_CLOSEST = NBT_SERVER_CLOSEST,
951 DS_SERVER_WRITABLE = NBT_SERVER_WRITABLE,
952 DS_SERVER_GOOD_TIMESERV = NBT_SERVER_GOOD_TIMESERV,
953 DS_SERVER_NDNC = 0x00000400,
954 DS_DNS_CONTROLLER = 0x20000000,
955 DS_DNS_DOMAIN = 0x40000000,
956 DS_DNS_FOREST = 0x80000000
960 [string,charset(UTF16)] uint16 *dc_unc;
961 [string,charset(UTF16)] uint16 *dc_address;
962 netr_DsRGetDCNameInfo_AddressType dc_address_type;
964 [string,charset(UTF16)] uint16 *domain_name;
965 [string,charset(UTF16)] uint16 *forest_name;
966 netr_DsR_DcFlags dc_flags;
967 [string,charset(UTF16)] uint16 *dc_site_name;
968 [string,charset(UTF16)] uint16 *client_site_name;
969 } netr_DsRGetDCNameInfo;
971 WERROR netr_DsRGetDCName(
972 [in] [string,charset(UTF16)] uint16 *server_unc,
973 [in] [string,charset(UTF16)] uint16 *domain_name,
974 [in] GUID *domain_guid,
975 [in] GUID *site_guid,
976 [in] netr_DsRGetDCName_flags flags,
977 [out] netr_DsRGetDCNameInfo *info
982 WERROR netr_NETRLOGONDUMMYROUTINE1();
986 WERROR netr_NETRLOGONSETSERVICEBITS();
990 WERROR netr_NETRLOGONGETTRUSTRID();
994 WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
998 WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
1002 [public] NTSTATUS netr_ServerAuthenticate3(
1003 [in] [string,charset(UTF16)] uint16 *server_name,
1004 [in] [string,charset(UTF16)] uint16 account_name[],
1005 [in] netr_SchannelType secure_channel_type,
1006 [in] [string,charset(UTF16)] uint16 computer_name[],
1007 [in,out,ref] netr_Credential *credentials,
1008 [in,out,ref] uint32 *negotiate_flags,
1009 [out,ref] uint32 *rid
1015 WERROR netr_DsRGetDCNameEx(
1016 [in] [string,charset(UTF16)] uint16 *server_unc,
1017 [in] [string,charset(UTF16)] uint16 *domain_name,
1018 [in] GUID *domain_guid,
1019 [in] [string,charset(UTF16)] uint16 *site_name,
1020 [in] netr_DsRGetDCName_flags flags,
1021 [out] netr_DsRGetDCNameInfo *info
1026 WERROR netr_DsRGetSiteName(
1027 [in] [string,charset(UTF16)] uint16 *computer_name,
1028 [out] [string,charset(UTF16)] uint16 *site
1034 typedef [flag(NDR_PAHEX)] struct {
1037 [size_is(size/2),length_is(length/2)] uint16 *data;
1038 } netr_BinaryString;
1042 [string,charset(UTF16)] uint16 *workstation_domain;
1043 [string,charset(UTF16)] uint16 *workstation_site;
1044 [string,charset(UTF16)] uint16 *unknown1;
1045 [string,charset(UTF16)] uint16 *unknown2;
1046 [string,charset(UTF16)] uint16 *unknown3;
1047 [string,charset(UTF16)] uint16 *unknown4;
1048 netr_BinaryString blob2;
1050 lsa_String unknown5;
1051 lsa_String unknown6;
1053 } netr_DomainQuery1;
1056 [case(1)] netr_DomainQuery1 *query1;
1057 [case(2)] netr_DomainQuery1 *query1;
1061 lsa_String domainname;
1062 lsa_String fulldomainname;
1066 netr_BinaryString unknown1[4];
1068 } netr_DomainTrustInfo;
1071 netr_DomainTrustInfo domaininfo;
1073 [size_is(num_trusts)] netr_DomainTrustInfo *trusts;
1074 uint32 unknown[14]; /* room for expansion? */
1078 [case(1)] netr_DomainInfo1 *info1;
1079 [case(2)] netr_DomainInfo1 *info1;
1082 NTSTATUS netr_LogonGetDomainInfo(
1083 [in] [string,charset(UTF16)] uint16 server_name[],
1084 [in] [string,charset(UTF16)] uint16 *computer_name,
1085 [in,ref] netr_Authenticator *credential,
1086 [in,out,ref] netr_Authenticator *return_authenticator,
1088 [in,switch_is(level)] netr_DomainQuery query,
1089 [out,switch_is(level)] netr_DomainInfo info
1092 typedef [flag(NDR_PAHEX)] struct {
1095 } netr_CryptPassword;
1099 NTSTATUS netr_ServerPasswordSet2(
1100 [in] [string,charset(UTF16)] uint16 *server_name,
1101 [in] [string,charset(UTF16)] uint16 account_name[],
1102 [in] netr_SchannelType secure_channel_type,
1103 [in] [string,charset(UTF16)] uint16 computer_name[],
1104 [in] netr_Authenticator credential,
1105 [in] netr_CryptPassword new_password,
1106 [out] netr_Authenticator return_authenticator
1111 WERROR netr_ServerPasswordGet(
1112 [in] [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,ref] netr_Authenticator *credential,
1117 [out,ref] netr_Authenticator *return_authenticator,
1118 [out,ref] samr_Password *password
1123 WERROR netr_NETRLOGONSENDTOSAM();
1129 [size_is(count)] lsa_String *sitename;
1130 } netr_DsRAddressToSitenamesWCtr;
1133 [size_is(size)] uint8 *buffer;
1137 WERROR netr_DsRAddressToSitenamesW(
1138 [in] [string,charset(UTF16)] uint16 *server_name,
1139 [in] [range(0,32000)] uint32 count,
1140 [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
1141 [out] [ref] netr_DsRAddressToSitenamesWCtr **ctr
1146 WERROR netr_DsRGetDCNameEx2(
1147 [in] [string,charset(UTF16)] uint16 *server_unc,
1148 [in] [string,charset(UTF16)] uint16 *client_account,
1149 [in] samr_AcctFlags mask,
1150 [in] [string,charset(UTF16)] uint16 *domain_name,
1151 [in] GUID *domain_guid,
1152 [in] [string,charset(UTF16)] uint16 *site_name,
1153 [in] netr_DsRGetDCName_flags flags,
1154 [out] netr_DsRGetDCNameInfo *info
1159 WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
1163 typedef [bitmap32bit] bitmap {
1164 NETR_TRUST_FLAG_IN_FOREST = 0x00000001,
1165 NETR_TRUST_FLAG_OUTBOUND = 0x00000002,
1166 NETR_TRUST_FLAG_TREEROOT = 0x00000004,
1167 NETR_TRUST_FLAG_PRIMARY = 0x00000008,
1168 NETR_TRUST_FLAG_NATIVE = 0x00000010,
1169 NETR_TRUST_FLAG_INBOUND = 0x00000020
1172 typedef [v1_enum] enum {
1173 NETR_TRUST_TYPE_DOWNLEVEL = 1,
1174 NETR_TRUST_TYPE_UPLEVEL = 2,
1175 NETR_TRUST_TYPE_MIT = 3,
1176 NETR_TRUST_TYPE_DCE = 4
1179 typedef [bitmap32bit] bitmap {
1180 NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x00000001,
1181 NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x00000002,
1182 NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x00000004,
1183 NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x00000008,
1184 NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x00000010,
1185 NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x00000020,
1186 NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x00000040
1187 } netr_TrustAttributes;
1190 [string,charset(UTF16)] uint16 *netbios_name;
1191 [string,charset(UTF16)] uint16 *dns_name;
1192 netr_TrustFlags trust_flags;
1193 uint32 parent_index;
1194 netr_TrustType trust_type;
1195 netr_TrustAttributes trust_attributes;
1202 [size_is(count)] netr_DomainTrust *array;
1203 } netr_DomainTrustList;
1205 WERROR netr_NetrEnumerateTrustedDomainsEx(
1206 [in] [string,charset(UTF16)] uint16 *server_name,
1207 [out,ref] netr_DomainTrustList *dom_trust_list
1214 [size_is(count)] lsa_String *sitename;
1215 [size_is(count)] lsa_String *subnetname;
1216 } netr_DsRAddressToSitenamesExWCtr;
1218 WERROR netr_DsRAddressToSitenamesExW(
1219 [in] [string,charset(UTF16)] uint16 *server_name,
1220 [in] [range(0,32000)] uint32 count,
1221 [in] [size_is(count)] [ref] netr_DsRAddress *addresses,
1222 [out] [ref] netr_DsRAddressToSitenamesExWCtr **ctr
1230 [size_is(num_sites)] [unique] lsa_String *sites;
1233 WERROR netr_DsrGetDcSiteCoverageW(
1234 [in] [string,charset(UTF16)] uint16 *server_name,
1235 [out] DcSitesCtr *ctr
1240 NTSTATUS netr_LogonSamLogonEx(
1241 [in] [string,charset(UTF16)] uint16 *server_name,
1242 [in] [string,charset(UTF16)] uint16 *computer_name,
1243 [in] uint16 logon_level,
1244 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1245 [in] uint16 validation_level,
1246 [out] [switch_is(validation_level)] netr_Validation validation,
1247 [out] uint8 authoritative,
1248 [in,out] uint32 flags
1254 WERROR netr_DsrEnumerateDomainTrusts(
1255 [in] [string,charset(UTF16)] uint16 *server_name,
1256 [in] netr_TrustFlags trust_flags,
1258 [out,size_is(count)] netr_DomainTrust *trusts
1264 WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
1268 NTSTATUS netr_ServerTrustPasswordsGet(
1269 [in] [string,charset(UTF16)] uint16 *server_name,
1270 [in] [string,charset(UTF16)] uint16 account_name[],
1271 [in] netr_SchannelType secure_channel_type,
1272 [in] [string,charset(UTF16)] uint16 computer_name[],
1273 [in,ref] netr_Authenticator *credential,
1274 [out,ref] netr_Authenticator *return_authenticator,
1275 [out,ref] samr_Password *password,
1276 [out,ref] samr_Password *password2
1282 const int DS_GFTI_UPDATE_TDO = 0x1;
1284 WERROR netr_DsRGetForestTrustInformation(
1285 [in] [string,charset(UTF16)] uint16 *server_name,
1286 [in] [string,charset(UTF16)] uint16 *trusted_domain_name,
1288 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1293 WERROR netr_GetForestTrustInformation(
1294 [in] [string,charset(UTF16)] uint16 *server_name,
1295 [in,ref] [string,charset(UTF16)] uint16 *trusted_domain_name,
1296 [in,ref] netr_Authenticator *credential,
1297 [out,ref] netr_Authenticator *return_authenticator,
1299 [out,ref] lsa_ForestTrustInformation **forest_trust_info
1305 /* this is the ADS varient. I don't yet know what the "flags" are for */
1306 NTSTATUS netr_LogonSamLogonWithFlags(
1307 [in] [string,charset(UTF16)] uint16 *server_name,
1308 [in] [string,charset(UTF16)] uint16 *computer_name,
1309 [in] netr_Authenticator *credential,
1310 [in][out] netr_Authenticator *return_authenticator,
1311 [in] uint16 logon_level,
1312 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1313 [in] uint16 validation_level,
1314 [out] [switch_is(validation_level)] netr_Validation validation,
1315 [out] uint8 authoritative,
1316 [in,out] uint32 flags
1321 WERROR netr_NETRSERVERGETTRUSTINFO();