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
8 Copyright (C) Jean François Micouleau 1998-2001.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef _RPC_SAMR_H /* _RPC_SAMR_H */
32 /*******************************************************************
33 the following information comes from a QuickView on samsrv.dll,
34 and gives an idea of exactly what is needed:
36 x SamrAddMemberToAlias
37 x SamrAddMemberToGroup
38 SamrAddMultipleMembersToAlias
39 x SamrChangePasswordUser
42 x SamrCreateAliasInDomain
43 x SamrCreateGroupInDomain
44 x SamrCreateUserInDomain
48 x SamrEnumerateAliasesInDomain
49 SamrEnumerateDomainsInSamServer
50 x SamrEnumerateGroupsInDomain
51 x SamrEnumerateUsersInDomain
52 SamrGetUserDomainPasswordInformation
53 SamrLookupDomainInSamServer
54 ? SamrLookupIdsInDomain
55 x SamrLookupNamesInDomain
60 x SamrQueryDisplayInformation
61 x SamrQueryInformationAlias
62 SamrQueryInformationDomain
63 ? SamrQueryInformationUser
64 x SamrQuerySecurityObject
65 SamrRemoveMemberFromAlias
66 SamrRemoveMemberFromForiegnDomain
67 SamrRemoveMemberFromGroup
68 SamrRemoveMultipleMembersFromAlias
69 x SamrSetInformationAlias
70 SamrSetInformationDomain
71 x SamrSetInformationGroup
72 x SamrSetInformationUser
73 SamrSetMemberAttributesOfGroup
76 SamrTestPrivateFunctionsDomain
77 SamrTestPrivateFunctionsUser
79 ********************************************************************/
81 #define SAMR_CONNECT_ANON 0x00
82 #define SAMR_CLOSE_HND 0x01
83 #define SAMR_UNKNOWN_2 0x02 /* set sec object? */
84 #define SAMR_QUERY_SEC_OBJECT 0x03
86 #define SAMR_UNKNOWN_4 0x04 /* profile info? */
87 #define SAMR_LOOKUP_DOMAIN 0x05
88 #define SAMR_ENUM_DOMAINS 0x06
89 #define SAMR_OPEN_DOMAIN 0x07
90 #define SAMR_QUERY_DOMAIN_INFO 0x08
91 #define SAMR_SET_DOMAIN_INFO 0x09
93 #define SAMR_CREATE_DOM_GROUP 0x0a
94 #define SAMR_ENUM_DOM_GROUPS 0x0b
95 #define SAMR_ENUM_DOM_USERS 0x0d
96 #define SAMR_CREATE_DOM_ALIAS 0x0e
97 #define SAMR_ENUM_DOM_ALIASES 0x0f
98 #define SAMR_QUERY_USERALIASES 0x10
100 #define SAMR_LOOKUP_NAMES 0x11
101 #define SAMR_LOOKUP_RIDS 0x12
103 #define SAMR_OPEN_GROUP 0x13
104 #define SAMR_QUERY_GROUPINFO 0x14
105 #define SAMR_SET_GROUPINFO 0x15
106 #define SAMR_ADD_GROUPMEM 0x16
107 #define SAMR_DELETE_DOM_GROUP 0x17
108 #define SAMR_DEL_GROUPMEM 0x18
109 #define SAMR_QUERY_GROUPMEM 0x19
110 #define SAMR_UNKNOWN_1A 0x1a
112 #define SAMR_OPEN_ALIAS 0x1b
113 #define SAMR_QUERY_ALIASINFO 0x1c
114 #define SAMR_SET_ALIASINFO 0x1d
115 #define SAMR_DELETE_DOM_ALIAS 0x1e
116 #define SAMR_ADD_ALIASMEM 0x1f
117 #define SAMR_DEL_ALIASMEM 0x20
118 #define SAMR_QUERY_ALIASMEM 0x21
120 #define SAMR_OPEN_USER 0x22
121 #define SAMR_DELETE_DOM_USER 0x23
122 #define SAMR_QUERY_USERINFO 0x24
123 #define SAMR_SET_USERINFO2 0x25
124 #define SAMR_QUERY_USERGROUPS 0x27
126 #define SAMR_QUERY_DISPINFO 0x28
127 #define SAMR_UNKNOWN_29 0x29
128 #define SAMR_UNKNOWN_2a 0x2a
129 #define SAMR_UNKNOWN_2b 0x2b
130 #define SAMR_GET_USRDOM_PWINFO 0x2c
131 #define SAMR_UNKNOWN_2D 0x2d
132 #define SAMR_UNKNOWN_2E 0x2e /* looks like an alias for SAMR_QUERY_DOMAIN_INFO */
133 #define SAMR_UNKNOWN_2f 0x2f
134 #define SAMR_QUERY_DISPINFO3 0x30 /* Alias for SAMR_QUERY_DISPINFO
136 #define SAMR_UNKNOWN_31 0x31
137 #define SAMR_CREATE_USER 0x32
138 #define SAMR_QUERY_DISPINFO4 0x33 /* Alias for SAMR_QUERY_DISPINFO
140 #define SAMR_ADDMULTI_ALIASMEM 0x34
142 #define SAMR_UNKNOWN_35 0x35
143 #define SAMR_UNKNOWN_36 0x36
144 #define SAMR_CHGPASSWD_USER 0x37
145 #define SAMR_GET_DOM_PWINFO 0x38
146 #define SAMR_CONNECT 0x39
147 #define SAMR_SET_USERINFO 0x3A
150 typedef struct _DISP_USER_INFO {
154 typedef struct _DISP_GROUP_INFO {
159 typedef struct logon_hours_info
161 uint32 len; /* normally 21 bytes */
166 /* SAM_USER_INFO_23 */
167 typedef struct sam_user_info_23
169 /* TIMES MAY NOT IN RIGHT ORDER!!!! */
170 NTTIME logon_time; /* logon time */
171 NTTIME logoff_time; /* logoff time */
172 NTTIME kickoff_time; /* kickoff time */
173 NTTIME pass_last_set_time; /* password last set time */
174 NTTIME pass_can_change_time; /* password can change time */
175 NTTIME pass_must_change_time; /* password must change time */
177 UNIHDR hdr_user_name; /* NULL - user name unicode string header */
178 UNIHDR hdr_full_name; /* user's full name unicode string header */
179 UNIHDR hdr_home_dir; /* home directory unicode string header */
180 UNIHDR hdr_dir_drive; /* home drive unicode string header */
181 UNIHDR hdr_logon_script; /* logon script unicode string header */
182 UNIHDR hdr_profile_path; /* profile path unicode string header */
183 UNIHDR hdr_acct_desc ; /* user description */
184 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
185 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
186 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
188 uint8 lm_pwd[16]; /* lm user passwords */
189 uint8 nt_pwd[16]; /* nt user passwords */
191 uint32 user_rid; /* Primary User ID */
192 uint32 group_rid; /* Primary Group ID */
194 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
196 uint32 unknown_3; /* 0x09f8 27fa */
198 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
200 uint32 ptr_logon_hrs; /* pointer to logon hours */
204 uint32 unknown_5; /* 0x0001 0000 */
208 UNISTR2 uni_user_name; /* NULL - username unicode string */
209 UNISTR2 uni_full_name; /* user's full name unicode string */
210 UNISTR2 uni_home_dir; /* home directory unicode string */
211 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
212 UNISTR2 uni_logon_script; /* logon script unicode string */
213 UNISTR2 uni_profile_path; /* profile path unicode string */
214 UNISTR2 uni_acct_desc ; /* user description unicode string */
215 UNISTR2 uni_workstations; /* login from workstations unicode string */
216 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
217 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
219 uint32 unknown_6; /* 0x0000 04ec */
226 /* SAM_USER_INFO_24 */
227 typedef struct sam_user_info_24
234 * NB. This structure is *definately* incorrect. It's my best guess
235 * currently for W2K SP2. The password field is encrypted in a different
236 * way than normal... And there are definately other problems. JRA.
239 /* SAM_USER_INFO_25 */
240 typedef struct sam_user_info_25
242 /* TIMES MAY NOT IN RIGHT ORDER!!!! */
243 NTTIME logon_time; /* logon time */
244 NTTIME logoff_time; /* logoff time */
245 NTTIME kickoff_time; /* kickoff time */
246 NTTIME pass_last_set_time; /* password last set time */
247 NTTIME pass_can_change_time; /* password can change time */
248 NTTIME pass_must_change_time; /* password must change time */
250 UNIHDR hdr_user_name; /* NULL - user name unicode string header */
251 UNIHDR hdr_full_name; /* user's full name unicode string header */
252 UNIHDR hdr_home_dir; /* home directory unicode string header */
253 UNIHDR hdr_dir_drive; /* home drive unicode string header */
254 UNIHDR hdr_logon_script; /* logon script unicode string header */
255 UNIHDR hdr_profile_path; /* profile path unicode string header */
256 UNIHDR hdr_acct_desc ; /* user description */
257 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
258 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
259 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
261 uint8 lm_pwd[16]; /* lm user passwords */
262 uint8 nt_pwd[16]; /* nt user passwords */
264 uint32 user_rid; /* Primary User ID */
265 uint32 group_rid; /* Primary Group ID */
267 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
273 UNISTR2 uni_user_name; /* NULL - username unicode string */
274 UNISTR2 uni_full_name; /* user's full name unicode string */
275 UNISTR2 uni_home_dir; /* home directory unicode string */
276 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
277 UNISTR2 uni_logon_script; /* logon script unicode string */
278 UNISTR2 uni_profile_path; /* profile path unicode string */
279 UNISTR2 uni_acct_desc ; /* user description unicode string */
280 UNISTR2 uni_workstations; /* login from workstations unicode string */
281 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
282 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
286 /* SAM_USER_INFO_21 */
287 typedef struct sam_user_info_21
289 NTTIME logon_time; /* logon time */
290 NTTIME logoff_time; /* logoff time */
291 NTTIME kickoff_time; /* kickoff time */
292 NTTIME pass_last_set_time; /* password last set time */
293 NTTIME pass_can_change_time; /* password can change time */
294 NTTIME pass_must_change_time; /* password must change time */
296 UNIHDR hdr_user_name; /* username unicode string header */
297 UNIHDR hdr_full_name; /* user's full name unicode string header */
298 UNIHDR hdr_home_dir; /* home directory unicode string header */
299 UNIHDR hdr_dir_drive; /* home drive unicode string header */
300 UNIHDR hdr_logon_script; /* logon script unicode string header */
301 UNIHDR hdr_profile_path; /* profile path unicode string header */
302 UNIHDR hdr_acct_desc ; /* user description */
303 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
304 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
305 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
307 uint8 lm_pwd[16]; /* lm user passwords */
308 uint8 nt_pwd[16]; /* nt user passwords */
310 uint32 user_rid; /* Primary User ID */
311 uint32 group_rid; /* Primary Group ID */
313 uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
315 uint32 unknown_3; /* 0x00ff ffff */
317 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
319 uint32 ptr_logon_hrs; /* unknown pointer */
321 uint32 unknown_5; /* 0x0002 0000 */
325 UNISTR2 uni_user_name; /* username unicode string */
326 UNISTR2 uni_full_name; /* user's full name unicode string */
327 UNISTR2 uni_home_dir; /* home directory unicode string */
328 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
329 UNISTR2 uni_logon_script; /* logon script unicode string */
330 UNISTR2 uni_profile_path; /* profile path unicode string */
331 UNISTR2 uni_acct_desc ; /* user description unicode string */
332 UNISTR2 uni_workstations; /* login from workstations unicode string */
333 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
334 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
336 uint32 unknown_6; /* 0x0000 04ec */
344 /* SAM_USER_INFO_20 */
345 typedef struct sam_user_info_20
347 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
349 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
353 /* SAM_USER_INFO_12 */
354 typedef struct sam_user_info_12
356 uint8 lm_pwd[16]; /* lm user passwords */
357 uint8 nt_pwd[16]; /* nt user passwords */
364 /* SAM_USER_INFO_11 */
365 typedef struct sam_user_info_11
367 uint8 padding_0[16]; /* 0 - padding 16 bytes */
368 NTTIME expiry; /* expiry time or something? */
369 uint8 padding_1[24]; /* 0 - padding 24 bytes */
371 UNIHDR hdr_mach_acct; /* unicode header for machine account */
372 uint32 padding_2; /* 0 - padding 4 bytes */
374 uint32 ptr_1; /* pointer */
375 uint8 padding_3[32]; /* 0 - padding 32 bytes */
376 uint32 padding_4; /* 0 - padding 4 bytes */
378 uint32 ptr_2; /* pointer */
379 uint32 padding_5; /* 0 - padding 4 bytes */
381 uint32 ptr_3; /* pointer */
382 uint8 padding_6[32]; /* 0 - padding 32 bytes */
384 uint32 rid_user; /* user RID */
385 uint32 rid_group; /* group RID */
387 uint16 acct_ctrl; /* 0080 - ACB_XXXX */
388 uint16 unknown_3; /* 16 bit padding */
390 uint16 unknown_4; /* 0x003f - 16 bit unknown */
391 uint16 unknown_5; /* 0x003c - 16 bit unknown */
393 uint8 padding_7[16]; /* 0 - padding 16 bytes */
394 uint32 padding_8; /* 0 - padding 4 bytes */
396 UNISTR2 uni_mach_acct; /* unicode string for machine account */
398 uint8 padding_9[48]; /* 0 - padding 48 bytes */
403 /* SAM_USER_INFO_10 */
404 typedef struct sam_user_info_10
412 /* SAMR_Q_CLOSE_HND - probably a policy handle close */
413 typedef struct q_samr_close_hnd_info
415 POLICY_HND pol; /* policy handle */
420 /* SAMR_R_CLOSE_HND - probably a policy handle close */
421 typedef struct r_samr_close_hnd_info
423 POLICY_HND pol; /* policy handle */
424 NTSTATUS status; /* return status */
429 /****************************************************************************
430 SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this
431 *****************************************************************************/
433 /* SAMR_Q_GET_USRDOM_PWINFO */
434 typedef struct q_samr_usrdom_pwinfo_info
436 POLICY_HND user_pol; /* policy handle */
438 } SAMR_Q_GET_USRDOM_PWINFO;
441 /****************************************************************************
442 SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this
443 *****************************************************************************/
445 /* SAMR_R_GET_USRDOM_PWINFO */
446 typedef struct r_samr_usrdom_pwinfo_info
448 uint16 unknown_0; /* 0000 */
449 uint16 unknown_1; /* 0x0016 or 0x0015 */
450 uint32 unknown_2; /* 0x0000 0000 */
453 } SAMR_R_GET_USRDOM_PWINFO;
456 /****************************************************************************
457 SAMR_Q_QUERY_SEC_OBJ - info level 4. returns SIDs.
458 *****************************************************************************/
460 /* SAMR_Q_QUERY_SEC_OBJ - probably get domain info... */
461 typedef struct q_samr_query_sec_obj_info
463 POLICY_HND user_pol; /* policy handle */
464 uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
466 } SAMR_Q_QUERY_SEC_OBJ;
468 /* SAMR_R_QUERY_SEC_OBJ - probably an open */
469 typedef struct r_samr_query_sec_obj_info
474 NTSTATUS status; /* return status */
476 } SAMR_R_QUERY_SEC_OBJ;
479 /****************************************************************************
480 SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
481 *****************************************************************************/
483 /* SAMR_Q_QUERY_DOMAIN_INFO - */
484 typedef struct q_samr_query_domain_info
486 POLICY_HND domain_pol; /* policy handle */
487 uint16 switch_value; /* 0x0002, 0x0001 */
489 } SAMR_Q_QUERY_DOMAIN_INFO;
491 typedef struct sam_unknown_info_3_info
494 /* 0x8000 0000 */ /* DON'T forcibly disconnect remote users from server when logon hours expire*/
496 /* 0x0000 0000 */ /* forcibly disconnect remote users from server when logon hours expire*/
500 typedef struct sam_unknown_info_6_info
502 uint32 unknown_0; /* 0x0000 0000 */
504 uint32 ptr_0; /* pointer to unknown structure */
505 uint8 padding[12]; /* 12 bytes zeros */
509 typedef struct sam_unknown_info_7_info
511 uint16 unknown_0; /* 0x0003 */
515 typedef struct sam_unknown_info_12_inf
519 uint16 bad_attempt_lockout;
523 typedef struct sam_unknown_info_5_inf
525 UNIHDR hdr_server; /* server name unicode header */
526 UNISTR2 uni_server; /* server name unicode string */
530 typedef struct sam_unknown_info_2_inf
532 uint32 unknown_0; /* 0x0000 0000 */
533 uint32 unknown_1; /* 0x8000 0000 */
534 uint32 unknown_2; /* 0x0000 0000 */
536 uint32 ptr_0; /* pointer to unknown structure */
537 UNIHDR hdr_domain; /* domain name unicode header */
538 UNIHDR hdr_server; /* server name unicode header */
540 /* put all the data in here, at the moment, including what the above
541 pointer is referring to
544 uint32 seq_num; /* some sort of incrementing sequence number? */
545 uint32 unknown_3; /* 0x0000 0000 */
547 uint32 unknown_4; /* 0x0000 0001 */
548 uint32 unknown_5; /* 0x0000 0003 */
549 uint32 unknown_6; /* 0x0000 0001 */
550 uint32 num_domain_usrs; /* number of users in domain */
551 uint32 num_domain_grps; /* number of domain groups in domain */
552 uint32 num_local_grps; /* number of local groups in domain */
554 uint8 padding[12]; /* 12 bytes zeros */
556 UNISTR2 uni_domain; /* domain name unicode string */
557 UNISTR2 uni_server; /* server name unicode string */
561 typedef struct sam_unknown_info_1_inf
563 uint16 min_length_password;
564 uint16 password_history;
567 NTTIME min_passwordage;
572 typedef struct sam_unknown_ctr_info
582 SAM_UNK_INFO_12 inf12;
589 /* SAMR_R_QUERY_DOMAIN_INFO - */
590 typedef struct r_samr_query_domain_info
593 uint16 switch_value; /* same as in query */
597 NTSTATUS status; /* return status */
599 } SAMR_R_QUERY_DOMAIN_INFO;
602 /* SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain */
603 typedef struct q_samr_lookup_domain_info
605 POLICY_HND connect_pol;
610 } SAMR_Q_LOOKUP_DOMAIN;
613 /* SAMR_R_LOOKUP_DOMAIN */
614 typedef struct r_samr_lookup_domain_info
621 } SAMR_R_LOOKUP_DOMAIN;
624 /****************************************************************************
625 SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
627 0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
628 0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
629 *****************************************************************************/
631 /* SAMR_Q_OPEN_DOMAIN */
632 typedef struct q_samr_open_domain_info
634 POLICY_HND pol; /* policy handle */
635 uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
636 DOM_SID2 dom_sid; /* domain SID */
638 } SAMR_Q_OPEN_DOMAIN;
641 /* SAMR_R_OPEN_DOMAIN - probably an open */
642 typedef struct r_samr_open_domain_info
644 POLICY_HND domain_pol; /* policy handle associated with the SID */
645 NTSTATUS status; /* return status */
647 } SAMR_R_OPEN_DOMAIN;
649 #define MAX_SAM_ENTRIES_W2K 0x400
650 #define MAX_SAM_ENTRIES_W95 50
651 /* The following should be the greater of the preceeding two. */
652 #define MAX_SAM_ENTRIES MAX_SAM_ENTRIES_W2K
654 typedef struct samr_entry_info
662 /* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
663 typedef struct q_samr_enum_domains_info
665 POLICY_HND pol; /* policy handle */
667 uint32 start_idx; /* enumeration handle */
668 uint32 max_size; /* 0x0000 ffff */
670 } SAMR_Q_ENUM_DOMAINS;
672 /* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
673 typedef struct r_samr_enum_domains_info
675 uint32 next_idx; /* next starting index required for enum */
684 UNISTR2 *uni_dom_name;
690 } SAMR_R_ENUM_DOMAINS;
692 /* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
693 typedef struct q_samr_enum_dom_users_info
695 POLICY_HND pol; /* policy handle */
697 uint32 start_idx; /* number of values (0 indicates unlimited?) */
698 uint16 acb_mask; /* 0x0000 indicates all */
699 uint16 unknown_1; /* 0x0000 */
701 uint32 max_size; /* 0x0000 ffff */
703 } SAMR_Q_ENUM_DOM_USERS;
706 /* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
707 typedef struct r_samr_enum_dom_users_info
709 uint32 next_idx; /* next starting index required for enum */
718 UNISTR2 *uni_acct_name;
724 } SAMR_R_ENUM_DOM_USERS;
727 /* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
728 typedef struct q_samr_enum_dom_groups_info
730 POLICY_HND pol; /* policy handle */
732 /* this is possibly an enumeration context handle... */
733 uint32 start_idx; /* 0x0000 0000 */
735 uint32 max_size; /* 0x0000 ffff */
737 } SAMR_Q_ENUM_DOM_GROUPS;
740 /* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
741 typedef struct r_samr_enum_dom_groups_info
752 UNISTR2 *uni_grp_name;
758 } SAMR_R_ENUM_DOM_GROUPS;
761 /* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
762 typedef struct q_samr_enum_dom_aliases_info
764 POLICY_HND pol; /* policy handle */
766 /* this is possibly an enumeration context handle... */
767 uint32 start_idx; /* 0x0000 0000 */
769 uint32 max_size; /* 0x0000 ffff */
771 } SAMR_Q_ENUM_DOM_ALIASES;
774 /* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
775 typedef struct r_samr_enum_dom_aliases_info
786 UNISTR2 *uni_grp_name;
792 } SAMR_R_ENUM_DOM_ALIASES;
795 /* -- Level 1 Display Info - User Information -- */
797 typedef struct samr_entry_info1
804 UNIHDR hdr_acct_name;
805 UNIHDR hdr_user_name;
806 UNIHDR hdr_user_desc;
810 typedef struct samr_str_entry_info1
812 UNISTR2 uni_acct_name;
813 UNISTR2 uni_full_name;
814 UNISTR2 uni_acct_desc;
818 typedef struct sam_entry_info_1
826 /* -- Level 2 Display Info - Trust Account Information -- */
828 typedef struct samr_entry_info2
840 typedef struct samr_str_entry_info2
842 UNISTR2 uni_srv_name;
843 UNISTR2 uni_srv_desc;
847 typedef struct sam_entry_info_2
855 /* -- Level 3 Display Info - Domain Group Information -- */
857 typedef struct samr_entry_info3
862 uint32 attr; /* SE_GROUP_xxx, usually 7 */
869 typedef struct samr_str_entry_info3
871 UNISTR2 uni_grp_name;
872 UNISTR2 uni_grp_desc;
876 typedef struct sam_entry_info_3
884 /* -- Level 4 Display Info - User List (ASCII) -- */
886 typedef struct samr_entry_info4
889 STRHDR hdr_acct_name;
893 typedef struct samr_str_entry_info4
899 typedef struct sam_entry_info_4
907 /* -- Level 5 Display Info - Group List (ASCII) -- */
909 typedef struct samr_entry_info5
916 typedef struct samr_str_entry_info5
922 typedef struct sam_entry_info_5
930 typedef struct sam_dispinfo_ctr_info
934 SAM_DISPINFO_1 *info1; /* users/names/descriptions */
935 SAM_DISPINFO_2 *info2; /* trust accounts */
936 SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
937 SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
938 SAM_DISPINFO_5 *info5; /* group list (ASCII) */
939 void *info; /* allows assignment without typecasting, */
946 /* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
947 typedef struct q_samr_query_disp_info
949 POLICY_HND domain_pol;
951 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
954 uint32 start_idx; /* start enumeration index */
955 uint32 max_entries; /* maximum number of entries to return */
956 uint32 max_size; /* recommended data size; if exceeded server
957 should return STATUS_MORE_ENTRIES */
959 } SAMR_Q_QUERY_DISPINFO;
962 /* SAMR_R_QUERY_DISPINFO */
963 typedef struct r_samr_query_dispinfo_info
965 uint32 total_size; /* total data size for all matching entries
966 (0 = uncalculated) */
967 uint32 data_size; /* actual data size returned = size of SAM_ENTRY
968 structures + total length of strings */
970 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
973 uint32 num_entries; /* number of entries returned */
977 SAM_DISPINFO_CTR *ctr;
981 } SAMR_R_QUERY_DISPINFO;
984 /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
985 typedef struct q_samr_delete_dom_group_info
987 POLICY_HND group_pol; /* policy handle */
989 } SAMR_Q_DELETE_DOM_GROUP;
992 /* SAMR_R_DELETE_DOM_GROUP - delete domain group */
993 typedef struct r_samr_delete_dom_group_info
995 POLICY_HND pol; /* policy handle */
996 NTSTATUS status; /* return status */
998 } SAMR_R_DELETE_DOM_GROUP;
1001 /* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
1002 typedef struct q_samr_create_dom_group_info
1004 POLICY_HND pol; /* policy handle */
1006 UNIHDR hdr_acct_desc;
1007 UNISTR2 uni_acct_desc;
1011 } SAMR_Q_CREATE_DOM_GROUP;
1013 /* SAMR_R_CREATE_DOM_GROUP - SAM create group */
1014 typedef struct r_samr_create_dom_group_info
1016 POLICY_HND pol; /* policy handle */
1021 } SAMR_R_CREATE_DOM_GROUP;
1023 /* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
1024 typedef struct q_samr_query_group_info
1026 POLICY_HND pol; /* policy handle */
1028 uint16 switch_level; /* 0x0001 seen */
1030 } SAMR_Q_QUERY_GROUPINFO;
1032 typedef struct samr_group_info1
1034 UNIHDR hdr_acct_name;
1036 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1037 uint32 num_members; /* 0x0000 0001 - number of group members? */
1039 UNIHDR hdr_acct_desc;
1041 UNISTR2 uni_acct_name;
1042 UNISTR2 uni_acct_desc;
1046 typedef struct samr_group_info3
1048 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1052 typedef struct samr_group_info4
1054 UNIHDR hdr_acct_desc;
1055 UNISTR2 uni_acct_desc;
1059 /* GROUP_INFO_CTR */
1060 typedef struct group_info_ctr
1062 uint16 switch_value1;
1074 /* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
1075 typedef struct r_samr_query_groupinfo_info
1078 GROUP_INFO_CTR *ctr;
1082 } SAMR_R_QUERY_GROUPINFO;
1085 /* SAMR_Q_SET_GROUPINFO - SAM Group Info */
1086 typedef struct q_samr_set_group_info
1088 POLICY_HND pol; /* policy handle */
1089 GROUP_INFO_CTR *ctr;
1091 } SAMR_Q_SET_GROUPINFO;
1093 /* SAMR_R_SET_GROUPINFO - SAM Group Info */
1094 typedef struct r_samr_set_group_info
1098 } SAMR_R_SET_GROUPINFO;
1101 /* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
1102 typedef struct q_samr_delete_dom_alias_info
1104 POLICY_HND alias_pol; /* policy handle */
1106 } SAMR_Q_DELETE_DOM_ALIAS;
1109 /* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
1110 typedef struct r_samr_delete_dom_alias_info
1112 POLICY_HND pol; /* policy handle */
1113 NTSTATUS status; /* return status */
1115 } SAMR_R_DELETE_DOM_ALIAS;
1118 /* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
1119 typedef struct q_samr_create_dom_alias_info
1121 POLICY_HND dom_pol; /* policy handle */
1123 UNIHDR hdr_acct_desc;
1124 UNISTR2 uni_acct_desc;
1126 uint32 access_mask; /* 0x001f000f */
1128 } SAMR_Q_CREATE_DOM_ALIAS;
1130 /* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
1131 typedef struct r_samr_create_dom_alias_info
1133 POLICY_HND alias_pol; /* policy handle */
1138 } SAMR_R_CREATE_DOM_ALIAS;
1140 /* SAMR_Q_QUERY_ALIASINFO - SAM Alias Info */
1141 typedef struct q_samr_query_alias_info
1143 POLICY_HND pol; /* policy handle */
1145 uint16 switch_level; /* 0x0003 seen */
1147 } SAMR_Q_QUERY_ALIASINFO;
1149 typedef struct samr_alias_info1
1151 UNIHDR hdr_acct_name;
1152 UNIHDR hdr_acct_desc;
1154 UNISTR2 uni_acct_name;
1155 UNISTR2 uni_acct_desc;
1159 typedef struct samr_alias_info3
1161 UNIHDR hdr_acct_desc;
1162 UNISTR2 uni_acct_desc;
1166 /* ALIAS_INFO_CTR */
1167 typedef struct alias_info_ctr
1169 uint16 switch_value1;
1170 uint16 switch_value2;
1181 /* SAMR_R_QUERY_ALIASINFO - SAM alias info */
1182 typedef struct r_samr_query_aliasinfo_info
1189 } SAMR_R_QUERY_ALIASINFO;
1192 /* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
1193 typedef struct q_samr_set_alias_info
1195 POLICY_HND alias_pol; /* policy handle */
1198 } SAMR_Q_SET_ALIASINFO;
1200 /* SAMR_R_SET_ALIASINFO - SAM alias info */
1201 typedef struct r_samr_set_aliasinfo_info
1205 } SAMR_R_SET_ALIASINFO;
1208 /* SAMR_Q_QUERY_USERGROUPS - */
1209 typedef struct q_samr_query_usergroup_info
1211 POLICY_HND pol; /* policy handle associated with unknown id */
1213 } SAMR_Q_QUERY_USERGROUPS;
1215 /* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
1216 typedef struct r_samr_query_usergroup_info
1218 uint32 ptr_0; /* pointer */
1219 uint32 num_entries; /* number of RID groups */
1220 uint32 ptr_1; /* pointer */
1221 uint32 num_entries2; /* number of RID groups */
1223 DOM_GID *gid; /* group info */
1225 NTSTATUS status; /* return status */
1227 } SAMR_R_QUERY_USERGROUPS;
1229 /* SAM_USERINFO_CTR - sam user info */
1230 typedef struct sam_userinfo_ctr_info
1232 uint16 switch_value;
1236 SAM_USER_INFO_10 *id10; /* auth-level 0x10 */
1237 SAM_USER_INFO_11 *id11; /* auth-level 0x11 */
1238 SAM_USER_INFO_12 *id12; /* auth-level 0x12 */
1239 SAM_USER_INFO_20 *id20; /* auth-level 20 */
1240 SAM_USER_INFO_21 *id21; /* auth-level 21 */
1241 SAM_USER_INFO_23 *id23; /* auth-level 0x17 */
1242 SAM_USER_INFO_24 *id24; /* auth-level 0x18 */
1243 SAM_USER_INFO_25 *id25; /* auth-level 0x19 */
1244 void* id; /* to make typecasting easy */
1251 /* SAMR_Q_SET_USERINFO2 - set sam info */
1252 typedef struct q_samr_set_user_info2
1254 POLICY_HND pol; /* policy handle associated with user */
1255 uint16 switch_value; /* 0x0010 */
1257 SAM_USERINFO_CTR *ctr;
1259 } SAMR_Q_SET_USERINFO2;
1261 /* SAMR_R_SET_USERINFO2 - set sam info */
1262 typedef struct r_samr_set_user_info2
1264 NTSTATUS status; /* return status */
1266 } SAMR_R_SET_USERINFO2;
1268 /* SAMR_Q_SET_USERINFO - set sam info */
1269 typedef struct q_samr_set_user_info
1271 POLICY_HND pol; /* policy handle associated with user */
1272 uint16 switch_value;
1273 SAM_USERINFO_CTR *ctr;
1275 } SAMR_Q_SET_USERINFO;
1277 /* SAMR_R_SET_USERINFO - set sam info */
1278 typedef struct r_samr_set_user_info
1280 NTSTATUS status; /* return status */
1282 } SAMR_R_SET_USERINFO;
1285 /* SAMR_Q_QUERY_USERINFO - probably a get sam info */
1286 typedef struct q_samr_query_user_info
1288 POLICY_HND pol; /* policy handle associated with unknown id */
1289 uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
1291 } SAMR_Q_QUERY_USERINFO;
1293 /* SAMR_R_QUERY_USERINFO - probably a get sam info */
1294 typedef struct r_samr_query_user_info
1296 uint32 ptr; /* pointer */
1297 SAM_USERINFO_CTR *ctr;
1299 NTSTATUS status; /* return status */
1301 } SAMR_R_QUERY_USERINFO;
1304 /****************************************************************************
1305 SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
1307 the policy handle allocated by an "samr open secret" call is associated
1308 with a SID. this policy handle is what is queried here, *not* the SID
1309 itself. the response to the lookup rids is relative to this SID.
1310 *****************************************************************************/
1311 /* SAMR_Q_QUERY_USERALIASES */
1312 typedef struct q_samr_query_useraliases_info
1314 POLICY_HND pol; /* policy handle */
1316 uint32 num_sids1; /* number of rids being looked up */
1317 uint32 ptr; /* buffer pointer */
1318 uint32 num_sids2; /* number of rids being looked up */
1320 uint32 *ptr_sid; /* pointers to sids to be looked up */
1321 DOM_SID2 *sid ; /* sids to be looked up. */
1323 } SAMR_Q_QUERY_USERALIASES;
1326 /* SAMR_R_QUERY_USERALIASES */
1327 typedef struct r_samr_query_useraliases_info
1330 uint32 ptr; /* undocumented buffer pointer */
1332 uint32 num_entries2;
1333 uint32 *rid; /* domain RIDs being looked up */
1335 NTSTATUS status; /* return code */
1337 } SAMR_R_QUERY_USERALIASES;
1340 /****************************************************************************
1341 SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
1342 *****************************************************************************/
1343 /* SAMR_Q_LOOKUP_NAMES */
1344 typedef struct q_samr_lookup_names_info
1346 POLICY_HND pol; /* policy handle */
1348 uint32 num_names1; /* number of names being looked up */
1349 uint32 flags; /* 0x0000 03e8 - unknown */
1350 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1351 uint32 num_names2; /* number of names being looked up */
1353 UNIHDR *hdr_name; /* unicode account name header */
1354 UNISTR2 *uni_name; /* unicode account name string */
1356 } SAMR_Q_LOOKUP_NAMES;
1359 /* SAMR_R_LOOKUP_NAMES */
1360 typedef struct r_samr_lookup_names_info
1362 uint32 num_rids1; /* number of aliases being looked up */
1363 uint32 ptr_rids; /* pointer to aliases */
1364 uint32 num_rids2; /* number of aliases being looked up */
1366 uint32 *rids; /* rids */
1368 uint32 num_types1; /* number of users in aliases being looked up */
1369 uint32 ptr_types; /* pointer to users in aliases */
1370 uint32 num_types2; /* number of users in aliases being looked up */
1372 uint32 *types; /* SID_ENUM type */
1374 NTSTATUS status; /* return code */
1376 } SAMR_R_LOOKUP_NAMES;
1379 /****************************************************************************
1380 SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
1382 called to resolve domain RID groups.
1383 *****************************************************************************/
1384 /* SAMR_Q_LOOKUP_RIDS */
1385 typedef struct q_samr_lookup_rids_info
1387 POLICY_HND pol; /* policy handle */
1389 uint32 num_rids1; /* number of rids being looked up */
1390 uint32 flags; /* 0x0000 03e8 - unknown */
1391 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1392 uint32 num_rids2; /* number of rids being looked up */
1394 uint32 *rid; /* domain RIDs being looked up */
1396 } SAMR_Q_LOOKUP_RIDS;
1399 /****************************************************************************
1400 SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
1402 *****************************************************************************/
1403 /* SAMR_R_LOOKUP_RIDS */
1404 typedef struct r_samr_lookup_rids_info
1406 uint32 num_names1; /* number of aliases being looked up */
1407 uint32 ptr_names; /* pointer to aliases */
1408 uint32 num_names2; /* number of aliases being looked up */
1410 UNIHDR *hdr_name; /* unicode account name header */
1411 UNISTR2 *uni_name; /* unicode account name string */
1413 uint32 num_types1; /* number of users in aliases being looked up */
1414 uint32 ptr_types; /* pointer to users in aliases */
1415 uint32 num_types2; /* number of users in aliases being looked up */
1417 uint32 *type; /* SID_ENUM type */
1421 } SAMR_R_LOOKUP_RIDS;
1424 /* SAMR_Q_OPEN_USER - probably an open */
1425 typedef struct q_samr_open_user_info
1427 POLICY_HND domain_pol; /* policy handle */
1428 uint32 access_mask; /* 32 bit unknown - 0x02011b */
1429 uint32 user_rid; /* user RID */
1434 /* SAMR_R_OPEN_USER - probably an open */
1435 typedef struct r_samr_open_user_info
1437 POLICY_HND user_pol; /* policy handle associated with unknown id */
1438 NTSTATUS status; /* return status */
1443 /* SAMR_Q_CREATE_USER - probably a create */
1444 typedef struct q_samr_create_user_info
1446 POLICY_HND domain_pol; /* policy handle */
1448 UNIHDR hdr_name; /* unicode account name header */
1449 UNISTR2 uni_name; /* unicode account name */
1451 uint32 acb_info; /* account control info */
1452 uint32 access_mask; /* 0xe005 00b0 */
1454 } SAMR_Q_CREATE_USER;
1457 /* SAMR_R_CREATE_USER - probably a create */
1458 typedef struct r_samr_create_user_info
1460 POLICY_HND user_pol; /* policy handle associated with user */
1462 uint32 unknown_0; /* 0x0007 03ff */
1463 uint32 user_rid; /* user RID */
1464 NTSTATUS status; /* return status */
1466 } SAMR_R_CREATE_USER;
1469 /* SAMR_Q_DELETE_DOM_USER - delete domain user */
1470 typedef struct q_samr_delete_dom_user_info
1472 POLICY_HND user_pol; /* policy handle */
1474 } SAMR_Q_DELETE_DOM_USER;
1477 /* SAMR_R_DELETE_DOM_USER - delete domain user */
1478 typedef struct r_samr_delete_dom_user_info
1480 POLICY_HND pol; /* policy handle */
1481 NTSTATUS status; /* return status */
1483 } SAMR_R_DELETE_DOM_USER;
1486 /* SAMR_Q_QUERY_GROUPMEM - query group members */
1487 typedef struct q_samr_query_groupmem_info
1489 POLICY_HND group_pol; /* policy handle */
1491 } SAMR_Q_QUERY_GROUPMEM;
1494 /* SAMR_R_QUERY_GROUPMEM - query group members */
1495 typedef struct r_samr_query_groupmem_info
1511 } SAMR_R_QUERY_GROUPMEM;
1514 /* SAMR_Q_DEL_GROUPMEM - probably an del group member */
1515 typedef struct q_samr_del_group_mem_info
1517 POLICY_HND pol; /* policy handle */
1518 uint32 rid; /* rid */
1520 } SAMR_Q_DEL_GROUPMEM;
1523 /* SAMR_R_DEL_GROUPMEM - probably an del group member */
1524 typedef struct r_samr_del_group_mem_info
1526 NTSTATUS status; /* return status */
1528 } SAMR_R_DEL_GROUPMEM;
1531 /* SAMR_Q_ADD_GROUPMEM - probably an add group member */
1532 typedef struct q_samr_add_group_mem_info
1534 POLICY_HND pol; /* policy handle */
1536 uint32 rid; /* rid */
1537 uint32 unknown; /* 0x0000 0005 */
1539 } SAMR_Q_ADD_GROUPMEM;
1542 /* SAMR_R_ADD_GROUPMEM - probably an add group member */
1543 typedef struct r_samr_add_group_mem_info
1545 NTSTATUS status; /* return status */
1547 } SAMR_R_ADD_GROUPMEM;
1550 /* SAMR_Q_OPEN_GROUP - probably an open */
1551 typedef struct q_samr_open_group_info
1553 POLICY_HND domain_pol; /* policy handle */
1554 uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
1555 uint32 rid_group; /* rid */
1557 } SAMR_Q_OPEN_GROUP;
1560 /* SAMR_R_OPEN_GROUP - probably an open */
1561 typedef struct r_samr_open_group_info
1563 POLICY_HND pol; /* policy handle */
1564 NTSTATUS status; /* return status */
1566 } SAMR_R_OPEN_GROUP;
1569 /* SAMR_Q_QUERY_ALIASMEM - query alias members */
1570 typedef struct q_samr_query_aliasmem_info
1572 POLICY_HND alias_pol; /* policy handle */
1574 } SAMR_Q_QUERY_ALIASMEM;
1577 /* SAMR_R_QUERY_ALIASMEM - query alias members */
1578 typedef struct r_samr_query_aliasmem_info
1588 } SAMR_R_QUERY_ALIASMEM;
1591 /* SAMR_Q_ADD_ALIASMEM - add alias member */
1592 typedef struct q_samr_add_alias_mem_info
1594 POLICY_HND alias_pol; /* policy handle */
1596 DOM_SID2 sid; /* member sid to be added to the alias */
1598 } SAMR_Q_ADD_ALIASMEM;
1601 /* SAMR_R_ADD_ALIASMEM - add alias member */
1602 typedef struct r_samr_add_alias_mem_info
1604 NTSTATUS status; /* return status */
1606 } SAMR_R_ADD_ALIASMEM;
1609 /* SAMR_Q_DEL_ALIASMEM - add an add alias member */
1610 typedef struct q_samr_del_alias_mem_info
1612 POLICY_HND alias_pol; /* policy handle */
1614 DOM_SID2 sid; /* member sid to be added to alias */
1616 } SAMR_Q_DEL_ALIASMEM;
1619 /* SAMR_R_DEL_ALIASMEM - delete alias member */
1620 typedef struct r_samr_del_alias_mem_info
1622 NTSTATUS status; /* return status */
1624 } SAMR_R_DEL_ALIASMEM;
1628 /* SAMR_Q_OPEN_ALIAS - probably an open */
1629 typedef struct q_samr_open_alias_info
1636 } SAMR_Q_OPEN_ALIAS;
1639 /* SAMR_R_OPEN_ALIAS - probably an open */
1640 typedef struct r_samr_open_alias_info
1642 POLICY_HND pol; /* policy handle */
1643 NTSTATUS status; /* return status */
1645 } SAMR_R_OPEN_ALIAS;
1648 /* SAMR_Q_CONNECT_ANON - probably an open */
1649 typedef struct q_samr_connect_anon_info
1651 uint32 ptr; /* ptr? */
1652 uint16 unknown_0; /* 0x005c */
1653 uint16 unknown_1; /* 0x0001 */
1656 } SAMR_Q_CONNECT_ANON;
1658 /* SAMR_R_CONNECT_ANON - probably an open */
1659 typedef struct r_samr_connect_anon_info
1661 POLICY_HND connect_pol; /* policy handle */
1662 NTSTATUS status; /* return status */
1664 } SAMR_R_CONNECT_ANON;
1666 /* SAMR_Q_CONNECT - probably an open */
1667 typedef struct q_samr_connect_info
1669 uint32 ptr_srv_name; /* pointer (to server name?) */
1670 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
1677 /* SAMR_R_CONNECT - probably an open */
1678 typedef struct r_samr_connect_info
1680 POLICY_HND connect_pol; /* policy handle */
1681 NTSTATUS status; /* return status */
1685 /* SAMR_Q_GET_DOM_PWINFO */
1686 typedef struct q_samr_get_dom_pwinfo
1689 UNIHDR hdr_srv_name;
1690 UNISTR2 uni_srv_name;
1692 } SAMR_Q_GET_DOM_PWINFO;
1694 /* SAMR_R_GET_DOM_PWINFO */
1695 typedef struct r_samr_get_dom_pwinfo
1702 } SAMR_R_GET_DOM_PWINFO;
1704 /* SAMR_ENC_PASSWD */
1705 typedef struct enc_passwd_info
1713 typedef struct enc_hash_info
1720 /* SAMR_Q_CHGPASSWD_USER */
1721 typedef struct q_samr_chgpasswd_user_info
1725 UNIHDR hdr_dest_host; /* server name unicode header */
1726 UNISTR2 uni_dest_host; /* server name unicode string */
1728 UNIHDR hdr_user_name; /* username unicode string header */
1729 UNISTR2 uni_user_name; /* username unicode string */
1731 SAMR_ENC_PASSWD nt_newpass;
1732 SAMR_ENC_HASH nt_oldhash;
1734 uint32 unknown; /* 0x0000 0001 */
1736 SAMR_ENC_PASSWD lm_newpass;
1737 SAMR_ENC_HASH lm_oldhash;
1739 } SAMR_Q_CHGPASSWD_USER;
1741 /* SAMR_R_CHGPASSWD_USER */
1742 typedef struct r_samr_chgpasswd_user_info
1744 NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
1746 } SAMR_R_CHGPASSWD_USER;
1749 /* SAMR_Q_UNKNOWN_2D */
1750 typedef struct q_samr_unknown_2d_info
1752 POLICY_HND dom_pol; /* policy handle */
1753 DOM_SID2 sid; /* SID */
1755 } SAMR_Q_UNKNOWN_2D;
1758 /* SAMR_R_UNKNOWN_2D - probably an open */
1759 typedef struct r_samr_unknown_2d_info
1761 NTSTATUS status; /* return status */
1763 } SAMR_R_UNKNOWN_2D;
1767 /* these are from the old rpc_samr.h - they are needed while the merge
1768 is still going on */
1769 #define MAX_SAM_SIDS 15
1771 /* DOM_SID3 - security id */
1772 typedef struct sid_info_3
1774 uint16 len; /* length, bytes, including length of len :-) */
1781 /* SAMR_Q_UNKNOWN_2E */
1782 typedef struct q_samr_unknown_2e_info
1784 POLICY_HND domain_pol; /* policy handle */
1785 uint16 switch_value;
1787 } SAMR_Q_UNKNOWN_2E;
1789 /* SAMR_R_UNKNOWN_2E */
1790 typedef struct r_samr_unknown_2e_info
1793 uint16 switch_value;
1795 NTSTATUS status; /* return status */
1797 } SAMR_R_UNKNOWN_2E;
1799 /* SAMR_Q_SET_DOMAIN_INFO */
1800 typedef struct q_samr_set_domain_info
1802 POLICY_HND domain_pol; /* policy handle */
1803 uint16 switch_value0;
1804 uint16 switch_value;
1807 } SAMR_Q_SET_DOMAIN_INFO;
1809 /* SAMR_R_SET_DOMAIN_INFO */
1810 typedef struct r_samr_set_domain_info
1812 NTSTATUS status; /* return status */
1814 } SAMR_R_SET_DOMAIN_INFO;
1817 #endif /* _RPC_SAMR_H */