preparing for release of alpha.0.8
[Samba.git] / source / include / rpc_samr.h
blob3ae3f5ae404033cfa0b7e28a1e2f90270a8c772f
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1998
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1998
7 Copyright (C) Paul Ashton 1997-1998
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 */
25 #define _RPC_SAMR_H
28 #include "rpc_misc.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
39 x SamrCloseHandle
40 x SamrConnect
41 x SamrCreateAliasInDomain
42 x SamrCreateGroupInDomain
43 x SamrCreateUserInDomain
44 ? SamrDeleteAlias
45 SamrDeleteGroup
46 x SamrDeleteUser
47 x SamrEnumerateAliasesInDomain
48 SamrEnumerateDomainsInSamServer
49 x SamrEnumerateGroupsInDomain
50 x SamrEnumerateUsersInDomain
51 SamrGetUserDomainPasswordInformation
52 SamrLookupDomainInSamServer
53 ? SamrLookupIdsInDomain
54 x SamrLookupNamesInDomain
55 x SamrOpenAlias
56 x SamrOpenDomain
57 x SamrOpenGroup
58 x SamrOpenUser
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
73 SamrSetSecurityObject
74 SamrShutdownSamServer
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
91 #define SAMR_CREATE_DOM_GROUP 0x0a
92 #define SAMR_ENUM_DOM_GROUPS 0x0b
93 #define SAMR_ENUM_DOM_USERS 0x0d
94 #define SAMR_CREATE_DOM_ALIAS 0x0e
95 #define SAMR_ENUM_DOM_ALIASES 0x0f
96 #define SAMR_QUERY_USERALIASES 0x10
98 #define SAMR_LOOKUP_NAMES 0x11
99 #define SAMR_LOOKUP_RIDS 0x12
101 #define SAMR_OPEN_GROUP 0x13
102 #define SAMR_QUERY_GROUPINFO 0x14
103 #define SAMR_SET_GROUPINFO 0x15
104 #define SAMR_ADD_GROUPMEM 0x16
105 #define SAMR_DELETE_DOM_GROUP 0x17
106 #define SAMR_DEL_GROUPMEM 0x18
107 #define SAMR_QUERY_GROUPMEM 0x19
108 #define SAMR_UNKNOWN_1A 0x1a
110 #define SAMR_OPEN_ALIAS 0x1b
111 #define SAMR_QUERY_ALIASINFO 0x1c
112 #define SAMR_SET_ALIASINFO 0x1d
113 #define SAMR_DELETE_DOM_ALIAS 0x1e
114 #define SAMR_ADD_ALIASMEM 0x1f
115 #define SAMR_DEL_ALIASMEM 0x20
116 #define SAMR_QUERY_ALIASMEM 0x21
118 #define SAMR_OPEN_USER 0x22
119 #define SAMR_DELETE_DOM_USER 0x23
120 #define SAMR_QUERY_USERINFO 0x24
121 #define SAMR_SET_USERINFO2 0x25
122 #define SAMR_QUERY_USERGROUPS 0x27
124 #define SAMR_QUERY_DISPINFO 0x28
125 #define SAMR_UNKNOWN_29 0x29
126 #define SAMR_UNKNOWN_2a 0x2a
127 #define SAMR_UNKNOWN_2b 0x2b
128 #define SAMR_GET_USRDOM_PWINFO 0x2c
129 #define SAMR_UNKNOWN_2D 0x2d
130 #define SAMR_UNKNOWN_2e 0x2e
131 #define SAMR_UNKNOWN_2f 0x2f
132 #define SAMR_QUERY_DISPINFO3 0x30 /* Alias for SAMR_QUERY_DISPINFO
133 with info level 3 */
134 #define SAMR_UNKNOWN_31 0x31
135 #define SAMR_CREATE_USER 0x32
136 #define SAMR_QUERY_DISPINFO4 0x33 /* Alias for SAMR_QUERY_DISPINFO
137 with info level 4 */
138 #define SAMR_ADDMULTI_ALIASMEM 0x34
140 #define SAMR_UNKNOWN_35 0x35
141 #define SAMR_UNKNOWN_36 0x36
142 #define SAMR_CHGPASSWD_USER 0x37
143 #define SAMR_GET_DOM_PWINFO 0x38
144 #define SAMR_CONNECT 0x39
145 #define SAMR_SET_USERINFO 0x3A
149 typedef struct logon_hours_info
151 uint32 len; /* normally 21 bytes */
152 uint8 hours[32];
154 } LOGON_HRS;
156 /* SAM_USER_INFO_23 */
157 typedef struct sam_user_info_23
159 /* TIMES MAY NOT IN RIGHT ORDER!!!! */
160 NTTIME logon_time; /* logon time */
161 NTTIME logoff_time; /* logoff time */
162 NTTIME kickoff_time; /* kickoff time */
163 NTTIME pass_last_set_time; /* password last set time */
164 NTTIME pass_can_change_time; /* password can change time */
165 NTTIME pass_must_change_time; /* password must change time */
167 UNIHDR hdr_user_name; /* NULL - user name unicode string header */
168 UNIHDR hdr_full_name; /* user's full name unicode string header */
169 UNIHDR hdr_home_dir; /* home directory unicode string header */
170 UNIHDR hdr_dir_drive; /* home drive unicode string header */
171 UNIHDR hdr_logon_script; /* logon script unicode string header */
172 UNIHDR hdr_profile_path; /* profile path unicode string header */
173 UNIHDR hdr_acct_desc ; /* user description */
174 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
175 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
176 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
178 uint8 lm_pwd[16]; /* lm user passwords */
179 uint8 nt_pwd[16]; /* nt user passwords */
181 uint32 user_rid; /* Primary User ID */
182 uint32 group_rid; /* Primary Group ID */
184 uint16 acb_info; /* account info (ACB_xxxx bit-mask) */
185 /* uint8 pad[2] */
187 uint32 unknown_3; /* 0x09f8 27fa */
189 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
190 /* uint8 pad[2] */
191 uint32 ptr_logon_hrs; /* pointer to logon hours */
193 uint8 padding1[8];
195 uint32 unknown_5; /* 0x0001 0000 */
197 uint8 pass[516];
199 UNISTR2 uni_user_name; /* NULL - username unicode string */
200 UNISTR2 uni_full_name; /* user's full name unicode string */
201 UNISTR2 uni_home_dir; /* home directory unicode string */
202 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
203 UNISTR2 uni_logon_script; /* logon script unicode string */
204 UNISTR2 uni_profile_path; /* profile path unicode string */
205 UNISTR2 uni_acct_desc ; /* user description unicode string */
206 UNISTR2 uni_workstations; /* login from workstations unicode string */
207 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
208 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
210 #if 0
211 uint32 unknown_6; /* 0x0000 04ec */
212 uint32 padding4;
213 #endif
215 LOGON_HRS logon_hrs;
217 } SAM_USER_INFO_23;
219 /* SAM_USER_INFO_24 */
220 typedef struct sam_user_info_24
222 uint8 pass[516];
223 uint16 unk_0;
225 } SAM_USER_INFO_24;
228 /* SAM_USER_INFO_21 */
229 typedef struct sam_user_info_21
231 NTTIME logon_time; /* logon time */
232 NTTIME logoff_time; /* logoff time */
233 NTTIME kickoff_time; /* kickoff time */
234 NTTIME pass_last_set_time; /* password last set time */
235 NTTIME pass_can_change_time; /* password can change time */
236 NTTIME pass_must_change_time; /* password must change time */
238 UNIHDR hdr_user_name; /* username unicode string header */
239 UNIHDR hdr_full_name; /* user's full name unicode string header */
240 UNIHDR hdr_home_dir; /* home directory unicode string header */
241 UNIHDR hdr_dir_drive; /* home drive unicode string header */
242 UNIHDR hdr_logon_script; /* logon script unicode string header */
243 UNIHDR hdr_profile_path; /* profile path unicode string header */
244 UNIHDR hdr_acct_desc ; /* user description */
245 UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
246 UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
247 UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
249 uint8 lm_pwd[16]; /* lm user passwords */
250 uint8 nt_pwd[16]; /* nt user passwords */
252 uint32 user_rid; /* Primary User ID */
253 uint32 group_rid; /* Primary Group ID */
255 uint16 acb_info; /* account info (ACB_xxxx bit-mask) */
256 /* uint8 pad[2] */
258 uint32 unknown_3; /* 0x00ff ffff */
260 uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
261 /* uint8 pad[2] */
262 uint32 ptr_logon_hrs; /* unknown pointer */
264 uint32 unknown_5; /* 0x0002 0000 */
266 uint8 padding1[8];
268 UNISTR2 uni_user_name; /* username unicode string */
269 UNISTR2 uni_full_name; /* user's full name unicode string */
270 UNISTR2 uni_home_dir; /* home directory unicode string */
271 UNISTR2 uni_dir_drive; /* home directory drive unicode string */
272 UNISTR2 uni_logon_script; /* logon script unicode string */
273 UNISTR2 uni_profile_path; /* profile path unicode string */
274 UNISTR2 uni_acct_desc ; /* user description unicode string */
275 UNISTR2 uni_workstations; /* login from workstations unicode string */
276 UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
277 UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
279 uint32 unknown_6; /* 0x0000 04ec */
280 uint32 padding4;
282 LOGON_HRS logon_hrs;
284 } SAM_USER_INFO_21;
287 /* SAM_USER_INFO_12 */
288 typedef struct sam_user_info_12
290 uint16 acb_info; /* account control bits */
292 uint8 lm_pwd[16]; /* lm user passwords */
293 uint8 nt_pwd[16]; /* nt user passwords */
295 } SAM_USER_INFO_12;
297 /* SAM_USER_INFO_11 */
298 typedef struct sam_user_info_11
300 uint8 padding_0[16]; /* 0 - padding 16 bytes */
301 NTTIME expiry; /* expiry time or something? */
302 uint8 padding_1[24]; /* 0 - padding 24 bytes */
304 UNIHDR hdr_mach_acct; /* unicode header for machine account */
305 uint32 padding_2; /* 0 - padding 4 bytes */
307 uint32 ptr_1; /* pointer */
308 uint8 padding_3[32]; /* 0 - padding 32 bytes */
309 uint32 padding_4; /* 0 - padding 4 bytes */
311 uint32 ptr_2; /* pointer */
312 uint32 padding_5; /* 0 - padding 4 bytes */
314 uint32 ptr_3; /* pointer */
315 uint8 padding_6[32]; /* 0 - padding 32 bytes */
317 uint32 rid_user; /* user RID */
318 uint32 rid_group; /* group RID */
320 uint16 acct_ctrl; /* 0080 - ACB_XXXX */
321 uint16 unknown_3; /* 16 bit padding */
323 uint16 unknown_4; /* 0x003f - 16 bit unknown */
324 uint16 unknown_5; /* 0x003c - 16 bit unknown */
326 uint8 padding_7[16]; /* 0 - padding 16 bytes */
327 uint32 padding_8; /* 0 - padding 4 bytes */
329 UNISTR2 uni_mach_acct; /* unicode string for machine account */
331 uint8 padding_9[48]; /* 0 - padding 48 bytes */
333 } SAM_USER_INFO_11;
336 /* SAM_USER_INFO_10 */
337 typedef struct sam_user_info_10
339 uint32 acb_info;
341 } SAM_USER_INFO_10;
345 /* SAMR_Q_CLOSE_HND - probably a policy handle close */
346 typedef struct q_samr_close_hnd_info
348 POLICY_HND pol; /* policy handle */
350 } SAMR_Q_CLOSE_HND;
353 /* SAMR_R_CLOSE_HND - probably a policy handle close */
354 typedef struct r_samr_close_hnd_info
356 POLICY_HND pol; /* policy handle */
357 uint32 status; /* return status */
359 } SAMR_R_CLOSE_HND;
362 /****************************************************************************
363 SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this
364 *****************************************************************************/
366 /* SAMR_Q_GET_USRDOM_PWINFO */
367 typedef struct q_samr_usrdom_pwinfo_info
369 POLICY_HND user_pol; /* policy handle */
371 } SAMR_Q_GET_USRDOM_PWINFO;
374 /****************************************************************************
375 SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this
376 *****************************************************************************/
378 /* SAMR_R_GET_USRDOM_PWINFO */
379 typedef struct r_samr_usrdom_pwinfo_info
381 uint32 unknown_0; /* 0x0016 0000 */
382 uint32 unknown_1; /* 0x0000 0000 */
383 uint32 status;
385 } SAMR_R_GET_USRDOM_PWINFO;
388 /****************************************************************************
389 SAMR_Q_QUERY_SEC_OBJ - info level 4. returns SIDs.
390 *****************************************************************************/
392 /* SAMR_Q_QUERY_SEC_OBJ - probably get domain info... */
393 typedef struct q_samr_query_sec_obj_info
395 POLICY_HND user_pol; /* policy handle */
396 uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
398 } SAMR_Q_QUERY_SEC_OBJ;
400 /* SAMR_R_QUERY_SEC_OBJ - probably an open */
401 typedef struct r_samr_query_sec_obj_info
403 uint32 ptr;
404 SEC_DESC_BUF buf;
406 uint32 status; /* return status */
408 } SAMR_R_QUERY_SEC_OBJ;
411 /****************************************************************************
412 SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
413 *****************************************************************************/
415 /* SAMR_Q_QUERY_DOMAIN_INFO - */
416 typedef struct q_samr_query_domain_info
418 POLICY_HND domain_pol; /* policy handle */
419 uint16 switch_value; /* 0x0002, 0x0001 */
421 } SAMR_Q_QUERY_DOMAIN_INFO;
423 typedef struct sam_unknown_info_3_info
425 uint32 unknown_0; /* 0x0000 0000 */
426 uint32 unknown_1; /* 0x8000 0000 */
428 } SAM_UNK_INFO_3;
430 typedef struct sam_unknown_info_6_info
432 uint32 unknown_0; /* 0x0000 0000 */
434 uint32 ptr_0; /* pointer to unknown structure */
435 uint8 padding[12]; /* 12 bytes zeros */
437 } SAM_UNK_INFO_6;
439 typedef struct sam_unknown_info_7_info
441 uint16 unknown_0; /* 0x0003 */
443 } SAM_UNK_INFO_7;
445 typedef struct sam_unknown_info_2_inf
447 uint32 unknown_0; /* 0x0000 0000 */
448 uint32 unknown_1; /* 0x8000 0000 */
449 uint32 unknown_2; /* 0x0000 0000 */
451 uint32 ptr_0; /* pointer to unknown structure */
452 UNIHDR hdr_domain; /* domain name unicode header */
453 UNIHDR hdr_server; /* server name unicode header */
455 /* put all the data in here, at the moment, including what the above
456 pointer is referring to
459 uint32 seq_num; /* some sort of incrementing sequence number? */
460 uint32 unknown_3; /* 0x0000 0000 */
462 uint32 unknown_4; /* 0x0000 0001 */
463 uint32 unknown_5; /* 0x0000 0003 */
464 uint32 unknown_6; /* 0x0000 0001 */
465 uint32 num_domain_usrs; /* number of users in domain */
466 uint32 num_domain_grps; /* number of domain groups in domain */
467 uint32 num_local_grps; /* number of local groups in domain */
469 uint8 padding[12]; /* 12 bytes zeros */
471 UNISTR2 uni_domain; /* domain name unicode string */
472 UNISTR2 uni_server; /* server name unicode string */
474 } SAM_UNK_INFO_2;
476 typedef struct sam_unknown_info_1_inf
478 uint8 padding[12]; /* 12 bytes zeros */
479 uint32 unknown_1; /* 0x8000 0000 */
480 uint32 unknown_2; /* 0x0000 0000 */
482 } SAM_UNK_INFO_1;
485 typedef struct sam_unknown_ctr_info
487 union
489 SAM_UNK_INFO_1 inf1;
490 SAM_UNK_INFO_2 inf2;
491 SAM_UNK_INFO_3 inf3;
492 SAM_UNK_INFO_6 inf6;
493 SAM_UNK_INFO_7 inf7;
495 } info;
497 } SAM_UNK_CTR;
500 /* SAMR_R_QUERY_DOMAIN_INFO - */
501 typedef struct r_samr_query_domain_info
503 uint32 ptr_0;
504 uint16 switch_value; /* same as in query */
506 SAM_UNK_CTR *ctr;
508 uint32 status; /* return status */
510 } SAMR_R_QUERY_DOMAIN_INFO;
513 /* SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain */
514 typedef struct q_samr_lookup_domain_info
516 POLICY_HND connect_pol;
518 UNIHDR hdr_domain;
519 UNISTR2 uni_domain;
521 } SAMR_Q_LOOKUP_DOMAIN;
524 /* SAMR_R_LOOKUP_DOMAIN */
525 typedef struct r_samr_lookup_domain_info
527 uint32 ptr_sid;
528 DOM_SID2 dom_sid;
530 uint32 status;
532 } SAMR_R_LOOKUP_DOMAIN;
535 /****************************************************************************
536 SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
538 0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
539 0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
540 *****************************************************************************/
542 /* SAMR_Q_OPEN_DOMAIN */
543 typedef struct q_samr_open_domain_info
545 POLICY_HND connect_pol; /* policy handle */
546 uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
547 DOM_SID2 dom_sid; /* domain SID */
549 } SAMR_Q_OPEN_DOMAIN;
552 /* SAMR_R_OPEN_DOMAIN - probably an open */
553 typedef struct r_samr_open_domain_info
555 POLICY_HND domain_pol; /* policy handle associated with the SID */
556 uint32 status; /* return status */
558 } SAMR_R_OPEN_DOMAIN;
560 #define MAX_SAM_ENTRIES 250
562 typedef struct samr_entry_info
564 uint32 rid;
565 UNIHDR hdr_name;
567 } SAM_ENTRY;
570 /* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
571 typedef struct q_samr_enum_domains_info
573 POLICY_HND pol; /* policy handle */
575 uint32 start_idx; /* enumeration handle */
576 uint32 max_size; /* 0x0000 ffff */
578 } SAMR_Q_ENUM_DOMAINS;
580 /* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
581 typedef struct r_samr_enum_domains_info
583 uint32 next_idx; /* next starting index required for enum */
584 uint32 ptr_entries1;
586 uint32 num_entries2;
587 uint32 ptr_entries2;
589 uint32 num_entries3;
591 SAM_ENTRY *sam;
592 UNISTR2 *uni_dom_name;
594 uint32 num_entries4;
596 uint32 status;
598 } SAMR_R_ENUM_DOMAINS;
600 /* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
601 typedef struct q_samr_enum_dom_users_info
603 POLICY_HND pol; /* policy handle */
605 uint32 start_idx; /* number of values (0 indicates unlimited?) */
606 uint16 acb_mask; /* 0x0000 indicates all */
607 uint16 unknown_1; /* 0x0000 */
609 uint32 max_size; /* 0x0000 ffff */
611 } SAMR_Q_ENUM_DOM_USERS;
614 /* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
615 typedef struct r_samr_enum_dom_users_info
617 uint32 next_idx; /* next starting index required for enum */
618 uint32 ptr_entries1;
620 uint32 num_entries2;
621 uint32 ptr_entries2;
623 uint32 num_entries3;
625 SAM_ENTRY *sam;
626 UNISTR2 *uni_acct_name;
628 uint32 num_entries4;
630 uint32 status;
632 } SAMR_R_ENUM_DOM_USERS;
635 /* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
636 typedef struct q_samr_enum_dom_groups_info
638 POLICY_HND pol; /* policy handle */
640 /* this is possibly an enumeration context handle... */
641 uint32 start_idx; /* 0x0000 0000 */
643 uint32 max_size; /* 0x0000 ffff */
645 } SAMR_Q_ENUM_DOM_GROUPS;
648 /* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
649 typedef struct r_samr_enum_dom_groups_info
651 uint32 next_idx;
652 uint32 ptr_entries1;
654 uint32 num_entries2;
655 uint32 ptr_entries2;
657 uint32 num_entries3;
659 SAM_ENTRY *sam;
660 UNISTR2 *uni_grp_name;
662 uint32 num_entries4;
664 uint32 status;
666 } SAMR_R_ENUM_DOM_GROUPS;
669 /* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
670 typedef struct q_samr_enum_dom_aliases_info
672 POLICY_HND pol; /* policy handle */
674 /* this is possibly an enumeration context handle... */
675 uint32 start_idx; /* 0x0000 0000 */
677 uint32 max_size; /* 0x0000 ffff */
679 } SAMR_Q_ENUM_DOM_ALIASES;
682 /* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
683 typedef struct r_samr_enum_dom_aliases_info
685 uint32 next_idx;
686 uint32 ptr_entries1;
688 uint32 num_entries2;
689 uint32 ptr_entries2;
691 uint32 num_entries3;
693 SAM_ENTRY *sam;
694 UNISTR2 *uni_grp_name;
696 uint32 num_entries4;
698 uint32 status;
700 } SAMR_R_ENUM_DOM_ALIASES;
703 /* -- Level 1 Display Info - User Information -- */
705 typedef struct samr_entry_info1
707 uint32 user_idx;
709 uint32 rid_user;
710 uint16 acb_info;
711 uint16 pad;
713 UNIHDR hdr_acct_name;
714 UNIHDR hdr_user_name;
715 UNIHDR hdr_user_desc;
717 } SAM_ENTRY1;
719 typedef struct samr_str_entry_info1
721 UNISTR2 uni_acct_name;
722 UNISTR2 uni_full_name;
723 UNISTR2 uni_acct_desc;
725 } SAM_STR1;
727 typedef struct sam_entry_info_1
729 SAM_ENTRY1 sam[MAX_SAM_ENTRIES];
730 SAM_STR1 str[MAX_SAM_ENTRIES];
732 } SAM_DISPINFO_1;
735 /* -- Level 2 Display Info - Trust Account Information -- */
737 typedef struct samr_entry_info2
739 uint32 user_idx;
741 uint32 rid_user;
742 uint16 acb_info;
743 uint16 pad;
745 UNIHDR hdr_srv_name;
746 UNIHDR hdr_srv_desc;
748 } SAM_ENTRY2;
750 typedef struct samr_str_entry_info2
752 UNISTR2 uni_srv_name;
753 UNISTR2 uni_srv_desc;
755 } SAM_STR2;
757 typedef struct sam_entry_info_2
759 SAM_ENTRY2 sam[MAX_SAM_ENTRIES];
760 SAM_STR2 str[MAX_SAM_ENTRIES];
762 } SAM_DISPINFO_2;
765 /* -- Level 3 Display Info - Domain Group Information -- */
767 typedef struct samr_entry_info3
769 uint32 grp_idx;
771 uint32 rid_grp;
772 uint32 attr; /* SE_GROUP_xxx, usually 7 */
774 UNIHDR hdr_grp_name;
775 UNIHDR hdr_grp_desc;
777 } SAM_ENTRY3;
779 typedef struct samr_str_entry_info3
781 UNISTR2 uni_grp_name;
782 UNISTR2 uni_grp_desc;
784 } SAM_STR3;
786 typedef struct sam_entry_info_3
788 SAM_ENTRY3 sam[MAX_SAM_ENTRIES];
789 SAM_STR3 str[MAX_SAM_ENTRIES];
791 } SAM_DISPINFO_3;
794 /* -- Level 4 Display Info - User List (ASCII) -- */
796 typedef struct samr_entry_info4
798 uint32 user_idx;
799 STRHDR hdr_acct_name;
801 } SAM_ENTRY4;
803 typedef struct samr_str_entry_info4
805 STRING2 acct_name;
807 } SAM_STR4;
809 typedef struct sam_entry_info_4
811 SAM_ENTRY4 sam[MAX_SAM_ENTRIES];
812 SAM_STR4 str[MAX_SAM_ENTRIES];
814 } SAM_DISPINFO_4;
817 /* -- Level 5 Display Info - Group List (ASCII) -- */
819 typedef struct samr_entry_info5
821 uint32 grp_idx;
822 STRHDR hdr_grp_name;
824 } SAM_ENTRY5;
826 typedef struct samr_str_entry_info5
828 STRING2 grp_name;
830 } SAM_STR5;
832 typedef struct sam_entry_info_5
834 SAM_ENTRY5 sam[MAX_SAM_ENTRIES];
835 SAM_STR5 str[MAX_SAM_ENTRIES];
837 } SAM_DISPINFO_5;
840 typedef struct sam_dispinfo_ctr_info
842 union
844 SAM_DISPINFO_1 *info1; /* users/names/descriptions */
845 SAM_DISPINFO_2 *info2; /* trust accounts */
846 SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
847 SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
848 SAM_DISPINFO_5 *info5; /* group list (ASCII) */
849 void *info; /* allows assignment without typecasting, */
851 } sam;
853 } SAM_DISPINFO_CTR;
856 /* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
857 typedef struct q_samr_query_disp_info
859 POLICY_HND domain_pol;
861 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
862 /* align */
864 uint32 start_idx; /* start enumeration index */
865 uint32 max_entries; /* maximum number of entries to return */
866 uint32 max_size; /* recommended data size; if exceeded server
867 should return STATUS_MORE_ENTRIES */
869 } SAMR_Q_QUERY_DISPINFO;
872 /* SAMR_R_QUERY_DISPINFO */
873 typedef struct r_samr_query_dispinfo_info
875 uint32 total_size; /* total data size for all matching entries
876 (0 = uncalculated) */
877 uint32 data_size; /* actual data size returned = size of SAM_ENTRY
878 structures + total length of strings */
880 uint16 switch_level; /* see SAM_DISPINFO_CTR above */
881 /* align */
883 uint32 num_entries; /* number of entries returned */
884 uint32 ptr_entries;
885 uint32 num_entries2;
887 SAM_DISPINFO_CTR *ctr;
889 uint32 status;
891 } SAMR_R_QUERY_DISPINFO;
894 /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
895 typedef struct q_samr_delete_dom_group_info
897 POLICY_HND group_pol; /* policy handle */
899 } SAMR_Q_DELETE_DOM_GROUP;
902 /* SAMR_R_DELETE_DOM_GROUP - delete domain group */
903 typedef struct r_samr_delete_dom_group_info
905 POLICY_HND pol; /* policy handle */
906 uint32 status; /* return status */
908 } SAMR_R_DELETE_DOM_GROUP;
911 /* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
912 typedef struct q_samr_create_dom_group_info
914 POLICY_HND pol; /* policy handle */
916 UNIHDR hdr_acct_desc;
917 UNISTR2 uni_acct_desc;
919 uint32 access_mask;
921 } SAMR_Q_CREATE_DOM_GROUP;
923 /* SAMR_R_CREATE_DOM_GROUP - SAM create group */
924 typedef struct r_samr_create_dom_group_info
926 POLICY_HND pol; /* policy handle */
928 uint32 rid;
929 uint32 status;
931 } SAMR_R_CREATE_DOM_GROUP;
933 /* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
934 typedef struct q_samr_query_group_info
936 POLICY_HND pol; /* policy handle */
938 uint16 switch_level; /* 0x0001 seen */
940 } SAMR_Q_QUERY_GROUPINFO;
942 typedef struct samr_group_info1
944 UNIHDR hdr_acct_name;
946 uint32 unknown_1; /* 0x0000 0003 - number of group members? */
947 uint32 num_members; /* 0x0000 0001 - number of group members? */
949 UNIHDR hdr_acct_desc;
951 UNISTR2 uni_acct_name;
952 UNISTR2 uni_acct_desc;
954 } GROUP_INFO1;
956 typedef struct samr_group_info4
958 UNIHDR hdr_acct_desc;
959 UNISTR2 uni_acct_desc;
961 } GROUP_INFO4;
963 /* GROUP_INFO_CTR */
964 typedef struct group_info_ctr
966 uint16 switch_value1;
967 uint16 switch_value2;
969 union
971 GROUP_INFO4 info4;
972 GROUP_INFO1 info1;
974 } group;
976 } GROUP_INFO_CTR;
978 /* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
979 typedef struct r_samr_query_groupinfo_info
981 uint32 ptr;
982 GROUP_INFO_CTR *ctr;
984 uint32 status;
986 } SAMR_R_QUERY_GROUPINFO;
989 /* SAMR_Q_SET_GROUPINFO - SAM Group Info */
990 typedef struct q_samr_set_group_info
992 POLICY_HND pol; /* policy handle */
993 GROUP_INFO_CTR *ctr;
995 } SAMR_Q_SET_GROUPINFO;
997 /* SAMR_R_SET_GROUPINFO - SAM Group Info */
998 typedef struct r_samr_set_group_info
1000 uint32 status;
1002 } SAMR_R_SET_GROUPINFO;
1005 /* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
1006 typedef struct q_samr_delete_dom_alias_info
1008 POLICY_HND alias_pol; /* policy handle */
1010 } SAMR_Q_DELETE_DOM_ALIAS;
1013 /* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
1014 typedef struct r_samr_delete_dom_alias_info
1016 POLICY_HND pol; /* policy handle */
1017 uint32 status; /* return status */
1019 } SAMR_R_DELETE_DOM_ALIAS;
1022 /* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
1023 typedef struct q_samr_create_dom_alias_info
1025 POLICY_HND dom_pol; /* policy handle */
1027 UNIHDR hdr_acct_desc;
1028 UNISTR2 uni_acct_desc;
1030 uint32 access_mask; /* 0x001f000f */
1032 } SAMR_Q_CREATE_DOM_ALIAS;
1034 /* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
1035 typedef struct r_samr_create_dom_alias_info
1037 POLICY_HND alias_pol; /* policy handle */
1039 uint32 rid;
1040 uint32 status;
1042 } SAMR_R_CREATE_DOM_ALIAS;
1044 /* SAMR_Q_QUERY_ALIASINFO - SAM Alias Info */
1045 typedef struct q_samr_query_alias_info
1047 POLICY_HND pol; /* policy handle */
1049 uint16 switch_level; /* 0x0003 seen */
1051 } SAMR_Q_QUERY_ALIASINFO;
1053 typedef struct samr_alias_info3
1055 UNIHDR hdr_acct_desc;
1056 UNISTR2 uni_acct_desc;
1058 } ALIAS_INFO3;
1060 /* ALIAS_INFO_CTR */
1061 typedef struct alias_info_ctr
1063 uint16 switch_value1;
1064 uint16 switch_value2;
1066 union
1068 ALIAS_INFO3 info3;
1070 } alias;
1072 } ALIAS_INFO_CTR;
1074 /* SAMR_R_QUERY_ALIASINFO - SAM alias info */
1075 typedef struct r_samr_query_aliasinfo_info
1077 uint32 ptr;
1078 ALIAS_INFO_CTR *ctr;
1080 uint32 status;
1082 } SAMR_R_QUERY_ALIASINFO;
1085 /* SAMR_Q_SET_ALIASINFO - SAM Alias Info */
1086 typedef struct q_samr_set_alias_info
1088 POLICY_HND alias_pol; /* policy handle */
1089 ALIAS_INFO_CTR *ctr;
1091 } SAMR_Q_SET_ALIASINFO;
1093 /* SAMR_R_SET_ALIASINFO - SAM alias info */
1094 typedef struct r_samr_set_aliasinfo_info
1096 uint32 status;
1098 } SAMR_R_SET_ALIASINFO;
1101 /* SAMR_Q_QUERY_USERGROUPS - */
1102 typedef struct q_samr_query_usergroup_info
1104 POLICY_HND pol; /* policy handle associated with unknown id */
1106 } SAMR_Q_QUERY_USERGROUPS;
1108 /* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
1109 typedef struct r_samr_query_usergroup_info
1111 uint32 ptr_0; /* pointer */
1112 uint32 num_entries; /* number of RID groups */
1113 uint32 ptr_1; /* pointer */
1114 uint32 num_entries2; /* number of RID groups */
1116 DOM_GID *gid; /* group info */
1118 uint32 status; /* return status */
1120 } SAMR_R_QUERY_USERGROUPS;
1122 /* SAM_USERINFO_CTR - sam user info */
1123 typedef struct sam_userinfo_ctr_info
1125 uint16 switch_value;
1127 union
1129 SAM_USER_INFO_10 *id10; /* auth-level 0x10 */
1130 SAM_USER_INFO_11 *id11; /* auth-level 0x11 */
1131 SAM_USER_INFO_12 *id12; /* auth-level 0x12 */
1132 SAM_USER_INFO_21 *id21; /* auth-level 21 */
1133 SAM_USER_INFO_23 *id23; /* auth-level 0x17 */
1134 SAM_USER_INFO_24 *id24; /* auth-level 0x18 */
1135 void* id; /* to make typecasting easy */
1137 } info;
1139 } SAM_USERINFO_CTR;
1142 /* SAMR_Q_SET_USERINFO2 - set sam info */
1143 typedef struct q_samr_set_user_info2
1145 POLICY_HND pol; /* policy handle associated with user */
1146 uint16 switch_value; /* 0x0010 */
1148 SAM_USERINFO_CTR *ctr;
1150 } SAMR_Q_SET_USERINFO2;
1152 /* SAMR_R_SET_USERINFO2 - set sam info */
1153 typedef struct r_samr_set_user_info2
1155 uint32 status; /* return status */
1157 } SAMR_R_SET_USERINFO2;
1159 /* SAMR_Q_SET_USERINFO - set sam info */
1160 typedef struct q_samr_set_user_info
1162 POLICY_HND pol; /* policy handle associated with user */
1163 uint16 switch_value;
1164 SAM_USERINFO_CTR *ctr;
1166 } SAMR_Q_SET_USERINFO;
1168 /* SAMR_R_SET_USERINFO - set sam info */
1169 typedef struct r_samr_set_user_info
1171 uint32 status; /* return status */
1173 } SAMR_R_SET_USERINFO;
1176 /* SAMR_Q_QUERY_USERINFO - probably a get sam info */
1177 typedef struct q_samr_query_user_info
1179 POLICY_HND pol; /* policy handle associated with unknown id */
1180 uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
1182 } SAMR_Q_QUERY_USERINFO;
1184 /* SAMR_R_QUERY_USERINFO - probably a get sam info */
1185 typedef struct r_samr_query_user_info
1187 uint32 ptr; /* pointer */
1188 SAM_USERINFO_CTR *ctr;
1190 uint32 status; /* return status */
1192 } SAMR_R_QUERY_USERINFO;
1195 /****************************************************************************
1196 SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
1198 the policy handle allocated by an "samr open secret" call is associated
1199 with a SID. this policy handle is what is queried here, *not* the SID
1200 itself. the response to the lookup rids is relative to this SID.
1201 *****************************************************************************/
1202 /* SAMR_Q_QUERY_USERALIASES */
1203 typedef struct q_samr_query_useraliases_info
1205 POLICY_HND pol; /* policy handle */
1207 uint32 num_sids1; /* number of rids being looked up */
1208 uint32 ptr; /* buffer pointer */
1209 uint32 num_sids2; /* number of rids being looked up */
1211 uint32 *ptr_sid; /* pointers to sids to be looked up */
1212 DOM_SID2 *sid ; /* sids to be looked up. */
1214 } SAMR_Q_QUERY_USERALIASES;
1217 /* SAMR_R_QUERY_USERALIASES */
1218 typedef struct r_samr_query_useraliases_info
1220 uint32 num_entries;
1221 uint32 ptr; /* undocumented buffer pointer */
1223 uint32 num_entries2;
1224 uint32 *rid; /* domain RIDs being looked up */
1226 uint32 status; /* return code */
1228 } SAMR_R_QUERY_USERALIASES;
1231 /****************************************************************************
1232 SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
1233 *****************************************************************************/
1234 /* SAMR_Q_LOOKUP_NAMES */
1235 typedef struct q_samr_lookup_names_info
1237 POLICY_HND pol; /* policy handle */
1239 uint32 num_names1; /* number of names being looked up */
1240 uint32 flags; /* 0x0000 03e8 - unknown */
1241 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1242 uint32 num_names2; /* number of names being looked up */
1244 UNIHDR hdr_name[MAX_LOOKUP_SIDS]; /* unicode account name header */
1245 UNISTR2 uni_name[MAX_LOOKUP_SIDS]; /* unicode account name string */
1247 } SAMR_Q_LOOKUP_NAMES;
1250 /* SAMR_R_LOOKUP_NAMES */
1251 typedef struct r_samr_lookup_names_info
1253 uint32 num_rids1; /* number of aliases being looked up */
1254 uint32 ptr_rids; /* pointer to aliases */
1255 uint32 num_rids2; /* number of aliases being looked up */
1257 uint32 *rids; /* rids */
1259 uint32 num_types1; /* number of users in aliases being looked up */
1260 uint32 ptr_types; /* pointer to users in aliases */
1261 uint32 num_types2; /* number of users in aliases being looked up */
1263 uint32 *types; /* SID_ENUM type */
1265 uint32 status; /* return code */
1267 } SAMR_R_LOOKUP_NAMES;
1270 /****************************************************************************
1271 SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
1273 called to resolve domain RID groups.
1274 *****************************************************************************/
1275 /* SAMR_Q_LOOKUP_RIDS */
1276 typedef struct q_samr_lookup_rids_info
1278 POLICY_HND pol; /* policy handle */
1280 uint32 num_rids1; /* number of rids being looked up */
1281 uint32 flags; /* 0x0000 03e8 - unknown */
1282 uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
1283 uint32 num_rids2; /* number of rids being looked up */
1285 uint32 *rid; /* domain RIDs being looked up */
1287 } SAMR_Q_LOOKUP_RIDS;
1290 /****************************************************************************
1291 SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
1293 *****************************************************************************/
1294 /* SAMR_R_LOOKUP_RIDS */
1295 typedef struct r_samr_lookup_rids_info
1297 uint32 num_names1; /* number of aliases being looked up */
1298 uint32 ptr_names; /* pointer to aliases */
1299 uint32 num_names2; /* number of aliases being looked up */
1301 UNIHDR *hdr_name; /* unicode account name header */
1302 UNISTR2 *uni_name; /* unicode account name string */
1304 uint32 num_types1; /* number of users in aliases being looked up */
1305 uint32 ptr_types; /* pointer to users in aliases */
1306 uint32 num_types2; /* number of users in aliases being looked up */
1308 uint32 *type; /* SID_ENUM type */
1310 uint32 status;
1312 } SAMR_R_LOOKUP_RIDS;
1315 /* SAMR_Q_OPEN_USER - probably an open */
1316 typedef struct q_samr_open_user_info
1318 POLICY_HND domain_pol; /* policy handle */
1319 uint32 access_mask; /* 32 bit unknown - 0x02011b */
1320 uint32 user_rid; /* user RID */
1322 } SAMR_Q_OPEN_USER;
1325 /* SAMR_R_OPEN_USER - probably an open */
1326 typedef struct r_samr_open_user_info
1328 POLICY_HND user_pol; /* policy handle associated with unknown id */
1329 uint32 status; /* return status */
1331 } SAMR_R_OPEN_USER;
1334 /* SAMR_Q_CREATE_USER - probably a create */
1335 typedef struct q_samr_create_user_info
1337 POLICY_HND domain_pol; /* policy handle */
1339 UNIHDR hdr_name; /* unicode account name header */
1340 UNISTR2 uni_name; /* unicode account name */
1342 uint16 acb_info; /* account control info */
1343 uint32 access_mask; /* 0xe005 00b0 */
1345 } SAMR_Q_CREATE_USER;
1348 /* SAMR_R_CREATE_USER - probably a create */
1349 typedef struct r_samr_create_user_info
1351 POLICY_HND user_pol; /* policy handle associated with user */
1353 uint32 unknown_0; /* 0x0007 03ff */
1354 uint32 user_rid; /* user RID */
1355 uint32 status; /* return status */
1357 } SAMR_R_CREATE_USER;
1360 /* SAMR_Q_DELETE_DOM_USER - delete domain user */
1361 typedef struct q_samr_delete_dom_user_info
1363 POLICY_HND user_pol; /* policy handle */
1365 } SAMR_Q_DELETE_DOM_USER;
1368 /* SAMR_R_DELETE_DOM_USER - delete domain user */
1369 typedef struct r_samr_delete_dom_user_info
1371 POLICY_HND pol; /* policy handle */
1372 uint32 status; /* return status */
1374 } SAMR_R_DELETE_DOM_USER;
1377 /* SAMR_Q_QUERY_GROUPMEM - query group members */
1378 typedef struct q_samr_query_groupmem_info
1380 POLICY_HND group_pol; /* policy handle */
1382 } SAMR_Q_QUERY_GROUPMEM;
1385 /* SAMR_R_QUERY_GROUPMEM - query group members */
1386 typedef struct r_samr_query_groupmem_info
1388 uint32 ptr;
1389 uint32 num_entries;
1391 uint32 ptr_rids;
1392 uint32 ptr_attrs;
1394 uint32 num_rids;
1395 uint32 *rid;
1397 uint32 num_attrs;
1398 uint32 *attr;
1400 uint32 status;
1402 } SAMR_R_QUERY_GROUPMEM;
1405 /* SAMR_Q_DEL_GROUPMEM - probably an del group member */
1406 typedef struct q_samr_del_group_mem_info
1408 POLICY_HND pol; /* policy handle */
1410 uint32 rid; /* rid */
1412 } SAMR_Q_DEL_GROUPMEM;
1415 /* SAMR_R_DEL_GROUPMEM - probably an del group member */
1416 typedef struct r_samr_del_group_mem_info
1418 uint32 status; /* return status */
1420 } SAMR_R_DEL_GROUPMEM;
1423 /* SAMR_Q_ADD_GROUPMEM - probably an add group member */
1424 typedef struct q_samr_add_group_mem_info
1426 POLICY_HND pol; /* policy handle */
1428 uint32 rid; /* rid */
1429 uint32 unknown; /* 0x0000 0005 */
1431 } SAMR_Q_ADD_GROUPMEM;
1434 /* SAMR_R_ADD_GROUPMEM - probably an add group member */
1435 typedef struct r_samr_add_group_mem_info
1437 uint32 status; /* return status */
1439 } SAMR_R_ADD_GROUPMEM;
1442 /* SAMR_Q_OPEN_GROUP - probably an open */
1443 typedef struct q_samr_open_group_info
1445 POLICY_HND domain_pol; /* policy handle */
1446 uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
1447 uint32 rid_group; /* rid */
1449 } SAMR_Q_OPEN_GROUP;
1452 /* SAMR_R_OPEN_GROUP - probably an open */
1453 typedef struct r_samr_open_group_info
1455 POLICY_HND pol; /* policy handle */
1456 uint32 status; /* return status */
1458 } SAMR_R_OPEN_GROUP;
1461 /* SAMR_Q_QUERY_ALIASMEM - query alias members */
1462 typedef struct q_samr_query_aliasmem_info
1464 POLICY_HND alias_pol; /* policy handle */
1466 } SAMR_Q_QUERY_ALIASMEM;
1469 /* SAMR_R_QUERY_ALIASMEM - query alias members */
1470 typedef struct r_samr_query_aliasmem_info
1472 uint32 num_sids;
1473 uint32 ptr;
1474 uint32 num_sids1;
1476 DOM_SID2 *sid;
1478 uint32 status;
1480 } SAMR_R_QUERY_ALIASMEM;
1483 /* SAMR_Q_ADD_ALIASMEM - add alias member */
1484 typedef struct q_samr_add_alias_mem_info
1486 POLICY_HND alias_pol; /* policy handle */
1488 DOM_SID2 sid; /* member sid to be added to the alias */
1490 } SAMR_Q_ADD_ALIASMEM;
1493 /* SAMR_R_ADD_ALIASMEM - add alias member */
1494 typedef struct r_samr_add_alias_mem_info
1496 uint32 status; /* return status */
1498 } SAMR_R_ADD_ALIASMEM;
1501 /* SAMR_Q_DEL_ALIASMEM - add an add alias member */
1502 typedef struct q_samr_del_alias_mem_info
1504 POLICY_HND alias_pol; /* policy handle */
1506 DOM_SID2 sid; /* member sid to be added to alias */
1508 } SAMR_Q_DEL_ALIASMEM;
1511 /* SAMR_R_DEL_ALIASMEM - delete alias member */
1512 typedef struct r_samr_del_alias_mem_info
1514 uint32 status; /* return status */
1516 } SAMR_R_DEL_ALIASMEM;
1520 /* SAMR_Q_OPEN_ALIAS - probably an open */
1521 typedef struct q_samr_open_alias_info
1523 POLICY_HND dom_pol;
1525 uint32 unknown_0; /* 0x0000 0008 */
1526 uint32 rid_alias; /* rid */
1528 } SAMR_Q_OPEN_ALIAS;
1531 /* SAMR_R_OPEN_ALIAS - probably an open */
1532 typedef struct r_samr_open_alias_info
1534 POLICY_HND pol; /* policy handle */
1535 uint32 status; /* return status */
1537 } SAMR_R_OPEN_ALIAS;
1540 /* SAMR_Q_CONNECT_ANON - probably an open */
1541 typedef struct q_samr_connect_anon_info
1543 uint32 ptr; /* ptr? */
1544 uint16 unknown_0; /* 0x005c */
1545 uint16 unknown_1; /* 0x0001 */
1546 uint32 access_mask;
1548 } SAMR_Q_CONNECT_ANON;
1550 /* SAMR_R_CONNECT_ANON - probably an open */
1551 typedef struct r_samr_connect_anon_info
1553 POLICY_HND connect_pol; /* policy handle */
1554 uint32 status; /* return status */
1556 } SAMR_R_CONNECT_ANON;
1558 /* SAMR_Q_CONNECT - probably an open */
1559 typedef struct q_samr_connect_info
1561 uint32 ptr_srv_name; /* pointer (to server name?) */
1562 UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
1564 uint32 access_mask;
1566 } SAMR_Q_CONNECT;
1569 /* SAMR_R_CONNECT - probably an open */
1570 typedef struct r_samr_connect_info
1572 POLICY_HND connect_pol; /* policy handle */
1573 uint32 status; /* return status */
1575 } SAMR_R_CONNECT;
1577 /* SAMR_Q_GET_DOM_PWINFO */
1578 typedef struct q_samr_get_dom_pwinfo
1580 uint32 ptr;
1581 UNIHDR hdr_srv_name;
1582 UNISTR2 uni_srv_name;
1584 } SAMR_Q_GET_DOM_PWINFO;
1586 /* SAMR_R_GET_DOM_PWINFO */
1587 typedef struct r_samr_get_dom_pwinfo
1589 uint16 unk_0;
1590 uint16 unk_1;
1591 uint16 unk_2;
1592 uint32 status;
1594 } SAMR_R_GET_DOM_PWINFO;
1596 /* SAMR_ENC_PASSWD */
1597 typedef struct enc_passwd_info
1599 uint32 ptr;
1600 uint8 pass[516];
1602 } SAMR_ENC_PASSWD;
1604 /* SAMR_ENC_HASH */
1605 typedef struct enc_hash_info
1607 uint32 ptr;
1608 uint8 hash[16];
1610 } SAMR_ENC_HASH;
1612 /* SAMR_Q_CHGPASSWD_USER */
1613 typedef struct q_samr_chgpasswd_user_info
1615 uint32 ptr_0;
1617 UNIHDR hdr_dest_host; /* server name unicode header */
1618 UNISTR2 uni_dest_host; /* server name unicode string */
1620 UNIHDR hdr_user_name; /* username unicode string header */
1621 UNISTR2 uni_user_name; /* username unicode string */
1623 SAMR_ENC_PASSWD nt_newpass;
1624 SAMR_ENC_HASH nt_oldhash;
1626 uint32 unknown; /* 0x0000 0001 */
1628 SAMR_ENC_PASSWD lm_newpass;
1629 SAMR_ENC_HASH lm_oldhash;
1631 } SAMR_Q_CHGPASSWD_USER;
1633 /* SAMR_R_CHGPASSWD_USER */
1634 typedef struct r_samr_chgpasswd_user_info
1636 uint32 status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
1638 } SAMR_R_CHGPASSWD_USER;
1641 /* SAMR_Q_UNKNOWN_2D */
1642 typedef struct q_samr_unknown_2d_info
1644 POLICY_HND dom_pol; /* policy handle */
1645 DOM_SID2 sid; /* SID */
1647 } SAMR_Q_UNKNOWN_2D;
1650 /* SAMR_R_UNKNOWN_2D - probably an open */
1651 typedef struct r_samr_unknown_2d_info
1653 uint32 status; /* return status */
1655 } SAMR_R_UNKNOWN_2D;
1657 #endif /* _RPC_SAMR_H */