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 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 [public] 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;
332 [value(nt_length)] uint16 nt_size;
335 [value(lm_length)] uint16 lm_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 history;
347 typedef struct { /* TODO: make this a union! */
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 WERROR 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 /* two unkown bits still: DS_IP_VERSION_AGNOSTIC and
912 * DS_TRY_NEXTCLOSEST_SITE - Guenther */
914 typedef [bitmap32bit] bitmap {
915 DS_FORCE_REDISCOVERY = 0x00000001,
916 DS_DIRECTORY_SERVICE_REQUIRED = 0x00000010,
917 DS_DIRECTORY_SERVICE_PREFERRED = 0x00000020,
918 DS_GC_SERVER_REQUIRED = 0x00000040,
919 DS_PDC_REQUIRED = 0x00000080,
920 DS_BACKGROUND_ONLY = 0x00000100,
921 DS_IP_REQUIRED = 0x00000200,
922 DS_KDC_REQUIRED = 0x00000400,
923 DS_TIMESERV_REQUIRED = 0x00000800,
924 DS_WRITABLE_REQUIRED = 0x00001000,
925 DS_GOOD_TIMESERV_PREFERRED = 0x00002000,
926 DS_AVOID_SELF = 0x00004000,
927 DS_ONLY_LDAP_NEEDED = 0x00008000,
928 DS_IS_FLAT_NAME = 0x00010000,
929 DS_IS_DNS_NAME = 0x00020000,
930 DS_RETURN_DNS_NAME = 0x40000000,
931 DS_RETURN_FLAT_NAME = 0x80000000
932 } netr_DsRGetDCName_flags;
934 typedef [v1_enum] enum {
935 DS_ADDRESS_TYPE_INET = 1,
936 DS_ADDRESS_TYPE_NETBIOS = 2
937 } netr_DsRGetDCNameInfo_AddressType;
939 typedef [bitmap32bit] bitmap {
940 DS_SERVER_PDC = NBT_SERVER_PDC,
941 DS_SERVER_GC = NBT_SERVER_GC,
942 DS_SERVER_LDAP = NBT_SERVER_LDAP,
943 DS_SERVER_DS = NBT_SERVER_DS,
944 DS_SERVER_KDC = NBT_SERVER_KDC,
945 DS_SERVER_TIMESERV = NBT_SERVER_TIMESERV,
946 DS_SERVER_CLOSEST = NBT_SERVER_CLOSEST,
947 DS_SERVER_WRITABLE = NBT_SERVER_WRITABLE,
948 DS_SERVER_GOOD_TIMESERV = NBT_SERVER_GOOD_TIMESERV,
949 DS_DNS_CONTROLLER = 0x20000000,
950 DS_DNS_DOMAIN = 0x40000000,
951 DS_DNS_FOREST = 0x80000000
955 [string,charset(UTF16)] uint16 *dc_unc;
956 [string,charset(UTF16)] uint16 *dc_address;
957 netr_DsRGetDCNameInfo_AddressType dc_address_type;
959 [string,charset(UTF16)] uint16 *domain_name;
960 [string,charset(UTF16)] uint16 *forest_name;
961 netr_DsR_DcFlags dc_flags;
962 [string,charset(UTF16)] uint16 *dc_site_name;
963 [string,charset(UTF16)] uint16 *client_site_name;
964 } netr_DsRGetDCNameInfo;
966 WERROR netr_DsRGetDCName(
967 [in] [string,charset(UTF16)] uint16 *server_unc,
968 [in] [string,charset(UTF16)] uint16 *domain_name,
969 [in] GUID *domain_guid,
970 [in] GUID *site_guid,
971 [in] netr_DsRGetDCName_flags flags,
972 [out] netr_DsRGetDCNameInfo *info
977 WERROR netr_NETRLOGONDUMMYROUTINE1();
981 WERROR netr_NETRLOGONSETSERVICEBITS();
985 WERROR netr_NETRLOGONGETTRUSTRID();
989 WERROR netr_NETRLOGONCOMPUTESERVERDIGEST();
993 WERROR netr_NETRLOGONCOMPUTECLIENTDIGEST();
997 [public] NTSTATUS netr_ServerAuthenticate3(
998 [in] [string,charset(UTF16)] uint16 *server_name,
999 [in] [string,charset(UTF16)] uint16 account_name[],
1000 [in] netr_SchannelType secure_channel_type,
1001 [in] [string,charset(UTF16)] uint16 computer_name[],
1002 [in,out,ref] netr_Credential *credentials,
1003 [in,out,ref] uint32 *negotiate_flags,
1004 [out,ref] uint32 *rid
1010 WERROR netr_DsRGetDCNameEx(
1011 [in] [string,charset(UTF16)] uint16 *server_unc,
1012 [in] [string,charset(UTF16)] uint16 *domain_name,
1013 [in] GUID *domain_guid,
1014 [in] [string,charset(UTF16)] uint16 *site_name,
1015 [in] netr_DsRGetDCName_flags flags,
1016 [out] netr_DsRGetDCNameInfo *info
1021 WERROR netr_DsRGetSiteName(
1022 [in] [string,charset(UTF16)] uint16 *computer_name,
1023 [out] [string,charset(UTF16)] uint16 *site
1031 [size_is(length)] uint8 *data;
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_NETRSERVERPASSWORDGET();
1115 WERROR netr_NETRLOGONSENDTOSAM();
1119 WERROR netr_DSRADDRESSTOSITENAMESW();
1123 WERROR netr_DsRGetDCNameEx2(
1124 [in] [string,charset(UTF16)] uint16 *server_unc,
1125 [in] [string,charset(UTF16)] uint16 *client_account,
1126 [in] samr_AcctFlags mask,
1127 [in] [string,charset(UTF16)] uint16 *domain_name,
1128 [in] GUID *domain_guid,
1129 [in] [string,charset(UTF16)] uint16 *site_name,
1130 [in] netr_DsRGetDCName_flags flags,
1131 [out] netr_DsRGetDCNameInfo *info
1136 WERROR netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN();
1140 WERROR netr_NETRENUMERATETRUSTEDDOMAINSEX();
1144 WERROR netr_DSRADDRESSTOSITENAMESEXW();
1151 [size_is(num_sites)] [unique] lsa_String *sites;
1154 WERROR netr_DsrGetDcSiteCoverageW(
1155 [in] [string,charset(UTF16)] uint16 *server_name,
1156 [out] DcSitesCtr *ctr
1161 NTSTATUS netr_LogonSamLogonEx(
1162 [in] [string,charset(UTF16)] uint16 *server_name,
1163 [in] [string,charset(UTF16)] uint16 *computer_name,
1164 [in] uint16 logon_level,
1165 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1166 [in] uint16 validation_level,
1167 [out] [switch_is(validation_level)] netr_Validation validation,
1168 [out] uint8 authoritative,
1169 [in,out] uint32 flags
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;
1212 WERROR netr_DsrEnumerateDomainTrusts(
1213 [in] [string,charset(UTF16)] uint16 *server_name,
1214 [in] netr_TrustFlags trust_flags,
1216 [out,size_is(count)] netr_DomainTrust *trusts
1222 WERROR netr_DSRDEREGISTERDNSHOSTRECORDS();
1226 WERROR netr_NETRSERVERTRUSTPASSWORDSGET();
1230 WERROR netr_DSRGETFORESTTRUSTINFORMATION();
1234 WERROR netr_NETRGETFORESTTRUSTINFORMATION();
1239 /* this is the ADS varient. I don't yet know what the "flags" are for */
1240 NTSTATUS netr_LogonSamLogonWithFlags(
1241 [in] [string,charset(UTF16)] uint16 *server_name,
1242 [in] [string,charset(UTF16)] uint16 *computer_name,
1243 [in] netr_Authenticator *credential,
1244 [in][out] netr_Authenticator *return_authenticator,
1245 [in] uint16 logon_level,
1246 [in] [switch_is(logon_level)] netr_LogonLevel logon,
1247 [in] uint16 validation_level,
1248 [out] [switch_is(validation_level)] netr_Validation validation,
1249 [out] uint8 authoritative,
1250 [in,out] uint32 flags
1255 WERROR netr_NETRSERVERGETTRUSTINFO();