3 much of this was derived from the ethereal sources - thanks to everyone
10 uuid(12345678-1234-abcd-ef00-01234567cffb),
12 pointer_default(unique)
33 time_t pw_must_change;
40 WERROR netr_LogonUasLogon(
41 [in] unistr *server_name,
43 [in] unistr workstation,
44 [out] netr_UasInfo *info
56 WERROR netr_LogonUasLogoff(
57 [in] unistr *server_name,
59 [in] unistr workstation,
60 [out] netr_UasLogoffInfo info
67 typedef [flag(NDR_PAHEX)] struct {
71 typedef [flag(NDR_PAHEX)] struct {
75 netr_Credential client;
76 netr_Credential server;
77 } netr_CredentialState;
80 [value(strlen_m(r->string)*2)] uint16 size;
81 [value(r->size)] uint16 length;
82 unistr_noterm *string;
86 netr_String domain_name;
87 uint32 parameter_control;
91 netr_String workstation;
94 typedef [flag(NDR_PAHEX)] struct {
99 netr_IdentityInfo identity_info;
100 netr_Password lmpassword;
101 netr_Password ntpassword;
104 typedef [flag(NDR_PAHEX)] struct {
106 [value(r->length)] uint16 size;
107 [size_is(size),length_is(length)] uint8 *data;
108 } netr_ChallengeResponse;
110 typedef [flag(NDR_PAHEX)] struct {
111 netr_IdentityInfo logon_info;
113 netr_ChallengeResponse nt;
114 netr_ChallengeResponse lm;
118 [case(1)] netr_PasswordInfo *interactive;
119 [case(2)] netr_NetworkInfo *network;
120 [case(3)] netr_PasswordInfo *service;
124 netr_Credential cred;
126 } netr_Authenticator;
131 } netr_GroupMembership;
133 typedef [flag(NDR_PAHEX)] struct {
134 uint8 user_session_key[16];
135 } netr_UserSessionKey;
141 NTTIME passwd_last_set;
142 NTTIME passwd_can_change;
143 NTTIME passwd_must_change;
144 netr_String account_name;
145 netr_String full_name;
146 netr_String logon_script;
147 netr_String profile_path;
148 netr_String home_dir;
149 netr_String home_drive;
151 uint16 bad_passwd_count;
153 uint32 primary_group;
155 [size_is(group_count)] netr_GroupMembership *groupids;
157 netr_UserSessionKey key;
158 netr_String logon_server;
160 dom_sid2 *domain_sid;
161 uint32 expansionroom[10];
173 NTTIME passwd_last_set;
174 NTTIME passwd_can_change;
175 NTTIME passwd_must_change;
176 netr_String account_name;
177 netr_String full_name;
178 netr_String logon_script;
179 netr_String profile_path;
180 netr_String home_dir;
181 netr_String home_drive;
183 uint16 bad_passwd_count;
185 uint32 primary_group;
187 [size_is(group_count)] netr_GroupMembership *groupids;
189 netr_UserSessionKey key;
190 netr_String logon_server;
192 dom_sid2 *domain_sid;
193 uint32 expansionroom[10];
195 [size_is(sidcount)] netr_SidAttr *sids;
200 [size_is(pac_size)] uint8 *pac;
201 netr_String logon_domain;
202 netr_String logon_server;
203 netr_String principal_name;
205 [size_is(auth_size)] uint8 *auth;
206 netr_UserSessionKey user_session_key;
207 uint32 expansionroom[10];
208 netr_String unknown1;
209 netr_String unknown2;
210 netr_String unknown3;
211 netr_String unknown4;
215 [case(2)] netr_SamInfo *sam;
216 [case(3)] netr_SamInfo2 *sam2;
217 [case(4)] netr_PacInfo *pac;
218 [case(5)] netr_PacInfo *pac2;
221 NTSTATUS netr_LogonSamLogon(
222 [in] unistr *server_name,
223 [in] unistr *workstation,
224 [in] netr_Authenticator *credential,
225 [in][out] netr_Authenticator *authenticator,
226 [in] uint16 logon_level,
227 [in] [switch_is(logon_level)] netr_LogonLevel logon,
228 [in] uint16 validation_level,
229 [out] [switch_is(validation_level)] netr_Validation validation,
230 [out] uint32 authoritative
237 NTSTATUS netr_LogonSamLogoff(
238 [in] unistr *server_name,
239 [in] unistr *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
251 NTSTATUS netr_ServerReqChallenge(
252 [in] unistr *server_name,
253 [in] unistr computer_name,
254 [in][out] netr_Credential credentials
261 /* secure channel types */
262 const int SEC_CHAN_WKSTA = 2;
263 const int SEC_CHAN_DOMAIN = 4;
264 const int SEC_CHAN_BDC = 6;
266 NTSTATUS netr_ServerAuthenticate(
267 [in] unistr *server_name,
268 [in] unistr username,
269 [in] uint16 secure_challenge_type,
270 [in] unistr computer_name,
271 [in,out] netr_Credential credentials
278 NTSTATUS netr_ServerPasswordSet(
279 [in] unistr *server_name,
280 [in] unistr username,
281 [in] uint16 secure_challenge_type,
282 [in] unistr computer_name,
283 [in] netr_Authenticator credential,
284 [in] netr_Password new_password,
285 [out] netr_Authenticator return_authenticator
294 netr_String unknown1;
295 netr_String unknown2;
296 netr_String unknown3;
297 netr_String unknown4;
302 } netr_DELTA_DELETE_USER;
305 bool8 SensitiveDataFlag;
307 [size_is(DataLength)] uint8 *SensitiveData;
308 } netr_USER_PRIVATE_INFO;
311 netr_String account_name;
312 netr_String full_name;
314 uint32 primary_group;
315 netr_String home_dir;
316 netr_String home_drive;
317 netr_String logon_script;
318 netr_String description;
319 netr_String workstations;
322 samr_LogonHours logon_hours;
326 NTTIME AccountExpires;
327 uint32 AccountControl;
333 netr_String UserComment;
334 netr_String Parameters;
337 netr_USER_PRIVATE_INFO user_private_info;
338 uint32 SecurityInformation;
340 netr_String profile_path;
341 netr_String unknown2;
342 netr_String unknown3;
343 netr_String unknown4;
351 netr_String DomainName;
355 uint16 passwdhistorylen;
356 ULONG8 pwd_must_change_time;
357 ULONG8 pwd_can_change_time;
359 NTTIME domain_create_time;
360 uint32 SecurityInformation;
362 netr_String unknown1;
363 netr_String unknown2;
364 netr_String unknown3;
365 netr_String unknown4;
373 netr_String groupname;
374 netr_GroupMembership group_membership;
376 uint32 SecurityInformation;
378 netr_String unknown1;
379 netr_String unknown2;
380 netr_String unknown3;
381 netr_String unknown4;
391 netr_String unknown1;
392 netr_String unknown2;
393 netr_String unknown3;
394 netr_String unknown4;
402 [size_is(num_rids)] uint32 *rids;
403 [size_is(num_rids)] uint32 *attribs;
409 } netr_DELTA_GROUP_MEMBER;
412 netr_String alias_name;
414 uint32 SecurityInformation;
416 netr_String unknown1;
417 netr_String unknown2;
418 netr_String unknown3;
419 netr_String unknown4;
432 } netr_DELTA_ALIAS_MEMBER;
435 uint32 pagedpoollimit;
436 uint32 nonpagedpoollimit;
437 uint32 minimumworkingsetsize;
438 uint32 maximumworkingsetsize;
439 uint32 pagefilelimit;
445 NTTIME auditretentionperiod;
447 uint32 maxauditeventcount;
448 [size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
449 netr_String primarydomainname;
451 netr_QUOTA_LIMITS quota_limits;
452 NTTIME db_modify_time;
453 NTTIME db_create_time;
454 uint32 SecurityInformation;
456 netr_String unknown1;
457 netr_String unknown2;
458 netr_String unknown3;
459 netr_String unknown4;
467 netr_String DomainName;
468 uint32 num_controllers;
469 [size_is(num_controllers)] netr_String *controller_names;
470 uint32 SecurityInformation;
472 netr_String unknown1;
473 netr_String unknown2;
474 netr_String unknown3;
475 netr_String unknown4;
480 } netr_DELTA_TRUSTED_DOMAINS;
483 uint32 privilege_entries;
484 uint32 privilege_control;
485 [size_is(privilege_entries)] uint32 *privilege_attrib;
486 [size_is(privilege_entries)] netr_String *privilege_name;
487 netr_QUOTA_LIMITS quotalimits;
489 uint32 SecurityInformation;
491 netr_String unknown1;
492 netr_String unknown2;
493 netr_String unknown3;
494 netr_String unknown4;
499 } netr_DELTA_ACCOUNTS;
504 [size_is(maxlen)][length_is(len)] uint8 *cipher_data;
508 netr_CIPHER_VALUE current_cipher;
509 NTTIME current_cipher_set_time;
510 netr_CIPHER_VALUE old_cipher;
511 NTTIME old_cipher_set_time;
512 uint32 SecurityInformation;
514 netr_String unknown1;
515 netr_String unknown2;
516 netr_String unknown3;
517 netr_String unknown4;
525 [case(1)] netr_DELTA_DOMAIN *domain;
526 [case(2)] netr_DELTA_GROUP *group;
527 [case(4)] netr_DELTA_RENAME *rename_group;
528 [case(5)] netr_DELTA_USER *user;
529 [case(7)] netr_DELTA_RENAME *rename_user;
530 [case(8)] netr_DELTA_GROUP_MEMBER *group_member;
531 [case(9)] netr_DELTA_ALIAS *alias;
532 [case(11)] netr_DELTA_RENAME *rename_alias;
533 [case(12)] netr_DELTA_ALIAS_MEMBER *alias_member;
534 [case(13)] netr_DELTA_POLICY *policy;
535 [case(14)] netr_DELTA_TRUSTED_DOMAINS *trusted_domains;
536 [case(16)] netr_DELTA_ACCOUNTS *accounts;
537 [case(18)] netr_DELTA_SECRET *secret;
538 [case(20)] netr_DELTA_DELETE_USER *delete_group;
539 [case(21)] netr_DELTA_DELETE_USER *delete_user;
540 [case(22)] ULONG8 *modified_count;
544 [case(1)] uint32 rid;
545 [case(2)] uint32 rid;
546 [case(3)] uint32 rid;
547 [case(4)] uint32 rid;
548 [case(5)] uint32 rid;
549 [case(6)] uint32 rid;
550 [case(7)] uint32 rid;
551 [case(8)] uint32 rid;
552 [case(9)] uint32 rid;
553 [case(10)] uint32 rid;
554 [case(11)] uint32 rid;
555 [case(12)] uint32 rid;
556 [case(13)] dom_sid2 *sid;
557 [case(14)] dom_sid2 *sid;
558 [case(15)] dom_sid2 *sid;
559 [case(16)] dom_sid2 *sid;
560 [case(17)] dom_sid2 *sid;
561 [case(18)] unistr *Name;
562 [case(19)] unistr *Name;
563 [case(20)] uint32 rid;
564 [case(21)] uint32 rid;
565 } netr_DELTA_ID_UNION;
569 [switch_is(delta_type)] netr_DELTA_ID_UNION delta_id_union;
570 [switch_is(delta_type)] netr_DELTA_UNION delta_union;
575 [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum;
576 } netr_DELTA_ENUM_ARRAY;
579 NTSTATUS netr_DatabaseDeltas(
580 [in] unistr logonserver,
581 [in] unistr computername,
582 [in] netr_Authenticator credential,
583 [in,out] netr_Authenticator return_authenticator,
584 [in] uint32 database_id,
585 [in,out] ULONG8 sequence_num,
586 [in] uint32 preferredmaximumlength,
587 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
594 NTSTATUS netr_DatabaseSync(
595 [in] unistr logonserver,
596 [in] unistr computername,
597 [in] netr_Authenticator credential,
598 [in,out] netr_Authenticator return_authenticator,
599 [in] uint32 database_id,
600 [in,out] uint32 sync_context,
601 [in] uint32 preferredmaximumlength,
602 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
610 uint8 computer_name[16];
612 uint32 serial_number;
615 NTSTATUS netr_AccountDeltas(
616 [in] unistr *logonserver,
617 [in] unistr computername,
618 [in] netr_Authenticator credential,
619 [in,out] netr_Authenticator return_authenticator,
620 [out][size_is(count_returned)] uint8 *buffer,
621 [out] uint32 count_returned,
622 [out] uint32 total_entries,
623 [in,out] UAS_INFO_0 recordid,
626 [in] uint32 buffersize
634 NTSTATUS netr_AccountSync(
635 [in][string] wchar_t *logonserver,
636 [in][string][ref] wchar_t *computername,
637 [in][ref] AUTHENTICATOR credential,
638 [in][out][ref] AUTHENTICATOR return_authenticator,
639 [out][ref][size_is(count_returned)] uint8 *Buffer,
640 [out][ref] uint32 count_returned,
641 [out][ref] uint32 total_entries,
642 [out][ref] uint32 next_reference,
643 [in][long] reference,
645 [in][long] buffersize,
646 [in][out][ref] UAS_INFO_0 recordid,
653 NTSTATUS netr_GetDcName(
654 [in] unistr logon_server,
655 [in] unistr *domainname,
661 uint32 pdc_connection_status;
666 uint32 pdc_connection_status;
667 unistr trusted_dc_name;
668 uint32 tc_connection_status;
673 uint32 logon_attempts;
681 typedef [switch_type(long)] union {
682 [case(1)] NETLOGON_INFO_1 *i1;
683 [case(2)] NETLOGON_INFO_2 *i2;
684 [case(3)] NETLOGON_INFO_3 *i3;
685 } CONTROL_QUERY_INFORMATION;
691 NTSTATUS netr_LogonControl(
692 [in][string] wchar_t *logonserver,
693 [in] uint32 function_code,
695 [out][ref] CONTROL_QUERY_INFORMATION
702 NTSTATUS netr_GetAnyDCName(
703 [in] unistr *logon_server,
704 [in] unistr *domainname,
708 typedef [switch_type(long)] union {
709 [case(5)] unistr *unknown;
710 [case(6)] unistr *unknown;
711 [case(0xfffe)] uint32 unknown;
712 [case(7)] unistry*unknown;
713 } CONTROL_DATA_INFORMATION;
719 NTSTATUS netr_LogonControl2(
720 [in][string] wchar_t *logonserver,
721 [in] uint32 function_code,
723 [in][ref] CONTROL_DATA_INFORMATION *data,
724 [out][ref] CONTROL_QUERY_INFORMATION *query
731 NTSTATUS netr_ServerAuthenticate2(
732 [in][string] wchar_t *logonserver,
733 [in] unistr username,
734 [in] uint16 secure_channel_type,
735 [in] unistr computername,
736 [in][ref] CREDENTIAL *client_chal,
737 [out][ref] CREDENTIAL *server_chal,
738 [in][out][ref] uint32 *negotiate_flags,
745 NTSTATUS netr_DatabaseSync2(
746 [in][string][ref] wchar_t *logonserver, # REF!!!
747 [in][string][ref] wchar_t *computername,
748 [in][ref] AUTHENTICATOR credential,
749 [in][out][ref] AUTHENTICATOR return_authenticator,
750 [in] uint32 database_id,
751 [in] uint16 restart_state,
752 [in][out][ref] uint32 *sync_context,
753 [in] uint32 preferredmaximumlength,
754 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
761 NTSTATUS netr_DatabaseRedo(
762 [in][string][ref] wchar_t *logonserver, # REF!!!
763 [in][string][ref] wchar_t *computername,
764 [in][ref] netr_Authenticator credential,
765 [in][out][ref] netr_Authenticator return_authenticator,
766 [in][ref][size_is(change_log_entry_size)] uint8 *change_log_entry,
767 [in] uint32 change_log_entry_size,
768 [out] netr_DELTA_ENUM_ARRAY *delta_enum_array
775 NTSTATUS netr_LogonControl2Ex(
776 [in][string] wchar_t *logonserver,
777 [in] uint32 function_code,
779 [in][ref] CONTROL_DATA_INFORMATION *data,
780 [out][ref] CONTROL_QUERY_INFORMATION *query