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