s3-samr: remove duplicate copies of SAM user specific access rights.
[ira/wip.git] / source3 / librpc / gen_ndr / samr.h
1 /* header auto-generated by pidl */
2
3 #include <stdint.h>
4
5 #include "librpc/gen_ndr/misc.h"
6 #include "librpc/gen_ndr/lsa.h"
7 #include "librpc/gen_ndr/security.h"
8 #ifndef _HEADER_samr
9 #define _HEADER_samr
10
11 #define SAMR_ACCESS_ALL_ACCESS  ( 0x0000003F )
12 #define GENERIC_RIGHTS_SAM_ALL_ACCESS   ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_ACCESS_ALL_ACCESS) )
13 #define GENERIC_RIGHTS_SAM_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_ACCESS_ENUM_DOMAINS) )
14 #define GENERIC_RIGHTS_SAM_WRITE        ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ACCESS_CREATE_DOMAIN|SAMR_ACCESS_INITIALIZE_SERVER|SAMR_ACCESS_SHUTDOWN_SERVER) )
15 #define GENERIC_RIGHTS_SAM_EXECUTE      ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ACCESS_OPEN_DOMAIN|SAMR_ACCESS_CONNECT_TO_SERVER) )
16 #define SAMR_USER_ACCESS_ALL_ACCESS     ( 0x000007FF )
17 #define GENERIC_RIGHTS_USER_ALL_ACCESS  ( (STANDARD_RIGHTS_REQUIRED_ACCESS|SAMR_USER_ACCESS_ALL_ACCESS) )
18 #define GENERIC_RIGHTS_USER_READ        ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP|SAMR_USER_ACCESS_GET_GROUPS|SAMR_USER_ACCESS_GET_ATTRIBUTES|SAMR_USER_ACCESS_GET_LOGONINFO|SAMR_USER_ACCESS_GET_LOCALE) )
19 #define GENERIC_RIGHTS_USER_WRITE       ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_SET_LOC_COM|SAMR_USER_ACCESS_SET_ATTRIBUTES|SAMR_USER_ACCESS_SET_PASSWORD|SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP) )
20 #define GENERIC_RIGHTS_USER_EXECUTE     ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_USER_ACCESS_CHANGE_PASSWORD|SAMR_USER_ACCESS_GET_NAME_ETC) )
21 #define MAX_SAM_ENTRIES_W2K     ( 0x400 )
22 #define MAX_SAM_ENTRIES_W95     ( 50 )
23 #define SAMR_ENUM_USERS_MULTIPLIER      ( 54 )
24 #define PASS_MUST_CHANGE_AT_NEXT_LOGON  ( 0x01 )
25 #define PASS_DONT_CHANGE_AT_NEXT_LOGON  ( 0x00 )
26 /* bitmap samr_AcctFlags */
27 #define ACB_DISABLED ( 0x00000001 )
28 #define ACB_HOMDIRREQ ( 0x00000002 )
29 #define ACB_PWNOTREQ ( 0x00000004 )
30 #define ACB_TEMPDUP ( 0x00000008 )
31 #define ACB_NORMAL ( 0x00000010 )
32 #define ACB_MNS ( 0x00000020 )
33 #define ACB_DOMTRUST ( 0x00000040 )
34 #define ACB_WSTRUST ( 0x00000080 )
35 #define ACB_SVRTRUST ( 0x00000100 )
36 #define ACB_PWNOEXP ( 0x00000200 )
37 #define ACB_AUTOLOCK ( 0x00000400 )
38 #define ACB_ENC_TXT_PWD_ALLOWED ( 0x00000800 )
39 #define ACB_SMARTCARD_REQUIRED ( 0x00001000 )
40 #define ACB_TRUSTED_FOR_DELEGATION ( 0x00002000 )
41 #define ACB_NOT_DELEGATED ( 0x00004000 )
42 #define ACB_USE_DES_KEY_ONLY ( 0x00008000 )
43 #define ACB_DONT_REQUIRE_PREAUTH ( 0x00010000 )
44 #define ACB_PW_EXPIRED ( 0x00020000 )
45 #define ACB_NO_AUTH_DATA_REQD ( 0x00080000 )
46
47 /* bitmap samr_ConnectAccessMask */
48 #define SAMR_ACCESS_CONNECT_TO_SERVER ( 0x00000001 )
49 #define SAMR_ACCESS_SHUTDOWN_SERVER ( 0x00000002 )
50 #define SAMR_ACCESS_INITIALIZE_SERVER ( 0x00000004 )
51 #define SAMR_ACCESS_CREATE_DOMAIN ( 0x00000008 )
52 #define SAMR_ACCESS_ENUM_DOMAINS ( 0x00000010 )
53 #define SAMR_ACCESS_OPEN_DOMAIN ( 0x00000020 )
54
55 /* bitmap samr_UserAccessMask */
56 #define SAMR_USER_ACCESS_GET_NAME_ETC ( 0x00000001 )
57 #define SAMR_USER_ACCESS_GET_LOCALE ( 0x00000002 )
58 #define SAMR_USER_ACCESS_SET_LOC_COM ( 0x00000004 )
59 #define SAMR_USER_ACCESS_GET_LOGONINFO ( 0x00000008 )
60 #define SAMR_USER_ACCESS_GET_ATTRIBUTES ( 0x00000010 )
61 #define SAMR_USER_ACCESS_SET_ATTRIBUTES ( 0x00000020 )
62 #define SAMR_USER_ACCESS_CHANGE_PASSWORD ( 0x00000040 )
63 #define SAMR_USER_ACCESS_SET_PASSWORD ( 0x00000080 )
64 #define SAMR_USER_ACCESS_GET_GROUPS ( 0x00000100 )
65 #define SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP ( 0x00000200 )
66 #define SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP ( 0x00000400 )
67
68 /* bitmap samr_DomainAccessMask */
69 #define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1 ( 0x00000001 )
70 #define SAMR_DOMAIN_ACCESS_SET_INFO_1 ( 0x00000002 )
71 #define SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2 ( 0x00000004 )
72 #define SAMR_DOMAIN_ACCESS_SET_INFO_2 ( 0x00000008 )
73 #define SAMR_DOMAIN_ACCESS_CREATE_USER ( 0x00000010 )
74 #define SAMR_DOMAIN_ACCESS_CREATE_GROUP ( 0x00000020 )
75 #define SAMR_DOMAIN_ACCESS_CREATE_ALIAS ( 0x00000040 )
76 #define SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS ( 0x00000080 )
77 #define SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS ( 0x00000100 )
78 #define SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT ( 0x00000200 )
79 #define SAMR_DOMAIN_ACCESS_SET_INFO_3 ( 0x00000400 )
80
81 /* bitmap samr_GroupAccessMask */
82 #define SAMR_GROUP_ACCESS_LOOKUP_INFO ( 0x00000001 )
83 #define SAMR_GROUP_ACCESS_SET_INFO ( 0x00000002 )
84 #define SAMR_GROUP_ACCESS_ADD_MEMBER ( 0x00000004 )
85 #define SAMR_GROUP_ACCESS_REMOVE_MEMBER ( 0x00000008 )
86 #define SAMR_GROUP_ACCESS_GET_MEMBERS ( 0x00000010 )
87
88 /* bitmap samr_AliasAccessMask */
89 #define SAMR_ALIAS_ACCESS_ADD_MEMBER ( 0x00000001 )
90 #define SAMR_ALIAS_ACCESS_REMOVE_MEMBER ( 0x00000002 )
91 #define SAMR_ALIAS_ACCESS_GET_MEMBERS ( 0x00000004 )
92 #define SAMR_ALIAS_ACCESS_LOOKUP_INFO ( 0x00000008 )
93 #define SAMR_ALIAS_ACCESS_SET_INFO ( 0x00000010 )
94
95 struct samr_SamEntry {
96         uint32_t idx;
97         struct lsa_String name;
98 };
99
100 struct samr_SamArray {
101         uint32_t count;
102         struct samr_SamEntry *entries;/* [unique,size_is(count)] */
103 };
104
105 enum samr_Role
106 #ifndef USE_UINT_ENUMS
107  {
108         SAMR_ROLE_STANDALONE=0,
109         SAMR_ROLE_DOMAIN_MEMBER=1,
110         SAMR_ROLE_DOMAIN_BDC=2,
111         SAMR_ROLE_DOMAIN_PDC=3
112 }
113 #else
114  { __donnot_use_enum_samr_Role=0x7FFFFFFF}
115 #define SAMR_ROLE_STANDALONE ( 0 )
116 #define SAMR_ROLE_DOMAIN_MEMBER ( 1 )
117 #define SAMR_ROLE_DOMAIN_BDC ( 2 )
118 #define SAMR_ROLE_DOMAIN_PDC ( 3 )
119 #endif
120 ;
121
122 /* bitmap samr_PasswordProperties */
123 #define DOMAIN_PASSWORD_COMPLEX ( 0x00000001 )
124 #define DOMAIN_PASSWORD_NO_ANON_CHANGE ( 0x00000002 )
125 #define DOMAIN_PASSWORD_NO_CLEAR_CHANGE ( 0x00000004 )
126 #define DOMAIN_PASSWORD_LOCKOUT_ADMINS ( 0x00000008 )
127 #define DOMAIN_PASSWORD_STORE_CLEARTEXT ( 0x00000010 )
128 #define DOMAIN_REFUSE_PASSWORD_CHANGE ( 0x00000020 )
129
130 struct samr_DomInfo1 {
131         uint16_t min_password_length;
132         uint16_t password_history_length;
133         uint32_t password_properties;
134         int64_t max_password_age;
135         int64_t min_password_age;
136 };
137
138 struct samr_DomGeneralInformation {
139         NTTIME force_logoff_time;
140         struct lsa_String oem_information;
141         struct lsa_String domain_name;
142         struct lsa_String primary;
143         uint64_t sequence_num;
144         uint32_t unknown2;
145         enum samr_Role role;
146         uint32_t unknown3;
147         uint32_t num_users;
148         uint32_t num_groups;
149         uint32_t num_aliases;
150 };
151
152 struct samr_DomInfo3 {
153         NTTIME force_logoff_time;
154 };
155
156 struct samr_DomOEMInformation {
157         struct lsa_String oem_information;
158 };
159
160 struct samr_DomInfo5 {
161         struct lsa_String domain_name;
162 };
163
164 struct samr_DomInfo6 {
165         struct lsa_String primary;
166 };
167
168 struct samr_DomInfo7 {
169         enum samr_Role role;
170 };
171
172 struct samr_DomInfo8 {
173         uint64_t sequence_num;
174         NTTIME domain_create_time;
175 };
176
177 struct samr_DomInfo9 {
178         uint32_t unknown;
179 };
180
181 struct samr_DomGeneralInformation2 {
182         struct samr_DomGeneralInformation general;
183         uint64_t lockout_duration;
184         uint64_t lockout_window;
185         uint16_t lockout_threshold;
186 };
187
188 struct samr_DomInfo12 {
189         uint64_t lockout_duration;
190         uint64_t lockout_window;
191         uint16_t lockout_threshold;
192 };
193
194 struct samr_DomInfo13 {
195         uint64_t sequence_num;
196         NTTIME domain_create_time;
197         uint32_t unknown1;
198         uint32_t unknown2;
199 };
200
201 union samr_DomainInfo {
202         struct samr_DomInfo1 info1;/* [case] */
203         struct samr_DomGeneralInformation general;/* [case(2)] */
204         struct samr_DomInfo3 info3;/* [case(3)] */
205         struct samr_DomOEMInformation oem;/* [case(4)] */
206         struct samr_DomInfo5 info5;/* [case(5)] */
207         struct samr_DomInfo6 info6;/* [case(6)] */
208         struct samr_DomInfo7 info7;/* [case(7)] */
209         struct samr_DomInfo8 info8;/* [case(8)] */
210         struct samr_DomInfo9 info9;/* [case(9)] */
211         struct samr_DomGeneralInformation2 general2;/* [case(11)] */
212         struct samr_DomInfo12 info12;/* [case(12)] */
213         struct samr_DomInfo13 info13;/* [case(13)] */
214 }/* [switch_type(uint16)] */;
215
216 struct samr_Ids {
217         uint32_t count;/* [range(0,1024)] */
218         uint32_t *ids;/* [unique,size_is(count)] */
219 };
220
221 /* bitmap samr_GroupAttrs */
222 #define SE_GROUP_MANDATORY ( 0x00000001 )
223 #define SE_GROUP_ENABLED_BY_DEFAULT ( 0x00000002 )
224 #define SE_GROUP_ENABLED ( 0x00000004 )
225 #define SE_GROUP_OWNER ( 0x00000008 )
226 #define SE_GROUP_USE_FOR_DENY_ONLY ( 0x00000010 )
227 #define SE_GROUP_RESOURCE ( 0x20000000 )
228 #define SE_GROUP_LOGON_ID ( 0xC0000000 )
229
230 struct samr_GroupInfoAll {
231         struct lsa_String name;
232         uint32_t attributes;
233         uint32_t num_members;
234         struct lsa_String description;
235 };
236
237 struct samr_GroupInfoAttributes {
238         uint32_t attributes;
239 };
240
241 struct samr_GroupInfoDescription {
242         struct lsa_String description;
243 };
244
245 enum samr_GroupInfoEnum
246 #ifndef USE_UINT_ENUMS
247  {
248         GROUPINFOALL=1,
249         GROUPINFONAME=2,
250         GROUPINFOATTRIBUTES=3,
251         GROUPINFODESCRIPTION=4,
252         GROUPINFOALL2=5
253 }
254 #else
255  { __donnot_use_enum_samr_GroupInfoEnum=0x7FFFFFFF}
256 #define GROUPINFOALL ( 1 )
257 #define GROUPINFONAME ( 2 )
258 #define GROUPINFOATTRIBUTES ( 3 )
259 #define GROUPINFODESCRIPTION ( 4 )
260 #define GROUPINFOALL2 ( 5 )
261 #endif
262 ;
263
264 union samr_GroupInfo {
265         struct samr_GroupInfoAll all;/* [case(GROUPINFOALL)] */
266         struct lsa_String name;/* [case(GROUPINFONAME)] */
267         struct samr_GroupInfoAttributes attributes;/* [case(GROUPINFOATTRIBUTES)] */
268         struct lsa_String description;/* [case(GROUPINFODESCRIPTION)] */
269         struct samr_GroupInfoAll all2;/* [case(GROUPINFOALL2)] */
270 }/* [switch_type(samr_GroupInfoEnum)] */;
271
272 struct samr_RidTypeArray {
273         uint32_t count;
274         uint32_t *rids;/* [unique,size_is(count)] */
275         uint32_t *types;/* [unique,size_is(count)] */
276 };
277
278 struct samr_AliasInfoAll {
279         struct lsa_String name;
280         uint32_t num_members;
281         struct lsa_String description;
282 };
283
284 enum samr_AliasInfoEnum
285 #ifndef USE_UINT_ENUMS
286  {
287         ALIASINFOALL=1,
288         ALIASINFONAME=2,
289         ALIASINFODESCRIPTION=3
290 }
291 #else
292  { __donnot_use_enum_samr_AliasInfoEnum=0x7FFFFFFF}
293 #define ALIASINFOALL ( 1 )
294 #define ALIASINFONAME ( 2 )
295 #define ALIASINFODESCRIPTION ( 3 )
296 #endif
297 ;
298
299 union samr_AliasInfo {
300         struct samr_AliasInfoAll all;/* [case(ALIASINFOALL)] */
301         struct lsa_String name;/* [case(ALIASINFONAME)] */
302         struct lsa_String description;/* [case(ALIASINFODESCRIPTION)] */
303 }/* [switch_type(samr_AliasInfoEnum)] */;
304
305 struct samr_UserInfo1 {
306         struct lsa_String account_name;
307         struct lsa_String full_name;
308         uint32_t primary_gid;
309         struct lsa_String description;
310         struct lsa_String comment;
311 };
312
313 struct samr_UserInfo2 {
314         struct lsa_String comment;
315         struct lsa_String unknown;
316         uint16_t country_code;
317         uint16_t code_page;
318 };
319
320 struct samr_LogonHours {
321         uint16_t units_per_week;
322         uint8_t *bits;/* [unique,length_is(units_per_week/8),size_is(1260)] */
323 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
324
325 struct samr_UserInfo3 {
326         struct lsa_String account_name;
327         struct lsa_String full_name;
328         uint32_t rid;
329         uint32_t primary_gid;
330         struct lsa_String home_directory;
331         struct lsa_String home_drive;
332         struct lsa_String logon_script;
333         struct lsa_String profile_path;
334         struct lsa_String workstations;
335         NTTIME last_logon;
336         NTTIME last_logoff;
337         NTTIME last_password_change;
338         NTTIME allow_password_change;
339         NTTIME force_password_change;
340         struct samr_LogonHours logon_hours;
341         uint16_t bad_password_count;
342         uint16_t logon_count;
343         uint32_t acct_flags;
344 };
345
346 struct samr_UserInfo4 {
347         struct samr_LogonHours logon_hours;
348 };
349
350 struct samr_UserInfo5 {
351         struct lsa_String account_name;
352         struct lsa_String full_name;
353         uint32_t rid;
354         uint32_t primary_gid;
355         struct lsa_String home_directory;
356         struct lsa_String home_drive;
357         struct lsa_String logon_script;
358         struct lsa_String profile_path;
359         struct lsa_String description;
360         struct lsa_String workstations;
361         NTTIME last_logon;
362         NTTIME last_logoff;
363         struct samr_LogonHours logon_hours;
364         uint16_t bad_password_count;
365         uint16_t logon_count;
366         NTTIME last_password_change;
367         NTTIME acct_expiry;
368         uint32_t acct_flags;
369 };
370
371 struct samr_UserInfo6 {
372         struct lsa_String account_name;
373         struct lsa_String full_name;
374 };
375
376 struct samr_UserInfo7 {
377         struct lsa_String account_name;
378 };
379
380 struct samr_UserInfo8 {
381         struct lsa_String full_name;
382 };
383
384 struct samr_UserInfo9 {
385         uint32_t primary_gid;
386 };
387
388 struct samr_UserInfo10 {
389         struct lsa_String home_directory;
390         struct lsa_String home_drive;
391 };
392
393 struct samr_UserInfo11 {
394         struct lsa_String logon_script;
395 };
396
397 struct samr_UserInfo12 {
398         struct lsa_String profile_path;
399 };
400
401 struct samr_UserInfo13 {
402         struct lsa_String description;
403 };
404
405 struct samr_UserInfo14 {
406         struct lsa_String workstations;
407 };
408
409 struct samr_UserInfo16 {
410         uint32_t acct_flags;
411 };
412
413 struct samr_UserInfo17 {
414         NTTIME acct_expiry;
415 };
416
417 struct samr_Password {
418         uint8_t hash[16];
419 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
420
421 struct samr_UserInfo18 {
422         struct samr_Password lm_pwd;
423         struct samr_Password nt_pwd;
424         uint8_t lm_pwd_active;
425         uint8_t nt_pwd_active;
426 };
427
428 struct samr_UserInfo20 {
429         struct lsa_BinaryString parameters;
430 };
431
432 /* bitmap samr_FieldsPresent */
433 #define SAMR_FIELD_ACCOUNT_NAME ( 0x00000001 )
434 #define SAMR_FIELD_FULL_NAME ( 0x00000002 )
435 #define SAMR_FIELD_RID ( 0x00000004 )
436 #define SAMR_FIELD_PRIMARY_GID ( 0x00000008 )
437 #define SAMR_FIELD_DESCRIPTION ( 0x00000010 )
438 #define SAMR_FIELD_COMMENT ( 0x00000020 )
439 #define SAMR_FIELD_HOME_DIRECTORY ( 0x00000040 )
440 #define SAMR_FIELD_HOME_DRIVE ( 0x00000080 )
441 #define SAMR_FIELD_LOGON_SCRIPT ( 0x00000100 )
442 #define SAMR_FIELD_PROFILE_PATH ( 0x00000200 )
443 #define SAMR_FIELD_WORKSTATIONS ( 0x00000400 )
444 #define SAMR_FIELD_LAST_LOGON ( 0x00000800 )
445 #define SAMR_FIELD_LAST_LOGOFF ( 0x00001000 )
446 #define SAMR_FIELD_LOGON_HOURS ( 0x00002000 )
447 #define SAMR_FIELD_BAD_PWD_COUNT ( 0x00004000 )
448 #define SAMR_FIELD_NUM_LOGONS ( 0x00008000 )
449 #define SAMR_FIELD_ALLOW_PWD_CHANGE ( 0x00010000 )
450 #define SAMR_FIELD_FORCE_PWD_CHANGE ( 0x00020000 )
451 #define SAMR_FIELD_LAST_PWD_CHANGE ( 0x00040000 )
452 #define SAMR_FIELD_ACCT_EXPIRY ( 0x00080000 )
453 #define SAMR_FIELD_ACCT_FLAGS ( 0x00100000 )
454 #define SAMR_FIELD_PARAMETERS ( 0x00200000 )
455 #define SAMR_FIELD_COUNTRY_CODE ( 0x00400000 )
456 #define SAMR_FIELD_CODE_PAGE ( 0x00800000 )
457 #define SAMR_FIELD_PASSWORD ( 0x01000000 )
458 #define SAMR_FIELD_PASSWORD2 ( 0x02000000 )
459 #define SAMR_FIELD_PRIVATE_DATA ( 0x04000000 )
460 #define SAMR_FIELD_EXPIRED_FLAG ( 0x08000000 )
461 #define SAMR_FIELD_SEC_DESC ( 0x10000000 )
462 #define SAMR_FIELD_OWF_PWD ( 0x20000000 )
463
464 struct samr_UserInfo21 {
465         NTTIME last_logon;
466         NTTIME last_logoff;
467         NTTIME last_password_change;
468         NTTIME acct_expiry;
469         NTTIME allow_password_change;
470         NTTIME force_password_change;
471         struct lsa_String account_name;
472         struct lsa_String full_name;
473         struct lsa_String home_directory;
474         struct lsa_String home_drive;
475         struct lsa_String logon_script;
476         struct lsa_String profile_path;
477         struct lsa_String description;
478         struct lsa_String workstations;
479         struct lsa_String comment;
480         struct lsa_BinaryString parameters;
481         struct lsa_String unknown1;
482         struct lsa_String unknown2;
483         struct lsa_String unknown3;
484         uint32_t buf_count;
485         uint8_t *buffer;/* [unique,size_is(buf_count)] */
486         uint32_t rid;
487         uint32_t primary_gid;
488         uint32_t acct_flags;
489         uint32_t fields_present;
490         struct samr_LogonHours logon_hours;
491         uint16_t bad_password_count;
492         uint16_t logon_count;
493         uint16_t country_code;
494         uint16_t code_page;
495         uint8_t nt_password_set;
496         uint8_t lm_password_set;
497         uint8_t password_expired;
498         uint8_t unknown4;
499 };
500
501 struct samr_CryptPassword {
502         uint8_t data[516];
503 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
504
505 struct samr_UserInfo23 {
506         struct samr_UserInfo21 info;
507         struct samr_CryptPassword password;
508 };
509
510 struct samr_UserInfo24 {
511         struct samr_CryptPassword password;
512         uint8_t pw_len;
513 };
514
515 struct samr_CryptPasswordEx {
516         uint8_t data[532];
517 }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
518
519 struct samr_UserInfo25 {
520         struct samr_UserInfo21 info;
521         struct samr_CryptPasswordEx password;
522 };
523
524 struct samr_UserInfo26 {
525         struct samr_CryptPasswordEx password;
526         uint8_t pw_len;
527 };
528
529 union samr_UserInfo {
530         struct samr_UserInfo1 info1;/* [case] */
531         struct samr_UserInfo2 info2;/* [case(2)] */
532         struct samr_UserInfo3 info3;/* [case(3)] */
533         struct samr_UserInfo4 info4;/* [case(4)] */
534         struct samr_UserInfo5 info5;/* [case(5)] */
535         struct samr_UserInfo6 info6;/* [case(6)] */
536         struct samr_UserInfo7 info7;/* [case(7)] */
537         struct samr_UserInfo8 info8;/* [case(8)] */
538         struct samr_UserInfo9 info9;/* [case(9)] */
539         struct samr_UserInfo10 info10;/* [case(10)] */
540         struct samr_UserInfo11 info11;/* [case(11)] */
541         struct samr_UserInfo12 info12;/* [case(12)] */
542         struct samr_UserInfo13 info13;/* [case(13)] */
543         struct samr_UserInfo14 info14;/* [case(14)] */
544         struct samr_UserInfo16 info16;/* [case(16)] */
545         struct samr_UserInfo17 info17;/* [case(17)] */
546         struct samr_UserInfo18 info18;/* [case(18)] */
547         struct samr_UserInfo20 info20;/* [case(20)] */
548         struct samr_UserInfo21 info21;/* [case(21)] */
549         struct samr_UserInfo23 info23;/* [case(23)] */
550         struct samr_UserInfo24 info24;/* [case(24)] */
551         struct samr_UserInfo25 info25;/* [case(25)] */
552         struct samr_UserInfo26 info26;/* [case(26)] */
553 }/* [switch_type(uint16)] */;
554
555 struct samr_RidWithAttribute {
556         uint32_t rid;
557         uint32_t attributes;
558 }/* [public] */;
559
560 struct samr_RidWithAttributeArray {
561         uint32_t count;
562         struct samr_RidWithAttribute *rids;/* [unique,size_is(count)] */
563 }/* [public] */;
564
565 struct samr_DispEntryGeneral {
566         uint32_t idx;
567         uint32_t rid;
568         uint32_t acct_flags;
569         struct lsa_String account_name;
570         struct lsa_String description;
571         struct lsa_String full_name;
572 };
573
574 struct samr_DispInfoGeneral {
575         uint32_t count;
576         struct samr_DispEntryGeneral *entries;/* [unique,size_is(count)] */
577 };
578
579 struct samr_DispEntryFull {
580         uint32_t idx;
581         uint32_t rid;
582         uint32_t acct_flags;
583         struct lsa_String account_name;
584         struct lsa_String description;
585 };
586
587 struct samr_DispInfoFull {
588         uint32_t count;
589         struct samr_DispEntryFull *entries;/* [unique,size_is(count)] */
590 };
591
592 struct samr_DispEntryFullGroup {
593         uint32_t idx;
594         uint32_t rid;
595         uint32_t acct_flags;
596         struct lsa_String account_name;
597         struct lsa_String description;
598 };
599
600 struct samr_DispInfoFullGroups {
601         uint32_t count;
602         struct samr_DispEntryFullGroup *entries;/* [unique,size_is(count)] */
603 };
604
605 struct samr_DispEntryAscii {
606         uint32_t idx;
607         struct lsa_AsciiStringLarge account_name;
608 };
609
610 struct samr_DispInfoAscii {
611         uint32_t count;
612         struct samr_DispEntryAscii *entries;/* [unique,size_is(count)] */
613 };
614
615 union samr_DispInfo {
616         struct samr_DispInfoGeneral info1;/* [case] */
617         struct samr_DispInfoFull info2;/* [case(2)] */
618         struct samr_DispInfoFullGroups info3;/* [case(3)] */
619         struct samr_DispInfoAscii info4;/* [case(4)] */
620         struct samr_DispInfoAscii info5;/* [case(5)] */
621 }/* [switch_type(uint16)] */;
622
623 struct samr_PwInfo {
624         uint16_t min_password_length;
625         uint32_t password_properties;
626 };
627
628 enum samr_ConnectVersion
629 #ifndef USE_UINT_ENUMS
630  {
631         SAMR_CONNECT_PRE_W2K=1,
632         SAMR_CONNECT_W2K=2,
633         SAMR_CONNECT_AFTER_W2K=3
634 }
635 #else
636  { __donnot_use_enum_samr_ConnectVersion=0x7FFFFFFF}
637 #define SAMR_CONNECT_PRE_W2K ( 1 )
638 #define SAMR_CONNECT_W2K ( 2 )
639 #define SAMR_CONNECT_AFTER_W2K ( 3 )
640 #endif
641 ;
642
643 enum samr_RejectReason;
644
645 struct samr_ChangeReject {
646         enum samr_RejectReason reason;
647         uint32_t unknown1;
648         uint32_t unknown2;
649 };
650
651 struct samr_ConnectInfo1 {
652         enum samr_ConnectVersion client_version;
653         uint32_t unknown2;
654 };
655
656 union samr_ConnectInfo {
657         struct samr_ConnectInfo1 info1;/* [case] */
658 };
659
660 /* bitmap samr_ValidateFieldsPresent */
661 #define SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET ( 0x00000001 )
662 #define SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME ( 0x00000002 )
663 #define SAMR_VALIDATE_FIELD_LOCKOUT_TIME ( 0x00000004 )
664 #define SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT ( 0x00000008 )
665 #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH ( 0x00000010 )
666 #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY ( 0x00000020 )
667
668 enum samr_ValidatePasswordLevel
669 #ifndef USE_UINT_ENUMS
670  {
671         NetValidateAuthentication=1,
672         NetValidatePasswordChange=2,
673         NetValidatePasswordReset=3
674 }
675 #else
676  { __donnot_use_enum_samr_ValidatePasswordLevel=0x7FFFFFFF}
677 #define NetValidateAuthentication ( 1 )
678 #define NetValidatePasswordChange ( 2 )
679 #define NetValidatePasswordReset ( 3 )
680 #endif
681 ;
682
683 enum samr_ValidationStatus
684 #ifndef USE_UINT_ENUMS
685  {
686         SAMR_VALIDATION_STATUS_SUCCESS=0,
687         SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1,
688         SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2,
689         SAMR_VALIDATION_STATUS_BAD_PASSWORD=4,
690         SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5,
691         SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6,
692         SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7,
693         SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8,
694         SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9
695 }
696 #else
697  { __donnot_use_enum_samr_ValidationStatus=0x7FFFFFFF}
698 #define SAMR_VALIDATION_STATUS_SUCCESS ( 0 )
699 #define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 )
700 #define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 )
701 #define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 )
702 #define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 )
703 #define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 )
704 #define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 )
705 #define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 )
706 #define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 )
707 #endif
708 ;
709
710 struct samr_ValidationBlob {
711         uint32_t length;
712         uint8_t *data;/* [unique,size_is(length)] */
713 };
714
715 struct samr_ValidatePasswordInfo {
716         uint32_t fields_present;
717         NTTIME last_password_change;
718         NTTIME bad_password_time;
719         NTTIME lockout_time;
720         uint32_t bad_pwd_count;
721         uint32_t pwd_history_len;
722         struct samr_ValidationBlob *pwd_history;/* [unique,size_is(pwd_history_len)] */
723 };
724
725 struct samr_ValidatePasswordRepCtr {
726         struct samr_ValidatePasswordInfo info;
727         enum samr_ValidationStatus status;
728 };
729
730 union samr_ValidatePasswordRep {
731         struct samr_ValidatePasswordRepCtr ctr1;/* [case] */
732         struct samr_ValidatePasswordRepCtr ctr2;/* [case(2)] */
733         struct samr_ValidatePasswordRepCtr ctr3;/* [case(3)] */
734 }/* [switch_type(uint16)] */;
735
736 struct samr_ValidatePasswordReq3 {
737         struct samr_ValidatePasswordInfo info;
738         struct lsa_StringLarge password;
739         struct lsa_StringLarge account;
740         struct samr_ValidationBlob hash;
741         uint8_t pwd_must_change_at_next_logon;
742         uint8_t clear_lockout;
743 };
744
745 struct samr_ValidatePasswordReq2 {
746         struct samr_ValidatePasswordInfo info;
747         struct lsa_StringLarge password;
748         struct lsa_StringLarge account;
749         struct samr_ValidationBlob hash;
750         uint8_t password_matched;
751 };
752
753 struct samr_ValidatePasswordReq1 {
754         struct samr_ValidatePasswordInfo info;
755         uint8_t password_matched;
756 };
757
758 union samr_ValidatePasswordReq {
759         struct samr_ValidatePasswordReq1 req1;/* [case] */
760         struct samr_ValidatePasswordReq2 req2;/* [case(2)] */
761         struct samr_ValidatePasswordReq3 req3;/* [case(3)] */
762 }/* [switch_type(uint16)] */;
763
764
765 struct samr_Connect {
766         struct {
767                 uint16_t *system_name;/* [unique] */
768                 uint32_t access_mask;
769         } in;
770
771         struct {
772                 struct policy_handle *connect_handle;/* [ref] */
773                 NTSTATUS result;
774         } out;
775
776 };
777
778
779 struct samr_Close {
780         struct {
781                 struct policy_handle *handle;/* [ref] */
782         } in;
783
784         struct {
785                 struct policy_handle *handle;/* [ref] */
786                 NTSTATUS result;
787         } out;
788
789 };
790
791
792 struct samr_SetSecurity {
793         struct {
794                 struct policy_handle *handle;/* [ref] */
795                 uint32_t sec_info;
796                 struct sec_desc_buf *sdbuf;/* [ref] */
797         } in;
798
799         struct {
800                 NTSTATUS result;
801         } out;
802
803 };
804
805
806 struct samr_QuerySecurity {
807         struct {
808                 struct policy_handle *handle;/* [ref] */
809                 uint32_t sec_info;
810         } in;
811
812         struct {
813                 struct sec_desc_buf **sdbuf;/* [ref] */
814                 NTSTATUS result;
815         } out;
816
817 };
818
819
820 struct samr_Shutdown {
821         struct {
822                 struct policy_handle *connect_handle;/* [ref] */
823         } in;
824
825         struct {
826                 NTSTATUS result;
827         } out;
828
829 };
830
831
832 struct samr_LookupDomain {
833         struct {
834                 struct policy_handle *connect_handle;/* [ref] */
835                 struct lsa_String *domain_name;/* [ref] */
836         } in;
837
838         struct {
839                 struct dom_sid2 **sid;/* [ref] */
840                 NTSTATUS result;
841         } out;
842
843 };
844
845
846 struct samr_EnumDomains {
847         struct {
848                 struct policy_handle *connect_handle;/* [ref] */
849                 uint32_t buf_size;
850                 uint32_t *resume_handle;/* [ref] */
851         } in;
852
853         struct {
854                 struct samr_SamArray **sam;/* [ref] */
855                 uint32_t *num_entries;/* [ref] */
856                 uint32_t *resume_handle;/* [ref] */
857                 NTSTATUS result;
858         } out;
859
860 };
861
862
863 struct samr_OpenDomain {
864         struct {
865                 struct policy_handle *connect_handle;/* [ref] */
866                 uint32_t access_mask;
867                 struct dom_sid2 *sid;/* [ref] */
868         } in;
869
870         struct {
871                 struct policy_handle *domain_handle;/* [ref] */
872                 NTSTATUS result;
873         } out;
874
875 };
876
877
878 struct samr_QueryDomainInfo {
879         struct {
880                 struct policy_handle *domain_handle;/* [ref] */
881                 uint16_t level;
882         } in;
883
884         struct {
885                 union samr_DomainInfo **info;/* [ref,switch_is(level)] */
886                 NTSTATUS result;
887         } out;
888
889 };
890
891
892 struct samr_SetDomainInfo {
893         struct {
894                 struct policy_handle *domain_handle;/* [ref] */
895                 uint16_t level;
896                 union samr_DomainInfo *info;/* [ref,switch_is(level)] */
897         } in;
898
899         struct {
900                 NTSTATUS result;
901         } out;
902
903 };
904
905
906 struct samr_CreateDomainGroup {
907         struct {
908                 struct policy_handle *domain_handle;/* [ref] */
909                 struct lsa_String *name;/* [ref] */
910                 uint32_t access_mask;
911         } in;
912
913         struct {
914                 struct policy_handle *group_handle;/* [ref] */
915                 uint32_t *rid;/* [ref] */
916                 NTSTATUS result;
917         } out;
918
919 };
920
921
922 struct samr_EnumDomainGroups {
923         struct {
924                 struct policy_handle *domain_handle;/* [ref] */
925                 uint32_t max_size;
926                 uint32_t *resume_handle;/* [ref] */
927         } in;
928
929         struct {
930                 struct samr_SamArray **sam;/* [ref] */
931                 uint32_t *num_entries;/* [ref] */
932                 uint32_t *resume_handle;/* [ref] */
933                 NTSTATUS result;
934         } out;
935
936 };
937
938
939 struct samr_CreateUser {
940         struct {
941                 struct policy_handle *domain_handle;/* [ref] */
942                 struct lsa_String *account_name;/* [ref] */
943                 uint32_t access_mask;
944         } in;
945
946         struct {
947                 struct policy_handle *user_handle;/* [ref] */
948                 uint32_t *rid;/* [ref] */
949                 NTSTATUS result;
950         } out;
951
952 };
953
954
955 struct samr_EnumDomainUsers {
956         struct {
957                 struct policy_handle *domain_handle;/* [ref] */
958                 uint32_t acct_flags;
959                 uint32_t max_size;
960                 uint32_t *resume_handle;/* [ref] */
961         } in;
962
963         struct {
964                 struct samr_SamArray **sam;/* [ref] */
965                 uint32_t *num_entries;/* [ref] */
966                 uint32_t *resume_handle;/* [ref] */
967                 NTSTATUS result;
968         } out;
969
970 };
971
972
973 struct samr_CreateDomAlias {
974         struct {
975                 struct policy_handle *domain_handle;/* [ref] */
976                 struct lsa_String *alias_name;/* [ref] */
977                 uint32_t access_mask;
978         } in;
979
980         struct {
981                 struct policy_handle *alias_handle;/* [ref] */
982                 uint32_t *rid;/* [ref] */
983                 NTSTATUS result;
984         } out;
985
986 };
987
988
989 struct samr_EnumDomainAliases {
990         struct {
991                 struct policy_handle *domain_handle;/* [ref] */
992                 uint32_t max_size;
993                 uint32_t *resume_handle;/* [ref] */
994         } in;
995
996         struct {
997                 struct samr_SamArray **sam;/* [ref] */
998                 uint32_t *num_entries;/* [ref] */
999                 uint32_t *resume_handle;/* [ref] */
1000                 NTSTATUS result;
1001         } out;
1002
1003 };
1004
1005
1006 struct samr_GetAliasMembership {
1007         struct {
1008                 struct policy_handle *domain_handle;/* [ref] */
1009                 struct lsa_SidArray *sids;/* [ref] */
1010         } in;
1011
1012         struct {
1013                 struct samr_Ids *rids;/* [ref] */
1014                 NTSTATUS result;
1015         } out;
1016
1017 };
1018
1019
1020 struct samr_LookupNames {
1021         struct {
1022                 struct policy_handle *domain_handle;/* [ref] */
1023                 uint32_t num_names;/* [range(0,1000)] */
1024                 struct lsa_String *names;/* [length_is(num_names),size_is(1000)] */
1025         } in;
1026
1027         struct {
1028                 struct samr_Ids *rids;/* [ref] */
1029                 struct samr_Ids *types;/* [ref] */
1030                 NTSTATUS result;
1031         } out;
1032
1033 };
1034
1035
1036 struct samr_LookupRids {
1037         struct {
1038                 struct policy_handle *domain_handle;/* [ref] */
1039                 uint32_t num_rids;/* [range(0,1000)] */
1040                 uint32_t *rids;/* [length_is(num_rids),size_is(1000)] */
1041         } in;
1042
1043         struct {
1044                 struct lsa_Strings *names;/* [ref] */
1045                 struct samr_Ids *types;/* [ref] */
1046                 NTSTATUS result;
1047         } out;
1048
1049 };
1050
1051
1052 struct samr_OpenGroup {
1053         struct {
1054                 struct policy_handle *domain_handle;/* [ref] */
1055                 uint32_t access_mask;
1056                 uint32_t rid;
1057         } in;
1058
1059         struct {
1060                 struct policy_handle *group_handle;/* [ref] */
1061                 NTSTATUS result;
1062         } out;
1063
1064 };
1065
1066
1067 struct samr_QueryGroupInfo {
1068         struct {
1069                 struct policy_handle *group_handle;/* [ref] */
1070                 enum samr_GroupInfoEnum level;
1071         } in;
1072
1073         struct {
1074                 union samr_GroupInfo **info;/* [ref,switch_is(level)] */
1075                 NTSTATUS result;
1076         } out;
1077
1078 };
1079
1080
1081 struct samr_SetGroupInfo {
1082         struct {
1083                 struct policy_handle *group_handle;/* [ref] */
1084                 enum samr_GroupInfoEnum level;
1085                 union samr_GroupInfo *info;/* [ref,switch_is(level)] */
1086         } in;
1087
1088         struct {
1089                 NTSTATUS result;
1090         } out;
1091
1092 };
1093
1094
1095 struct samr_AddGroupMember {
1096         struct {
1097                 struct policy_handle *group_handle;/* [ref] */
1098                 uint32_t rid;
1099                 uint32_t flags;
1100         } in;
1101
1102         struct {
1103                 NTSTATUS result;
1104         } out;
1105
1106 };
1107
1108
1109 struct samr_DeleteDomainGroup {
1110         struct {
1111                 struct policy_handle *group_handle;/* [ref] */
1112         } in;
1113
1114         struct {
1115                 struct policy_handle *group_handle;/* [ref] */
1116                 NTSTATUS result;
1117         } out;
1118
1119 };
1120
1121
1122 struct samr_DeleteGroupMember {
1123         struct {
1124                 struct policy_handle *group_handle;/* [ref] */
1125                 uint32_t rid;
1126         } in;
1127
1128         struct {
1129                 NTSTATUS result;
1130         } out;
1131
1132 };
1133
1134
1135 struct samr_QueryGroupMember {
1136         struct {
1137                 struct policy_handle *group_handle;/* [ref] */
1138         } in;
1139
1140         struct {
1141                 struct samr_RidTypeArray **rids;/* [ref] */
1142                 NTSTATUS result;
1143         } out;
1144
1145 };
1146
1147
1148 struct samr_SetMemberAttributesOfGroup {
1149         struct {
1150                 struct policy_handle *group_handle;/* [ref] */
1151                 uint32_t unknown1;
1152                 uint32_t unknown2;
1153         } in;
1154
1155         struct {
1156                 NTSTATUS result;
1157         } out;
1158
1159 };
1160
1161
1162 struct samr_OpenAlias {
1163         struct {
1164                 struct policy_handle *domain_handle;/* [ref] */
1165                 uint32_t access_mask;
1166                 uint32_t rid;
1167         } in;
1168
1169         struct {
1170                 struct policy_handle *alias_handle;/* [ref] */
1171                 NTSTATUS result;
1172         } out;
1173
1174 };
1175
1176
1177 struct samr_QueryAliasInfo {
1178         struct {
1179                 struct policy_handle *alias_handle;/* [ref] */
1180                 enum samr_AliasInfoEnum level;
1181         } in;
1182
1183         struct {
1184                 union samr_AliasInfo **info;/* [ref,switch_is(level)] */
1185                 NTSTATUS result;
1186         } out;
1187
1188 };
1189
1190
1191 struct samr_SetAliasInfo {
1192         struct {
1193                 struct policy_handle *alias_handle;/* [ref] */
1194                 enum samr_AliasInfoEnum level;
1195                 union samr_AliasInfo *info;/* [ref,switch_is(level)] */
1196         } in;
1197
1198         struct {
1199                 NTSTATUS result;
1200         } out;
1201
1202 };
1203
1204
1205 struct samr_DeleteDomAlias {
1206         struct {
1207                 struct policy_handle *alias_handle;/* [ref] */
1208         } in;
1209
1210         struct {
1211                 struct policy_handle *alias_handle;/* [ref] */
1212                 NTSTATUS result;
1213         } out;
1214
1215 };
1216
1217
1218 struct samr_AddAliasMember {
1219         struct {
1220                 struct policy_handle *alias_handle;/* [ref] */
1221                 struct dom_sid2 *sid;/* [ref] */
1222         } in;
1223
1224         struct {
1225                 NTSTATUS result;
1226         } out;
1227
1228 };
1229
1230
1231 struct samr_DeleteAliasMember {
1232         struct {
1233                 struct policy_handle *alias_handle;/* [ref] */
1234                 struct dom_sid2 *sid;/* [ref] */
1235         } in;
1236
1237         struct {
1238                 NTSTATUS result;
1239         } out;
1240
1241 };
1242
1243
1244 struct samr_GetMembersInAlias {
1245         struct {
1246                 struct policy_handle *alias_handle;/* [ref] */
1247         } in;
1248
1249         struct {
1250                 struct lsa_SidArray *sids;/* [ref] */
1251                 NTSTATUS result;
1252         } out;
1253
1254 };
1255
1256
1257 struct samr_OpenUser {
1258         struct {
1259                 struct policy_handle *domain_handle;/* [ref] */
1260                 uint32_t access_mask;
1261                 uint32_t rid;
1262         } in;
1263
1264         struct {
1265                 struct policy_handle *user_handle;/* [ref] */
1266                 NTSTATUS result;
1267         } out;
1268
1269 };
1270
1271
1272 struct samr_DeleteUser {
1273         struct {
1274                 struct policy_handle *user_handle;/* [ref] */
1275         } in;
1276
1277         struct {
1278                 struct policy_handle *user_handle;/* [ref] */
1279                 NTSTATUS result;
1280         } out;
1281
1282 };
1283
1284
1285 struct samr_QueryUserInfo {
1286         struct {
1287                 struct policy_handle *user_handle;/* [ref] */
1288                 uint16_t level;
1289         } in;
1290
1291         struct {
1292                 union samr_UserInfo **info;/* [ref,switch_is(level)] */
1293                 NTSTATUS result;
1294         } out;
1295
1296 };
1297
1298
1299 struct samr_SetUserInfo {
1300         struct {
1301                 struct policy_handle *user_handle;/* [ref] */
1302                 uint16_t level;
1303                 union samr_UserInfo *info;/* [ref,switch_is(level)] */
1304         } in;
1305
1306         struct {
1307                 NTSTATUS result;
1308         } out;
1309
1310 };
1311
1312
1313 struct samr_ChangePasswordUser {
1314         struct {
1315                 struct policy_handle *user_handle;/* [ref] */
1316                 uint8_t lm_present;
1317                 struct samr_Password *old_lm_crypted;/* [unique] */
1318                 struct samr_Password *new_lm_crypted;/* [unique] */
1319                 uint8_t nt_present;
1320                 struct samr_Password *old_nt_crypted;/* [unique] */
1321                 struct samr_Password *new_nt_crypted;/* [unique] */
1322                 uint8_t cross1_present;
1323                 struct samr_Password *nt_cross;/* [unique] */
1324                 uint8_t cross2_present;
1325                 struct samr_Password *lm_cross;/* [unique] */
1326         } in;
1327
1328         struct {
1329                 NTSTATUS result;
1330         } out;
1331
1332 };
1333
1334
1335 struct samr_GetGroupsForUser {
1336         struct {
1337                 struct policy_handle *user_handle;/* [ref] */
1338         } in;
1339
1340         struct {
1341                 struct samr_RidWithAttributeArray **rids;/* [ref] */
1342                 NTSTATUS result;
1343         } out;
1344
1345 };
1346
1347
1348 struct samr_QueryDisplayInfo {
1349         struct {
1350                 struct policy_handle *domain_handle;/* [ref] */
1351                 uint16_t level;
1352                 uint32_t start_idx;
1353                 uint32_t max_entries;
1354                 uint32_t buf_size;
1355         } in;
1356
1357         struct {
1358                 uint32_t *total_size;/* [ref] */
1359                 uint32_t *returned_size;/* [ref] */
1360                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1361                 NTSTATUS result;
1362         } out;
1363
1364 };
1365
1366
1367 struct samr_GetDisplayEnumerationIndex {
1368         struct {
1369                 struct policy_handle *domain_handle;/* [ref] */
1370                 uint16_t level;
1371                 struct lsa_String *name;/* [ref] */
1372         } in;
1373
1374         struct {
1375                 uint32_t *idx;/* [ref] */
1376                 NTSTATUS result;
1377         } out;
1378
1379 };
1380
1381
1382 struct samr_TestPrivateFunctionsDomain {
1383         struct {
1384                 struct policy_handle *domain_handle;/* [ref] */
1385         } in;
1386
1387         struct {
1388                 NTSTATUS result;
1389         } out;
1390
1391 };
1392
1393
1394 struct samr_TestPrivateFunctionsUser {
1395         struct {
1396                 struct policy_handle *user_handle;/* [ref] */
1397         } in;
1398
1399         struct {
1400                 NTSTATUS result;
1401         } out;
1402
1403 };
1404
1405
1406 struct samr_GetUserPwInfo {
1407         struct {
1408                 struct policy_handle *user_handle;/* [ref] */
1409         } in;
1410
1411         struct {
1412                 struct samr_PwInfo *info;/* [ref] */
1413                 NTSTATUS result;
1414         } out;
1415
1416 };
1417
1418
1419 struct samr_RemoveMemberFromForeignDomain {
1420         struct {
1421                 struct policy_handle *domain_handle;/* [ref] */
1422                 struct dom_sid2 *sid;/* [ref] */
1423         } in;
1424
1425         struct {
1426                 NTSTATUS result;
1427         } out;
1428
1429 };
1430
1431
1432 struct samr_QueryDomainInfo2 {
1433         struct {
1434                 struct policy_handle *domain_handle;/* [ref] */
1435                 uint16_t level;
1436         } in;
1437
1438         struct {
1439                 union samr_DomainInfo **info;/* [ref,switch_is(level)] */
1440                 NTSTATUS result;
1441         } out;
1442
1443 };
1444
1445
1446 struct samr_QueryUserInfo2 {
1447         struct {
1448                 struct policy_handle *user_handle;/* [ref] */
1449                 uint16_t level;
1450         } in;
1451
1452         struct {
1453                 union samr_UserInfo *info;/* [ref,switch_is(level)] */
1454                 NTSTATUS result;
1455         } out;
1456
1457 };
1458
1459
1460 struct samr_QueryDisplayInfo2 {
1461         struct {
1462                 struct policy_handle *domain_handle;/* [ref] */
1463                 uint16_t level;
1464                 uint32_t start_idx;
1465                 uint32_t max_entries;
1466                 uint32_t buf_size;
1467         } in;
1468
1469         struct {
1470                 uint32_t *total_size;/* [ref] */
1471                 uint32_t *returned_size;/* [ref] */
1472                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1473                 NTSTATUS result;
1474         } out;
1475
1476 };
1477
1478
1479 struct samr_GetDisplayEnumerationIndex2 {
1480         struct {
1481                 struct policy_handle *domain_handle;/* [ref] */
1482                 uint16_t level;
1483                 struct lsa_String *name;/* [ref] */
1484         } in;
1485
1486         struct {
1487                 uint32_t *idx;/* [ref] */
1488                 NTSTATUS result;
1489         } out;
1490
1491 };
1492
1493
1494 struct samr_CreateUser2 {
1495         struct {
1496                 struct policy_handle *domain_handle;/* [ref] */
1497                 struct lsa_String *account_name;/* [ref] */
1498                 uint32_t acct_flags;
1499                 uint32_t access_mask;
1500         } in;
1501
1502         struct {
1503                 struct policy_handle *user_handle;/* [ref] */
1504                 uint32_t *access_granted;/* [ref] */
1505                 uint32_t *rid;/* [ref] */
1506                 NTSTATUS result;
1507         } out;
1508
1509 };
1510
1511
1512 struct samr_QueryDisplayInfo3 {
1513         struct {
1514                 struct policy_handle *domain_handle;/* [ref] */
1515                 uint16_t level;
1516                 uint32_t start_idx;
1517                 uint32_t max_entries;
1518                 uint32_t buf_size;
1519         } in;
1520
1521         struct {
1522                 uint32_t *total_size;/* [ref] */
1523                 uint32_t *returned_size;/* [ref] */
1524                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1525                 NTSTATUS result;
1526         } out;
1527
1528 };
1529
1530
1531 struct samr_AddMultipleMembersToAlias {
1532         struct {
1533                 struct policy_handle *alias_handle;/* [ref] */
1534                 struct lsa_SidArray *sids;/* [ref] */
1535         } in;
1536
1537         struct {
1538                 NTSTATUS result;
1539         } out;
1540
1541 };
1542
1543
1544 struct samr_RemoveMultipleMembersFromAlias {
1545         struct {
1546                 struct policy_handle *alias_handle;/* [ref] */
1547                 struct lsa_SidArray *sids;/* [ref] */
1548         } in;
1549
1550         struct {
1551                 NTSTATUS result;
1552         } out;
1553
1554 };
1555
1556
1557 struct samr_OemChangePasswordUser2 {
1558         struct {
1559                 struct lsa_AsciiString *server;/* [unique] */
1560                 struct lsa_AsciiString *account;/* [ref] */
1561                 struct samr_CryptPassword *password;/* [unique] */
1562                 struct samr_Password *hash;/* [unique] */
1563         } in;
1564
1565         struct {
1566                 NTSTATUS result;
1567         } out;
1568
1569 };
1570
1571
1572 struct samr_ChangePasswordUser2 {
1573         struct {
1574                 struct lsa_String *server;/* [unique] */
1575                 struct lsa_String *account;/* [ref] */
1576                 struct samr_CryptPassword *nt_password;/* [unique] */
1577                 struct samr_Password *nt_verifier;/* [unique] */
1578                 uint8_t lm_change;
1579                 struct samr_CryptPassword *lm_password;/* [unique] */
1580                 struct samr_Password *lm_verifier;/* [unique] */
1581         } in;
1582
1583         struct {
1584                 NTSTATUS result;
1585         } out;
1586
1587 };
1588
1589
1590 struct samr_GetDomPwInfo {
1591         struct {
1592                 struct lsa_String *domain_name;/* [unique] */
1593         } in;
1594
1595         struct {
1596                 struct samr_PwInfo *info;/* [ref] */
1597                 NTSTATUS result;
1598         } out;
1599
1600 };
1601
1602
1603 struct samr_Connect2 {
1604         struct {
1605                 const char *system_name;/* [unique,charset(UTF16)] */
1606                 uint32_t access_mask;
1607         } in;
1608
1609         struct {
1610                 struct policy_handle *connect_handle;/* [ref] */
1611                 NTSTATUS result;
1612         } out;
1613
1614 };
1615
1616
1617 struct samr_SetUserInfo2 {
1618         struct {
1619                 struct policy_handle *user_handle;/* [ref] */
1620                 uint16_t level;
1621                 union samr_UserInfo *info;/* [ref,switch_is(level)] */
1622         } in;
1623
1624         struct {
1625                 NTSTATUS result;
1626         } out;
1627
1628 };
1629
1630
1631 struct samr_SetBootKeyInformation {
1632         struct {
1633                 struct policy_handle *connect_handle;/* [ref] */
1634                 uint32_t unknown1;
1635                 uint32_t unknown2;
1636                 uint32_t unknown3;
1637         } in;
1638
1639         struct {
1640                 NTSTATUS result;
1641         } out;
1642
1643 };
1644
1645
1646 struct samr_GetBootKeyInformation {
1647         struct {
1648                 struct policy_handle *domain_handle;/* [ref] */
1649         } in;
1650
1651         struct {
1652                 uint32_t *unknown;/* [ref] */
1653                 NTSTATUS result;
1654         } out;
1655
1656 };
1657
1658
1659 struct samr_Connect3 {
1660         struct {
1661                 const char *system_name;/* [unique,charset(UTF16)] */
1662                 uint32_t unknown;
1663                 uint32_t access_mask;
1664         } in;
1665
1666         struct {
1667                 struct policy_handle *connect_handle;/* [ref] */
1668                 NTSTATUS result;
1669         } out;
1670
1671 };
1672
1673
1674 struct samr_Connect4 {
1675         struct {
1676                 const char *system_name;/* [unique,charset(UTF16)] */
1677                 enum samr_ConnectVersion client_version;
1678                 uint32_t access_mask;
1679         } in;
1680
1681         struct {
1682                 struct policy_handle *connect_handle;/* [ref] */
1683                 NTSTATUS result;
1684         } out;
1685
1686 };
1687
1688
1689 struct samr_ChangePasswordUser3 {
1690         struct {
1691                 struct lsa_String *server;/* [unique] */
1692                 struct lsa_String *account;/* [ref] */
1693                 struct samr_CryptPassword *nt_password;/* [unique] */
1694                 struct samr_Password *nt_verifier;/* [unique] */
1695                 uint8_t lm_change;
1696                 struct samr_CryptPassword *lm_password;/* [unique] */
1697                 struct samr_Password *lm_verifier;/* [unique] */
1698                 struct samr_CryptPassword *password3;/* [unique] */
1699         } in;
1700
1701         struct {
1702                 struct samr_DomInfo1 **dominfo;/* [ref] */
1703                 struct samr_ChangeReject **reject;/* [ref] */
1704                 NTSTATUS result;
1705         } out;
1706
1707 };
1708
1709
1710 struct samr_Connect5 {
1711         struct {
1712                 const char *system_name;/* [unique,charset(UTF16)] */
1713                 uint32_t access_mask;
1714                 uint32_t level_in;
1715                 union samr_ConnectInfo *info_in;/* [ref,switch_is(level_in)] */
1716         } in;
1717
1718         struct {
1719                 uint32_t *level_out;/* [ref] */
1720                 union samr_ConnectInfo *info_out;/* [ref,switch_is(*level_out)] */
1721                 struct policy_handle *connect_handle;/* [ref] */
1722                 NTSTATUS result;
1723         } out;
1724
1725 };
1726
1727
1728 struct samr_RidToSid {
1729         struct {
1730                 struct policy_handle *domain_handle;/* [ref] */
1731                 uint32_t rid;
1732         } in;
1733
1734         struct {
1735                 struct dom_sid2 *sid;/* [ref] */
1736                 NTSTATUS result;
1737         } out;
1738
1739 };
1740
1741
1742 struct samr_SetDsrmPassword {
1743         struct {
1744                 struct lsa_String *name;/* [unique] */
1745                 uint32_t unknown;
1746                 struct samr_Password *hash;/* [unique] */
1747         } in;
1748
1749         struct {
1750                 NTSTATUS result;
1751         } out;
1752
1753 };
1754
1755
1756 struct samr_ValidatePassword {
1757         struct {
1758                 enum samr_ValidatePasswordLevel level;
1759                 union samr_ValidatePasswordReq req;/* [switch_is(level)] */
1760         } in;
1761
1762         struct {
1763                 union samr_ValidatePasswordRep *rep;/* [ref,switch_is(level)] */
1764                 NTSTATUS result;
1765         } out;
1766
1767 };
1768
1769 #endif /* _HEADER_samr */