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 0x400
651 typedef struct samr_entry_info
659 /* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
660 typedef struct q_samr_enum_domains_info
662 POLICY_HND pol; /* policy handle */
664 uint32 start_idx; /* enumeration handle */
665 uint32 max_size; /* 0x0000 ffff */
667 } SAMR_Q_ENUM_DOMAINS;
669 /* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
670 typedef struct r_samr_enum_domains_info
672 uint32 next_idx; /* next starting index required for enum */
681 UNISTR2 *uni_dom_name;
687 } SAMR_R_ENUM_DOMAINS;
689 /* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
690 typedef struct q_samr_enum_dom_users_info
692 POLICY_HND pol; /* policy handle */
694 uint32 start_idx; /* number of values (0 indicates unlimited?) */
695 uint16 acb_mask; /* 0x0000 indicates all */
696 uint16 unknown_1; /* 0x0000 */
698 uint32 max_size; /* 0x0000 ffff */
700 } SAMR_Q_ENUM_DOM_USERS;
703 /* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
704 typedef struct r_samr_enum_dom_users_info
706 uint32 next_idx; /* next starting index required for enum */
715 UNISTR2 *uni_acct_name;
721 } SAMR_R_ENUM_DOM_USERS;
724 /* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
725 typedef struct q_samr_enum_dom_groups_info
727 POLICY_HND pol; /* policy handle */
729 /* this is possibly an enumeration context handle... */
730 uint32 start_idx; /* 0x0000 0000 */
732 uint32 max_size; /* 0x0000 ffff */
734 } SAMR_Q_ENUM_DOM_GROUPS;
737 /* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
738 typedef struct r_samr_enum_dom_groups_info
749 UNISTR2 *uni_grp_name;
755 } SAMR_R_ENUM_DOM_GROUPS;
758 /* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
759 typedef struct q_samr_enum_dom_aliases_info
761 POLICY_HND pol; /* policy handle */
763 /* this is possibly an enumeration context handle... */
764 uint32 start_idx; /* 0x0000 0000 */
766 uint32 max_size; /* 0x0000 ffff */
768 } SAMR_Q_ENUM_DOM_ALIASES;
771 /* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
772 typedef struct r_samr_enum_dom_aliases_info
783 UNISTR2 *uni_grp_name;
789 } SAMR_R_ENUM_DOM_ALIASES;
792 /* -- Level 1 Display Info - User Information -- */
794 typedef struct samr_entry_info1
801 UNIHDR hdr_acct_name;
802 UNIHDR hdr_user_name;
803 UNIHDR hdr_user_desc;
807 typedef struct samr_str_entry_info1
809 UNISTR2 uni_acct_name;
810 UNISTR2 uni_full_name;
811 UNISTR2 uni_acct_desc;
815 typedef struct sam_entry_info_1
823 /* -- Level 2 Display Info - Trust Account Information -- */
825 typedef struct samr_entry_info2
837 typedef struct samr_str_entry_info2
839 UNISTR2 uni_srv_name;
840 UNISTR2 uni_srv_desc;
844 typedef struct sam_entry_info_2
852 /* -- Level 3 Display Info - Domain Group Information -- */
854 typedef struct samr_entry_info3
859 uint32 attr; /* SE_GROUP_xxx, usually 7 */
866 typedef struct samr_str_entry_info3
868 UNISTR2 uni_grp_name;
869 UNISTR2 uni_grp_desc;
873 typedef struct sam_entry_info_3
881 /* -- Level 4 Display Info - User List (ASCII) -- */
883 typedef struct samr_entry_info4
886 STRHDR hdr_acct_name;
890 typedef struct samr_str_entry_info4
896 typedef struct sam_entry_info_4
904 /* -- Level 5 Display Info - Group List (ASCII) -- */
906 typedef struct samr_entry_info5
913 typedef struct samr_str_entry_info5
919 typedef struct sam_entry_info_5
927 typedef struct sam_dispinfo_ctr_info
931 SAM_DISPINFO_1 *info1; /* users/names/descriptions */
932 SAM_DISPINFO_2 *info2; /* trust accounts */
933 SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
934 SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
935 SAM_DISPINFO_5 *info5; /* group list (ASCII) */
936 void *info; /* allows assignment without typecasting, */
943 /* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
944 typedef struct q_samr_query_disp_info
946 POLICY_HND domain_pol;
948 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
951 uint32 start_idx; /* start enumeration index */
952 uint32 max_entries; /* maximum number of entries to return */
953 uint32 max_size; /* recommended data size; if exceeded server
954 should return STATUS_MORE_ENTRIES */
956 } SAMR_Q_QUERY_DISPINFO;
959 /* SAMR_R_QUERY_DISPINFO */
960 typedef struct r_samr_query_dispinfo_info
962 uint32 total_size; /* total data size for all matching entries
963 (0 = uncalculated) */
964 uint32 data_size; /* actual data size returned = size of SAM_ENTRY
965 structures + total length of strings */
967 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
970 uint32 num_entries; /* number of entries returned */
974 SAM_DISPINFO_CTR *ctr;
978 } SAMR_R_QUERY_DISPINFO;
981 /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
982 typedef struct q_samr_delete_dom_group_info
984 POLICY_HND group_pol; /* policy handle */
986 } SAMR_Q_DELETE_DOM_GROUP;
989 /* SAMR_R_DELETE_DOM_GROUP - delete domain group */
990 typedef struct r_samr_delete_dom_group_info
992 POLICY_HND pol; /* policy handle */
993 NTSTATUS status; /* return status */
995 } SAMR_R_DELETE_DOM_GROUP;
998 /* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
999 typedef struct q_samr_create_dom_group_info
1001 POLICY_HND pol; /* policy handle */
1003 UNIHDR hdr_acct_desc;
1004 UNISTR2 uni_acct_desc;
1008 } SAMR_Q_CREATE_DOM_GROUP;
1010 /* SAMR_R_CREATE_DOM_GROUP - SAM create group */
1011 typedef struct r_samr_create_dom_group_info
1013 POLICY_HND pol; /* policy handle */
1018 } SAMR_R_CREATE_DOM_GROUP;
1020 /* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
1021 typedef struct q_samr_query_group_info
1023 POLICY_HND pol; /* policy handle */
1025 uint16 switch_level; /* 0x0001 seen */
1027 } SAMR_Q_QUERY_GROUPINFO;
1029 typedef struct samr_group_info1
1031 UNIHDR hdr_acct_name;
1033 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1034 uint32 num_members; /* 0x0000 0001 - number of group members? */
1036 UNIHDR hdr_acct_desc;
1038 UNISTR2 uni_acct_name;
1039 UNISTR2 uni_acct_desc;
1043 typedef struct samr_group_info3
1045 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
1049 typedef struct samr_group_info4
1051 UNIHDR hdr_acct_desc;
1052 UNISTR2 uni_acct_desc;
1056 /* GROUP_INFO_CTR */
1057 typedef struct group_info_ctr
1059 uint16 switch_value1;
1071 /* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
1072 typedef struct r_samr_query_groupinfo_info
1075 GROUP_INFO_CTR *ctr;
1079 } SAMR_R_QUERY_GROUPINFO;
1082 /* SAMR_Q_SET_GROUPINFO - SAM Group Info */
1083 typedef struct q_samr_set_group_info
1085 POLICY_HND pol; /* policy handle */
1086 GROUP_INFO_CTR *ctr;
1088 } SAMR_Q_SET_GROUPINFO;
1090 /* SAMR_R_SET_GROUPINFO - SAM Group Info */
1091 typedef struct r_samr_set_group_info
1095 } SAMR_R_SET_GROUPINFO;
1098 /* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
1099 typedef struct q_samr_delete_dom_alias_info
1101 POLICY_HND alias_pol; /* policy handle */
1103 } SAMR_Q_DELETE_DOM_ALIAS;
1106 /* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
1107 typedef struct r_samr_delete_dom_alias_info
1109 POLICY_HND pol; /* policy handle */
1110 NTSTATUS status; /* return status */
1112 } SAMR_R_DELETE_DOM_ALIAS;
1115 /* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
1116 typedef struct q_samr_create_dom_alias_info
1118 POLICY_HND dom_pol; /* policy handle */
1120 UNIHDR hdr_acct_desc;
1121 UNISTR2 uni_acct_desc;
1123 uint32 access_mask; /* 0x001f000f */
1125 } SAMR_Q_CREATE_DOM_ALIAS;
1127 /* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
1128 typedef struct r_samr_create_dom_alias_info
1130 POLICY_HND alias_pol; /* policy handle */
1135 } SAMR_R_CREATE_DOM_ALIAS;
1137 /* SAMR_Q_QUERY_ALIASINFO - SAM Alias Info */
1138 typedef struct q_samr_query_alias_info
1140 POLICY_HND pol; /* policy handle */
1142 uint16 switch_level; /* 0x0003 seen */
1144 } SAMR_Q_QUERY_ALIASINFO;
1146 typedef struct samr_alias_info1
1148 UNIHDR hdr_acct_name;
1149 UNIHDR hdr_acct_desc;
1151 UNISTR2 uni_acct_name;
1152 UNISTR2 uni_acct_desc;
1156 typedef struct samr_alias_info3
1158 UNIHDR hdr_acct_desc;
1159 UNISTR2 uni_acct_desc;
1163 /* ALIAS_INFO_CTR */
1164 typedef struct alias_info_ctr
1166 uint16 switch_value1;
1167 uint16 switch_value2;
1178 /* SAMR_R_QUERY_ALIASINFO - SAM alias info */
1179 typedef struct r_samr_query_aliasinfo_info
1186 } SAMR_R_QUERY_ALIASINFO;
1189 /* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
1190 typedef struct q_samr_set_alias_info
1192 POLICY_HND alias_pol; /* policy handle */
1195 } SAMR_Q_SET_ALIASINFO;
1197 /* SAMR_R_SET_ALIASINFO - SAM alias info */
1198 typedef struct r_samr_set_aliasinfo_info
1202 } SAMR_R_SET_ALIASINFO;
1205 /* SAMR_Q_QUERY_USERGROUPS - */
1206 typedef struct q_samr_query_usergroup_info
1208 POLICY_HND pol; /* policy handle associated with unknown id */
1210 } SAMR_Q_QUERY_USERGROUPS;
1212 /* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
1213 typedef struct r_samr_query_usergroup_info
1215 uint32 ptr_0; /* pointer */
1216 uint32 num_entries; /* number of RID groups */
1217 uint32 ptr_1; /* pointer */
1218 uint32 num_entries2; /* number of RID groups */
1220 DOM_GID *gid; /* group info */
1222 NTSTATUS status; /* return status */
1224 } SAMR_R_QUERY_USERGROUPS;
1226 /* SAM_USERINFO_CTR - sam user info */
1227 typedef struct sam_userinfo_ctr_info
1229 uint16 switch_value;
1233 SAM_USER_INFO_10 *id10; /* auth-level 0x10 */
1234 SAM_USER_INFO_11 *id11; /* auth-level 0x11 */
1235 SAM_USER_INFO_12 *id12; /* auth-level 0x12 */
1236 SAM_USER_INFO_20 *id20; /* auth-level 20 */
1237 SAM_USER_INFO_21 *id21; /* auth-level 21 */
1238 SAM_USER_INFO_23 *id23; /* auth-level 0x17 */
1239 SAM_USER_INFO_24 *id24; /* auth-level 0x18 */
1240 SAM_USER_INFO_25 *id25; /* auth-level 0x19 */
1241 void* id; /* to make typecasting easy */
1248 /* SAMR_Q_SET_USERINFO2 - set sam info */
1249 typedef struct q_samr_set_user_info2
1251 POLICY_HND pol; /* policy handle associated with user */
1252 uint16 switch_value; /* 0x0010 */
1254 SAM_USERINFO_CTR *ctr;
1256 } SAMR_Q_SET_USERINFO2;
1258 /* SAMR_R_SET_USERINFO2 - set sam info */
1259 typedef struct r_samr_set_user_info2
1261 NTSTATUS status; /* return status */
1263 } SAMR_R_SET_USERINFO2;
1265 /* SAMR_Q_SET_USERINFO - set sam info */
1266 typedef struct q_samr_set_user_info
1268 POLICY_HND pol; /* policy handle associated with user */
1269 uint16 switch_value;
1270 SAM_USERINFO_CTR *ctr;
1272 } SAMR_Q_SET_USERINFO;
1274 /* SAMR_R_SET_USERINFO - set sam info */
1275 typedef struct r_samr_set_user_info
1277 NTSTATUS status; /* return status */
1279 } SAMR_R_SET_USERINFO;
1282 /* SAMR_Q_QUERY_USERINFO - probably a get sam info */
1283 typedef struct q_samr_query_user_info
1285 POLICY_HND pol; /* policy handle associated with unknown id */
1286 uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
1288 } SAMR_Q_QUERY_USERINFO;
1290 /* SAMR_R_QUERY_USERINFO - probably a get sam info */
1291 typedef struct r_samr_query_user_info
1293 uint32 ptr; /* pointer */
1294 SAM_USERINFO_CTR *ctr;
1296 NTSTATUS status; /* return status */
1298 } SAMR_R_QUERY_USERINFO;
1301 /****************************************************************************
1302 SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
1304 the policy handle allocated by an "samr open secret" call is associated
1305 with a SID. this policy handle is what is queried here, *not* the SID
1306 itself. the response to the lookup rids is relative to this SID.
1307 *****************************************************************************/
1308 /* SAMR_Q_QUERY_USERALIASES */
1309 typedef struct q_samr_query_useraliases_info
1311 POLICY_HND pol; /* policy handle */
1313 uint32 num_sids1; /* number of rids being looked up */
1314 uint32 ptr; /* buffer pointer */
1315 uint32 num_sids2; /* number of rids being looked up */
1317 uint32 *ptr_sid; /* pointers to sids to be looked up */
1318 DOM_SID2 *sid ; /* sids to be looked up. */
1320 } SAMR_Q_QUERY_USERALIASES;
1323 /* SAMR_R_QUERY_USERALIASES */
1324 typedef struct r_samr_query_useraliases_info
1327 uint32 ptr; /* undocumented buffer pointer */
1329 uint32 num_entries2;
1330 uint32 *rid; /* domain RIDs being looked up */
1332 NTSTATUS status; /* return code */
1334 } SAMR_R_QUERY_USERALIASES;
1337 /****************************************************************************
1338 SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
1339 *****************************************************************************/
1340 /* SAMR_Q_LOOKUP_NAMES */
1341 typedef struct q_samr_lookup_names_info
1343 POLICY_HND pol; /* policy handle */
1345 uint32 num_names1; /* number of names being looked up */
1346 uint32 flags; /* 0x0000 03e8 - unknown */
1347 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1348 uint32 num_names2; /* number of names being looked up */
1350 UNIHDR *hdr_name; /* unicode account name header */
1351 UNISTR2 *uni_name; /* unicode account name string */
1353 } SAMR_Q_LOOKUP_NAMES;
1356 /* SAMR_R_LOOKUP_NAMES */
1357 typedef struct r_samr_lookup_names_info
1359 uint32 num_rids1; /* number of aliases being looked up */
1360 uint32 ptr_rids; /* pointer to aliases */
1361 uint32 num_rids2; /* number of aliases being looked up */
1363 uint32 *rids; /* rids */
1365 uint32 num_types1; /* number of users in aliases being looked up */
1366 uint32 ptr_types; /* pointer to users in aliases */
1367 uint32 num_types2; /* number of users in aliases being looked up */
1369 uint32 *types; /* SID_ENUM type */
1371 NTSTATUS status; /* return code */
1373 } SAMR_R_LOOKUP_NAMES;
1376 /****************************************************************************
1377 SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
1379 called to resolve domain RID groups.
1380 *****************************************************************************/
1381 /* SAMR_Q_LOOKUP_RIDS */
1382 typedef struct q_samr_lookup_rids_info
1384 POLICY_HND pol; /* policy handle */
1386 uint32 num_rids1; /* number of rids being looked up */
1387 uint32 flags; /* 0x0000 03e8 - unknown */
1388 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1389 uint32 num_rids2; /* number of rids being looked up */
1391 uint32 *rid; /* domain RIDs being looked up */
1393 } SAMR_Q_LOOKUP_RIDS;
1396 /****************************************************************************
1397 SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
1399 *****************************************************************************/
1400 /* SAMR_R_LOOKUP_RIDS */
1401 typedef struct r_samr_lookup_rids_info
1403 uint32 num_names1; /* number of aliases being looked up */
1404 uint32 ptr_names; /* pointer to aliases */
1405 uint32 num_names2; /* number of aliases being looked up */
1407 UNIHDR *hdr_name; /* unicode account name header */
1408 UNISTR2 *uni_name; /* unicode account name string */
1410 uint32 num_types1; /* number of users in aliases being looked up */
1411 uint32 ptr_types; /* pointer to users in aliases */
1412 uint32 num_types2; /* number of users in aliases being looked up */
1414 uint32 *type; /* SID_ENUM type */
1418 } SAMR_R_LOOKUP_RIDS;
1421 /* SAMR_Q_OPEN_USER - probably an open */
1422 typedef struct q_samr_open_user_info
1424 POLICY_HND domain_pol; /* policy handle */
1425 uint32 access_mask; /* 32 bit unknown - 0x02011b */
1426 uint32 user_rid; /* user RID */
1431 /* SAMR_R_OPEN_USER - probably an open */
1432 typedef struct r_samr_open_user_info
1434 POLICY_HND user_pol; /* policy handle associated with unknown id */
1435 NTSTATUS status; /* return status */
1440 /* SAMR_Q_CREATE_USER - probably a create */
1441 typedef struct q_samr_create_user_info
1443 POLICY_HND domain_pol; /* policy handle */
1445 UNIHDR hdr_name; /* unicode account name header */
1446 UNISTR2 uni_name; /* unicode account name */
1448 uint32 acb_info; /* account control info */
1449 uint32 access_mask; /* 0xe005 00b0 */
1451 } SAMR_Q_CREATE_USER;
1454 /* SAMR_R_CREATE_USER - probably a create */
1455 typedef struct r_samr_create_user_info
1457 POLICY_HND user_pol; /* policy handle associated with user */
1459 uint32 unknown_0; /* 0x0007 03ff */
1460 uint32 user_rid; /* user RID */
1461 NTSTATUS status; /* return status */
1463 } SAMR_R_CREATE_USER;
1466 /* SAMR_Q_DELETE_DOM_USER - delete domain user */
1467 typedef struct q_samr_delete_dom_user_info
1469 POLICY_HND user_pol; /* policy handle */
1471 } SAMR_Q_DELETE_DOM_USER;
1474 /* SAMR_R_DELETE_DOM_USER - delete domain user */
1475 typedef struct r_samr_delete_dom_user_info
1477 POLICY_HND pol; /* policy handle */
1478 NTSTATUS status; /* return status */
1480 } SAMR_R_DELETE_DOM_USER;
1483 /* SAMR_Q_QUERY_GROUPMEM - query group members */
1484 typedef struct q_samr_query_groupmem_info
1486 POLICY_HND group_pol; /* policy handle */
1488 } SAMR_Q_QUERY_GROUPMEM;
1491 /* SAMR_R_QUERY_GROUPMEM - query group members */
1492 typedef struct r_samr_query_groupmem_info
1508 } SAMR_R_QUERY_GROUPMEM;
1511 /* SAMR_Q_DEL_GROUPMEM - probably an del group member */
1512 typedef struct q_samr_del_group_mem_info
1514 POLICY_HND pol; /* policy handle */
1515 uint32 rid; /* rid */
1517 } SAMR_Q_DEL_GROUPMEM;
1520 /* SAMR_R_DEL_GROUPMEM - probably an del group member */
1521 typedef struct r_samr_del_group_mem_info
1523 NTSTATUS status; /* return status */
1525 } SAMR_R_DEL_GROUPMEM;
1528 /* SAMR_Q_ADD_GROUPMEM - probably an add group member */
1529 typedef struct q_samr_add_group_mem_info
1531 POLICY_HND pol; /* policy handle */
1533 uint32 rid; /* rid */
1534 uint32 unknown; /* 0x0000 0005 */
1536 } SAMR_Q_ADD_GROUPMEM;
1539 /* SAMR_R_ADD_GROUPMEM - probably an add group member */
1540 typedef struct r_samr_add_group_mem_info
1542 NTSTATUS status; /* return status */
1544 } SAMR_R_ADD_GROUPMEM;
1547 /* SAMR_Q_OPEN_GROUP - probably an open */
1548 typedef struct q_samr_open_group_info
1550 POLICY_HND domain_pol; /* policy handle */
1551 uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
1552 uint32 rid_group; /* rid */
1554 } SAMR_Q_OPEN_GROUP;
1557 /* SAMR_R_OPEN_GROUP - probably an open */
1558 typedef struct r_samr_open_group_info
1560 POLICY_HND pol; /* policy handle */
1561 NTSTATUS status; /* return status */
1563 } SAMR_R_OPEN_GROUP;
1566 /* SAMR_Q_QUERY_ALIASMEM - query alias members */
1567 typedef struct q_samr_query_aliasmem_info
1569 POLICY_HND alias_pol; /* policy handle */
1571 } SAMR_Q_QUERY_ALIASMEM;
1574 /* SAMR_R_QUERY_ALIASMEM - query alias members */
1575 typedef struct r_samr_query_aliasmem_info
1585 } SAMR_R_QUERY_ALIASMEM;
1588 /* SAMR_Q_ADD_ALIASMEM - add alias member */
1589 typedef struct q_samr_add_alias_mem_info
1591 POLICY_HND alias_pol; /* policy handle */
1593 DOM_SID2 sid; /* member sid to be added to the alias */
1595 } SAMR_Q_ADD_ALIASMEM;
1598 /* SAMR_R_ADD_ALIASMEM - add alias member */
1599 typedef struct r_samr_add_alias_mem_info
1601 NTSTATUS status; /* return status */
1603 } SAMR_R_ADD_ALIASMEM;
1606 /* SAMR_Q_DEL_ALIASMEM - add an add alias member */
1607 typedef struct q_samr_del_alias_mem_info
1609 POLICY_HND alias_pol; /* policy handle */
1611 DOM_SID2 sid; /* member sid to be added to alias */
1613 } SAMR_Q_DEL_ALIASMEM;
1616 /* SAMR_R_DEL_ALIASMEM - delete alias member */
1617 typedef struct r_samr_del_alias_mem_info
1619 NTSTATUS status; /* return status */
1621 } SAMR_R_DEL_ALIASMEM;
1625 /* SAMR_Q_OPEN_ALIAS - probably an open */
1626 typedef struct q_samr_open_alias_info
1633 } SAMR_Q_OPEN_ALIAS;
1636 /* SAMR_R_OPEN_ALIAS - probably an open */
1637 typedef struct r_samr_open_alias_info
1639 POLICY_HND pol; /* policy handle */
1640 NTSTATUS status; /* return status */
1642 } SAMR_R_OPEN_ALIAS;
1645 /* SAMR_Q_CONNECT_ANON - probably an open */
1646 typedef struct q_samr_connect_anon_info
1648 uint32 ptr; /* ptr? */
1649 uint16 unknown_0; /* 0x005c */
1650 uint16 unknown_1; /* 0x0001 */
1653 } SAMR_Q_CONNECT_ANON;
1655 /* SAMR_R_CONNECT_ANON - probably an open */
1656 typedef struct r_samr_connect_anon_info
1658 POLICY_HND connect_pol; /* policy handle */
1659 NTSTATUS status; /* return status */
1661 } SAMR_R_CONNECT_ANON;
1663 /* SAMR_Q_CONNECT - probably an open */
1664 typedef struct q_samr_connect_info
1666 uint32 ptr_srv_name; /* pointer (to server name?) */
1667 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
1674 /* SAMR_R_CONNECT - probably an open */
1675 typedef struct r_samr_connect_info
1677 POLICY_HND connect_pol; /* policy handle */
1678 NTSTATUS status; /* return status */
1682 /* SAMR_Q_GET_DOM_PWINFO */
1683 typedef struct q_samr_get_dom_pwinfo
1686 UNIHDR hdr_srv_name;
1687 UNISTR2 uni_srv_name;
1689 } SAMR_Q_GET_DOM_PWINFO;
1691 /* SAMR_R_GET_DOM_PWINFO */
1692 typedef struct r_samr_get_dom_pwinfo
1699 } SAMR_R_GET_DOM_PWINFO;
1701 /* SAMR_ENC_PASSWD */
1702 typedef struct enc_passwd_info
1710 typedef struct enc_hash_info
1717 /* SAMR_Q_CHGPASSWD_USER */
1718 typedef struct q_samr_chgpasswd_user_info
1722 UNIHDR hdr_dest_host; /* server name unicode header */
1723 UNISTR2 uni_dest_host; /* server name unicode string */
1725 UNIHDR hdr_user_name; /* username unicode string header */
1726 UNISTR2 uni_user_name; /* username unicode string */
1728 SAMR_ENC_PASSWD nt_newpass;
1729 SAMR_ENC_HASH nt_oldhash;
1731 uint32 unknown; /* 0x0000 0001 */
1733 SAMR_ENC_PASSWD lm_newpass;
1734 SAMR_ENC_HASH lm_oldhash;
1736 } SAMR_Q_CHGPASSWD_USER;
1738 /* SAMR_R_CHGPASSWD_USER */
1739 typedef struct r_samr_chgpasswd_user_info
1741 NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
1743 } SAMR_R_CHGPASSWD_USER;
1746 /* SAMR_Q_UNKNOWN_2D */
1747 typedef struct q_samr_unknown_2d_info
1749 POLICY_HND dom_pol; /* policy handle */
1750 DOM_SID2 sid; /* SID */
1752 } SAMR_Q_UNKNOWN_2D;
1755 /* SAMR_R_UNKNOWN_2D - probably an open */
1756 typedef struct r_samr_unknown_2d_info
1758 NTSTATUS status; /* return status */
1760 } SAMR_R_UNKNOWN_2D;
1764 /* these are from the old rpc_samr.h - they are needed while the merge
1765 is still going on */
1766 #define MAX_SAM_SIDS 15
1768 /* DOM_SID3 - security id */
1769 typedef struct sid_info_3
1771 uint16 len; /* length, bytes, including length of len :-) */
1778 /* SAMR_Q_UNKNOWN_2E */
1779 typedef struct q_samr_unknown_2e_info
1781 POLICY_HND domain_pol; /* policy handle */
1782 uint16 switch_value;
1784 } SAMR_Q_UNKNOWN_2E;
1786 /* SAMR_R_UNKNOWN_2E */
1787 typedef struct r_samr_unknown_2e_info
1790 uint16 switch_value;
1792 NTSTATUS status; /* return status */
1794 } SAMR_R_UNKNOWN_2E;
1796 /* SAMR_Q_SET_DOMAIN_INFO */
1797 typedef struct q_samr_set_domain_info
1799 POLICY_HND domain_pol; /* policy handle */
1800 uint16 switch_value0;
1801 uint16 switch_value;
1804 } SAMR_Q_SET_DOMAIN_INFO;
1806 /* SAMR_R_SET_DOMAIN_INFO */
1807 typedef struct r_samr_set_domain_info
1809 NTSTATUS status; /* return status */
1811 } SAMR_R_SET_DOMAIN_INFO;
1814 #endif /* _RPC_SAMR_H */