1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 | SMB parameters and setup
|
---|
4 | Copyright (C) Andrew Tridgell 1992-2000
|
---|
5 | Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
---|
6 | Copyright (C) Paul Ashton 1997-2000
|
---|
7 | Copyright (C) Jean François Micouleau 1998-2001
|
---|
8 | Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002
|
---|
9 |
|
---|
10 |
|
---|
11 | This program is free software; you can redistribute it and/or modify
|
---|
12 | it under the terms of the GNU General Public License as published by
|
---|
13 | the Free Software Foundation; either version 2 of the License, or
|
---|
14 | (at your option) any later version.
|
---|
15 |
|
---|
16 | This program is distributed in the hope that it will be useful,
|
---|
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | GNU General Public License for more details.
|
---|
20 |
|
---|
21 | You should have received a copy of the GNU General Public License
|
---|
22 | along with this program; if not, write to the Free Software
|
---|
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef _RPC_SAMR_H /* _RPC_SAMR_H */
|
---|
27 | #define _RPC_SAMR_H
|
---|
28 |
|
---|
29 | /*******************************************************************
|
---|
30 | the following information comes from a QuickView on samsrv.dll,
|
---|
31 | and gives an idea of exactly what is needed:
|
---|
32 |
|
---|
33 | x SamrAddMemberToAlias
|
---|
34 | x SamrAddMemberToGroup
|
---|
35 | SamrAddMultipleMembersToAlias
|
---|
36 | x SamrChangePasswordUser
|
---|
37 | x SamrCloseHandle
|
---|
38 | x SamrConnect
|
---|
39 | x SamrCreateAliasInDomain
|
---|
40 | x SamrCreateGroupInDomain
|
---|
41 | x SamrCreateUserInDomain
|
---|
42 | ? SamrDeleteAlias
|
---|
43 | SamrDeleteGroup
|
---|
44 | x SamrDeleteUser
|
---|
45 | x SamrEnumerateAliasesInDomain
|
---|
46 | SamrEnumerateDomainsInSamServer
|
---|
47 | x SamrEnumerateGroupsInDomain
|
---|
48 | x SamrEnumerateUsersInDomain
|
---|
49 | SamrGetUserDomainPasswordInformation
|
---|
50 | SamrLookupDomainInSamServer
|
---|
51 | ? SamrLookupIdsInDomain
|
---|
52 | x SamrLookupNamesInDomain
|
---|
53 | x SamrOpenAlias
|
---|
54 | x SamrOpenDomain
|
---|
55 | x SamrOpenGroup
|
---|
56 | x SamrOpenUser
|
---|
57 | x SamrQueryDisplayInformation
|
---|
58 | x SamrQueryInformationAlias
|
---|
59 | SamrQueryInformationDomain
|
---|
60 | ? SamrQueryInformationUser
|
---|
61 | x SamrQuerySecurityObject
|
---|
62 | SamrRemoveMemberFromAlias
|
---|
63 | SamrRemoveMemberFromForiegnDomain
|
---|
64 | SamrRemoveMemberFromGroup
|
---|
65 | SamrRemoveMultipleMembersFromAlias
|
---|
66 | x SamrSetInformationAlias
|
---|
67 | SamrSetInformationDomain
|
---|
68 | x SamrSetInformationGroup
|
---|
69 | x SamrSetInformationUser
|
---|
70 | SamrSetMemberAttributesOfGroup
|
---|
71 | SamrSetSecurityObject
|
---|
72 | SamrShutdownSamServer
|
---|
73 | SamrTestPrivateFunctionsDomain
|
---|
74 | SamrTestPrivateFunctionsUser
|
---|
75 |
|
---|
76 | ********************************************************************/
|
---|
77 |
|
---|
78 | #define SAMR_CONNECT_ANON 0x00
|
---|
79 | #define SAMR_CLOSE_HND 0x01
|
---|
80 | #define SAMR_SET_SEC_OBJECT 0x02
|
---|
81 | #define SAMR_QUERY_SEC_OBJECT 0x03
|
---|
82 |
|
---|
83 | #define SAMR_UNKNOWN_4 0x04 /* profile info? */
|
---|
84 | #define SAMR_LOOKUP_DOMAIN 0x05
|
---|
85 | #define SAMR_ENUM_DOMAINS 0x06
|
---|
86 | #define SAMR_OPEN_DOMAIN 0x07
|
---|
87 | #define SAMR_QUERY_DOMAIN_INFO 0x08
|
---|
88 | #define SAMR_SET_DOMAIN_INFO 0x09
|
---|
89 |
|
---|
90 | #define SAMR_CREATE_DOM_GROUP 0x0a
|
---|
91 | #define SAMR_ENUM_DOM_GROUPS 0x0b
|
---|
92 | #define SAMR_ENUM_DOM_USERS 0x0d
|
---|
93 | #define SAMR_CREATE_DOM_ALIAS 0x0e
|
---|
94 | #define SAMR_ENUM_DOM_ALIASES 0x0f
|
---|
95 | #define SAMR_QUERY_USERALIASES 0x10
|
---|
96 |
|
---|
97 | #define SAMR_LOOKUP_NAMES 0x11
|
---|
98 | #define SAMR_LOOKUP_RIDS 0x12
|
---|
99 |
|
---|
100 | #define SAMR_OPEN_GROUP 0x13
|
---|
101 | #define SAMR_QUERY_GROUPINFO 0x14
|
---|
102 | #define SAMR_SET_GROUPINFO 0x15
|
---|
103 | #define SAMR_ADD_GROUPMEM 0x16
|
---|
104 | #define SAMR_DELETE_DOM_GROUP 0x17
|
---|
105 | #define SAMR_DEL_GROUPMEM 0x18
|
---|
106 | #define SAMR_QUERY_GROUPMEM 0x19
|
---|
107 | #define SAMR_UNKNOWN_1A 0x1a
|
---|
108 |
|
---|
109 | #define SAMR_OPEN_ALIAS 0x1b
|
---|
110 | #define SAMR_QUERY_ALIASINFO 0x1c
|
---|
111 | #define SAMR_SET_ALIASINFO 0x1d
|
---|
112 | #define SAMR_DELETE_DOM_ALIAS 0x1e
|
---|
113 | #define SAMR_ADD_ALIASMEM 0x1f
|
---|
114 | #define SAMR_DEL_ALIASMEM 0x20
|
---|
115 | #define SAMR_QUERY_ALIASMEM 0x21
|
---|
116 |
|
---|
117 | #define SAMR_OPEN_USER 0x22
|
---|
118 | #define SAMR_DELETE_DOM_USER 0x23
|
---|
119 | #define SAMR_QUERY_USERINFO 0x24
|
---|
120 | #define SAMR_SET_USERINFO2 0x25
|
---|
121 | #define SAMR_QUERY_USERGROUPS 0x27
|
---|
122 |
|
---|
123 | #define SAMR_QUERY_DISPINFO 0x28
|
---|
124 | #define SAMR_GET_DISPENUM_INDEX 0x29
|
---|
125 | #define SAMR_UNKNOWN_2a 0x2a
|
---|
126 | #define SAMR_UNKNOWN_2b 0x2b
|
---|
127 | #define SAMR_GET_USRDOM_PWINFO 0x2c
|
---|
128 | #define SAMR_REMOVE_SID_FOREIGN_DOMAIN 0x2d
|
---|
129 | #define SAMR_QUERY_DOMAIN_INFO2 0x2e /* looks like an alias for SAMR_QUERY_DOMAIN_INFO */
|
---|
130 | #define SAMR_UNKNOWN_2f 0x2f
|
---|
131 | #define SAMR_QUERY_DISPINFO3 0x30 /* Alias for SAMR_QUERY_DISPINFO
|
---|
132 | with info level 3 */
|
---|
133 | #define SAMR_UNKNOWN_31 0x31
|
---|
134 | #define SAMR_CREATE_USER 0x32
|
---|
135 | #define SAMR_QUERY_DISPINFO4 0x33 /* Alias for SAMR_QUERY_DISPINFO
|
---|
136 | with info level 4 */
|
---|
137 | #define SAMR_ADDMULTI_ALIASMEM 0x34
|
---|
138 |
|
---|
139 | #define SAMR_UNKNOWN_35 0x35
|
---|
140 | #define SAMR_UNKNOWN_36 0x36
|
---|
141 | #define SAMR_CHGPASSWD_USER 0x37
|
---|
142 | #define SAMR_GET_DOM_PWINFO 0x38
|
---|
143 | #define SAMR_CONNECT 0x39
|
---|
144 | #define SAMR_SET_USERINFO 0x3A
|
---|
145 | #define SAMR_CONNECT4 0x3E
|
---|
146 | #define SAMR_CHGPASSWD_USER3 0x3F
|
---|
147 | #define SAMR_CONNECT5 0x40
|
---|
148 |
|
---|
149 | typedef struct logon_hours_info
|
---|
150 | {
|
---|
151 | uint32 max_len; /* normally 1260 bytes */
|
---|
152 | uint32 offset;
|
---|
153 | uint32 len; /* normally 21 bytes */
|
---|
154 | uint8 hours[32];
|
---|
155 |
|
---|
156 | } LOGON_HRS;
|
---|
157 |
|
---|
158 | /* SAM_USER_INFO_23 */
|
---|
159 | typedef struct sam_user_info_23
|
---|
160 | {
|
---|
161 | /* TIMES MAY NOT IN RIGHT ORDER!!!! */
|
---|
162 | NTTIME logon_time; /* logon time */
|
---|
163 | NTTIME logoff_time; /* logoff time */
|
---|
164 | NTTIME kickoff_time; /* kickoff time */
|
---|
165 | NTTIME pass_last_set_time; /* password last set time */
|
---|
166 | NTTIME pass_can_change_time; /* password can change time */
|
---|
167 | NTTIME pass_must_change_time; /* password must change time */
|
---|
168 |
|
---|
169 | UNIHDR hdr_user_name; /* NULL - user name unicode string header */
|
---|
170 | UNIHDR hdr_full_name; /* user's full name unicode string header */
|
---|
171 | UNIHDR hdr_home_dir; /* home directory unicode string header */
|
---|
172 | UNIHDR hdr_dir_drive; /* home drive unicode string header */
|
---|
173 | UNIHDR hdr_logon_script; /* logon script unicode string header */
|
---|
174 | UNIHDR hdr_profile_path; /* profile path unicode string header */
|
---|
175 | UNIHDR hdr_acct_desc ; /* user description */
|
---|
176 | UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
|
---|
177 | UNIHDR hdr_comment;
|
---|
178 | UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
|
---|
179 |
|
---|
180 | uint8 lm_pwd[16]; /* lm user passwords */
|
---|
181 | uint8 nt_pwd[16]; /* nt user passwords */
|
---|
182 |
|
---|
183 | uint32 user_rid; /* Primary User ID */
|
---|
184 | uint32 group_rid; /* Primary Group ID */
|
---|
185 |
|
---|
186 | uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
|
---|
187 |
|
---|
188 | uint32 fields_present; /* 0x09f8 27fa */
|
---|
189 |
|
---|
190 | uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
|
---|
191 | /* uint8 pad[2] */
|
---|
192 | uint32 ptr_logon_hrs; /* pointer to logon hours */
|
---|
193 |
|
---|
194 | /* Was unknown_5. */
|
---|
195 | uint16 bad_password_count;
|
---|
196 | uint16 logon_count;
|
---|
197 |
|
---|
198 | uint8 padding1[6];
|
---|
199 |
|
---|
200 | uint8 passmustchange; /* 0x00 must change = 0x01 */
|
---|
201 |
|
---|
202 | uint8 padding2;
|
---|
203 |
|
---|
204 | uint8 pass[516];
|
---|
205 |
|
---|
206 | UNISTR2 uni_user_name; /* NULL - username unicode string */
|
---|
207 | UNISTR2 uni_full_name; /* user's full name unicode string */
|
---|
208 | UNISTR2 uni_home_dir; /* home directory unicode string */
|
---|
209 | UNISTR2 uni_dir_drive; /* home directory drive unicode string */
|
---|
210 | UNISTR2 uni_logon_script; /* logon script unicode string */
|
---|
211 | UNISTR2 uni_profile_path; /* profile path unicode string */
|
---|
212 | UNISTR2 uni_acct_desc ; /* user description unicode string */
|
---|
213 | UNISTR2 uni_workstations; /* login from workstations unicode string */
|
---|
214 | UNISTR2 uni_comment;
|
---|
215 | UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
|
---|
216 |
|
---|
217 | LOGON_HRS logon_hrs;
|
---|
218 |
|
---|
219 | } SAM_USER_INFO_23;
|
---|
220 |
|
---|
221 | /* SAM_USER_INFO_24 */
|
---|
222 | typedef struct sam_user_info_24
|
---|
223 | {
|
---|
224 | uint8 pass[516];
|
---|
225 | uint8 pw_len;
|
---|
226 | } SAM_USER_INFO_24;
|
---|
227 |
|
---|
228 | /*
|
---|
229 | * NB. This structure is *definately* incorrect. It's my best guess
|
---|
230 | * currently for W2K SP2. The password field is encrypted in a different
|
---|
231 | * way than normal... And there are definately other problems. JRA.
|
---|
232 | */
|
---|
233 |
|
---|
234 | /* SAM_USER_INFO_25 */
|
---|
235 | typedef struct sam_user_info_25
|
---|
236 | {
|
---|
237 | /* TIMES MAY NOT IN RIGHT ORDER!!!! */
|
---|
238 | NTTIME logon_time; /* logon time */
|
---|
239 | NTTIME logoff_time; /* logoff time */
|
---|
240 | NTTIME kickoff_time; /* kickoff time */
|
---|
241 | NTTIME pass_last_set_time; /* password last set time */
|
---|
242 | NTTIME pass_can_change_time; /* password can change time */
|
---|
243 | NTTIME pass_must_change_time; /* password must change time */
|
---|
244 |
|
---|
245 | UNIHDR hdr_user_name; /* NULL - user name unicode string header */
|
---|
246 | UNIHDR hdr_full_name; /* user's full name unicode string header */
|
---|
247 | UNIHDR hdr_home_dir; /* home directory unicode string header */
|
---|
248 | UNIHDR hdr_dir_drive; /* home drive unicode string header */
|
---|
249 | UNIHDR hdr_logon_script; /* logon script unicode string header */
|
---|
250 | UNIHDR hdr_profile_path; /* profile path unicode string header */
|
---|
251 | UNIHDR hdr_acct_desc ; /* user description */
|
---|
252 | UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
|
---|
253 | UNIHDR hdr_comment;
|
---|
254 | UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
|
---|
255 |
|
---|
256 | uint8 lm_pwd[16]; /* lm user passwords */
|
---|
257 | uint8 nt_pwd[16]; /* nt user passwords */
|
---|
258 |
|
---|
259 | uint32 user_rid; /* Primary User ID */
|
---|
260 | uint32 group_rid; /* Primary Group ID */
|
---|
261 |
|
---|
262 | uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
|
---|
263 | uint32 fields_present;
|
---|
264 |
|
---|
265 | uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
|
---|
266 | /* uint8 pad[2] */
|
---|
267 | uint32 ptr_logon_hrs; /* pointer to logon hours */
|
---|
268 |
|
---|
269 | /* Was unknown_5. */
|
---|
270 | uint16 bad_password_count;
|
---|
271 | uint16 logon_count;
|
---|
272 |
|
---|
273 | uint8 padding1[6];
|
---|
274 |
|
---|
275 | uint8 passmustchange; /* 0x00 must change = 0x01 */
|
---|
276 |
|
---|
277 | uint8 padding2;
|
---|
278 |
|
---|
279 | uint8 pass[532];
|
---|
280 |
|
---|
281 | UNISTR2 uni_user_name; /* NULL - username unicode string */
|
---|
282 | UNISTR2 uni_full_name; /* user's full name unicode string */
|
---|
283 | UNISTR2 uni_home_dir; /* home directory unicode string */
|
---|
284 | UNISTR2 uni_dir_drive; /* home directory drive unicode string */
|
---|
285 | UNISTR2 uni_logon_script; /* logon script unicode string */
|
---|
286 | UNISTR2 uni_profile_path; /* profile path unicode string */
|
---|
287 | UNISTR2 uni_acct_desc ; /* user description unicode string */
|
---|
288 | UNISTR2 uni_workstations; /* login from workstations unicode string */
|
---|
289 | UNISTR2 uni_comment;
|
---|
290 | UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
|
---|
291 | LOGON_HRS logon_hrs;
|
---|
292 |
|
---|
293 | } SAM_USER_INFO_25;
|
---|
294 |
|
---|
295 | /* SAM_USER_INFO_26 */
|
---|
296 | typedef struct sam_user_info_26
|
---|
297 | {
|
---|
298 | uint8 pass[532];
|
---|
299 | uint8 pw_len;
|
---|
300 | } SAM_USER_INFO_26;
|
---|
301 |
|
---|
302 |
|
---|
303 | /* SAM_USER_INFO_21 */
|
---|
304 | typedef struct sam_user_info_21
|
---|
305 | {
|
---|
306 | NTTIME logon_time; /* logon time */
|
---|
307 | NTTIME logoff_time; /* logoff time */
|
---|
308 | NTTIME kickoff_time; /* kickoff time */
|
---|
309 | NTTIME pass_last_set_time; /* password last set time */
|
---|
310 | NTTIME pass_can_change_time; /* password can change time */
|
---|
311 | NTTIME pass_must_change_time; /* password must change time */
|
---|
312 |
|
---|
313 | UNIHDR hdr_user_name; /* username unicode string header */
|
---|
314 | UNIHDR hdr_full_name; /* user's full name unicode string header */
|
---|
315 | UNIHDR hdr_home_dir; /* home directory unicode string header */
|
---|
316 | UNIHDR hdr_dir_drive; /* home drive unicode string header */
|
---|
317 | UNIHDR hdr_logon_script; /* logon script unicode string header */
|
---|
318 | UNIHDR hdr_profile_path; /* profile path unicode string header */
|
---|
319 | UNIHDR hdr_acct_desc ; /* user description */
|
---|
320 | UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
|
---|
321 | UNIHDR hdr_comment;
|
---|
322 | UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
|
---|
323 |
|
---|
324 | uint8 lm_pwd[16]; /* lm user passwords */
|
---|
325 | uint8 nt_pwd[16]; /* nt user passwords */
|
---|
326 |
|
---|
327 | uint32 user_rid; /* Primary User ID */
|
---|
328 | uint32 group_rid; /* Primary Group ID */
|
---|
329 |
|
---|
330 | uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
|
---|
331 |
|
---|
332 | /* Was unknown_3 */
|
---|
333 | uint32 fields_present; /* 0x00ff ffff */
|
---|
334 |
|
---|
335 | uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
|
---|
336 | /* uint8 pad[2] */
|
---|
337 | uint32 ptr_logon_hrs; /* unknown pointer */
|
---|
338 |
|
---|
339 | /* Was unknown_5. */
|
---|
340 | uint16 bad_password_count;
|
---|
341 | uint16 logon_count;
|
---|
342 |
|
---|
343 | uint8 padding1[6];
|
---|
344 |
|
---|
345 | uint8 passmustchange; /* 0x00 must change = 0x01 */
|
---|
346 |
|
---|
347 | uint8 padding2;
|
---|
348 |
|
---|
349 | UNISTR2 uni_user_name; /* username unicode string */
|
---|
350 | UNISTR2 uni_full_name; /* user's full name unicode string */
|
---|
351 | UNISTR2 uni_home_dir; /* home directory unicode string */
|
---|
352 | UNISTR2 uni_dir_drive; /* home directory drive unicode string */
|
---|
353 | UNISTR2 uni_logon_script; /* logon script unicode string */
|
---|
354 | UNISTR2 uni_profile_path; /* profile path unicode string */
|
---|
355 | UNISTR2 uni_acct_desc ; /* user description unicode string */
|
---|
356 | UNISTR2 uni_workstations; /* login from workstations unicode string */
|
---|
357 | UNISTR2 uni_comment;
|
---|
358 | UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
|
---|
359 |
|
---|
360 | LOGON_HRS logon_hrs;
|
---|
361 |
|
---|
362 | } SAM_USER_INFO_21;
|
---|
363 |
|
---|
364 | #define PASS_MUST_CHANGE_AT_NEXT_LOGON 0x01
|
---|
365 | #define PASS_DONT_CHANGE_AT_NEXT_LOGON 0x00
|
---|
366 |
|
---|
367 | /* SAM_USER_INFO_20 */
|
---|
368 | typedef struct sam_user_info_20
|
---|
369 | {
|
---|
370 | UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
|
---|
371 |
|
---|
372 | UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
|
---|
373 |
|
---|
374 | } SAM_USER_INFO_20;
|
---|
375 |
|
---|
376 | /* SAM_USER_INFO_18 */
|
---|
377 | typedef struct sam_user_info_18
|
---|
378 | {
|
---|
379 | uint8 lm_pwd[16]; /* lm user passwords */
|
---|
380 | uint8 nt_pwd[16]; /* nt user passwords */
|
---|
381 |
|
---|
382 | uint8 lm_pwd_active;
|
---|
383 | uint8 nt_pwd_active;
|
---|
384 |
|
---|
385 | } SAM_USER_INFO_18;
|
---|
386 |
|
---|
387 | /* SAM_USER_INFO_17 */
|
---|
388 | typedef struct sam_user_info_17
|
---|
389 | {
|
---|
390 | uint8 padding_0[16]; /* 0 - padding 16 bytes */
|
---|
391 | NTTIME expiry; /* expiry time or something? */
|
---|
392 | uint8 padding_1[24]; /* 0 - padding 24 bytes */
|
---|
393 |
|
---|
394 | UNIHDR hdr_mach_acct; /* unicode header for machine account */
|
---|
395 | uint32 padding_2; /* 0 - padding 4 bytes */
|
---|
396 |
|
---|
397 | uint32 ptr_1; /* pointer */
|
---|
398 | uint8 padding_3[32]; /* 0 - padding 32 bytes */
|
---|
399 | uint32 padding_4; /* 0 - padding 4 bytes */
|
---|
400 |
|
---|
401 | uint32 ptr_2; /* pointer */
|
---|
402 | uint32 padding_5; /* 0 - padding 4 bytes */
|
---|
403 |
|
---|
404 | uint32 ptr_3; /* pointer */
|
---|
405 | uint8 padding_6[32]; /* 0 - padding 32 bytes */
|
---|
406 |
|
---|
407 | uint32 rid_user; /* user RID */
|
---|
408 | uint32 rid_group; /* group RID */
|
---|
409 |
|
---|
410 | uint16 acct_ctrl; /* 0080 - ACB_XXXX */
|
---|
411 | uint16 unknown_3; /* 16 bit padding */
|
---|
412 |
|
---|
413 | uint16 unknown_4; /* 0x003f - 16 bit unknown */
|
---|
414 | uint16 unknown_5; /* 0x003c - 16 bit unknown */
|
---|
415 |
|
---|
416 | uint8 padding_7[16]; /* 0 - padding 16 bytes */
|
---|
417 | uint32 padding_8; /* 0 - padding 4 bytes */
|
---|
418 |
|
---|
419 | UNISTR2 uni_mach_acct; /* unicode string for machine account */
|
---|
420 |
|
---|
421 | uint8 padding_9[48]; /* 0 - padding 48 bytes */
|
---|
422 |
|
---|
423 | } SAM_USER_INFO_17;
|
---|
424 |
|
---|
425 |
|
---|
426 | /* SAM_USER_INFO_16 */
|
---|
427 | typedef struct sam_user_info_16
|
---|
428 | {
|
---|
429 | uint32 acb_info;
|
---|
430 |
|
---|
431 | } SAM_USER_INFO_16;
|
---|
432 |
|
---|
433 |
|
---|
434 | /* SAM_USER_INFO_7 */
|
---|
435 | typedef struct sam_user_info_7
|
---|
436 | {
|
---|
437 | UNIHDR hdr_name; /* unicode header for name */
|
---|
438 | UNISTR2 uni_name; /* unicode string for name */
|
---|
439 |
|
---|
440 | } SAM_USER_INFO_7;
|
---|
441 |
|
---|
442 |
|
---|
443 | /* SAM_USER_INFO_9 */
|
---|
444 | typedef struct sam_user_info_9
|
---|
445 | {
|
---|
446 | uint32 rid_group; /* Primary Group RID */
|
---|
447 | } SAM_USER_INFO_9;
|
---|
448 |
|
---|
449 |
|
---|
450 | /* SAMR_Q_CLOSE_HND - probably a policy handle close */
|
---|
451 | typedef struct q_samr_close_hnd_info
|
---|
452 | {
|
---|
453 | POLICY_HND pol; /* policy handle */
|
---|
454 |
|
---|
455 | } SAMR_Q_CLOSE_HND;
|
---|
456 |
|
---|
457 |
|
---|
458 | /* SAMR_R_CLOSE_HND - probably a policy handle close */
|
---|
459 | typedef struct r_samr_close_hnd_info
|
---|
460 | {
|
---|
461 | POLICY_HND pol; /* policy handle */
|
---|
462 | NTSTATUS status; /* return status */
|
---|
463 |
|
---|
464 | } SAMR_R_CLOSE_HND;
|
---|
465 |
|
---|
466 |
|
---|
467 | /****************************************************************************
|
---|
468 | SAMR_Q_GET_USRDOM_PWINFO - a "set user info" occurs just after this
|
---|
469 | *****************************************************************************/
|
---|
470 |
|
---|
471 | /* SAMR_Q_GET_USRDOM_PWINFO */
|
---|
472 | typedef struct q_samr_usrdom_pwinfo_info
|
---|
473 | {
|
---|
474 | POLICY_HND user_pol; /* policy handle */
|
---|
475 |
|
---|
476 | } SAMR_Q_GET_USRDOM_PWINFO;
|
---|
477 |
|
---|
478 |
|
---|
479 | /****************************************************************************
|
---|
480 | SAMR_R_GET_USRDOM_PWINFO - a "set user info" occurs just after this
|
---|
481 | *****************************************************************************/
|
---|
482 |
|
---|
483 | /* SAMR_R_GET_USRDOM_PWINFO */
|
---|
484 | typedef struct r_samr_usrdom_pwinfo_info
|
---|
485 | {
|
---|
486 | uint16 min_pwd_length;
|
---|
487 | uint16 unknown_1; /* 0x0016 or 0x0015 */
|
---|
488 | uint32 password_properties;
|
---|
489 | NTSTATUS status;
|
---|
490 |
|
---|
491 | } SAMR_R_GET_USRDOM_PWINFO;
|
---|
492 |
|
---|
493 | /****************************************************************************
|
---|
494 | SAMR_Q_SET_SEC_OBJ - info level 4.
|
---|
495 | *****************************************************************************/
|
---|
496 |
|
---|
497 | /* SAMR_Q_SET_SEC_OBJ - */
|
---|
498 | typedef struct q_samr_set_sec_obj_info
|
---|
499 | {
|
---|
500 | POLICY_HND pol; /* policy handle */
|
---|
501 | uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
|
---|
502 | SEC_DESC_BUF *buf;
|
---|
503 |
|
---|
504 | } SAMR_Q_SET_SEC_OBJ;
|
---|
505 |
|
---|
506 | /* SAMR_R_SET_SEC_OBJ - */
|
---|
507 | typedef struct r_samr_set_sec_obj_info
|
---|
508 | {
|
---|
509 | NTSTATUS status; /* return status */
|
---|
510 |
|
---|
511 | } SAMR_R_SET_SEC_OBJ;
|
---|
512 |
|
---|
513 |
|
---|
514 | /****************************************************************************
|
---|
515 | SAMR_Q_QUERY_SEC_OBJ - info level 4. returns SIDs.
|
---|
516 | *****************************************************************************/
|
---|
517 |
|
---|
518 | /* SAMR_Q_QUERY_SEC_OBJ - probably get domain info... */
|
---|
519 | typedef struct q_samr_query_sec_obj_info
|
---|
520 | {
|
---|
521 | POLICY_HND user_pol; /* policy handle */
|
---|
522 | uint32 sec_info; /* xxxx_SECURITY_INFORMATION 0x0000 0004 */
|
---|
523 |
|
---|
524 | } SAMR_Q_QUERY_SEC_OBJ;
|
---|
525 |
|
---|
526 | /* SAMR_R_QUERY_SEC_OBJ - probably an open */
|
---|
527 | typedef struct r_samr_query_sec_obj_info
|
---|
528 | {
|
---|
529 | uint32 ptr;
|
---|
530 | SEC_DESC_BUF *buf;
|
---|
531 |
|
---|
532 | NTSTATUS status; /* return status */
|
---|
533 |
|
---|
534 | } SAMR_R_QUERY_SEC_OBJ;
|
---|
535 |
|
---|
536 |
|
---|
537 | /****************************************************************************
|
---|
538 | SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
|
---|
539 | *****************************************************************************/
|
---|
540 |
|
---|
541 | /* SAMR_Q_QUERY_DOMAIN_INFO - */
|
---|
542 | typedef struct q_samr_query_domain_info
|
---|
543 | {
|
---|
544 | POLICY_HND domain_pol; /* policy handle */
|
---|
545 | uint16 switch_value; /* 0x0002, 0x0001 */
|
---|
546 |
|
---|
547 | } SAMR_Q_QUERY_DOMAIN_INFO;
|
---|
548 |
|
---|
549 | typedef struct sam_unknown_info_1_inf
|
---|
550 | {
|
---|
551 | uint16 min_length_password;
|
---|
552 | uint16 password_history;
|
---|
553 | uint32 password_properties;
|
---|
554 | NTTIME expire;
|
---|
555 | NTTIME min_passwordage;
|
---|
556 |
|
---|
557 | } SAM_UNK_INFO_1;
|
---|
558 |
|
---|
559 | typedef struct sam_unknown_info_2_inf
|
---|
560 | {
|
---|
561 | NTTIME logout; /* whether users are forcibly disconnected when logon hours expire */
|
---|
562 | UNIHDR hdr_comment; /* comment according to samba4 idl */
|
---|
563 | UNIHDR hdr_domain; /* domain name unicode header */
|
---|
564 | UNIHDR hdr_server; /* server name unicode header */
|
---|
565 |
|
---|
566 | /* put all the data in here, at the moment, including what the above
|
---|
567 | pointer is referring to
|
---|
568 | */
|
---|
569 |
|
---|
570 | uint64 seq_num;
|
---|
571 |
|
---|
572 | uint32 unknown_4; /* 0x0000 0001 */
|
---|
573 | uint32 server_role;
|
---|
574 | uint32 unknown_6; /* 0x0000 0001 */
|
---|
575 | uint32 num_domain_usrs; /* number of users in domain */
|
---|
576 | uint32 num_domain_grps; /* number of domain groups in domain */
|
---|
577 | uint32 num_local_grps; /* number of local groups in domain */
|
---|
578 |
|
---|
579 | UNISTR2 uni_comment; /* comment unicode string */
|
---|
580 | UNISTR2 uni_domain; /* domain name unicode string */
|
---|
581 | UNISTR2 uni_server; /* server name unicode string */
|
---|
582 |
|
---|
583 | } SAM_UNK_INFO_2;
|
---|
584 |
|
---|
585 | typedef struct sam_unknown_info_3_info
|
---|
586 | {
|
---|
587 | NTTIME logout;
|
---|
588 | /* 0x8000 0000 */ /* DON'T forcibly disconnect remote users from server when logon hours expire*/
|
---|
589 | /* 0x0000 0000 */ /* forcibly disconnect remote users from server when logon hours expire*/
|
---|
590 |
|
---|
591 | } SAM_UNK_INFO_3;
|
---|
592 |
|
---|
593 | typedef struct sam_unknown_info_4_inf
|
---|
594 | {
|
---|
595 | UNIHDR hdr_comment; /* comment according to samba4 idl */
|
---|
596 | UNISTR2 uni_comment; /* comment unicode string */
|
---|
597 |
|
---|
598 | } SAM_UNK_INFO_4;
|
---|
599 |
|
---|
600 | typedef struct sam_unknown_info_5_inf
|
---|
601 | {
|
---|
602 | UNIHDR hdr_domain; /* domain name unicode header */
|
---|
603 | UNISTR2 uni_domain; /* domain name unicode string */
|
---|
604 |
|
---|
605 | } SAM_UNK_INFO_5;
|
---|
606 |
|
---|
607 | typedef struct sam_unknown_info_6_info
|
---|
608 | {
|
---|
609 | UNIHDR hdr_server; /* server name unicode header */
|
---|
610 | UNISTR2 uni_server; /* server name unicode string */
|
---|
611 |
|
---|
612 | } SAM_UNK_INFO_6;
|
---|
613 |
|
---|
614 | typedef struct sam_unknown_info_7_info
|
---|
615 | {
|
---|
616 | uint16 server_role;
|
---|
617 |
|
---|
618 | } SAM_UNK_INFO_7;
|
---|
619 |
|
---|
620 | typedef struct sam_unknown_info_8_info
|
---|
621 | {
|
---|
622 | uint64 seq_num;
|
---|
623 | NTTIME domain_create_time;
|
---|
624 |
|
---|
625 | } SAM_UNK_INFO_8;
|
---|
626 |
|
---|
627 | typedef struct sam_unknown_info_9_info
|
---|
628 | {
|
---|
629 | uint32 unknown;
|
---|
630 |
|
---|
631 | } SAM_UNK_INFO_9;
|
---|
632 |
|
---|
633 | typedef struct sam_unknown_info_12_inf
|
---|
634 | {
|
---|
635 | NTTIME duration;
|
---|
636 | NTTIME reset_count;
|
---|
637 | uint16 bad_attempt_lockout;
|
---|
638 |
|
---|
639 | } SAM_UNK_INFO_12;
|
---|
640 |
|
---|
641 | typedef struct sam_unknown_info_13_info
|
---|
642 | {
|
---|
643 | uint64 seq_num;
|
---|
644 | NTTIME domain_create_time;
|
---|
645 | uint32 unknown1;
|
---|
646 | uint32 unknown2;
|
---|
647 |
|
---|
648 | } SAM_UNK_INFO_13;
|
---|
649 |
|
---|
650 | typedef struct sam_unknown_ctr_info
|
---|
651 | {
|
---|
652 | union
|
---|
653 | {
|
---|
654 | SAM_UNK_INFO_1 inf1;
|
---|
655 | SAM_UNK_INFO_2 inf2;
|
---|
656 | SAM_UNK_INFO_3 inf3;
|
---|
657 | SAM_UNK_INFO_4 inf4;
|
---|
658 | SAM_UNK_INFO_5 inf5;
|
---|
659 | SAM_UNK_INFO_6 inf6;
|
---|
660 | SAM_UNK_INFO_7 inf7;
|
---|
661 | SAM_UNK_INFO_8 inf8;
|
---|
662 | SAM_UNK_INFO_9 inf9;
|
---|
663 | SAM_UNK_INFO_12 inf12;
|
---|
664 | SAM_UNK_INFO_13 inf13;
|
---|
665 |
|
---|
666 | } info;
|
---|
667 |
|
---|
668 | } SAM_UNK_CTR;
|
---|
669 |
|
---|
670 |
|
---|
671 | /* SAMR_R_QUERY_DOMAIN_INFO - */
|
---|
672 | typedef struct r_samr_query_domain_info
|
---|
673 | {
|
---|
674 | uint32 ptr_0;
|
---|
675 | uint16 switch_value; /* same as in query */
|
---|
676 |
|
---|
677 | SAM_UNK_CTR *ctr;
|
---|
678 |
|
---|
679 | NTSTATUS status; /* return status */
|
---|
680 |
|
---|
681 | } SAMR_R_QUERY_DOMAIN_INFO;
|
---|
682 |
|
---|
683 |
|
---|
684 | /* SAMR_Q_LOOKUP_DOMAIN - obtain SID for a local domain */
|
---|
685 | typedef struct q_samr_lookup_domain_info
|
---|
686 | {
|
---|
687 | POLICY_HND connect_pol;
|
---|
688 |
|
---|
689 | UNIHDR hdr_domain;
|
---|
690 | UNISTR2 uni_domain;
|
---|
691 |
|
---|
692 | } SAMR_Q_LOOKUP_DOMAIN;
|
---|
693 |
|
---|
694 |
|
---|
695 | /* SAMR_R_LOOKUP_DOMAIN */
|
---|
696 | typedef struct r_samr_lookup_domain_info
|
---|
697 | {
|
---|
698 | uint32 ptr_sid;
|
---|
699 | DOM_SID2 dom_sid;
|
---|
700 |
|
---|
701 | NTSTATUS status;
|
---|
702 |
|
---|
703 | } SAMR_R_LOOKUP_DOMAIN;
|
---|
704 |
|
---|
705 |
|
---|
706 | /****************************************************************************
|
---|
707 | SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
|
---|
708 |
|
---|
709 | 0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
|
---|
710 | 0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
|
---|
711 | *****************************************************************************/
|
---|
712 |
|
---|
713 | /* SAMR_Q_OPEN_DOMAIN */
|
---|
714 | typedef struct q_samr_open_domain_info
|
---|
715 | {
|
---|
716 | POLICY_HND pol; /* policy handle */
|
---|
717 | uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
|
---|
718 | DOM_SID2 dom_sid; /* domain SID */
|
---|
719 |
|
---|
720 | } SAMR_Q_OPEN_DOMAIN;
|
---|
721 |
|
---|
722 |
|
---|
723 | /* SAMR_R_OPEN_DOMAIN - probably an open */
|
---|
724 | typedef struct r_samr_open_domain_info
|
---|
725 | {
|
---|
726 | POLICY_HND domain_pol; /* policy handle associated with the SID */
|
---|
727 | NTSTATUS status; /* return status */
|
---|
728 |
|
---|
729 | } SAMR_R_OPEN_DOMAIN;
|
---|
730 |
|
---|
731 | #define MAX_SAM_ENTRIES_W2K 0x400
|
---|
732 | #define MAX_SAM_ENTRIES_W95 50
|
---|
733 | /* The following should be the greater of the preceeding two. */
|
---|
734 | #define MAX_SAM_ENTRIES MAX_SAM_ENTRIES_W2K
|
---|
735 |
|
---|
736 | typedef struct samr_entry_info
|
---|
737 | {
|
---|
738 | uint32 rid;
|
---|
739 | UNIHDR hdr_name;
|
---|
740 |
|
---|
741 | } SAM_ENTRY;
|
---|
742 |
|
---|
743 |
|
---|
744 | /* SAMR_Q_ENUM_DOMAINS - SAM rids and names */
|
---|
745 | typedef struct q_samr_enum_domains_info
|
---|
746 | {
|
---|
747 | POLICY_HND pol; /* policy handle */
|
---|
748 |
|
---|
749 | uint32 start_idx; /* enumeration handle */
|
---|
750 | uint32 max_size; /* 0x0000 ffff */
|
---|
751 |
|
---|
752 | } SAMR_Q_ENUM_DOMAINS;
|
---|
753 |
|
---|
754 | /* SAMR_R_ENUM_DOMAINS - SAM rids and Domain names */
|
---|
755 | typedef struct r_samr_enum_domains_info
|
---|
756 | {
|
---|
757 | uint32 next_idx; /* next starting index required for enum */
|
---|
758 | uint32 ptr_entries1;
|
---|
759 |
|
---|
760 | uint32 num_entries2;
|
---|
761 | uint32 ptr_entries2;
|
---|
762 |
|
---|
763 | uint32 num_entries3;
|
---|
764 |
|
---|
765 | SAM_ENTRY *sam;
|
---|
766 | UNISTR2 *uni_dom_name;
|
---|
767 |
|
---|
768 | uint32 num_entries4;
|
---|
769 |
|
---|
770 | NTSTATUS status;
|
---|
771 |
|
---|
772 | } SAMR_R_ENUM_DOMAINS;
|
---|
773 |
|
---|
774 | /* SAMR_Q_ENUM_DOM_USERS - SAM rids and names */
|
---|
775 | typedef struct q_samr_enum_dom_users_info
|
---|
776 | {
|
---|
777 | POLICY_HND pol; /* policy handle */
|
---|
778 |
|
---|
779 | uint32 start_idx; /* number of values (0 indicates unlimited?) */
|
---|
780 | uint32 acb_mask; /* 0x0000 indicates all */
|
---|
781 |
|
---|
782 | uint32 max_size; /* 0x0000 ffff */
|
---|
783 |
|
---|
784 | } SAMR_Q_ENUM_DOM_USERS;
|
---|
785 |
|
---|
786 |
|
---|
787 | /* SAMR_R_ENUM_DOM_USERS - SAM rids and names */
|
---|
788 | typedef struct r_samr_enum_dom_users_info
|
---|
789 | {
|
---|
790 | uint32 next_idx; /* next starting index required for enum */
|
---|
791 | uint32 ptr_entries1;
|
---|
792 |
|
---|
793 | uint32 num_entries2;
|
---|
794 | uint32 ptr_entries2;
|
---|
795 |
|
---|
796 | uint32 num_entries3;
|
---|
797 |
|
---|
798 | SAM_ENTRY *sam;
|
---|
799 | UNISTR2 *uni_acct_name;
|
---|
800 |
|
---|
801 | uint32 num_entries4;
|
---|
802 |
|
---|
803 | NTSTATUS status;
|
---|
804 |
|
---|
805 | } SAMR_R_ENUM_DOM_USERS;
|
---|
806 |
|
---|
807 |
|
---|
808 | /* SAMR_Q_ENUM_DOM_GROUPS - SAM rids and names */
|
---|
809 | typedef struct q_samr_enum_dom_groups_info
|
---|
810 | {
|
---|
811 | POLICY_HND pol; /* policy handle */
|
---|
812 |
|
---|
813 | /* this is possibly an enumeration context handle... */
|
---|
814 | uint32 start_idx; /* 0x0000 0000 */
|
---|
815 |
|
---|
816 | uint32 max_size; /* 0x0000 ffff */
|
---|
817 |
|
---|
818 | } SAMR_Q_ENUM_DOM_GROUPS;
|
---|
819 |
|
---|
820 |
|
---|
821 | /* SAMR_R_ENUM_DOM_GROUPS - SAM rids and names */
|
---|
822 | typedef struct r_samr_enum_dom_groups_info
|
---|
823 | {
|
---|
824 | uint32 next_idx;
|
---|
825 | uint32 ptr_entries1;
|
---|
826 |
|
---|
827 | uint32 num_entries2;
|
---|
828 | uint32 ptr_entries2;
|
---|
829 |
|
---|
830 | uint32 num_entries3;
|
---|
831 |
|
---|
832 | SAM_ENTRY *sam;
|
---|
833 | UNISTR2 *uni_grp_name;
|
---|
834 |
|
---|
835 | uint32 num_entries4;
|
---|
836 |
|
---|
837 | NTSTATUS status;
|
---|
838 |
|
---|
839 | } SAMR_R_ENUM_DOM_GROUPS;
|
---|
840 |
|
---|
841 |
|
---|
842 | /* SAMR_Q_ENUM_DOM_ALIASES - SAM rids and names */
|
---|
843 | typedef struct q_samr_enum_dom_aliases_info
|
---|
844 | {
|
---|
845 | POLICY_HND pol; /* policy handle */
|
---|
846 |
|
---|
847 | /* this is possibly an enumeration context handle... */
|
---|
848 | uint32 start_idx; /* 0x0000 0000 */
|
---|
849 |
|
---|
850 | uint32 max_size; /* 0x0000 ffff */
|
---|
851 |
|
---|
852 | } SAMR_Q_ENUM_DOM_ALIASES;
|
---|
853 |
|
---|
854 |
|
---|
855 | /* SAMR_R_ENUM_DOM_ALIASES - SAM rids and names */
|
---|
856 | typedef struct r_samr_enum_dom_aliases_info
|
---|
857 | {
|
---|
858 | uint32 next_idx;
|
---|
859 | uint32 ptr_entries1;
|
---|
860 |
|
---|
861 | uint32 num_entries2;
|
---|
862 | uint32 ptr_entries2;
|
---|
863 |
|
---|
864 | uint32 num_entries3;
|
---|
865 |
|
---|
866 | SAM_ENTRY *sam;
|
---|
867 | UNISTR2 *uni_grp_name;
|
---|
868 |
|
---|
869 | uint32 num_entries4;
|
---|
870 |
|
---|
871 | NTSTATUS status;
|
---|
872 |
|
---|
873 | } SAMR_R_ENUM_DOM_ALIASES;
|
---|
874 |
|
---|
875 |
|
---|
876 | /* -- Level 1 Display Info - User Information -- */
|
---|
877 |
|
---|
878 | typedef struct samr_entry_info1
|
---|
879 | {
|
---|
880 | uint32 user_idx;
|
---|
881 |
|
---|
882 | uint32 rid_user;
|
---|
883 | uint32 acb_info;
|
---|
884 |
|
---|
885 | UNIHDR hdr_acct_name;
|
---|
886 | UNIHDR hdr_user_name;
|
---|
887 | UNIHDR hdr_user_desc;
|
---|
888 |
|
---|
889 | } SAM_ENTRY1;
|
---|
890 |
|
---|
891 | typedef struct samr_str_entry_info1
|
---|
892 | {
|
---|
893 | UNISTR2 uni_acct_name;
|
---|
894 | UNISTR2 uni_full_name;
|
---|
895 | UNISTR2 uni_acct_desc;
|
---|
896 |
|
---|
897 | } SAM_STR1;
|
---|
898 |
|
---|
899 | typedef struct sam_entry_info_1
|
---|
900 | {
|
---|
901 | SAM_ENTRY1 *sam;
|
---|
902 | SAM_STR1 *str;
|
---|
903 |
|
---|
904 | } SAM_DISPINFO_1;
|
---|
905 |
|
---|
906 |
|
---|
907 | /* -- Level 2 Display Info - Trust Account Information -- */
|
---|
908 |
|
---|
909 | typedef struct samr_entry_info2
|
---|
910 | {
|
---|
911 | uint32 user_idx;
|
---|
912 |
|
---|
913 | uint32 rid_user;
|
---|
914 | uint32 acb_info;
|
---|
915 |
|
---|
916 | UNIHDR hdr_srv_name;
|
---|
917 | UNIHDR hdr_srv_desc;
|
---|
918 |
|
---|
919 | } SAM_ENTRY2;
|
---|
920 |
|
---|
921 | typedef struct samr_str_entry_info2
|
---|
922 | {
|
---|
923 | UNISTR2 uni_srv_name;
|
---|
924 | UNISTR2 uni_srv_desc;
|
---|
925 |
|
---|
926 | } SAM_STR2;
|
---|
927 |
|
---|
928 | typedef struct sam_entry_info_2
|
---|
929 | {
|
---|
930 | SAM_ENTRY2 *sam;
|
---|
931 | SAM_STR2 *str;
|
---|
932 |
|
---|
933 | } SAM_DISPINFO_2;
|
---|
934 |
|
---|
935 |
|
---|
936 | /* -- Level 3 Display Info - Domain Group Information -- */
|
---|
937 |
|
---|
938 | typedef struct samr_entry_info3
|
---|
939 | {
|
---|
940 | uint32 grp_idx;
|
---|
941 |
|
---|
942 | uint32 rid_grp;
|
---|
943 | uint32 attr; /* SE_GROUP_xxx, usually 7 */
|
---|
944 |
|
---|
945 | UNIHDR hdr_grp_name;
|
---|
946 | UNIHDR hdr_grp_desc;
|
---|
947 |
|
---|
948 | } SAM_ENTRY3;
|
---|
949 |
|
---|
950 | typedef struct samr_str_entry_info3
|
---|
951 | {
|
---|
952 | UNISTR2 uni_grp_name;
|
---|
953 | UNISTR2 uni_grp_desc;
|
---|
954 |
|
---|
955 | } SAM_STR3;
|
---|
956 |
|
---|
957 | typedef struct sam_entry_info_3
|
---|
958 | {
|
---|
959 | SAM_ENTRY3 *sam;
|
---|
960 | SAM_STR3 *str;
|
---|
961 |
|
---|
962 | } SAM_DISPINFO_3;
|
---|
963 |
|
---|
964 |
|
---|
965 | /* -- Level 4 Display Info - User List (ASCII) -- */
|
---|
966 |
|
---|
967 | typedef struct samr_entry_info4
|
---|
968 | {
|
---|
969 | uint32 user_idx;
|
---|
970 | STRHDR hdr_acct_name;
|
---|
971 |
|
---|
972 | } SAM_ENTRY4;
|
---|
973 |
|
---|
974 | typedef struct samr_str_entry_info4
|
---|
975 | {
|
---|
976 | STRING2 acct_name;
|
---|
977 |
|
---|
978 | } SAM_STR4;
|
---|
979 |
|
---|
980 | typedef struct sam_entry_info_4
|
---|
981 | {
|
---|
982 | SAM_ENTRY4 *sam;
|
---|
983 | SAM_STR4 *str;
|
---|
984 |
|
---|
985 | } SAM_DISPINFO_4;
|
---|
986 |
|
---|
987 |
|
---|
988 | /* -- Level 5 Display Info - Group List (ASCII) -- */
|
---|
989 |
|
---|
990 | typedef struct samr_entry_info5
|
---|
991 | {
|
---|
992 | uint32 grp_idx;
|
---|
993 | STRHDR hdr_grp_name;
|
---|
994 |
|
---|
995 | } SAM_ENTRY5;
|
---|
996 |
|
---|
997 | typedef struct samr_str_entry_info5
|
---|
998 | {
|
---|
999 | STRING2 grp_name;
|
---|
1000 |
|
---|
1001 | } SAM_STR5;
|
---|
1002 |
|
---|
1003 | typedef struct sam_entry_info_5
|
---|
1004 | {
|
---|
1005 | SAM_ENTRY5 *sam;
|
---|
1006 | SAM_STR5 *str;
|
---|
1007 |
|
---|
1008 | } SAM_DISPINFO_5;
|
---|
1009 |
|
---|
1010 |
|
---|
1011 | typedef struct sam_dispinfo_ctr_info
|
---|
1012 | {
|
---|
1013 | union
|
---|
1014 | {
|
---|
1015 | SAM_DISPINFO_1 *info1; /* users/names/descriptions */
|
---|
1016 | SAM_DISPINFO_2 *info2; /* trust accounts */
|
---|
1017 | SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
|
---|
1018 | SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
|
---|
1019 | SAM_DISPINFO_5 *info5; /* group list (ASCII) */
|
---|
1020 | void *info; /* allows assignment without typecasting, */
|
---|
1021 |
|
---|
1022 | } sam;
|
---|
1023 |
|
---|
1024 | } SAM_DISPINFO_CTR;
|
---|
1025 |
|
---|
1026 |
|
---|
1027 | /* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
|
---|
1028 | typedef struct q_samr_query_disp_info
|
---|
1029 | {
|
---|
1030 | POLICY_HND domain_pol;
|
---|
1031 |
|
---|
1032 | uint16 switch_level; /* see SAM_DISPINFO_CTR above */
|
---|
1033 | /* align */
|
---|
1034 |
|
---|
1035 | uint32 start_idx; /* start enumeration index */
|
---|
1036 | uint32 max_entries; /* maximum number of entries to return */
|
---|
1037 | uint32 max_size; /* recommended data size; if exceeded server
|
---|
1038 | should return STATUS_MORE_ENTRIES */
|
---|
1039 |
|
---|
1040 | } SAMR_Q_QUERY_DISPINFO;
|
---|
1041 |
|
---|
1042 |
|
---|
1043 | /* SAMR_R_QUERY_DISPINFO */
|
---|
1044 | typedef struct r_samr_query_dispinfo_info
|
---|
1045 | {
|
---|
1046 | uint32 total_size; /* total data size for all matching entries
|
---|
1047 | (0 = uncalculated) */
|
---|
1048 | uint32 data_size; /* actual data size returned = size of SAM_ENTRY
|
---|
1049 | structures + total length of strings */
|
---|
1050 |
|
---|
1051 | uint16 switch_level; /* see SAM_DISPINFO_CTR above */
|
---|
1052 | /* align */
|
---|
1053 |
|
---|
1054 | uint32 num_entries; /* number of entries returned */
|
---|
1055 | uint32 ptr_entries;
|
---|
1056 | uint32 num_entries2;
|
---|
1057 |
|
---|
1058 | SAM_DISPINFO_CTR *ctr;
|
---|
1059 |
|
---|
1060 | NTSTATUS status;
|
---|
1061 |
|
---|
1062 | } SAMR_R_QUERY_DISPINFO;
|
---|
1063 |
|
---|
1064 | /* SAMR_Q_GET_DISPENUM_INDEX */
|
---|
1065 | typedef struct q_samr_get_dispenum_index
|
---|
1066 | {
|
---|
1067 | POLICY_HND domain_pol;
|
---|
1068 | uint16 switch_level;
|
---|
1069 | LSA_STRING name;
|
---|
1070 |
|
---|
1071 | } SAMR_Q_GET_DISPENUM_INDEX;
|
---|
1072 |
|
---|
1073 | /* SAMR_R_GET_DISPENUM_INDEX */
|
---|
1074 | typedef struct r_samr_get_dispenum_index
|
---|
1075 | {
|
---|
1076 | uint32 idx;
|
---|
1077 | NTSTATUS status;
|
---|
1078 |
|
---|
1079 | } SAMR_R_GET_DISPENUM_INDEX;
|
---|
1080 |
|
---|
1081 | /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
|
---|
1082 | typedef struct q_samr_delete_dom_group_info
|
---|
1083 | {
|
---|
1084 | POLICY_HND group_pol; /* policy handle */
|
---|
1085 |
|
---|
1086 | } SAMR_Q_DELETE_DOM_GROUP;
|
---|
1087 |
|
---|
1088 |
|
---|
1089 | /* SAMR_R_DELETE_DOM_GROUP - delete domain group */
|
---|
1090 | typedef struct r_samr_delete_dom_group_info
|
---|
1091 | {
|
---|
1092 | POLICY_HND pol; /* policy handle */
|
---|
1093 | NTSTATUS status; /* return status */
|
---|
1094 |
|
---|
1095 | } SAMR_R_DELETE_DOM_GROUP;
|
---|
1096 |
|
---|
1097 |
|
---|
1098 | /* SAMR_Q_CREATE_DOM_GROUP - SAM create group */
|
---|
1099 | typedef struct q_samr_create_dom_group_info
|
---|
1100 | {
|
---|
1101 | POLICY_HND pol; /* policy handle */
|
---|
1102 |
|
---|
1103 | UNIHDR hdr_acct_desc;
|
---|
1104 | UNISTR2 uni_acct_desc;
|
---|
1105 |
|
---|
1106 | uint32 access_mask;
|
---|
1107 |
|
---|
1108 | } SAMR_Q_CREATE_DOM_GROUP;
|
---|
1109 |
|
---|
1110 | /* SAMR_R_CREATE_DOM_GROUP - SAM create group */
|
---|
1111 | typedef struct r_samr_create_dom_group_info
|
---|
1112 | {
|
---|
1113 | POLICY_HND pol; /* policy handle */
|
---|
1114 |
|
---|
1115 | uint32 rid;
|
---|
1116 | NTSTATUS status;
|
---|
1117 |
|
---|
1118 | } SAMR_R_CREATE_DOM_GROUP;
|
---|
1119 |
|
---|
1120 | /* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
|
---|
1121 | typedef struct q_samr_query_group_info
|
---|
1122 | {
|
---|
1123 | POLICY_HND pol; /* policy handle */
|
---|
1124 |
|
---|
1125 | uint16 switch_level; /* 0x0001 seen */
|
---|
1126 |
|
---|
1127 | } SAMR_Q_QUERY_GROUPINFO;
|
---|
1128 |
|
---|
1129 | typedef struct samr_group_info1
|
---|
1130 | {
|
---|
1131 | UNIHDR hdr_acct_name;
|
---|
1132 |
|
---|
1133 | uint32 group_attr; /* 0x0000 0003 - group attribute */
|
---|
1134 | uint32 num_members; /* 0x0000 0001 - number of group members? */
|
---|
1135 |
|
---|
1136 | UNIHDR hdr_acct_desc;
|
---|
1137 |
|
---|
1138 | UNISTR2 uni_acct_name;
|
---|
1139 | UNISTR2 uni_acct_desc;
|
---|
1140 |
|
---|
1141 | } GROUP_INFO1;
|
---|
1142 |
|
---|
1143 | typedef struct samr_group_info2
|
---|
1144 | {
|
---|
1145 | uint16 level;
|
---|
1146 | UNIHDR hdr_acct_name;
|
---|
1147 | UNISTR2 uni_acct_name;
|
---|
1148 |
|
---|
1149 | } GROUP_INFO2;
|
---|
1150 |
|
---|
1151 | typedef struct samr_group_info3
|
---|
1152 | {
|
---|
1153 | uint32 group_attr; /* 0x0000 0003 - group attribute */
|
---|
1154 |
|
---|
1155 | } GROUP_INFO3;
|
---|
1156 |
|
---|
1157 | typedef struct samr_group_info4
|
---|
1158 | {
|
---|
1159 | uint16 level;
|
---|
1160 | UNIHDR hdr_acct_desc;
|
---|
1161 | UNISTR2 uni_acct_desc;
|
---|
1162 |
|
---|
1163 | } GROUP_INFO4;
|
---|
1164 |
|
---|
1165 | typedef struct samr_group_info5
|
---|
1166 | {
|
---|
1167 | UNIHDR hdr_acct_name;
|
---|
1168 |
|
---|
1169 | uint32 group_attr; /* 0x0000 0003 - group attribute */
|
---|
1170 | uint32 num_members; /* 0x0000 0001 - number of group members? */
|
---|
1171 |
|
---|
1172 | UNIHDR hdr_acct_desc;
|
---|
1173 |
|
---|
1174 | UNISTR2 uni_acct_name;
|
---|
1175 | UNISTR2 uni_acct_desc;
|
---|
1176 |
|
---|
1177 | } GROUP_INFO5;
|
---|
1178 |
|
---|
1179 |
|
---|
1180 | /* GROUP_INFO_CTR */
|
---|
1181 | typedef struct group_info_ctr
|
---|
1182 | {
|
---|
1183 | uint16 switch_value1;
|
---|
1184 |
|
---|
1185 | union
|
---|
1186 | {
|
---|
1187 | GROUP_INFO1 info1;
|
---|
1188 | GROUP_INFO2 info2;
|
---|
1189 | GROUP_INFO3 info3;
|
---|
1190 | GROUP_INFO4 info4;
|
---|
1191 | GROUP_INFO5 info5;
|
---|
1192 | } group;
|
---|
1193 |
|
---|
1194 | } GROUP_INFO_CTR;
|
---|
1195 |
|
---|
1196 | /* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
|
---|
1197 | typedef struct r_samr_query_groupinfo_info
|
---|
1198 | {
|
---|
1199 | uint32 ptr;
|
---|
1200 | GROUP_INFO_CTR *ctr;
|
---|
1201 |
|
---|
1202 | NTSTATUS status;
|
---|
1203 |
|
---|
1204 | } SAMR_R_QUERY_GROUPINFO;
|
---|
1205 |
|
---|
1206 |
|
---|
1207 | /* SAMR_Q_SET_GROUPINFO - SAM Group Info */
|
---|
1208 | typedef struct q_samr_set_group_info
|
---|
1209 | {
|
---|
1210 | POLICY_HND pol; /* policy handle */
|
---|
1211 | GROUP_INFO_CTR *ctr;
|
---|
1212 |
|
---|
1213 | } SAMR_Q_SET_GROUPINFO;
|
---|
1214 |
|
---|
1215 | /* SAMR_R_SET_GROUPINFO - SAM Group Info */
|
---|
1216 | typedef struct r_samr_set_group_info
|
---|
1217 | {
|
---|
1218 | NTSTATUS status;
|
---|
1219 |
|
---|
1220 | } SAMR_R_SET_GROUPINFO;
|
---|
1221 |
|
---|
1222 |
|
---|
1223 | /* SAMR_Q_DELETE_DOM_ALIAS - delete domain alias */
|
---|
1224 | typedef struct q_samr_delete_dom_alias_info
|
---|
1225 | {
|
---|
1226 | POLICY_HND alias_pol; /* policy handle */
|
---|
1227 |
|
---|
1228 | } SAMR_Q_DELETE_DOM_ALIAS;
|
---|
1229 |
|
---|
1230 |
|
---|
1231 | /* SAMR_R_DELETE_DOM_ALIAS - delete domain alias */
|
---|
1232 | typedef struct r_samr_delete_dom_alias_info
|
---|
1233 | {
|
---|
1234 | POLICY_HND pol; /* policy handle */
|
---|
1235 | NTSTATUS status; /* return status */
|
---|
1236 |
|
---|
1237 | } SAMR_R_DELETE_DOM_ALIAS;
|
---|
1238 |
|
---|
1239 |
|
---|
1240 | /* SAMR_Q_CREATE_DOM_ALIAS - SAM create alias */
|
---|
1241 | typedef struct q_samr_create_dom_alias_info
|
---|
1242 | {
|
---|
1243 | POLICY_HND dom_pol; /* policy handle */
|
---|
1244 |
|
---|
1245 | UNIHDR hdr_acct_desc;
|
---|
1246 | UNISTR2 uni_acct_desc;
|
---|
1247 |
|
---|
1248 | uint32 access_mask; /* 0x001f000f */
|
---|
1249 |
|
---|
1250 | } SAMR_Q_CREATE_DOM_ALIAS;
|
---|
1251 |
|
---|
1252 | /* SAMR_R_CREATE_DOM_ALIAS - SAM create alias */
|
---|
1253 | typedef struct r_samr_create_dom_alias_info
|
---|
1254 | {
|
---|
1255 | POLICY_HND alias_pol; /* policy handle */
|
---|
1256 |
|
---|
1257 | uint32 rid;
|
---|
1258 | NTSTATUS status;
|
---|
1259 |
|
---|
1260 | } SAMR_R_CREATE_DOM_ALIAS;
|
---|
1261 |
|
---|
1262 |
|
---|
1263 | /********************************************************/
|
---|
1264 |
|
---|
1265 | typedef struct {
|
---|
1266 | UNISTR4 name;
|
---|
1267 | UNISTR4 description;
|
---|
1268 | uint32 num_member;
|
---|
1269 | } ALIAS_INFO1;
|
---|
1270 |
|
---|
1271 | typedef struct {
|
---|
1272 | UNISTR4 name;
|
---|
1273 | } ALIAS_INFO2;
|
---|
1274 |
|
---|
1275 | typedef struct {
|
---|
1276 | UNISTR4 description;
|
---|
1277 | } ALIAS_INFO3;
|
---|
1278 |
|
---|
1279 | typedef struct {
|
---|
1280 | POLICY_HND pol; /* policy handle */
|
---|
1281 | uint16 level; /* 0x0003 seen */
|
---|
1282 | } SAMR_Q_QUERY_ALIASINFO;
|
---|
1283 |
|
---|
1284 | typedef struct {
|
---|
1285 | uint16 level;
|
---|
1286 | union {
|
---|
1287 | ALIAS_INFO1 info1;
|
---|
1288 | ALIAS_INFO2 info2;
|
---|
1289 | ALIAS_INFO3 info3;
|
---|
1290 | } alias;
|
---|
1291 | } ALIAS_INFO_CTR;
|
---|
1292 |
|
---|
1293 | typedef struct {
|
---|
1294 | ALIAS_INFO_CTR *ctr;
|
---|
1295 | NTSTATUS status;
|
---|
1296 | } SAMR_R_QUERY_ALIASINFO;
|
---|
1297 |
|
---|
1298 |
|
---|
1299 | /********************************************************/
|
---|
1300 |
|
---|
1301 | typedef struct {
|
---|
1302 | POLICY_HND alias_pol; /* policy handle */
|
---|
1303 | ALIAS_INFO_CTR ctr;
|
---|
1304 | } SAMR_Q_SET_ALIASINFO;
|
---|
1305 |
|
---|
1306 | typedef struct {
|
---|
1307 | NTSTATUS status;
|
---|
1308 | } SAMR_R_SET_ALIASINFO;
|
---|
1309 |
|
---|
1310 |
|
---|
1311 | /********************************************************/
|
---|
1312 |
|
---|
1313 | /* SAMR_Q_QUERY_USERGROUPS - */
|
---|
1314 | typedef struct q_samr_query_usergroup_info
|
---|
1315 | {
|
---|
1316 | POLICY_HND pol; /* policy handle associated with unknown id */
|
---|
1317 |
|
---|
1318 | } SAMR_Q_QUERY_USERGROUPS;
|
---|
1319 |
|
---|
1320 | /* SAMR_R_QUERY_USERGROUPS - probably a get sam info */
|
---|
1321 | typedef struct r_samr_query_usergroup_info
|
---|
1322 | {
|
---|
1323 | uint32 ptr_0; /* pointer */
|
---|
1324 | uint32 num_entries; /* number of RID groups */
|
---|
1325 | uint32 ptr_1; /* pointer */
|
---|
1326 | uint32 num_entries2; /* number of RID groups */
|
---|
1327 |
|
---|
1328 | DOM_GID *gid; /* group info */
|
---|
1329 |
|
---|
1330 | NTSTATUS status; /* return status */
|
---|
1331 |
|
---|
1332 | } SAMR_R_QUERY_USERGROUPS;
|
---|
1333 |
|
---|
1334 | /* SAM_USERINFO_CTR - sam user info */
|
---|
1335 | typedef struct sam_userinfo_ctr_info
|
---|
1336 | {
|
---|
1337 | uint16 switch_value;
|
---|
1338 |
|
---|
1339 | union
|
---|
1340 | {
|
---|
1341 | SAM_USER_INFO_7 *id7;
|
---|
1342 | SAM_USER_INFO_9 *id9;
|
---|
1343 | SAM_USER_INFO_16 *id16;
|
---|
1344 | SAM_USER_INFO_17 *id17;
|
---|
1345 | SAM_USER_INFO_18 *id18;
|
---|
1346 | SAM_USER_INFO_20 *id20;
|
---|
1347 | SAM_USER_INFO_21 *id21;
|
---|
1348 | SAM_USER_INFO_23 *id23;
|
---|
1349 | SAM_USER_INFO_24 *id24;
|
---|
1350 | SAM_USER_INFO_25 *id25;
|
---|
1351 | SAM_USER_INFO_26 *id26;
|
---|
1352 | void* id; /* to make typecasting easy */
|
---|
1353 |
|
---|
1354 | } info;
|
---|
1355 |
|
---|
1356 | } SAM_USERINFO_CTR;
|
---|
1357 |
|
---|
1358 |
|
---|
1359 | /* SAMR_Q_SET_USERINFO2 - set sam info */
|
---|
1360 | typedef struct q_samr_set_user_info2
|
---|
1361 | {
|
---|
1362 | POLICY_HND pol; /* policy handle associated with user */
|
---|
1363 | uint16 switch_value; /* 0x0010 */
|
---|
1364 |
|
---|
1365 | SAM_USERINFO_CTR *ctr;
|
---|
1366 |
|
---|
1367 | } SAMR_Q_SET_USERINFO2;
|
---|
1368 |
|
---|
1369 | /* SAMR_R_SET_USERINFO2 - set sam info */
|
---|
1370 | typedef struct r_samr_set_user_info2
|
---|
1371 | {
|
---|
1372 | NTSTATUS status; /* return status */
|
---|
1373 |
|
---|
1374 | } SAMR_R_SET_USERINFO2;
|
---|
1375 |
|
---|
1376 | /* SAMR_Q_SET_USERINFO - set sam info */
|
---|
1377 | typedef struct q_samr_set_user_info
|
---|
1378 | {
|
---|
1379 | POLICY_HND pol; /* policy handle associated with user */
|
---|
1380 | uint16 switch_value;
|
---|
1381 | SAM_USERINFO_CTR *ctr;
|
---|
1382 |
|
---|
1383 | } SAMR_Q_SET_USERINFO;
|
---|
1384 |
|
---|
1385 | /* SAMR_R_SET_USERINFO - set sam info */
|
---|
1386 | typedef struct r_samr_set_user_info
|
---|
1387 | {
|
---|
1388 | NTSTATUS status; /* return status */
|
---|
1389 |
|
---|
1390 | } SAMR_R_SET_USERINFO;
|
---|
1391 |
|
---|
1392 |
|
---|
1393 | /* SAMR_Q_QUERY_USERINFO - probably a get sam info */
|
---|
1394 | typedef struct q_samr_query_user_info
|
---|
1395 | {
|
---|
1396 | POLICY_HND pol; /* policy handle associated with unknown id */
|
---|
1397 | uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
|
---|
1398 |
|
---|
1399 | } SAMR_Q_QUERY_USERINFO;
|
---|
1400 |
|
---|
1401 | /* SAMR_R_QUERY_USERINFO - probably a get sam info */
|
---|
1402 | typedef struct r_samr_query_user_info
|
---|
1403 | {
|
---|
1404 | uint32 ptr; /* pointer */
|
---|
1405 | SAM_USERINFO_CTR *ctr;
|
---|
1406 |
|
---|
1407 | NTSTATUS status; /* return status */
|
---|
1408 |
|
---|
1409 | } SAMR_R_QUERY_USERINFO;
|
---|
1410 |
|
---|
1411 |
|
---|
1412 | /****************************************************************************
|
---|
1413 | SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
|
---|
1414 |
|
---|
1415 | the policy handle allocated by an "samr open secret" call is associated
|
---|
1416 | with a SID. this policy handle is what is queried here, *not* the SID
|
---|
1417 | itself. the response to the lookup rids is relative to this SID.
|
---|
1418 | *****************************************************************************/
|
---|
1419 | /* SAMR_Q_QUERY_USERALIASES */
|
---|
1420 | typedef struct q_samr_query_useraliases_info
|
---|
1421 | {
|
---|
1422 | POLICY_HND pol; /* policy handle */
|
---|
1423 |
|
---|
1424 | uint32 num_sids1; /* number of rids being looked up */
|
---|
1425 | uint32 ptr; /* buffer pointer */
|
---|
1426 | uint32 num_sids2; /* number of rids being looked up */
|
---|
1427 |
|
---|
1428 | uint32 *ptr_sid; /* pointers to sids to be looked up */
|
---|
1429 | DOM_SID2 *sid ; /* sids to be looked up. */
|
---|
1430 |
|
---|
1431 | } SAMR_Q_QUERY_USERALIASES;
|
---|
1432 |
|
---|
1433 |
|
---|
1434 | /* SAMR_R_QUERY_USERALIASES */
|
---|
1435 | typedef struct r_samr_query_useraliases_info
|
---|
1436 | {
|
---|
1437 | uint32 num_entries;
|
---|
1438 | uint32 ptr; /* undocumented buffer pointer */
|
---|
1439 |
|
---|
1440 | uint32 num_entries2;
|
---|
1441 | uint32 *rid; /* domain RIDs being looked up */
|
---|
1442 |
|
---|
1443 | NTSTATUS status; /* return code */
|
---|
1444 |
|
---|
1445 | } SAMR_R_QUERY_USERALIASES;
|
---|
1446 |
|
---|
1447 |
|
---|
1448 | /****************************************************************************
|
---|
1449 | SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
|
---|
1450 | *****************************************************************************/
|
---|
1451 | /* SAMR_Q_LOOKUP_NAMES */
|
---|
1452 | typedef struct q_samr_lookup_names_info
|
---|
1453 | {
|
---|
1454 | POLICY_HND pol; /* policy handle */
|
---|
1455 |
|
---|
1456 | uint32 num_names1; /* number of names being looked up */
|
---|
1457 | uint32 flags; /* 0x0000 03e8 - unknown */
|
---|
1458 | uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
|
---|
1459 | uint32 num_names2; /* number of names being looked up */
|
---|
1460 |
|
---|
1461 | UNIHDR *hdr_name; /* unicode account name header */
|
---|
1462 | UNISTR2 *uni_name; /* unicode account name string */
|
---|
1463 |
|
---|
1464 | } SAMR_Q_LOOKUP_NAMES;
|
---|
1465 |
|
---|
1466 |
|
---|
1467 | /* SAMR_R_LOOKUP_NAMES */
|
---|
1468 | typedef struct r_samr_lookup_names_info
|
---|
1469 | {
|
---|
1470 | uint32 num_rids1; /* number of aliases being looked up */
|
---|
1471 | uint32 ptr_rids; /* pointer to aliases */
|
---|
1472 | uint32 num_rids2; /* number of aliases being looked up */
|
---|
1473 |
|
---|
1474 | uint32 *rids; /* rids */
|
---|
1475 |
|
---|
1476 | uint32 num_types1; /* number of users in aliases being looked up */
|
---|
1477 | uint32 ptr_types; /* pointer to users in aliases */
|
---|
1478 | uint32 num_types2; /* number of users in aliases being looked up */
|
---|
1479 |
|
---|
1480 | uint32 *types; /* SID_ENUM type */
|
---|
1481 |
|
---|
1482 | NTSTATUS status; /* return code */
|
---|
1483 |
|
---|
1484 | } SAMR_R_LOOKUP_NAMES;
|
---|
1485 |
|
---|
1486 |
|
---|
1487 | /****************************************************************************
|
---|
1488 | SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
|
---|
1489 |
|
---|
1490 | called to resolve domain RID groups.
|
---|
1491 | *****************************************************************************/
|
---|
1492 | /* SAMR_Q_LOOKUP_RIDS */
|
---|
1493 | typedef struct q_samr_lookup_rids_info
|
---|
1494 | {
|
---|
1495 | POLICY_HND pol; /* policy handle */
|
---|
1496 |
|
---|
1497 | uint32 num_rids1; /* number of rids being looked up */
|
---|
1498 | uint32 flags; /* 0x0000 03e8 - unknown */
|
---|
1499 | uint32 ptr; /* 0x0000 0000 - 32 bit unknown */
|
---|
1500 | uint32 num_rids2; /* number of rids being looked up */
|
---|
1501 |
|
---|
1502 | uint32 *rid; /* domain RIDs being looked up */
|
---|
1503 |
|
---|
1504 | } SAMR_Q_LOOKUP_RIDS;
|
---|
1505 |
|
---|
1506 |
|
---|
1507 | /****************************************************************************
|
---|
1508 | SAMR_R_LOOKUP_RIDS - do a conversion from group RID to names
|
---|
1509 |
|
---|
1510 | *****************************************************************************/
|
---|
1511 | /* SAMR_R_LOOKUP_RIDS */
|
---|
1512 | typedef struct r_samr_lookup_rids_info
|
---|
1513 | {
|
---|
1514 | uint32 num_names1; /* number of aliases being looked up */
|
---|
1515 | uint32 ptr_names; /* pointer to aliases */
|
---|
1516 | uint32 num_names2; /* number of aliases being looked up */
|
---|
1517 |
|
---|
1518 | UNIHDR *hdr_name; /* unicode account name header */
|
---|
1519 | UNISTR2 *uni_name; /* unicode account name string */
|
---|
1520 |
|
---|
1521 | uint32 num_types1; /* number of users in aliases being looked up */
|
---|
1522 | uint32 ptr_types; /* pointer to users in aliases */
|
---|
1523 | uint32 num_types2; /* number of users in aliases being looked up */
|
---|
1524 |
|
---|
1525 | uint32 *type; /* SID_ENUM type */
|
---|
1526 |
|
---|
1527 | NTSTATUS status;
|
---|
1528 |
|
---|
1529 | } SAMR_R_LOOKUP_RIDS;
|
---|
1530 |
|
---|
1531 |
|
---|
1532 | /* SAMR_Q_OPEN_USER - probably an open */
|
---|
1533 | typedef struct q_samr_open_user_info
|
---|
1534 | {
|
---|
1535 | POLICY_HND domain_pol; /* policy handle */
|
---|
1536 | uint32 access_mask; /* 32 bit unknown - 0x02011b */
|
---|
1537 | uint32 user_rid; /* user RID */
|
---|
1538 |
|
---|
1539 | } SAMR_Q_OPEN_USER;
|
---|
1540 |
|
---|
1541 |
|
---|
1542 | /* SAMR_R_OPEN_USER - probably an open */
|
---|
1543 | typedef struct r_samr_open_user_info
|
---|
1544 | {
|
---|
1545 | POLICY_HND user_pol; /* policy handle associated with unknown id */
|
---|
1546 | NTSTATUS status; /* return status */
|
---|
1547 |
|
---|
1548 | } SAMR_R_OPEN_USER;
|
---|
1549 |
|
---|
1550 |
|
---|
1551 | /* SAMR_Q_CREATE_USER - probably a create */
|
---|
1552 | typedef struct q_samr_create_user_info
|
---|
1553 | {
|
---|
1554 | POLICY_HND domain_pol; /* policy handle */
|
---|
1555 |
|
---|
1556 | UNIHDR hdr_name; /* unicode account name header */
|
---|
1557 | UNISTR2 uni_name; /* unicode account name */
|
---|
1558 |
|
---|
1559 | uint32 acb_info; /* account control info */
|
---|
1560 | uint32 access_mask; /* 0xe005 00b0 */
|
---|
1561 |
|
---|
1562 | } SAMR_Q_CREATE_USER;
|
---|
1563 |
|
---|
1564 |
|
---|
1565 | /* SAMR_R_CREATE_USER - probably a create */
|
---|
1566 | typedef struct r_samr_create_user_info
|
---|
1567 | {
|
---|
1568 | POLICY_HND user_pol; /* policy handle associated with user */
|
---|
1569 |
|
---|
1570 | uint32 access_granted;
|
---|
1571 | uint32 user_rid; /* user RID */
|
---|
1572 | NTSTATUS status; /* return status */
|
---|
1573 |
|
---|
1574 | } SAMR_R_CREATE_USER;
|
---|
1575 |
|
---|
1576 |
|
---|
1577 | /* SAMR_Q_DELETE_DOM_USER - delete domain user */
|
---|
1578 | typedef struct q_samr_delete_dom_user_info
|
---|
1579 | {
|
---|
1580 | POLICY_HND user_pol; /* policy handle */
|
---|
1581 |
|
---|
1582 | } SAMR_Q_DELETE_DOM_USER;
|
---|
1583 |
|
---|
1584 |
|
---|
1585 | /* SAMR_R_DELETE_DOM_USER - delete domain user */
|
---|
1586 | typedef struct r_samr_delete_dom_user_info
|
---|
1587 | {
|
---|
1588 | POLICY_HND pol; /* policy handle */
|
---|
1589 | NTSTATUS status; /* return status */
|
---|
1590 |
|
---|
1591 | } SAMR_R_DELETE_DOM_USER;
|
---|
1592 |
|
---|
1593 |
|
---|
1594 | /* SAMR_Q_QUERY_GROUPMEM - query group members */
|
---|
1595 | typedef struct q_samr_query_groupmem_info
|
---|
1596 | {
|
---|
1597 | POLICY_HND group_pol; /* policy handle */
|
---|
1598 |
|
---|
1599 | } SAMR_Q_QUERY_GROUPMEM;
|
---|
1600 |
|
---|
1601 |
|
---|
1602 | /* SAMR_R_QUERY_GROUPMEM - query group members */
|
---|
1603 | typedef struct r_samr_query_groupmem_info
|
---|
1604 | {
|
---|
1605 | uint32 ptr;
|
---|
1606 | uint32 num_entries;
|
---|
1607 |
|
---|
1608 | uint32 ptr_rids;
|
---|
1609 | uint32 ptr_attrs;
|
---|
1610 |
|
---|
1611 | uint32 num_rids;
|
---|
1612 | uint32 *rid;
|
---|
1613 |
|
---|
1614 | uint32 num_attrs;
|
---|
1615 | uint32 *attr;
|
---|
1616 |
|
---|
1617 | NTSTATUS status;
|
---|
1618 |
|
---|
1619 | } SAMR_R_QUERY_GROUPMEM;
|
---|
1620 |
|
---|
1621 |
|
---|
1622 | /* SAMR_Q_DEL_GROUPMEM - probably an del group member */
|
---|
1623 | typedef struct q_samr_del_group_mem_info
|
---|
1624 | {
|
---|
1625 | POLICY_HND pol; /* policy handle */
|
---|
1626 | uint32 rid; /* rid */
|
---|
1627 |
|
---|
1628 | } SAMR_Q_DEL_GROUPMEM;
|
---|
1629 |
|
---|
1630 |
|
---|
1631 | /* SAMR_R_DEL_GROUPMEM - probably an del group member */
|
---|
1632 | typedef struct r_samr_del_group_mem_info
|
---|
1633 | {
|
---|
1634 | NTSTATUS status; /* return status */
|
---|
1635 |
|
---|
1636 | } SAMR_R_DEL_GROUPMEM;
|
---|
1637 |
|
---|
1638 |
|
---|
1639 | /* SAMR_Q_ADD_GROUPMEM - probably an add group member */
|
---|
1640 | typedef struct q_samr_add_group_mem_info
|
---|
1641 | {
|
---|
1642 | POLICY_HND pol; /* policy handle */
|
---|
1643 |
|
---|
1644 | uint32 rid; /* rid */
|
---|
1645 | uint32 unknown; /* 0x0000 0005 */
|
---|
1646 |
|
---|
1647 | } SAMR_Q_ADD_GROUPMEM;
|
---|
1648 |
|
---|
1649 |
|
---|
1650 | /* SAMR_R_ADD_GROUPMEM - probably an add group member */
|
---|
1651 | typedef struct r_samr_add_group_mem_info
|
---|
1652 | {
|
---|
1653 | NTSTATUS status; /* return status */
|
---|
1654 |
|
---|
1655 | } SAMR_R_ADD_GROUPMEM;
|
---|
1656 |
|
---|
1657 |
|
---|
1658 | /* SAMR_Q_OPEN_GROUP - probably an open */
|
---|
1659 | typedef struct q_samr_open_group_info
|
---|
1660 | {
|
---|
1661 | POLICY_HND domain_pol; /* policy handle */
|
---|
1662 | uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
|
---|
1663 | uint32 rid_group; /* rid */
|
---|
1664 |
|
---|
1665 | } SAMR_Q_OPEN_GROUP;
|
---|
1666 |
|
---|
1667 |
|
---|
1668 | /* SAMR_R_OPEN_GROUP - probably an open */
|
---|
1669 | typedef struct r_samr_open_group_info
|
---|
1670 | {
|
---|
1671 | POLICY_HND pol; /* policy handle */
|
---|
1672 | NTSTATUS status; /* return status */
|
---|
1673 |
|
---|
1674 | } SAMR_R_OPEN_GROUP;
|
---|
1675 |
|
---|
1676 |
|
---|
1677 | /* SAMR_Q_QUERY_ALIASMEM - query alias members */
|
---|
1678 | typedef struct q_samr_query_aliasmem_info
|
---|
1679 | {
|
---|
1680 | POLICY_HND alias_pol; /* policy handle */
|
---|
1681 |
|
---|
1682 | } SAMR_Q_QUERY_ALIASMEM;
|
---|
1683 |
|
---|
1684 |
|
---|
1685 | /* SAMR_R_QUERY_ALIASMEM - query alias members */
|
---|
1686 | typedef struct r_samr_query_aliasmem_info
|
---|
1687 | {
|
---|
1688 | uint32 num_sids;
|
---|
1689 | uint32 ptr;
|
---|
1690 | uint32 num_sids1;
|
---|
1691 |
|
---|
1692 | DOM_SID2 *sid;
|
---|
1693 |
|
---|
1694 | NTSTATUS status;
|
---|
1695 |
|
---|
1696 | } SAMR_R_QUERY_ALIASMEM;
|
---|
1697 |
|
---|
1698 |
|
---|
1699 | /* SAMR_Q_ADD_ALIASMEM - add alias member */
|
---|
1700 | typedef struct q_samr_add_alias_mem_info
|
---|
1701 | {
|
---|
1702 | POLICY_HND alias_pol; /* policy handle */
|
---|
1703 |
|
---|
1704 | DOM_SID2 sid; /* member sid to be added to the alias */
|
---|
1705 |
|
---|
1706 | } SAMR_Q_ADD_ALIASMEM;
|
---|
1707 |
|
---|
1708 |
|
---|
1709 | /* SAMR_R_ADD_ALIASMEM - add alias member */
|
---|
1710 | typedef struct r_samr_add_alias_mem_info
|
---|
1711 | {
|
---|
1712 | NTSTATUS status; /* return status */
|
---|
1713 |
|
---|
1714 | } SAMR_R_ADD_ALIASMEM;
|
---|
1715 |
|
---|
1716 |
|
---|
1717 | /* SAMR_Q_DEL_ALIASMEM - add an add alias member */
|
---|
1718 | typedef struct q_samr_del_alias_mem_info
|
---|
1719 | {
|
---|
1720 | POLICY_HND alias_pol; /* policy handle */
|
---|
1721 |
|
---|
1722 | DOM_SID2 sid; /* member sid to be added to alias */
|
---|
1723 |
|
---|
1724 | } SAMR_Q_DEL_ALIASMEM;
|
---|
1725 |
|
---|
1726 |
|
---|
1727 | /* SAMR_R_DEL_ALIASMEM - delete alias member */
|
---|
1728 | typedef struct r_samr_del_alias_mem_info
|
---|
1729 | {
|
---|
1730 | NTSTATUS status; /* return status */
|
---|
1731 |
|
---|
1732 | } SAMR_R_DEL_ALIASMEM;
|
---|
1733 |
|
---|
1734 |
|
---|
1735 |
|
---|
1736 | /* SAMR_Q_OPEN_ALIAS - probably an open */
|
---|
1737 | typedef struct q_samr_open_alias_info
|
---|
1738 | {
|
---|
1739 | POLICY_HND dom_pol;
|
---|
1740 |
|
---|
1741 | uint32 access_mask;
|
---|
1742 | uint32 rid_alias;
|
---|
1743 |
|
---|
1744 | } SAMR_Q_OPEN_ALIAS;
|
---|
1745 |
|
---|
1746 |
|
---|
1747 | /* SAMR_R_OPEN_ALIAS - probably an open */
|
---|
1748 | typedef struct r_samr_open_alias_info
|
---|
1749 | {
|
---|
1750 | POLICY_HND pol; /* policy handle */
|
---|
1751 | NTSTATUS status; /* return status */
|
---|
1752 |
|
---|
1753 | } SAMR_R_OPEN_ALIAS;
|
---|
1754 |
|
---|
1755 |
|
---|
1756 | /* SAMR_Q_CONNECT_ANON - probably an open */
|
---|
1757 | typedef struct q_samr_connect_anon_info {
|
---|
1758 | uint32 ptr; /* ptr? */
|
---|
1759 | uint16 unknown_0; /* Only pushed if ptr is non-zero. */
|
---|
1760 | uint32 access_mask;
|
---|
1761 | } SAMR_Q_CONNECT_ANON;
|
---|
1762 |
|
---|
1763 | /* SAMR_R_CONNECT_ANON - probably an open */
|
---|
1764 | typedef struct r_samr_connect_anon_info
|
---|
1765 | {
|
---|
1766 | POLICY_HND connect_pol; /* policy handle */
|
---|
1767 | NTSTATUS status; /* return status */
|
---|
1768 |
|
---|
1769 | } SAMR_R_CONNECT_ANON;
|
---|
1770 |
|
---|
1771 | /* SAMR_Q_CONNECT - probably an open */
|
---|
1772 | typedef struct q_samr_connect_info
|
---|
1773 | {
|
---|
1774 | uint32 ptr_srv_name; /* pointer (to server name?) */
|
---|
1775 | UNISTR2 uni_srv_name; /* unicode server name starting with '\\' */
|
---|
1776 |
|
---|
1777 | uint32 access_mask;
|
---|
1778 |
|
---|
1779 | } SAMR_Q_CONNECT;
|
---|
1780 |
|
---|
1781 |
|
---|
1782 | /* SAMR_R_CONNECT - probably an open */
|
---|
1783 | typedef struct r_samr_connect_info
|
---|
1784 | {
|
---|
1785 | POLICY_HND connect_pol; /* policy handle */
|
---|
1786 | NTSTATUS status; /* return status */
|
---|
1787 |
|
---|
1788 | } SAMR_R_CONNECT;
|
---|
1789 |
|
---|
1790 | /* SAMR_Q_CONNECT4 */
|
---|
1791 | typedef struct q_samr_connect4_info
|
---|
1792 | {
|
---|
1793 | uint32 ptr_srv_name; /* pointer to server name */
|
---|
1794 | UNISTR2 uni_srv_name;
|
---|
1795 |
|
---|
1796 | uint32 unk_0; /* possible server name type, 1 for IP num, 2 for name */
|
---|
1797 | uint32 access_mask;
|
---|
1798 | } SAMR_Q_CONNECT4;
|
---|
1799 |
|
---|
1800 | /* SAMR_R_CONNECT4 - same format as connect */
|
---|
1801 | typedef struct r_samr_connect_info SAMR_R_CONNECT4;
|
---|
1802 |
|
---|
1803 | /* SAMR_Q_CONNECT5 */
|
---|
1804 | typedef struct q_samr_connect5_info
|
---|
1805 | {
|
---|
1806 | uint32 ptr_srv_name; /* pointer to server name */
|
---|
1807 | UNISTR2 uni_srv_name;
|
---|
1808 | uint32 access_mask;
|
---|
1809 | uint32 level;
|
---|
1810 | /* These following are acutally a level dependent
|
---|
1811 | value. Fudge it for now. JRA */
|
---|
1812 | uint32 info1_unk1;
|
---|
1813 | uint32 info1_unk2;
|
---|
1814 | } SAMR_Q_CONNECT5;
|
---|
1815 |
|
---|
1816 | /* SAMR_R_CONNECT5 */
|
---|
1817 | typedef struct r_samr_connect_info5
|
---|
1818 | {
|
---|
1819 | uint32 level;
|
---|
1820 | uint32 info1_unk1;
|
---|
1821 | uint32 info1_unk2;
|
---|
1822 | POLICY_HND connect_pol; /* policy handle */
|
---|
1823 | NTSTATUS status; /* return status */
|
---|
1824 |
|
---|
1825 | } SAMR_R_CONNECT5;
|
---|
1826 |
|
---|
1827 |
|
---|
1828 | /* SAMR_Q_GET_DOM_PWINFO */
|
---|
1829 | typedef struct q_samr_get_dom_pwinfo
|
---|
1830 | {
|
---|
1831 | uint32 ptr;
|
---|
1832 | UNIHDR hdr_srv_name;
|
---|
1833 | UNISTR2 uni_srv_name;
|
---|
1834 |
|
---|
1835 | } SAMR_Q_GET_DOM_PWINFO;
|
---|
1836 |
|
---|
1837 | #define DOMAIN_PASSWORD_COMPLEX 0x00000001
|
---|
1838 | #define DOMAIN_PASSWORD_NO_ANON_CHANGE 0x00000002
|
---|
1839 | #define DOMAIN_PASSWORD_NO_CLEAR_CHANGE 0x00000004
|
---|
1840 | #define DOMAIN_LOCKOUT_ADMINS 0x00000008
|
---|
1841 | #define DOMAIN_PASSWORD_STORE_CLEARTEXT 0x00000010
|
---|
1842 | #define DOMAIN_REFUSE_PASSWORD_CHANGE 0x00000020
|
---|
1843 |
|
---|
1844 | /* SAMR_R_GET_DOM_PWINFO */
|
---|
1845 | typedef struct r_samr_get_dom_pwinfo
|
---|
1846 | {
|
---|
1847 | uint16 min_pwd_length;
|
---|
1848 | uint32 password_properties;
|
---|
1849 | NTSTATUS status;
|
---|
1850 |
|
---|
1851 | } SAMR_R_GET_DOM_PWINFO;
|
---|
1852 |
|
---|
1853 | /* SAMR_ENC_PASSWD */
|
---|
1854 | typedef struct enc_passwd_info
|
---|
1855 | {
|
---|
1856 | uint32 ptr;
|
---|
1857 | uint8 pass[516];
|
---|
1858 |
|
---|
1859 | } SAMR_ENC_PASSWD;
|
---|
1860 |
|
---|
1861 | /* SAMR_ENC_HASH */
|
---|
1862 | typedef struct enc_hash_info
|
---|
1863 | {
|
---|
1864 | uint32 ptr;
|
---|
1865 | uint8 hash[16];
|
---|
1866 |
|
---|
1867 | } SAMR_ENC_HASH;
|
---|
1868 |
|
---|
1869 | /* SAMR_Q_CHGPASSWD_USER */
|
---|
1870 | typedef struct q_samr_chgpasswd_user_info
|
---|
1871 | {
|
---|
1872 | uint32 ptr_0;
|
---|
1873 |
|
---|
1874 | UNIHDR hdr_dest_host; /* server name unicode header */
|
---|
1875 | UNISTR2 uni_dest_host; /* server name unicode string */
|
---|
1876 |
|
---|
1877 | UNIHDR hdr_user_name; /* username unicode string header */
|
---|
1878 | UNISTR2 uni_user_name; /* username unicode string */
|
---|
1879 |
|
---|
1880 | SAMR_ENC_PASSWD nt_newpass;
|
---|
1881 | SAMR_ENC_HASH nt_oldhash;
|
---|
1882 |
|
---|
1883 | uint32 unknown; /* 0x0000 0001 */
|
---|
1884 |
|
---|
1885 | SAMR_ENC_PASSWD lm_newpass;
|
---|
1886 | SAMR_ENC_HASH lm_oldhash;
|
---|
1887 |
|
---|
1888 | } SAMR_Q_CHGPASSWD_USER;
|
---|
1889 |
|
---|
1890 | /* SAMR_R_CHGPASSWD_USER */
|
---|
1891 | typedef struct r_samr_chgpasswd_user_info
|
---|
1892 | {
|
---|
1893 | NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
|
---|
1894 |
|
---|
1895 | } SAMR_R_CHGPASSWD_USER;
|
---|
1896 |
|
---|
1897 | /* SAMR_Q_CHGPASSWD3 */
|
---|
1898 | typedef struct q_samr_chgpasswd_user3
|
---|
1899 | {
|
---|
1900 | uint32 ptr_0;
|
---|
1901 |
|
---|
1902 | UNIHDR hdr_dest_host; /* server name unicode header */
|
---|
1903 | UNISTR2 uni_dest_host; /* server name unicode string */
|
---|
1904 |
|
---|
1905 | UNIHDR hdr_user_name; /* username unicode string header */
|
---|
1906 | UNISTR2 uni_user_name; /* username unicode string */
|
---|
1907 |
|
---|
1908 | SAMR_ENC_PASSWD nt_newpass;
|
---|
1909 | SAMR_ENC_HASH nt_oldhash;
|
---|
1910 |
|
---|
1911 | uint32 lm_change; /* 0x0000 0001 */
|
---|
1912 |
|
---|
1913 | SAMR_ENC_PASSWD lm_newpass;
|
---|
1914 | SAMR_ENC_HASH lm_oldhash;
|
---|
1915 |
|
---|
1916 | SAMR_ENC_PASSWD password3;
|
---|
1917 |
|
---|
1918 | } SAMR_Q_CHGPASSWD_USER3;
|
---|
1919 |
|
---|
1920 | #define REJECT_REASON_OTHER 0x00000000
|
---|
1921 | #define REJECT_REASON_TOO_SHORT 0x00000001
|
---|
1922 | #define REJECT_REASON_IN_HISTORY 0x00000002
|
---|
1923 | #define REJECT_REASON_NOT_COMPLEX 0x00000005
|
---|
1924 |
|
---|
1925 | /* SAMR_CHANGE_REJECT */
|
---|
1926 | typedef struct samr_change_reject
|
---|
1927 | {
|
---|
1928 | uint32 reject_reason;
|
---|
1929 | uint32 unknown1;
|
---|
1930 | uint32 unknown2;
|
---|
1931 |
|
---|
1932 | } SAMR_CHANGE_REJECT;
|
---|
1933 |
|
---|
1934 | /* SAMR_R_CHGPASSWD3 */
|
---|
1935 | typedef struct r_samr_chgpasswd_user3
|
---|
1936 | {
|
---|
1937 | uint32 ptr_info;
|
---|
1938 | uint32 ptr_reject;
|
---|
1939 | SAM_UNK_INFO_1 *info;
|
---|
1940 | SAMR_CHANGE_REJECT *reject;
|
---|
1941 | NTSTATUS status; /* 0 == OK, C000006A (NT_STATUS_WRONG_PASSWORD) */
|
---|
1942 |
|
---|
1943 | } SAMR_R_CHGPASSWD_USER3;
|
---|
1944 |
|
---|
1945 |
|
---|
1946 |
|
---|
1947 | /* SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN */
|
---|
1948 | typedef struct q_samr_remove_sid_foreign_domain_info
|
---|
1949 | {
|
---|
1950 | POLICY_HND dom_pol; /* policy handle */
|
---|
1951 | DOM_SID2 sid; /* SID */
|
---|
1952 |
|
---|
1953 | } SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN;
|
---|
1954 |
|
---|
1955 |
|
---|
1956 | /* SAMR_R_REMOVE_SID_FOREIGN_DOMAIN */
|
---|
1957 | typedef struct r_samr_remove_sid_foreign_domain_info
|
---|
1958 | {
|
---|
1959 | NTSTATUS status; /* return status */
|
---|
1960 |
|
---|
1961 | } SAMR_R_REMOVE_SID_FOREIGN_DOMAIN;
|
---|
1962 |
|
---|
1963 |
|
---|
1964 |
|
---|
1965 | /* these are from the old rpc_samr.h - they are needed while the merge
|
---|
1966 | is still going on */
|
---|
1967 | #define MAX_SAM_SIDS 15
|
---|
1968 |
|
---|
1969 | /* DOM_SID3 - security id */
|
---|
1970 | typedef struct sid_info_3
|
---|
1971 | {
|
---|
1972 | uint16 len; /* length, bytes, including length of len :-) */
|
---|
1973 | /* uint8 pad[2]; */
|
---|
1974 |
|
---|
1975 | DOM_SID sid;
|
---|
1976 |
|
---|
1977 | } DOM_SID3;
|
---|
1978 |
|
---|
1979 | /* SAMR_Q_QUERY_DOMAIN_INFO2 */
|
---|
1980 | typedef struct q_samr_query_domain_info2
|
---|
1981 | {
|
---|
1982 | POLICY_HND domain_pol; /* policy handle */
|
---|
1983 | uint16 switch_value;
|
---|
1984 |
|
---|
1985 | } SAMR_Q_QUERY_DOMAIN_INFO2;
|
---|
1986 |
|
---|
1987 | /* SAMR_R_QUERY_DOMAIN_INFO2 */
|
---|
1988 | typedef struct r_samr_query_domain_info2
|
---|
1989 | {
|
---|
1990 | uint32 ptr_0;
|
---|
1991 | uint16 switch_value;
|
---|
1992 | SAM_UNK_CTR *ctr;
|
---|
1993 | NTSTATUS status; /* return status */
|
---|
1994 |
|
---|
1995 | } SAMR_R_QUERY_DOMAIN_INFO2;
|
---|
1996 |
|
---|
1997 | /* SAMR_Q_SET_DOMAIN_INFO */
|
---|
1998 | typedef struct q_samr_set_domain_info
|
---|
1999 | {
|
---|
2000 | POLICY_HND domain_pol; /* policy handle */
|
---|
2001 | uint16 switch_value0;
|
---|
2002 | uint16 switch_value;
|
---|
2003 | SAM_UNK_CTR *ctr;
|
---|
2004 |
|
---|
2005 | } SAMR_Q_SET_DOMAIN_INFO;
|
---|
2006 |
|
---|
2007 | /* SAMR_R_SET_DOMAIN_INFO */
|
---|
2008 | typedef struct r_samr_set_domain_info
|
---|
2009 | {
|
---|
2010 | NTSTATUS status; /* return status */
|
---|
2011 |
|
---|
2012 | } SAMR_R_SET_DOMAIN_INFO;
|
---|
2013 |
|
---|
2014 | #endif /* _RPC_SAMR_H */
|
---|