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