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