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