2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-2000
6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
7 Copyright (C) Paul Ashton 1997-2000
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_SAMR_H /* _RPC_SAMR_H */
31 /*******************************************************************
32 the following information comes from a QuickView on samsrv.dll,
33 and gives an idea of exactly what is needed:
35 x SamrAddMemberToAlias
36 x SamrAddMemberToGroup
37 SamrAddMultipleMembersToAlias
38 x SamrChangePasswordUser
41 x SamrCreateAliasInDomain
42 x SamrCreateGroupInDomain
43 x SamrCreateUserInDomain
47 x SamrEnumerateAliasesInDomain
48 SamrEnumerateDomainsInSamServer
49 x SamrEnumerateGroupsInDomain
50 x SamrEnumerateUsersInDomain
51 SamrGetUserDomainPasswordInformation
52 SamrLookupDomainInSamServer
53 ? SamrLookupIdsInDomain
54 x SamrLookupNamesInDomain
59 x SamrQueryDisplayInformation
60 x SamrQueryInformationAlias
61 SamrQueryInformationDomain
62 ? SamrQueryInformationUser
63 x SamrQuerySecurityObject
64 SamrRemoveMemberFromAlias
65 SamrRemoveMemberFromForiegnDomain
66 SamrRemoveMemberFromGroup
67 SamrRemoveMultipleMembersFromAlias
68 x SamrSetInformationAlias
69 SamrSetInformationDomain
70 x SamrSetInformationGroup
71 x SamrSetInformationUser
72 SamrSetMemberAttributesOfGroup
75 SamrTestPrivateFunctionsDomain
76 SamrTestPrivateFunctionsUser
78 ********************************************************************/
80 #define SAMR_CONNECT_ANON 0x00
81 #define SAMR_CLOSE_HND 0x01
82 #define SAMR_UNKNOWN_2 0x02 /* set sec object? */
83 #define SAMR_QUERY_SEC_OBJECT 0x03
85 #define SAMR_UNKNOWN_4 0x04 /* profile info? */
86 #define SAMR_LOOKUP_DOMAIN 0x05
87 #define SAMR_ENUM_DOMAINS 0x06
88 #define SAMR_OPEN_DOMAIN 0x07
89 #define SAMR_QUERY_DOMAIN_INFO 0x08
90 #define SAMR_SET_DOMAIN_INFO 0x09
92 #define SAMR_CREATE_DOM_GROUP 0x0a
93 #define SAMR_ENUM_DOM_GROUPS 0x0b
94 #define SAMR_ENUM_DOM_USERS 0x0d
95 #define SAMR_CREATE_DOM_ALIAS 0x0e
96 #define SAMR_ENUM_DOM_ALIASES 0x0f
97 #define SAMR_QUERY_USERALIASES 0x10
99 #define SAMR_LOOKUP_NAMES 0x11
100 #define SAMR_LOOKUP_RIDS 0x12
102 #define SAMR_OPEN_GROUP 0x13
103 #define SAMR_QUERY_GROUPINFO 0x14
104 #define SAMR_SET_GROUPINFO 0x15
105 #define SAMR_ADD_GROUPMEM 0x16
106 #define SAMR_DELETE_DOM_GROUP 0x17
107 #define SAMR_DEL_GROUPMEM 0x18
108 #define SAMR_QUERY_GROUPMEM 0x19
109 #define SAMR_UNKNOWN_1A 0x1a
111 #define SAMR_OPEN_ALIAS 0x1b
112 #define SAMR_QUERY_ALIASINFO 0x1c
113 #define SAMR_SET_ALIASINFO 0x1d
114 #define SAMR_DELETE_DOM_ALIAS 0x1e
115 #define SAMR_ADD_ALIASMEM 0x1f
116 #define SAMR_DEL_ALIASMEM 0x20
117 #define SAMR_QUERY_ALIASMEM 0x21
119 #define SAMR_OPEN_USER 0x22
120 #define SAMR_DELETE_DOM_USER 0x23
121 #define SAMR_QUERY_USERINFO 0x24
122 #define SAMR_SET_USERINFO2 0x25
123 #define SAMR_QUERY_USERGROUPS 0x27
125 #define SAMR_QUERY_DISPINFO 0x28
126 #define SAMR_UNKNOWN_29 0x29
127 #define SAMR_UNKNOWN_2a 0x2a
128 #define SAMR_UNKNOWN_2b 0x2b
129 #define SAMR_GET_USRDOM_PWINFO 0x2c
130 #define SAMR_UNKNOWN_2D 0x2d
131 #define SAMR_UNKNOWN_2E 0x2e /* looks like an alias for SAMR_QUERY_DOMAIN_INFO */
132 #define SAMR_UNKNOWN_2f 0x2f
133 #define SAMR_QUERY_DISPINFO3 0x30 /* Alias for SAMR_QUERY_DISPINFO
135 #define SAMR_UNKNOWN_31 0x31
136 #define SAMR_CREATE_USER 0x32
137 #define SAMR_QUERY_DISPINFO4 0x33 /* Alias for SAMR_QUERY_DISPINFO
139 #define SAMR_ADDMULTI_ALIASMEM 0x34
141 #define SAMR_UNKNOWN_35 0x35
142 #define SAMR_UNKNOWN_36 0x36
143 #define SAMR_CHGPASSWD_USER 0x37
144 #define SAMR_GET_DOM_PWINFO 0x38
145 #define SAMR_CONNECT 0x39
146 #define SAMR_SET_USERINFO 0x3A
149 typedef struct _DISP_USER_INFO {
154 typedef struct _DISP_GROUP_INFO {
160 typedef struct logon_hours_info
162 uint32 len; /* normally 21 bytes */
167 /* SAM_USER_INFO_23 */
168 typedef struct sam_user_info_23
170 /* TIMES MAY NOT IN RIGHT ORDER!!!! */
171 NTTIME logon_time; /* logon time */
172 NTTIME logoff_time; /* logoff time */
173 NTTIME kickoff_time; /* kickoff time */
174 NTTIME pass_last_set_time; /* password last set time */
175 NTTIME pass_can_change_time; /* password can change time */
176 NTTIME pass_must_change_time; /* password must change time */
178 UNIHDR hdr_user_name; /* NULL - user name unicode string header */
179 UNIHDR hdr_full_name; /* user's full name unicode string header */
180 UNIHDR hdr_home_dir; /* home directory unicode string header */
181 UNIHDR hdr_dir_drive; /* home drive unicode string header */
182 UNIHDR hdr_logon_script; /* logon script unicode string header */
183 UNIHDR hdr_profile_path; /* profile path unicode string header */
184 UNIHDR hdr_acct_desc ; /* user description */
185 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
186 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
187 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
189 uint8 lm_pwd[16]; /* lm user passwords */
190 uint8 nt_pwd[16]; /* nt user passwords */
192 uint32 user_rid; /* Primary User ID */
193 uint32 group_rid; /* Primary Group ID */
195 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
197 uint32 unknown_3; /* 0x09f8 27fa */
199 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
201 uint32 ptr_logon_hrs; /* pointer to logon hours */
205 uint32 unknown_5; /* 0x0001 0000 */
209 UNISTR2 uni_user_name; /* NULL - username unicode string */
210 UNISTR2 uni_full_name; /* user's full name unicode string */
211 UNISTR2 uni_home_dir; /* home directory unicode string */
212 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
213 UNISTR2 uni_logon_script; /* logon script unicode string */
214 UNISTR2 uni_profile_path; /* profile path unicode string */
215 UNISTR2 uni_acct_desc ; /* user description unicode string */
216 UNISTR2 uni_workstations; /* login from workstations unicode string */
217 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
218 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
220 uint32 unknown_6; /* 0x0000 04ec */
227 /* SAM_USER_INFO_24 */
228 typedef struct sam_user_info_24
235 * NB. This structure is *definately* incorrect. It's my best guess
236 * currently for W2K SP2. The password field is encrypted in a different
237 * way than normal... And there are definately other problems. JRA.
240 /* SAM_USER_INFO_25 */
241 typedef struct sam_user_info_25
243 /* TIMES MAY NOT IN RIGHT ORDER!!!! */
244 NTTIME logon_time; /* logon time */
245 NTTIME logoff_time; /* logoff time */
246 NTTIME kickoff_time; /* kickoff time */
247 NTTIME pass_last_set_time; /* password last set time */
248 NTTIME pass_can_change_time; /* password can change time */
249 NTTIME pass_must_change_time; /* password must change time */
251 UNIHDR hdr_user_name; /* NULL - user name unicode string header */
252 UNIHDR hdr_full_name; /* user's full name unicode string header */
253 UNIHDR hdr_home_dir; /* home directory unicode string header */
254 UNIHDR hdr_dir_drive; /* home drive unicode string header */
255 UNIHDR hdr_logon_script; /* logon script unicode string header */
256 UNIHDR hdr_profile_path; /* profile path unicode string header */
257 UNIHDR hdr_acct_desc ; /* user description */
258 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
259 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
260 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
262 uint8 lm_pwd[16]; /* lm user passwords */
263 uint8 nt_pwd[16]; /* nt user passwords */
265 uint32 user_rid; /* Primary User ID */
266 uint32 group_rid; /* Primary Group ID */
268 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
274 UNISTR2 uni_user_name; /* NULL - username unicode string */
275 UNISTR2 uni_full_name; /* user's full name unicode string */
276 UNISTR2 uni_home_dir; /* home directory unicode string */
277 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
278 UNISTR2 uni_logon_script; /* logon script unicode string */
279 UNISTR2 uni_profile_path; /* profile path unicode string */
280 UNISTR2 uni_acct_desc ; /* user description unicode string */
281 UNISTR2 uni_workstations; /* login from workstations unicode string */
282 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
283 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
287 /* SAM_USER_INFO_21 */
288 typedef struct sam_user_info_21
290 NTTIME logon_time; /* logon time */
291 NTTIME logoff_time; /* logoff time */
292 NTTIME kickoff_time; /* kickoff time */
293 NTTIME pass_last_set_time; /* password last set time */
294 NTTIME pass_can_change_time; /* password can change time */
295 NTTIME pass_must_change_time; /* password must change time */
297 UNIHDR hdr_user_name; /* username unicode string header */
298 UNIHDR hdr_full_name; /* user's full name unicode string header */
299 UNIHDR hdr_home_dir; /* home directory unicode string header */
300 UNIHDR hdr_dir_drive; /* home drive unicode string header */
301 UNIHDR hdr_logon_script; /* logon script unicode string header */
302 UNIHDR hdr_profile_path; /* profile path unicode string header */
303 UNIHDR hdr_acct_desc ; /* user description */
304 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
305 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
306 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
308 uint8 lm_pwd[16]; /* lm user passwords */
309 uint8 nt_pwd[16]; /* nt user passwords */
311 uint32 user_rid; /* Primary User ID */
312 uint32 group_rid; /* Primary Group ID */
314 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
316 uint32 unknown_3; /* 0x00ff ffff */
318 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
320 uint32 ptr_logon_hrs; /* unknown pointer */
322 uint32 unknown_5; /* 0x0002 0000 */
326 UNISTR2 uni_user_name; /* username unicode string */
327 UNISTR2 uni_full_name; /* user's full name unicode string */
328 UNISTR2 uni_home_dir; /* home directory unicode string */
329 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
330 UNISTR2 uni_logon_script; /* logon script unicode string */
331 UNISTR2 uni_profile_path; /* profile path unicode string */
332 UNISTR2 uni_acct_desc ; /* user description unicode string */
333 UNISTR2 uni_workstations; /* login from workstations unicode string */
334 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
335 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
337 uint32 unknown_6; /* 0x0000 04ec */
345 /* SAM_USER_INFO_20 */
346 typedef struct sam_user_info_20
348 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
350 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
354 /* SAM_USER_INFO_12 */
355 typedef struct sam_user_info_12
357 uint8 lm_pwd[16]; /* lm user passwords */
358 uint8 nt_pwd[16]; /* nt user passwords */
365 /* SAM_USER_INFO_11 */
366 typedef struct sam_user_info_11
368 uint8 padding_0[16]; /* 0 - padding 16 bytes */
369 NTTIME expiry; /* expiry time or something? */
370 uint8 padding_1[24]; /* 0 - padding 24 bytes */
372 UNIHDR hdr_mach_acct; /* unicode header for machine account */
373 uint32 padding_2; /* 0 - padding 4 bytes */
375 uint32 ptr_1; /* pointer */
376 uint8 padding_3[32]; /* 0 - padding 32 bytes */
377 uint32 padding_4; /* 0 - padding 4 bytes */
379 uint32 ptr_2; /* pointer */
380 uint32 padding_5; /* 0 - padding 4 bytes */
382 uint32 ptr_3; /* pointer */
383 uint8 padding_6[32]; /* 0 - padding 32 bytes */
385 uint32 rid_user; /* user RID */
386 uint32 rid_group; /* group RID */
388 uint16 acct_ctrl; /* 0080 - ACB_XXXX */
389 uint16 unknown_3; /* 16 bit padding */
391 uint16 unknown_4; /* 0x003f - 16 bit unknown */
392 uint16 unknown_5; /* 0x003c - 16 bit unknown */
394 uint8 padding_7[16]; /* 0 - padding 16 bytes */
395 uint32 padding_8; /* 0 - padding 4 bytes */
397 UNISTR2 uni_mach_acct; /* unicode string for machine account */
399 uint8 padding_9[48]; /* 0 - padding 48 bytes */
404 /* SAM_USER_INFO_10 */
405 typedef struct sam_user_info_10
413 /* SAMR_Q_CLOSE_HND - probably a policy handle close */
414 typedef struct q_samr_close_hnd_info
416 POLICY_HND pol; /* policy handle */
421 /* SAMR_R_CLOSE_HND - probably a policy handle close */
422 typedef struct r_samr_close_hnd_info
424 POLICY_HND pol; /* policy handle */
425 NTSTATUS status; /* return status */
430 /****************************************************************************
431 SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this
432 *****************************************************************************/
434 /* SAMR_Q_GET_USRDOM_PWINFO */
435 typedef struct q_samr_usrdom_pwinfo_info
437 POLICY_HND user_pol; /* policy handle */
439 } SAMR_Q_GET_USRDOM_PWINFO;
442 /****************************************************************************
443 SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this
444 *****************************************************************************/
446 /* SAMR_R_GET_USRDOM_PWINFO */
447 typedef struct r_samr_usrdom_pwinfo_info
449 uint16 unknown_0; /* 0000 */
450 uint16 unknown_1; /* 0x0016 or 0x0015 */
451 uint32 unknown_2; /* 0x0000 0000 */
454 } SAMR_R_GET_USRDOM_PWINFO;
457 /****************************************************************************
458 SAMR_Q_QUERY_SEC_OBJ - info level 4. returns SIDs.
459 *****************************************************************************/
461 /* SAMR_Q_QUERY_SEC_OBJ - probably get domain info... */
462 typedef struct q_samr_query_sec_obj_info
464 POLICY_HND user_pol; /* policy handle */
465 uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
467 } SAMR_Q_QUERY_SEC_OBJ;
469 /* SAMR_R_QUERY_SEC_OBJ - probably an open */
470 typedef struct r_samr_query_sec_obj_info
475 NTSTATUS status; /* return status */
477 } SAMR_R_QUERY_SEC_OBJ;
480 /****************************************************************************
481 SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
482 *****************************************************************************/
484 /* SAMR_Q_QUERY_DOMAIN_INFO - */
485 typedef struct q_samr_query_domain_info
487 POLICY_HND domain_pol; /* policy handle */
488 uint16 switch_value; /* 0x0002, 0x0001 */
490 } SAMR_Q_QUERY_DOMAIN_INFO;
492 typedef struct sam_unknown_info_3_info
495 /* 0x8000 0000 */ /* DON'T forcibly disconnect remote users from server when logon hours expire*/
497 /* 0x0000 0000 */ /* forcibly disconnect remote users from server when logon hours expire*/
501 typedef struct sam_unknown_info_6_info
503 uint32 unknown_0; /* 0x0000 0000 */
505 uint32 ptr_0; /* pointer to unknown structure */
506 uint8 padding[12]; /* 12 bytes zeros */
510 typedef struct sam_unknown_info_7_info
512 uint16 unknown_0; /* 0x0003 */
516 typedef struct sam_unknown_info_12_inf
520 uint16 bad_attempt_lockout;
524 typedef struct sam_unknown_info_5_inf
526 UNIHDR hdr_server; /* server name unicode header */
527 UNISTR2 uni_server; /* server name unicode string */
531 typedef struct sam_unknown_info_2_inf
533 uint32 unknown_0; /* 0x0000 0000 */
534 uint32 unknown_1; /* 0x8000 0000 */
535 uint32 unknown_2; /* 0x0000 0000 */
537 uint32 ptr_0; /* pointer to unknown structure */
538 UNIHDR hdr_domain; /* domain name unicode header */
539 UNIHDR hdr_server; /* server name unicode header */
541 /* put all the data in here, at the moment, including what the above
542 pointer is referring to
545 uint32 seq_num; /* some sort of incrementing sequence number? */
546 uint32 unknown_3; /* 0x0000 0000 */
548 uint32 unknown_4; /* 0x0000 0001 */
549 uint32 unknown_5; /* 0x0000 0003 */
550 uint32 unknown_6; /* 0x0000 0001 */
551 uint32 num_domain_usrs; /* number of users in domain */
552 uint32 num_domain_grps; /* number of domain groups in domain */
553 uint32 num_local_grps; /* number of local groups in domain */
555 uint8 padding[12]; /* 12 bytes zeros */
557 UNISTR2 uni_domain; /* domain name unicode string */
558 UNISTR2 uni_server; /* server name unicode string */
562 typedef struct sam_unknown_info_1_inf
564 uint16 min_length_password;
565 uint16 password_history;
568 NTTIME min_passwordage;
573 typedef struct sam_unknown_ctr_info
583 SAM_UNK_INFO_12 inf12;
590 /* SAMR_R_QUERY_DOMAIN_INFO - */
591 typedef struct r_samr_query_domain_info
594 uint16 switch_value; /* same as in query */
598 NTSTATUS status; /* return status */
600 } SAMR_R_QUERY_DOMAIN_INFO;
603 /* SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain */
604 typedef struct q_samr_lookup_domain_info
606 POLICY_HND connect_pol;
611 } SAMR_Q_LOOKUP_DOMAIN;
614 /* SAMR_R_LOOKUP_DOMAIN */
615 typedef struct r_samr_lookup_domain_info
622 } SAMR_R_LOOKUP_DOMAIN;
625 /****************************************************************************
626 SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
628 0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
629 0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
630 *****************************************************************************/
632 /* SAMR_Q_OPEN_DOMAIN */
633 typedef struct q_samr_open_domain_info
635 POLICY_HND pol; /* policy handle */
636 uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
637 DOM_SID2 dom_sid; /* domain SID */
639 } SAMR_Q_OPEN_DOMAIN;
642 /* SAMR_R_OPEN_DOMAIN - probably an open */
643 typedef struct r_samr_open_domain_info
645 POLICY_HND domain_pol; /* policy handle associated with the SID */
646 NTSTATUS status; /* return status */
648 } SAMR_R_OPEN_DOMAIN;
650 #define MAX_SAM_ENTRIES 50
652 typedef struct samr_entry_info
660 /* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
661 typedef struct q_samr_enum_domains_info
663 POLICY_HND pol; /* policy handle */
665 uint32 start_idx; /* enumeration handle */
666 uint32 max_size; /* 0x0000 ffff */
668 } SAMR_Q_ENUM_DOMAINS;
670 /* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
671 typedef struct r_samr_enum_domains_info
673 uint32 next_idx; /* next starting index required for enum */
682 UNISTR2 *uni_dom_name;
688 } SAMR_R_ENUM_DOMAINS;
690 /* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
691 typedef struct q_samr_enum_dom_users_info
693 POLICY_HND pol; /* policy handle */
695 uint32 start_idx; /* number of values (0 indicates unlimited?) */
696 uint16 acb_mask; /* 0x0000 indicates all */
697 uint16 unknown_1; /* 0x0000 */
699 uint32 max_size; /* 0x0000 ffff */
701 } SAMR_Q_ENUM_DOM_USERS;
704 /* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
705 typedef struct r_samr_enum_dom_users_info
707 uint32 next_idx; /* next starting index required for enum */
716 UNISTR2 *uni_acct_name;
722 } SAMR_R_ENUM_DOM_USERS;
725 /* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
726 typedef struct q_samr_enum_dom_groups_info
728 POLICY_HND pol; /* policy handle */
730 /* this is possibly an enumeration context handle... */
731 uint32 start_idx; /* 0x0000 0000 */
733 uint32 max_size; /* 0x0000 ffff */
735 } SAMR_Q_ENUM_DOM_GROUPS;
738 /* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
739 typedef struct r_samr_enum_dom_groups_info
750 UNISTR2 *uni_grp_name;
756 } SAMR_R_ENUM_DOM_GROUPS;
759 /* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
760 typedef struct q_samr_enum_dom_aliases_info
762 POLICY_HND pol; /* policy handle */
764 /* this is possibly an enumeration context handle... */
765 uint32 start_idx; /* 0x0000 0000 */
767 uint32 max_size; /* 0x0000 ffff */
769 } SAMR_Q_ENUM_DOM_ALIASES;
772 /* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
773 typedef struct r_samr_enum_dom_aliases_info
784 UNISTR2 *uni_grp_name;
790 } SAMR_R_ENUM_DOM_ALIASES;
793 /* -- Level 1 Display Info - User Information -- */
795 typedef struct samr_entry_info1
802 UNIHDR hdr_acct_name;
803 UNIHDR hdr_user_name;
804 UNIHDR hdr_user_desc;
808 typedef struct samr_str_entry_info1
810 UNISTR2 uni_acct_name;
811 UNISTR2 uni_full_name;
812 UNISTR2 uni_acct_desc;
816 typedef struct sam_entry_info_1
824 /* -- Level 2 Display Info - Trust Account Information -- */
826 typedef struct samr_entry_info2
838 typedef struct samr_str_entry_info2
840 UNISTR2 uni_srv_name;
841 UNISTR2 uni_srv_desc;
845 typedef struct sam_entry_info_2
853 /* -- Level 3 Display Info - Domain Group Information -- */
855 typedef struct samr_entry_info3
860 uint32 attr; /* SE_GROUP_xxx, usually 7 */
867 typedef struct samr_str_entry_info3
869 UNISTR2 uni_grp_name;
870 UNISTR2 uni_grp_desc;
874 typedef struct sam_entry_info_3
882 /* -- Level 4 Display Info - User List (ASCII) -- */
884 typedef struct samr_entry_info4
887 STRHDR hdr_acct_name;
891 typedef struct samr_str_entry_info4
897 typedef struct sam_entry_info_4
905 /* -- Level 5 Display Info - Group List (ASCII) -- */
907 typedef struct samr_entry_info5
914 typedef struct samr_str_entry_info5
920 typedef struct sam_entry_info_5
928 typedef struct sam_dispinfo_ctr_info
932 SAM_DISPINFO_1 *info1; /* users/names/descriptions */
933 SAM_DISPINFO_2 *info2; /* trust accounts */
934 SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
935 SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
936 SAM_DISPINFO_5 *info5; /* group list (ASCII) */
937 void *info; /* allows assignment without typecasting, */
944 /* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
945 typedef struct q_samr_query_disp_info
947 POLICY_HND domain_pol;
949 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
952 uint32 start_idx; /* start enumeration index */
953 uint32 max_entries; /* maximum number of entries to return */
954 uint32 max_size; /* recommended data size; if exceeded server
955 should return STATUS_MORE_ENTRIES */
957 } SAMR_Q_QUERY_DISPINFO;
960 /* SAMR_R_QUERY_DISPINFO */
961 typedef struct r_samr_query_dispinfo_info
963 uint32 total_size; /* total data size for all matching entries
964 (0 = uncalculated) */
965 uint32 data_size; /* actual data size returned = size of SAM_ENTRY
966 structures + total length of strings */
968 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
971 uint32 num_entries; /* number of entries returned */
975 SAM_DISPINFO_CTR *ctr;
979 } SAMR_R_QUERY_DISPINFO;
982 /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
983 typedef struct q_samr_delete_dom_group_info
985 POLICY_HND group_pol; /* policy handle */
987 } SAMR_Q_DELETE_DOM_GROUP;
990 /* SAMR_R_DELETE_DOM_GROUP - delete domain group */
991 typedef struct r_samr_delete_dom_group_info
993 POLICY_HND pol; /* policy handle */
994 NTSTATUS status; /* return status */
996 } SAMR_R_DELETE_DOM_GROUP;
999 /* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
1000 typedef struct q_samr_create_dom_group_info
1002 POLICY_HND pol; /* policy handle */
1004 UNIHDR hdr_acct_desc;
1005 UNISTR2 uni_acct_desc;
1009 } SAMR_Q_CREATE_DOM_GROUP;
1011 /* SAMR_R_CREATE_DOM_GROUP - SAM create group */
1012 typedef struct r_samr_create_dom_group_info
1014 POLICY_HND pol; /* policy handle */
1019 } SAMR_R_CREATE_DOM_GROUP;
1021 /* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
1022 typedef struct q_samr_query_group_info
1024 POLICY_HND pol; /* policy handle */
1026 uint16 switch_level; /* 0x0001 seen */
1028 } SAMR_Q_QUERY_GROUPINFO;
1030 typedef struct samr_group_info1
1032 UNIHDR hdr_acct_name;
1034 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1035 uint32 num_members; /* 0x0000 0001 - number of group members? */
1037 UNIHDR hdr_acct_desc;
1039 UNISTR2 uni_acct_name;
1040 UNISTR2 uni_acct_desc;
1044 typedef struct samr_group_info3
1046 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1050 typedef struct samr_group_info4
1052 UNIHDR hdr_acct_desc;
1053 UNISTR2 uni_acct_desc;
1057 /* GROUP_INFO_CTR */
1058 typedef struct group_info_ctr
1060 uint16 switch_value1;
1072 /* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
1073 typedef struct r_samr_query_groupinfo_info
1076 GROUP_INFO_CTR *ctr;
1080 } SAMR_R_QUERY_GROUPINFO;
1083 /* SAMR_Q_SET_GROUPINFO - SAM Group Info */
1084 typedef struct q_samr_set_group_info
1086 POLICY_HND pol; /* policy handle */
1087 GROUP_INFO_CTR *ctr;
1089 } SAMR_Q_SET_GROUPINFO;
1091 /* SAMR_R_SET_GROUPINFO - SAM Group Info */
1092 typedef struct r_samr_set_group_info
1096 } SAMR_R_SET_GROUPINFO;
1099 /* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
1100 typedef struct q_samr_delete_dom_alias_info
1102 POLICY_HND alias_pol; /* policy handle */
1104 } SAMR_Q_DELETE_DOM_ALIAS;
1107 /* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
1108 typedef struct r_samr_delete_dom_alias_info
1110 POLICY_HND pol; /* policy handle */
1111 NTSTATUS status; /* return status */
1113 } SAMR_R_DELETE_DOM_ALIAS;
1116 /* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
1117 typedef struct q_samr_create_dom_alias_info
1119 POLICY_HND dom_pol; /* policy handle */
1121 UNIHDR hdr_acct_desc;
1122 UNISTR2 uni_acct_desc;
1124 uint32 access_mask; /* 0x001f000f */
1126 } SAMR_Q_CREATE_DOM_ALIAS;
1128 /* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
1129 typedef struct r_samr_create_dom_alias_info
1131 POLICY_HND alias_pol; /* policy handle */
1136 } SAMR_R_CREATE_DOM_ALIAS;
1138 /* SAMR_Q_QUERY_ALIASINFO - SAM Alias Info */
1139 typedef struct q_samr_query_alias_info
1141 POLICY_HND pol; /* policy handle */
1143 uint16 switch_level; /* 0x0003 seen */
1145 } SAMR_Q_QUERY_ALIASINFO;
1147 typedef struct samr_alias_info1
1149 UNIHDR hdr_acct_name;
1150 UNIHDR hdr_acct_desc;
1152 UNISTR2 uni_acct_name;
1153 UNISTR2 uni_acct_desc;
1157 typedef struct samr_alias_info3
1159 UNIHDR hdr_acct_desc;
1160 UNISTR2 uni_acct_desc;
1164 /* ALIAS_INFO_CTR */
1165 typedef struct alias_info_ctr
1167 uint16 switch_value1;
1168 uint16 switch_value2;
1179 /* SAMR_R_QUERY_ALIASINFO - SAM alias info */
1180 typedef struct r_samr_query_aliasinfo_info
1187 } SAMR_R_QUERY_ALIASINFO;
1190 /* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
1191 typedef struct q_samr_set_alias_info
1193 POLICY_HND alias_pol; /* policy handle */
1196 } SAMR_Q_SET_ALIASINFO;
1198 /* SAMR_R_SET_ALIASINFO - SAM alias info */
1199 typedef struct r_samr_set_aliasinfo_info
1203 } SAMR_R_SET_ALIASINFO;
1206 /* SAMR_Q_QUERY_USERGROUPS - */
1207 typedef struct q_samr_query_usergroup_info
1209 POLICY_HND pol; /* policy handle associated with unknown id */
1211 } SAMR_Q_QUERY_USERGROUPS;
1213 /* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
1214 typedef struct r_samr_query_usergroup_info
1216 uint32 ptr_0; /* pointer */
1217 uint32 num_entries; /* number of RID groups */
1218 uint32 ptr_1; /* pointer */
1219 uint32 num_entries2; /* number of RID groups */
1221 DOM_GID *gid; /* group info */
1223 NTSTATUS status; /* return status */
1225 } SAMR_R_QUERY_USERGROUPS;
1227 /* SAM_USERINFO_CTR - sam user info */
1228 typedef struct sam_userinfo_ctr_info
1230 uint16 switch_value;
1234 SAM_USER_INFO_10 *id10; /* auth-level 0x10 */
1235 SAM_USER_INFO_11 *id11; /* auth-level 0x11 */
1236 SAM_USER_INFO_12 *id12; /* auth-level 0x12 */
1237 SAM_USER_INFO_20 *id20; /* auth-level 20 */
1238 SAM_USER_INFO_21 *id21; /* auth-level 21 */
1239 SAM_USER_INFO_23 *id23; /* auth-level 0x17 */
1240 SAM_USER_INFO_24 *id24; /* auth-level 0x18 */
1241 SAM_USER_INFO_25 *id25; /* auth-level 0x19 */
1242 void* id; /* to make typecasting easy */
1249 /* SAMR_Q_SET_USERINFO2 - set sam info */
1250 typedef struct q_samr_set_user_info2
1252 POLICY_HND pol; /* policy handle associated with user */
1253 uint16 switch_value; /* 0x0010 */
1255 SAM_USERINFO_CTR *ctr;
1257 } SAMR_Q_SET_USERINFO2;
1259 /* SAMR_R_SET_USERINFO2 - set sam info */
1260 typedef struct r_samr_set_user_info2
1262 NTSTATUS status; /* return status */
1264 } SAMR_R_SET_USERINFO2;
1266 /* SAMR_Q_SET_USERINFO - set sam info */
1267 typedef struct q_samr_set_user_info
1269 POLICY_HND pol; /* policy handle associated with user */
1270 uint16 switch_value;
1271 SAM_USERINFO_CTR *ctr;
1273 } SAMR_Q_SET_USERINFO;
1275 /* SAMR_R_SET_USERINFO - set sam info */
1276 typedef struct r_samr_set_user_info
1278 NTSTATUS status; /* return status */
1280 } SAMR_R_SET_USERINFO;
1283 /* SAMR_Q_QUERY_USERINFO - probably a get sam info */
1284 typedef struct q_samr_query_user_info
1286 POLICY_HND pol; /* policy handle associated with unknown id */
1287 uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
1289 } SAMR_Q_QUERY_USERINFO;
1291 /* SAMR_R_QUERY_USERINFO - probably a get sam info */
1292 typedef struct r_samr_query_user_info
1294 uint32 ptr; /* pointer */
1295 SAM_USERINFO_CTR *ctr;
1297 NTSTATUS status; /* return status */
1299 } SAMR_R_QUERY_USERINFO;
1302 /****************************************************************************
1303 SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
1305 the policy handle allocated by an "samr open secret" call is associated
1306 with a SID. this policy handle is what is queried here, *not* the SID
1307 itself. the response to the lookup rids is relative to this SID.
1308 *****************************************************************************/
1309 /* SAMR_Q_QUERY_USERALIASES */
1310 typedef struct q_samr_query_useraliases_info
1312 POLICY_HND pol; /* policy handle */
1314 uint32 num_sids1; /* number of rids being looked up */
1315 uint32 ptr; /* buffer pointer */
1316 uint32 num_sids2; /* number of rids being looked up */
1318 uint32 *ptr_sid; /* pointers to sids to be looked up */
1319 DOM_SID2 *sid ; /* sids to be looked up. */
1321 } SAMR_Q_QUERY_USERALIASES;
1324 /* SAMR_R_QUERY_USERALIASES */
1325 typedef struct r_samr_query_useraliases_info
1328 uint32 ptr; /* undocumented buffer pointer */
1330 uint32 num_entries2;
1331 uint32 *rid; /* domain RIDs being looked up */
1333 NTSTATUS status; /* return code */
1335 } SAMR_R_QUERY_USERALIASES;
1338 /****************************************************************************
1339 SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
1340 *****************************************************************************/
1341 /* SAMR_Q_LOOKUP_NAMES */
1342 typedef struct q_samr_lookup_names_info
1344 POLICY_HND pol; /* policy handle */
1346 uint32 num_names1; /* number of names being looked up */
1347 uint32 flags; /* 0x0000 03e8 - unknown */
1348 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1349 uint32 num_names2; /* number of names being looked up */
1351 UNIHDR *hdr_name; /* unicode account name header */
1352 UNISTR2 *uni_name; /* unicode account name string */
1354 } SAMR_Q_LOOKUP_NAMES;
1357 /* SAMR_R_LOOKUP_NAMES */
1358 typedef struct r_samr_lookup_names_info
1360 uint32 num_rids1; /* number of aliases being looked up */
1361 uint32 ptr_rids; /* pointer to aliases */
1362 uint32 num_rids2; /* number of aliases being looked up */
1364 uint32 *rids; /* rids */
1366 uint32 num_types1; /* number of users in aliases being looked up */
1367 uint32 ptr_types; /* pointer to users in aliases */
1368 uint32 num_types2; /* number of users in aliases being looked up */
1370 uint32 *types; /* SID_ENUM type */
1372 NTSTATUS status; /* return code */
1374 } SAMR_R_LOOKUP_NAMES;
1377 /****************************************************************************
1378 SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
1380 called to resolve domain RID groups.
1381 *****************************************************************************/
1382 /* SAMR_Q_LOOKUP_RIDS */
1383 typedef struct q_samr_lookup_rids_info
1385 POLICY_HND pol; /* policy handle */
1387 uint32 num_rids1; /* number of rids being looked up */
1388 uint32 flags; /* 0x0000 03e8 - unknown */
1389 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1390 uint32 num_rids2; /* number of rids being looked up */
1392 uint32 *rid; /* domain RIDs being looked up */
1394 } SAMR_Q_LOOKUP_RIDS;
1397 /****************************************************************************
1398 SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
1400 *****************************************************************************/
1401 /* SAMR_R_LOOKUP_RIDS */
1402 typedef struct r_samr_lookup_rids_info
1404 uint32 num_names1; /* number of aliases being looked up */
1405 uint32 ptr_names; /* pointer to aliases */
1406 uint32 num_names2; /* number of aliases being looked up */
1408 UNIHDR *hdr_name; /* unicode account name header */
1409 UNISTR2 *uni_name; /* unicode account name string */
1411 uint32 num_types1; /* number of users in aliases being looked up */
1412 uint32 ptr_types; /* pointer to users in aliases */
1413 uint32 num_types2; /* number of users in aliases being looked up */
1415 uint32 *type; /* SID_ENUM type */
1419 } SAMR_R_LOOKUP_RIDS;
1422 /* SAMR_Q_OPEN_USER - probably an open */
1423 typedef struct q_samr_open_user_info
1425 POLICY_HND domain_pol; /* policy handle */
1426 uint32 access_mask; /* 32 bit unknown - 0x02011b */
1427 uint32 user_rid; /* user RID */
1432 /* SAMR_R_OPEN_USER - probably an open */
1433 typedef struct r_samr_open_user_info
1435 POLICY_HND user_pol; /* policy handle associated with unknown id */
1436 NTSTATUS status; /* return status */
1441 /* SAMR_Q_CREATE_USER - probably a create */
1442 typedef struct q_samr_create_user_info
1444 POLICY_HND domain_pol; /* policy handle */
1446 UNIHDR hdr_name; /* unicode account name header */
1447 UNISTR2 uni_name; /* unicode account name */
1449 uint32 acb_info; /* account control info */
1450 uint32 access_mask; /* 0xe005 00b0 */
1452 } SAMR_Q_CREATE_USER;
1455 /* SAMR_R_CREATE_USER - probably a create */
1456 typedef struct r_samr_create_user_info
1458 POLICY_HND user_pol; /* policy handle associated with user */
1460 uint32 unknown_0; /* 0x0007 03ff */
1461 uint32 user_rid; /* user RID */
1462 NTSTATUS status; /* return status */
1464 } SAMR_R_CREATE_USER;
1467 /* SAMR_Q_DELETE_DOM_USER - delete domain user */
1468 typedef struct q_samr_delete_dom_user_info
1470 POLICY_HND user_pol; /* policy handle */
1472 } SAMR_Q_DELETE_DOM_USER;
1475 /* SAMR_R_DELETE_DOM_USER - delete domain user */
1476 typedef struct r_samr_delete_dom_user_info
1478 POLICY_HND pol; /* policy handle */
1479 NTSTATUS status; /* return status */
1481 } SAMR_R_DELETE_DOM_USER;
1484 /* SAMR_Q_QUERY_GROUPMEM - query group members */
1485 typedef struct q_samr_query_groupmem_info
1487 POLICY_HND group_pol; /* policy handle */
1489 } SAMR_Q_QUERY_GROUPMEM;
1492 /* SAMR_R_QUERY_GROUPMEM - query group members */
1493 typedef struct r_samr_query_groupmem_info
1509 } SAMR_R_QUERY_GROUPMEM;
1512 /* SAMR_Q_DEL_GROUPMEM - probably an del group member */
1513 typedef struct q_samr_del_group_mem_info
1515 POLICY_HND pol; /* policy handle */
1516 uint32 rid; /* rid */
1518 } SAMR_Q_DEL_GROUPMEM;
1521 /* SAMR_R_DEL_GROUPMEM - probably an del group member */
1522 typedef struct r_samr_del_group_mem_info
1524 NTSTATUS status; /* return status */
1526 } SAMR_R_DEL_GROUPMEM;
1529 /* SAMR_Q_ADD_GROUPMEM - probably an add group member */
1530 typedef struct q_samr_add_group_mem_info
1532 POLICY_HND pol; /* policy handle */
1534 uint32 rid; /* rid */
1535 uint32 unknown; /* 0x0000 0005 */
1537 } SAMR_Q_ADD_GROUPMEM;
1540 /* SAMR_R_ADD_GROUPMEM - probably an add group member */
1541 typedef struct r_samr_add_group_mem_info
1543 NTSTATUS status; /* return status */
1545 } SAMR_R_ADD_GROUPMEM;
1548 /* SAMR_Q_OPEN_GROUP - probably an open */
1549 typedef struct q_samr_open_group_info
1551 POLICY_HND domain_pol; /* policy handle */
1552 uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
1553 uint32 rid_group; /* rid */
1555 } SAMR_Q_OPEN_GROUP;
1558 /* SAMR_R_OPEN_GROUP - probably an open */
1559 typedef struct r_samr_open_group_info
1561 POLICY_HND pol; /* policy handle */
1562 NTSTATUS status; /* return status */
1564 } SAMR_R_OPEN_GROUP;
1567 /* SAMR_Q_QUERY_ALIASMEM - query alias members */
1568 typedef struct q_samr_query_aliasmem_info
1570 POLICY_HND alias_pol; /* policy handle */
1572 } SAMR_Q_QUERY_ALIASMEM;
1575 /* SAMR_R_QUERY_ALIASMEM - query alias members */
1576 typedef struct r_samr_query_aliasmem_info
1586 } SAMR_R_QUERY_ALIASMEM;
1589 /* SAMR_Q_ADD_ALIASMEM - add alias member */
1590 typedef struct q_samr_add_alias_mem_info
1592 POLICY_HND alias_pol; /* policy handle */
1594 DOM_SID2 sid; /* member sid to be added to the alias */
1596 } SAMR_Q_ADD_ALIASMEM;
1599 /* SAMR_R_ADD_ALIASMEM - add alias member */
1600 typedef struct r_samr_add_alias_mem_info
1602 NTSTATUS status; /* return status */
1604 } SAMR_R_ADD_ALIASMEM;
1607 /* SAMR_Q_DEL_ALIASMEM - add an add alias member */
1608 typedef struct q_samr_del_alias_mem_info
1610 POLICY_HND alias_pol; /* policy handle */
1612 DOM_SID2 sid; /* member sid to be added to alias */
1614 } SAMR_Q_DEL_ALIASMEM;
1617 /* SAMR_R_DEL_ALIASMEM - delete alias member */
1618 typedef struct r_samr_del_alias_mem_info
1620 NTSTATUS status; /* return status */
1622 } SAMR_R_DEL_ALIASMEM;
1626 /* SAMR_Q_OPEN_ALIAS - probably an open */
1627 typedef struct q_samr_open_alias_info
1634 } SAMR_Q_OPEN_ALIAS;
1637 /* SAMR_R_OPEN_ALIAS - probably an open */
1638 typedef struct r_samr_open_alias_info
1640 POLICY_HND pol; /* policy handle */
1641 NTSTATUS status; /* return status */
1643 } SAMR_R_OPEN_ALIAS;
1646 /* SAMR_Q_CONNECT_ANON - probably an open */
1647 typedef struct q_samr_connect_anon_info
1649 uint32 ptr; /* ptr? */
1650 uint16 unknown_0; /* 0x005c */
1651 uint16 unknown_1; /* 0x0001 */
1654 } SAMR_Q_CONNECT_ANON;
1656 /* SAMR_R_CONNECT_ANON - probably an open */
1657 typedef struct r_samr_connect_anon_info
1659 POLICY_HND connect_pol; /* policy handle */
1660 NTSTATUS status; /* return status */
1662 } SAMR_R_CONNECT_ANON;
1664 /* SAMR_Q_CONNECT - probably an open */
1665 typedef struct q_samr_connect_info
1667 uint32 ptr_srv_name; /* pointer (to server name?) */
1668 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
1675 /* SAMR_R_CONNECT - probably an open */
1676 typedef struct r_samr_connect_info
1678 POLICY_HND connect_pol; /* policy handle */
1679 NTSTATUS status; /* return status */
1683 /* SAMR_Q_GET_DOM_PWINFO */
1684 typedef struct q_samr_get_dom_pwinfo
1687 UNIHDR hdr_srv_name;
1688 UNISTR2 uni_srv_name;
1690 } SAMR_Q_GET_DOM_PWINFO;
1692 /* SAMR_R_GET_DOM_PWINFO */
1693 typedef struct r_samr_get_dom_pwinfo
1700 } SAMR_R_GET_DOM_PWINFO;
1702 /* SAMR_ENC_PASSWD */
1703 typedef struct enc_passwd_info
1711 typedef struct enc_hash_info
1718 /* SAMR_Q_CHGPASSWD_USER */
1719 typedef struct q_samr_chgpasswd_user_info
1723 UNIHDR hdr_dest_host; /* server name unicode header */
1724 UNISTR2 uni_dest_host; /* server name unicode string */
1726 UNIHDR hdr_user_name; /* username unicode string header */
1727 UNISTR2 uni_user_name; /* username unicode string */
1729 SAMR_ENC_PASSWD nt_newpass;
1730 SAMR_ENC_HASH nt_oldhash;
1732 uint32 unknown; /* 0x0000 0001 */
1734 SAMR_ENC_PASSWD lm_newpass;
1735 SAMR_ENC_HASH lm_oldhash;
1737 } SAMR_Q_CHGPASSWD_USER;
1739 /* SAMR_R_CHGPASSWD_USER */
1740 typedef struct r_samr_chgpasswd_user_info
1742 NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
1744 } SAMR_R_CHGPASSWD_USER;
1747 /* SAMR_Q_UNKNOWN_2D */
1748 typedef struct q_samr_unknown_2d_info
1750 POLICY_HND dom_pol; /* policy handle */
1751 DOM_SID2 sid; /* SID */
1753 } SAMR_Q_UNKNOWN_2D;
1756 /* SAMR_R_UNKNOWN_2D - probably an open */
1757 typedef struct r_samr_unknown_2d_info
1759 NTSTATUS status; /* return status */
1761 } SAMR_R_UNKNOWN_2D;
1765 /* these are from the old rpc_samr.h - they are needed while the merge
1766 is still going on */
1767 #define MAX_SAM_SIDS 15
1769 /* DOM_SID3 - security id */
1770 typedef struct sid_info_3
1772 uint16 len; /* length, bytes, including length of len :-) */
1779 /* SAMR_Q_UNKNOWN_2E */
1780 typedef struct q_samr_unknown_2e_info
1782 POLICY_HND domain_pol; /* policy handle */
1783 uint16 switch_value;
1785 } SAMR_Q_UNKNOWN_2E;
1787 /* SAMR_R_UNKNOWN_2E */
1788 typedef struct r_samr_unknown_2e_info
1791 uint16 switch_value;
1793 NTSTATUS status; /* return status */
1795 } SAMR_R_UNKNOWN_2E;
1797 /* SAMR_Q_SET_DOMAIN_INFO */
1798 typedef struct q_samr_set_domain_info
1800 POLICY_HND domain_pol; /* policy handle */
1801 uint16 switch_value0;
1802 uint16 switch_value;
1805 } SAMR_Q_SET_DOMAIN_INFO;
1807 /* SAMR_R_SET_DOMAIN_INFO */
1808 typedef struct r_samr_set_domain_info
1810 NTSTATUS status; /* return status */
1812 } SAMR_R_SET_DOMAIN_INFO;
1815 #endif /* _RPC_SAMR_H */