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