Merge branch 'master' of ssh://git.samba.org/data/git/samba
[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 enum samr_RejectReason;
702
703 struct samr_ChangeReject {
704         enum samr_RejectReason reason;
705         uint32_t unknown1;
706         uint32_t unknown2;
707 };
708
709 struct samr_ConnectInfo1 {
710         enum samr_ConnectVersion client_version;
711         uint32_t unknown2;
712 };
713
714 union samr_ConnectInfo {
715         struct samr_ConnectInfo1 info1;/* [case] */
716 };
717
718 /* bitmap samr_ValidateFieldsPresent */
719 #define SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET ( 0x00000001 )
720 #define SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME ( 0x00000002 )
721 #define SAMR_VALIDATE_FIELD_LOCKOUT_TIME ( 0x00000004 )
722 #define SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT ( 0x00000008 )
723 #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH ( 0x00000010 )
724 #define SAMR_VALIDATE_FIELD_PASSWORD_HISTORY ( 0x00000020 )
725
726 enum samr_ValidatePasswordLevel
727 #ifndef USE_UINT_ENUMS
728  {
729         NetValidateAuthentication=1,
730         NetValidatePasswordChange=2,
731         NetValidatePasswordReset=3
732 }
733 #else
734  { __donnot_use_enum_samr_ValidatePasswordLevel=0x7FFFFFFF}
735 #define NetValidateAuthentication ( 1 )
736 #define NetValidatePasswordChange ( 2 )
737 #define NetValidatePasswordReset ( 3 )
738 #endif
739 ;
740
741 enum samr_ValidationStatus
742 #ifndef USE_UINT_ENUMS
743  {
744         SAMR_VALIDATION_STATUS_SUCCESS=0,
745         SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE=1,
746         SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT=2,
747         SAMR_VALIDATION_STATUS_BAD_PASSWORD=4,
748         SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT=5,
749         SAMR_VALIDATION_STATUS_PWD_TOO_SHORT=6,
750         SAMR_VALIDATION_STATUS_PWD_TOO_LONG=7,
751         SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH=8,
752         SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT=9
753 }
754 #else
755  { __donnot_use_enum_samr_ValidationStatus=0x7FFFFFFF}
756 #define SAMR_VALIDATION_STATUS_SUCCESS ( 0 )
757 #define SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE ( 1 )
758 #define SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT ( 2 )
759 #define SAMR_VALIDATION_STATUS_BAD_PASSWORD ( 4 )
760 #define SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT ( 5 )
761 #define SAMR_VALIDATION_STATUS_PWD_TOO_SHORT ( 6 )
762 #define SAMR_VALIDATION_STATUS_PWD_TOO_LONG ( 7 )
763 #define SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH ( 8 )
764 #define SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT ( 9 )
765 #endif
766 ;
767
768 struct samr_ValidationBlob {
769         uint32_t length;
770         uint8_t *data;/* [unique,size_is(length)] */
771 };
772
773 struct samr_ValidatePasswordInfo {
774         uint32_t fields_present;
775         NTTIME last_password_change;
776         NTTIME bad_password_time;
777         NTTIME lockout_time;
778         uint32_t bad_pwd_count;
779         uint32_t pwd_history_len;
780         struct samr_ValidationBlob *pwd_history;/* [unique,size_is(pwd_history_len)] */
781 };
782
783 struct samr_ValidatePasswordRepCtr {
784         struct samr_ValidatePasswordInfo info;
785         enum samr_ValidationStatus status;
786 };
787
788 union samr_ValidatePasswordRep {
789         struct samr_ValidatePasswordRepCtr ctr1;/* [case] */
790         struct samr_ValidatePasswordRepCtr ctr2;/* [case(2)] */
791         struct samr_ValidatePasswordRepCtr ctr3;/* [case(3)] */
792 }/* [switch_type(uint16)] */;
793
794 struct samr_ValidatePasswordReq3 {
795         struct samr_ValidatePasswordInfo info;
796         struct lsa_StringLarge password;
797         struct lsa_StringLarge account;
798         struct samr_ValidationBlob hash;
799         uint8_t pwd_must_change_at_next_logon;
800         uint8_t clear_lockout;
801 };
802
803 struct samr_ValidatePasswordReq2 {
804         struct samr_ValidatePasswordInfo info;
805         struct lsa_StringLarge password;
806         struct lsa_StringLarge account;
807         struct samr_ValidationBlob hash;
808         uint8_t password_matched;
809 };
810
811 struct samr_ValidatePasswordReq1 {
812         struct samr_ValidatePasswordInfo info;
813         uint8_t password_matched;
814 };
815
816 union samr_ValidatePasswordReq {
817         struct samr_ValidatePasswordReq1 req1;/* [case] */
818         struct samr_ValidatePasswordReq2 req2;/* [case(2)] */
819         struct samr_ValidatePasswordReq3 req3;/* [case(3)] */
820 }/* [switch_type(uint16)] */;
821
822
823 struct samr_Connect {
824         struct {
825                 uint16_t *system_name;/* [unique] */
826                 uint32_t access_mask;
827         } in;
828
829         struct {
830                 struct policy_handle *connect_handle;/* [ref] */
831                 NTSTATUS result;
832         } out;
833
834 };
835
836
837 struct samr_Close {
838         struct {
839                 struct policy_handle *handle;/* [ref] */
840         } in;
841
842         struct {
843                 struct policy_handle *handle;/* [ref] */
844                 NTSTATUS result;
845         } out;
846
847 };
848
849
850 struct samr_SetSecurity {
851         struct {
852                 struct policy_handle *handle;/* [ref] */
853                 uint32_t sec_info;
854                 struct sec_desc_buf *sdbuf;/* [ref] */
855         } in;
856
857         struct {
858                 NTSTATUS result;
859         } out;
860
861 };
862
863
864 struct samr_QuerySecurity {
865         struct {
866                 struct policy_handle *handle;/* [ref] */
867                 uint32_t sec_info;
868         } in;
869
870         struct {
871                 struct sec_desc_buf **sdbuf;/* [ref] */
872                 NTSTATUS result;
873         } out;
874
875 };
876
877
878 struct samr_Shutdown {
879         struct {
880                 struct policy_handle *connect_handle;/* [ref] */
881         } in;
882
883         struct {
884                 NTSTATUS result;
885         } out;
886
887 };
888
889
890 struct samr_LookupDomain {
891         struct {
892                 struct policy_handle *connect_handle;/* [ref] */
893                 struct lsa_String *domain_name;/* [ref] */
894         } in;
895
896         struct {
897                 struct dom_sid2 **sid;/* [ref] */
898                 NTSTATUS result;
899         } out;
900
901 };
902
903
904 struct samr_EnumDomains {
905         struct {
906                 struct policy_handle *connect_handle;/* [ref] */
907                 uint32_t buf_size;
908                 uint32_t *resume_handle;/* [ref] */
909         } in;
910
911         struct {
912                 struct samr_SamArray **sam;/* [ref] */
913                 uint32_t *num_entries;/* [ref] */
914                 uint32_t *resume_handle;/* [ref] */
915                 NTSTATUS result;
916         } out;
917
918 };
919
920
921 struct samr_OpenDomain {
922         struct {
923                 struct policy_handle *connect_handle;/* [ref] */
924                 uint32_t access_mask;
925                 struct dom_sid2 *sid;/* [ref] */
926         } in;
927
928         struct {
929                 struct policy_handle *domain_handle;/* [ref] */
930                 NTSTATUS result;
931         } out;
932
933 };
934
935
936 struct samr_QueryDomainInfo {
937         struct {
938                 struct policy_handle *domain_handle;/* [ref] */
939                 uint16_t level;
940         } in;
941
942         struct {
943                 union samr_DomainInfo **info;/* [ref,switch_is(level)] */
944                 NTSTATUS result;
945         } out;
946
947 };
948
949
950 struct samr_SetDomainInfo {
951         struct {
952                 struct policy_handle *domain_handle;/* [ref] */
953                 uint16_t level;
954                 union samr_DomainInfo *info;/* [ref,switch_is(level)] */
955         } in;
956
957         struct {
958                 NTSTATUS result;
959         } out;
960
961 };
962
963
964 struct samr_CreateDomainGroup {
965         struct {
966                 struct policy_handle *domain_handle;/* [ref] */
967                 struct lsa_String *name;/* [ref] */
968                 uint32_t access_mask;
969         } in;
970
971         struct {
972                 struct policy_handle *group_handle;/* [ref] */
973                 uint32_t *rid;/* [ref] */
974                 NTSTATUS result;
975         } out;
976
977 };
978
979
980 struct samr_EnumDomainGroups {
981         struct {
982                 struct policy_handle *domain_handle;/* [ref] */
983                 uint32_t max_size;
984                 uint32_t *resume_handle;/* [ref] */
985         } in;
986
987         struct {
988                 struct samr_SamArray **sam;/* [ref] */
989                 uint32_t *num_entries;/* [ref] */
990                 uint32_t *resume_handle;/* [ref] */
991                 NTSTATUS result;
992         } out;
993
994 };
995
996
997 struct samr_CreateUser {
998         struct {
999                 struct policy_handle *domain_handle;/* [ref] */
1000                 struct lsa_String *account_name;/* [ref] */
1001                 uint32_t access_mask;
1002         } in;
1003
1004         struct {
1005                 struct policy_handle *user_handle;/* [ref] */
1006                 uint32_t *rid;/* [ref] */
1007                 NTSTATUS result;
1008         } out;
1009
1010 };
1011
1012
1013 struct samr_EnumDomainUsers {
1014         struct {
1015                 struct policy_handle *domain_handle;/* [ref] */
1016                 uint32_t acct_flags;
1017                 uint32_t max_size;
1018                 uint32_t *resume_handle;/* [ref] */
1019         } in;
1020
1021         struct {
1022                 struct samr_SamArray **sam;/* [ref] */
1023                 uint32_t *num_entries;/* [ref] */
1024                 uint32_t *resume_handle;/* [ref] */
1025                 NTSTATUS result;
1026         } out;
1027
1028 };
1029
1030
1031 struct samr_CreateDomAlias {
1032         struct {
1033                 struct policy_handle *domain_handle;/* [ref] */
1034                 struct lsa_String *alias_name;/* [ref] */
1035                 uint32_t access_mask;
1036         } in;
1037
1038         struct {
1039                 struct policy_handle *alias_handle;/* [ref] */
1040                 uint32_t *rid;/* [ref] */
1041                 NTSTATUS result;
1042         } out;
1043
1044 };
1045
1046
1047 struct samr_EnumDomainAliases {
1048         struct {
1049                 struct policy_handle *domain_handle;/* [ref] */
1050                 uint32_t max_size;
1051                 uint32_t *resume_handle;/* [ref] */
1052         } in;
1053
1054         struct {
1055                 struct samr_SamArray **sam;/* [ref] */
1056                 uint32_t *num_entries;/* [ref] */
1057                 uint32_t *resume_handle;/* [ref] */
1058                 NTSTATUS result;
1059         } out;
1060
1061 };
1062
1063
1064 struct samr_GetAliasMembership {
1065         struct {
1066                 struct policy_handle *domain_handle;/* [ref] */
1067                 struct lsa_SidArray *sids;/* [ref] */
1068         } in;
1069
1070         struct {
1071                 struct samr_Ids *rids;/* [ref] */
1072                 NTSTATUS result;
1073         } out;
1074
1075 };
1076
1077
1078 struct samr_LookupNames {
1079         struct {
1080                 struct policy_handle *domain_handle;/* [ref] */
1081                 uint32_t num_names;/* [range(0,1000)] */
1082                 struct lsa_String *names;/* [length_is(num_names),size_is(1000)] */
1083         } in;
1084
1085         struct {
1086                 struct samr_Ids *rids;/* [ref] */
1087                 struct samr_Ids *types;/* [ref] */
1088                 NTSTATUS result;
1089         } out;
1090
1091 };
1092
1093
1094 struct samr_LookupRids {
1095         struct {
1096                 struct policy_handle *domain_handle;/* [ref] */
1097                 uint32_t num_rids;/* [range(0,1000)] */
1098                 uint32_t *rids;/* [length_is(num_rids),size_is(1000)] */
1099         } in;
1100
1101         struct {
1102                 struct lsa_Strings *names;/* [ref] */
1103                 struct samr_Ids *types;/* [ref] */
1104                 NTSTATUS result;
1105         } out;
1106
1107 };
1108
1109
1110 struct samr_OpenGroup {
1111         struct {
1112                 struct policy_handle *domain_handle;/* [ref] */
1113                 uint32_t access_mask;
1114                 uint32_t rid;
1115         } in;
1116
1117         struct {
1118                 struct policy_handle *group_handle;/* [ref] */
1119                 NTSTATUS result;
1120         } out;
1121
1122 };
1123
1124
1125 struct samr_QueryGroupInfo {
1126         struct {
1127                 struct policy_handle *group_handle;/* [ref] */
1128                 enum samr_GroupInfoEnum level;
1129         } in;
1130
1131         struct {
1132                 union samr_GroupInfo **info;/* [ref,switch_is(level)] */
1133                 NTSTATUS result;
1134         } out;
1135
1136 };
1137
1138
1139 struct samr_SetGroupInfo {
1140         struct {
1141                 struct policy_handle *group_handle;/* [ref] */
1142                 enum samr_GroupInfoEnum level;
1143                 union samr_GroupInfo *info;/* [ref,switch_is(level)] */
1144         } in;
1145
1146         struct {
1147                 NTSTATUS result;
1148         } out;
1149
1150 };
1151
1152
1153 struct samr_AddGroupMember {
1154         struct {
1155                 struct policy_handle *group_handle;/* [ref] */
1156                 uint32_t rid;
1157                 uint32_t flags;
1158         } in;
1159
1160         struct {
1161                 NTSTATUS result;
1162         } out;
1163
1164 };
1165
1166
1167 struct samr_DeleteDomainGroup {
1168         struct {
1169                 struct policy_handle *group_handle;/* [ref] */
1170         } in;
1171
1172         struct {
1173                 struct policy_handle *group_handle;/* [ref] */
1174                 NTSTATUS result;
1175         } out;
1176
1177 };
1178
1179
1180 struct samr_DeleteGroupMember {
1181         struct {
1182                 struct policy_handle *group_handle;/* [ref] */
1183                 uint32_t rid;
1184         } in;
1185
1186         struct {
1187                 NTSTATUS result;
1188         } out;
1189
1190 };
1191
1192
1193 struct samr_QueryGroupMember {
1194         struct {
1195                 struct policy_handle *group_handle;/* [ref] */
1196         } in;
1197
1198         struct {
1199                 struct samr_RidTypeArray **rids;/* [ref] */
1200                 NTSTATUS result;
1201         } out;
1202
1203 };
1204
1205
1206 struct samr_SetMemberAttributesOfGroup {
1207         struct {
1208                 struct policy_handle *group_handle;/* [ref] */
1209                 uint32_t unknown1;
1210                 uint32_t unknown2;
1211         } in;
1212
1213         struct {
1214                 NTSTATUS result;
1215         } out;
1216
1217 };
1218
1219
1220 struct samr_OpenAlias {
1221         struct {
1222                 struct policy_handle *domain_handle;/* [ref] */
1223                 uint32_t access_mask;
1224                 uint32_t rid;
1225         } in;
1226
1227         struct {
1228                 struct policy_handle *alias_handle;/* [ref] */
1229                 NTSTATUS result;
1230         } out;
1231
1232 };
1233
1234
1235 struct samr_QueryAliasInfo {
1236         struct {
1237                 struct policy_handle *alias_handle;/* [ref] */
1238                 enum samr_AliasInfoEnum level;
1239         } in;
1240
1241         struct {
1242                 union samr_AliasInfo **info;/* [ref,switch_is(level)] */
1243                 NTSTATUS result;
1244         } out;
1245
1246 };
1247
1248
1249 struct samr_SetAliasInfo {
1250         struct {
1251                 struct policy_handle *alias_handle;/* [ref] */
1252                 enum samr_AliasInfoEnum level;
1253                 union samr_AliasInfo *info;/* [ref,switch_is(level)] */
1254         } in;
1255
1256         struct {
1257                 NTSTATUS result;
1258         } out;
1259
1260 };
1261
1262
1263 struct samr_DeleteDomAlias {
1264         struct {
1265                 struct policy_handle *alias_handle;/* [ref] */
1266         } in;
1267
1268         struct {
1269                 struct policy_handle *alias_handle;/* [ref] */
1270                 NTSTATUS result;
1271         } out;
1272
1273 };
1274
1275
1276 struct samr_AddAliasMember {
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_DeleteAliasMember {
1290         struct {
1291                 struct policy_handle *alias_handle;/* [ref] */
1292                 struct dom_sid2 *sid;/* [ref] */
1293         } in;
1294
1295         struct {
1296                 NTSTATUS result;
1297         } out;
1298
1299 };
1300
1301
1302 struct samr_GetMembersInAlias {
1303         struct {
1304                 struct policy_handle *alias_handle;/* [ref] */
1305         } in;
1306
1307         struct {
1308                 struct lsa_SidArray *sids;/* [ref] */
1309                 NTSTATUS result;
1310         } out;
1311
1312 };
1313
1314
1315 struct samr_OpenUser {
1316         struct {
1317                 struct policy_handle *domain_handle;/* [ref] */
1318                 uint32_t access_mask;
1319                 uint32_t rid;
1320         } in;
1321
1322         struct {
1323                 struct policy_handle *user_handle;/* [ref] */
1324                 NTSTATUS result;
1325         } out;
1326
1327 };
1328
1329
1330 struct samr_DeleteUser {
1331         struct {
1332                 struct policy_handle *user_handle;/* [ref] */
1333         } in;
1334
1335         struct {
1336                 struct policy_handle *user_handle;/* [ref] */
1337                 NTSTATUS result;
1338         } out;
1339
1340 };
1341
1342
1343 struct samr_QueryUserInfo {
1344         struct {
1345                 struct policy_handle *user_handle;/* [ref] */
1346                 uint16_t level;
1347         } in;
1348
1349         struct {
1350                 union samr_UserInfo **info;/* [ref,switch_is(level)] */
1351                 NTSTATUS result;
1352         } out;
1353
1354 };
1355
1356
1357 struct samr_SetUserInfo {
1358         struct {
1359                 struct policy_handle *user_handle;/* [ref] */
1360                 uint16_t level;
1361                 union samr_UserInfo *info;/* [ref,switch_is(level)] */
1362         } in;
1363
1364         struct {
1365                 NTSTATUS result;
1366         } out;
1367
1368 };
1369
1370
1371 struct samr_ChangePasswordUser {
1372         struct {
1373                 struct policy_handle *user_handle;/* [ref] */
1374                 uint8_t lm_present;
1375                 struct samr_Password *old_lm_crypted;/* [unique] */
1376                 struct samr_Password *new_lm_crypted;/* [unique] */
1377                 uint8_t nt_present;
1378                 struct samr_Password *old_nt_crypted;/* [unique] */
1379                 struct samr_Password *new_nt_crypted;/* [unique] */
1380                 uint8_t cross1_present;
1381                 struct samr_Password *nt_cross;/* [unique] */
1382                 uint8_t cross2_present;
1383                 struct samr_Password *lm_cross;/* [unique] */
1384         } in;
1385
1386         struct {
1387                 NTSTATUS result;
1388         } out;
1389
1390 };
1391
1392
1393 struct samr_GetGroupsForUser {
1394         struct {
1395                 struct policy_handle *user_handle;/* [ref] */
1396         } in;
1397
1398         struct {
1399                 struct samr_RidWithAttributeArray **rids;/* [ref] */
1400                 NTSTATUS result;
1401         } out;
1402
1403 };
1404
1405
1406 struct samr_QueryDisplayInfo {
1407         struct {
1408                 struct policy_handle *domain_handle;/* [ref] */
1409                 uint16_t level;
1410                 uint32_t start_idx;
1411                 uint32_t max_entries;
1412                 uint32_t buf_size;
1413         } in;
1414
1415         struct {
1416                 uint32_t *total_size;/* [ref] */
1417                 uint32_t *returned_size;/* [ref] */
1418                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1419                 NTSTATUS result;
1420         } out;
1421
1422 };
1423
1424
1425 struct samr_GetDisplayEnumerationIndex {
1426         struct {
1427                 struct policy_handle *domain_handle;/* [ref] */
1428                 uint16_t level;
1429                 struct lsa_String *name;/* [ref] */
1430         } in;
1431
1432         struct {
1433                 uint32_t *idx;/* [ref] */
1434                 NTSTATUS result;
1435         } out;
1436
1437 };
1438
1439
1440 struct samr_TestPrivateFunctionsDomain {
1441         struct {
1442                 struct policy_handle *domain_handle;/* [ref] */
1443         } in;
1444
1445         struct {
1446                 NTSTATUS result;
1447         } out;
1448
1449 };
1450
1451
1452 struct samr_TestPrivateFunctionsUser {
1453         struct {
1454                 struct policy_handle *user_handle;/* [ref] */
1455         } in;
1456
1457         struct {
1458                 NTSTATUS result;
1459         } out;
1460
1461 };
1462
1463
1464 struct samr_GetUserPwInfo {
1465         struct {
1466                 struct policy_handle *user_handle;/* [ref] */
1467         } in;
1468
1469         struct {
1470                 struct samr_PwInfo *info;/* [ref] */
1471                 NTSTATUS result;
1472         } out;
1473
1474 };
1475
1476
1477 struct samr_RemoveMemberFromForeignDomain {
1478         struct {
1479                 struct policy_handle *domain_handle;/* [ref] */
1480                 struct dom_sid2 *sid;/* [ref] */
1481         } in;
1482
1483         struct {
1484                 NTSTATUS result;
1485         } out;
1486
1487 };
1488
1489
1490 struct samr_QueryDomainInfo2 {
1491         struct {
1492                 struct policy_handle *domain_handle;/* [ref] */
1493                 uint16_t level;
1494         } in;
1495
1496         struct {
1497                 union samr_DomainInfo **info;/* [ref,switch_is(level)] */
1498                 NTSTATUS result;
1499         } out;
1500
1501 };
1502
1503
1504 struct samr_QueryUserInfo2 {
1505         struct {
1506                 struct policy_handle *user_handle;/* [ref] */
1507                 uint16_t level;
1508         } in;
1509
1510         struct {
1511                 union samr_UserInfo **info;/* [ref,switch_is(level)] */
1512                 NTSTATUS result;
1513         } out;
1514
1515 };
1516
1517
1518 struct samr_QueryDisplayInfo2 {
1519         struct {
1520                 struct policy_handle *domain_handle;/* [ref] */
1521                 uint16_t level;
1522                 uint32_t start_idx;
1523                 uint32_t max_entries;
1524                 uint32_t buf_size;
1525         } in;
1526
1527         struct {
1528                 uint32_t *total_size;/* [ref] */
1529                 uint32_t *returned_size;/* [ref] */
1530                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1531                 NTSTATUS result;
1532         } out;
1533
1534 };
1535
1536
1537 struct samr_GetDisplayEnumerationIndex2 {
1538         struct {
1539                 struct policy_handle *domain_handle;/* [ref] */
1540                 uint16_t level;
1541                 struct lsa_String *name;/* [ref] */
1542         } in;
1543
1544         struct {
1545                 uint32_t *idx;/* [ref] */
1546                 NTSTATUS result;
1547         } out;
1548
1549 };
1550
1551
1552 struct samr_CreateUser2 {
1553         struct {
1554                 struct policy_handle *domain_handle;/* [ref] */
1555                 struct lsa_String *account_name;/* [ref] */
1556                 uint32_t acct_flags;
1557                 uint32_t access_mask;
1558         } in;
1559
1560         struct {
1561                 struct policy_handle *user_handle;/* [ref] */
1562                 uint32_t *access_granted;/* [ref] */
1563                 uint32_t *rid;/* [ref] */
1564                 NTSTATUS result;
1565         } out;
1566
1567 };
1568
1569
1570 struct samr_QueryDisplayInfo3 {
1571         struct {
1572                 struct policy_handle *domain_handle;/* [ref] */
1573                 uint16_t level;
1574                 uint32_t start_idx;
1575                 uint32_t max_entries;
1576                 uint32_t buf_size;
1577         } in;
1578
1579         struct {
1580                 uint32_t *total_size;/* [ref] */
1581                 uint32_t *returned_size;/* [ref] */
1582                 union samr_DispInfo *info;/* [ref,switch_is(level)] */
1583                 NTSTATUS result;
1584         } out;
1585
1586 };
1587
1588
1589 struct samr_AddMultipleMembersToAlias {
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_RemoveMultipleMembersFromAlias {
1603         struct {
1604                 struct policy_handle *alias_handle;/* [ref] */
1605                 struct lsa_SidArray *sids;/* [ref] */
1606         } in;
1607
1608         struct {
1609                 NTSTATUS result;
1610         } out;
1611
1612 };
1613
1614
1615 struct samr_OemChangePasswordUser2 {
1616         struct {
1617                 struct lsa_AsciiString *server;/* [unique] */
1618                 struct lsa_AsciiString *account;/* [ref] */
1619                 struct samr_CryptPassword *password;/* [unique] */
1620                 struct samr_Password *hash;/* [unique] */
1621         } in;
1622
1623         struct {
1624                 NTSTATUS result;
1625         } out;
1626
1627 };
1628
1629
1630 struct samr_ChangePasswordUser2 {
1631         struct {
1632                 struct lsa_String *server;/* [unique] */
1633                 struct lsa_String *account;/* [ref] */
1634                 struct samr_CryptPassword *nt_password;/* [unique] */
1635                 struct samr_Password *nt_verifier;/* [unique] */
1636                 uint8_t lm_change;
1637                 struct samr_CryptPassword *lm_password;/* [unique] */
1638                 struct samr_Password *lm_verifier;/* [unique] */
1639         } in;
1640
1641         struct {
1642                 NTSTATUS result;
1643         } out;
1644
1645 };
1646
1647
1648 struct samr_GetDomPwInfo {
1649         struct {
1650                 struct lsa_String *domain_name;/* [unique] */
1651         } in;
1652
1653         struct {
1654                 struct samr_PwInfo *info;/* [ref] */
1655                 NTSTATUS result;
1656         } out;
1657
1658 };
1659
1660
1661 struct samr_Connect2 {
1662         struct {
1663                 const char *system_name;/* [unique,charset(UTF16)] */
1664                 uint32_t access_mask;
1665         } in;
1666
1667         struct {
1668                 struct policy_handle *connect_handle;/* [ref] */
1669                 NTSTATUS result;
1670         } out;
1671
1672 };
1673
1674
1675 struct samr_SetUserInfo2 {
1676         struct {
1677                 struct policy_handle *user_handle;/* [ref] */
1678                 uint16_t level;
1679                 union samr_UserInfo *info;/* [ref,switch_is(level)] */
1680         } in;
1681
1682         struct {
1683                 NTSTATUS result;
1684         } out;
1685
1686 };
1687
1688
1689 struct samr_SetBootKeyInformation {
1690         struct {
1691                 struct policy_handle *connect_handle;/* [ref] */
1692                 uint32_t unknown1;
1693                 uint32_t unknown2;
1694                 uint32_t unknown3;
1695         } in;
1696
1697         struct {
1698                 NTSTATUS result;
1699         } out;
1700
1701 };
1702
1703
1704 struct samr_GetBootKeyInformation {
1705         struct {
1706                 struct policy_handle *domain_handle;/* [ref] */
1707         } in;
1708
1709         struct {
1710                 uint32_t *unknown;/* [ref] */
1711                 NTSTATUS result;
1712         } out;
1713
1714 };
1715
1716
1717 struct samr_Connect3 {
1718         struct {
1719                 const char *system_name;/* [unique,charset(UTF16)] */
1720                 uint32_t unknown;
1721                 uint32_t access_mask;
1722         } in;
1723
1724         struct {
1725                 struct policy_handle *connect_handle;/* [ref] */
1726                 NTSTATUS result;
1727         } out;
1728
1729 };
1730
1731
1732 struct samr_Connect4 {
1733         struct {
1734                 const char *system_name;/* [unique,charset(UTF16)] */
1735                 enum samr_ConnectVersion client_version;
1736                 uint32_t access_mask;
1737         } in;
1738
1739         struct {
1740                 struct policy_handle *connect_handle;/* [ref] */
1741                 NTSTATUS result;
1742         } out;
1743
1744 };
1745
1746
1747 struct samr_ChangePasswordUser3 {
1748         struct {
1749                 struct lsa_String *server;/* [unique] */
1750                 struct lsa_String *account;/* [ref] */
1751                 struct samr_CryptPassword *nt_password;/* [unique] */
1752                 struct samr_Password *nt_verifier;/* [unique] */
1753                 uint8_t lm_change;
1754                 struct samr_CryptPassword *lm_password;/* [unique] */
1755                 struct samr_Password *lm_verifier;/* [unique] */
1756                 struct samr_CryptPassword *password3;/* [unique] */
1757         } in;
1758
1759         struct {
1760                 struct samr_DomInfo1 **dominfo;/* [ref] */
1761                 struct samr_ChangeReject **reject;/* [ref] */
1762                 NTSTATUS result;
1763         } out;
1764
1765 };
1766
1767
1768 struct samr_Connect5 {
1769         struct {
1770                 const char *system_name;/* [unique,charset(UTF16)] */
1771                 uint32_t access_mask;
1772                 uint32_t level_in;
1773                 union samr_ConnectInfo *info_in;/* [ref,switch_is(level_in)] */
1774         } in;
1775
1776         struct {
1777                 uint32_t *level_out;/* [ref] */
1778                 union samr_ConnectInfo *info_out;/* [ref,switch_is(*level_out)] */
1779                 struct policy_handle *connect_handle;/* [ref] */
1780                 NTSTATUS result;
1781         } out;
1782
1783 };
1784
1785
1786 struct samr_RidToSid {
1787         struct {
1788                 struct policy_handle *domain_handle;/* [ref] */
1789                 uint32_t rid;
1790         } in;
1791
1792         struct {
1793                 struct dom_sid2 **sid;/* [ref] */
1794                 NTSTATUS result;
1795         } out;
1796
1797 };
1798
1799
1800 struct samr_SetDsrmPassword {
1801         struct {
1802                 struct lsa_String *name;/* [unique] */
1803                 uint32_t unknown;
1804                 struct samr_Password *hash;/* [unique] */
1805         } in;
1806
1807         struct {
1808                 NTSTATUS result;
1809         } out;
1810
1811 };
1812
1813
1814 struct samr_ValidatePassword {
1815         struct {
1816                 enum samr_ValidatePasswordLevel level;
1817                 union samr_ValidatePasswordReq *req;/* [ref,switch_is(level)] */
1818         } in;
1819
1820         struct {
1821                 union samr_ValidatePasswordRep **rep;/* [ref,switch_is(level)] */
1822                 NTSTATUS result;
1823         } out;
1824
1825 };
1826
1827 #endif /* _HEADER_samr */