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