1 /* header auto-generated by pidl */
5 #include "librpc/gen_ndr/security.h"
6 #include "librpc/gen_ndr/lsa.h"
7 #include "librpc/gen_ndr/samr.h"
8 #include "librpc/gen_ndr/netlogon.h"
9 #ifndef _HEADER_winbind_protocol
10 #define _HEADER_winbind_protocol
12 #define WINBIND_MAX_LENGTH_PRIVILEGED ( 0x0FFFFFFF )
13 #define WINBIND_MAX_LENGTH_UNPRIVILEGED ( 0x00020000 )
14 #define WINBIND_STATUS_FOOBAR ( WINBIND_STATUS_UNKNOWN_ERROR )
15 #define WINBIND_HEADER_SIZE ( 0x10 )
23 #ifndef USE_UINT_ENUMS
25 WINBIND_STATUS_OK=0x00000000,
26 WINBIND_STATUS_UNKNOWN_ERROR=0x57420001,
27 WINBIND_STATUS_NOT_IMPLEMENTED=0x57420002,
28 WINBIND_STATUS_NOT_SUPPORTED=0x57420003,
29 WINBIND_STATUS_NO_MEMORY=0x57420004,
30 WINBIND_STATUS_INVALID_PARAMETER=0x57420005,
31 WINBIND_STATUS_INVALID_LEVEL=0x57420006,
32 WINBIND_STATUS_UNKNOWN_LEVEL=0x57420007,
33 WINBIND_STATUS_DOMAIN_OFFLINE=0x57420008
36 { __donnot_use_enum_winbind_status=0x7FFFFFFF}
37 #define WINBIND_STATUS_OK ( 0x00000000 )
38 #define WINBIND_STATUS_UNKNOWN_ERROR ( 0x57420001 )
39 #define WINBIND_STATUS_NOT_IMPLEMENTED ( 0x57420002 )
40 #define WINBIND_STATUS_NOT_SUPPORTED ( 0x57420003 )
41 #define WINBIND_STATUS_NO_MEMORY ( 0x57420004 )
42 #define WINBIND_STATUS_INVALID_PARAMETER ( 0x57420005 )
43 #define WINBIND_STATUS_INVALID_LEVEL ( 0x57420006 )
44 #define WINBIND_STATUS_UNKNOWN_LEVEL ( 0x57420007 )
45 #define WINBIND_STATUS_DOMAIN_OFFLINE ( 0x57420008 )
49 /* bitmap winbind_header_version */
50 #define WINBIND_HEADER_VERSION ( 0x0001 )
52 /* bitmap winbind_header_flags */
53 #define WINBIND_HEADER_FLAGS_RESPONSE ( 0x00000001 )
54 #define WINBIND_HEADER_FLAGS_ERROR ( 0x00000002 )
56 struct winbind_header {
58 const char *magic;/* [value("WBPT"),charset(DOS)] */
59 uint16_t version;/* [value(WINBIND_HEADER_VERSION)] */
64 enum winbind_auth_level
65 #ifndef USE_UINT_ENUMS
67 WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN=1,
68 WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE=2,
69 WINBIND_AUTH_LEVEL_COMPAT_LOGOFF=3,
70 WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_PLAIN=4
73 { __donnot_use_enum_winbind_auth_level=0x7FFFFFFF}
74 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN ( 1 )
75 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE ( 2 )
76 #define WINBIND_AUTH_LEVEL_COMPAT_LOGOFF ( 3 )
77 #define WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_PLAIN ( 4 )
81 struct winbind_auth_compat_auth_plain_req {
83 const char *account_name;/* [charset(UTF8)] */
84 const char *domain_name;/* [unique,charset(UTF8)] */
85 const char *password;/* [charset(UTF8)] */
86 uint32_t num_require_membership_of_sids;
87 struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
88 const char *krb5_cc_type;/* [unique,charset(UTF8)] */
89 uint64_t *uid;/* [unique] */
92 struct winbind_auth_compat_auth_rep {
93 const char *unix_username;/* [unique,charset(UTF8)] */
94 const char *krb5_cc_name;/* [unique,charset(UTF8)] */
95 struct netr_SamInfo3 *info3;/* [unique] */
96 struct samr_DomInfo1 *password_policy;/* [unique] */
97 DATA_BLOB *afs_token;/* [unique] */
100 struct winbind_auth_compat_auth_response_req {
102 const char *account_name;/* [charset(UTF8)] */
103 const char *domain_name;/* [unique,charset(UTF8)] */
104 const char *workstation_name;/* [unique,charset(UTF8)] */
105 uint32_t num_require_membership_of_sids;
106 struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
107 uint32_t logon_parameters;
108 uint8_t challenge[8];
109 DATA_BLOB lm_response;
110 DATA_BLOB nt_response;
113 struct winbind_auth_compat_logoff_req {
115 const char *account_name;/* [charset(UTF8)] */
116 const char *domain_name;/* [unique,charset(UTF8)] */
117 const char *krb5_cc_name;/* [unique,charset(UTF8)] */
118 uint64_t *uid;/* [unique] */
121 struct winbind_auth_change_password_plain_req {
122 const char *account_name;/* [charset(UTF8)] */
123 const char *domain_name;/* [unique,charset(UTF8)] */
124 const char *old_password;/* [charset(UTF8)] */
125 const char *new_password;/* [charset(UTF8)] */
128 union winbind_auth_req {
129 struct winbind_auth_compat_auth_plain_req compat_auth_plain;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
130 struct winbind_auth_compat_auth_response_req compat_auth_response;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE)] */
131 struct winbind_auth_compat_logoff_req compat_logoff;/* [case(WINBIND_AUTH_LEVEL_COMPAT_LOGOFF)] */
132 struct winbind_auth_change_password_plain_req change_password_plain;/* [case(WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_PLAIN)] */
133 }/* [switch_type(winbind_auth_level)] */;
135 union winbind_auth_rep {
136 struct winbind_auth_compat_auth_rep compat_auth;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
137 }/* [switch_type(winbind_auth_level)] */;
139 enum winbind_trust_level
140 #ifndef USE_UINT_ENUMS
142 WINBIND_TRUST_LEVEL_COMPAT_LIST=1,
143 WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC=2
146 { __donnot_use_enum_winbind_trust_level=0x7FFFFFFF}
147 #define WINBIND_TRUST_LEVEL_COMPAT_LIST ( 1 )
148 #define WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC ( 2 )
152 struct winbind_domain_info_compat {
153 const char *netbios_name;/* [charset(UTF8)] */
154 const char *dns_name;/* [unique,charset(UTF8)] */
155 struct dom_sid *sid;/* [ref] */
156 uint32_t is_native_mode;
157 uint32_t is_active_directory;
161 struct winbind_domain_info_compat_array {
162 uint32_t num_domains;
163 struct winbind_domain_info_compat *domains;
166 struct winbind_domain_info_compat;
168 union winbind_trust_req {
169 }/* [switch_type(winbind_trust_level)] */;
171 union winbind_trust_rep {
172 struct winbind_domain_info_compat_array compat_trusts;/* [case(WINBIND_TRUST_LEVEL_COMPAT_LIST)] */
173 }/* [switch_type(winbind_trust_level)] */;
175 enum winbind_lookup_level
176 #ifndef USE_UINT_ENUMS
178 WINBIND_LOOKUP_LEVEL_SID2NAME=1,
179 WINBIND_LOOKUP_LEVEL_NAME2SID=2,
180 WINBIND_LOOKUP_LEVEL_RIDS2NAMES=3,
181 WINBIND_LOOKUP_LEVEL_SID2USERINFO=4,
182 WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS=5,
183 WINBIND_LOOKUP_LEVEL_EXPANDALIASES=6
186 { __donnot_use_enum_winbind_lookup_level=0x7FFFFFFF}
187 #define WINBIND_LOOKUP_LEVEL_SID2NAME ( 1 )
188 #define WINBIND_LOOKUP_LEVEL_NAME2SID ( 2 )
189 #define WINBIND_LOOKUP_LEVEL_RIDS2NAMES ( 3 )
190 #define WINBIND_LOOKUP_LEVEL_SID2USERINFO ( 4 )
191 #define WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS ( 5 )
192 #define WINBIND_LOOKUP_LEVEL_EXPANDALIASES ( 6 )
196 struct winbind_lookup_req_rids {
197 struct dom_sid *domain_sid;/* [unique] */
202 struct winbind_lookup_name_info {
203 const char *domain_name;/* [charset(UTF8)] */
204 const char *account_name;/* [charset(UTF8)] */
205 enum lsa_SidType type;
208 struct winbind_lookup_sid_info {
209 struct dom_sid *sid;/* [unique] */
210 enum lsa_SidType type;
213 struct winbind_lookup_name_info_array {
215 struct winbind_lookup_name_info *names;
218 struct winbind_lookup_name_info;
220 struct winbind_lookup_user_info {
221 const char *account;/* [charset(UTF8)] */
222 const char *gecos;/* [charset(UTF8)] */
223 const char *homedir;/* [charset(UTF8)] */
224 const char *shell;/* [charset(UTF8)] */
225 uint64_t primary_gid;
226 uint32_t primary_rid;
229 struct winbind_lookup_sid_info_array {
231 struct winbind_lookup_sid_info *sids;
234 struct winbind_lookup_sid_info;
236 union winbind_lookup_req {
237 struct dom_sid *sid;/* [unique,case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
238 const char *name;/* [charset(UTF8),case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
239 struct winbind_lookup_req_rids rids;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
240 struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_EXPANDALIASES)] */
241 }/* [switch_type(winbind_lookup_level)] */;
243 union winbind_lookup_rep {
244 struct winbind_lookup_name_info name_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
245 struct winbind_lookup_sid_info sid_info;/* [case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
246 struct winbind_lookup_name_info_array name_array;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
247 struct winbind_lookup_user_info user_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2USERINFO)] */
248 struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS)] */
249 }/* [switch_type(winbind_lookup_level)] */;
251 enum winbind_get_idmap_level
252 #ifndef USE_UINT_ENUMS
254 WINBIND_IDMAP_LEVEL_SID_TO_UID=1,
255 WINBIND_IDMAP_LEVEL_SID_TO_GID=2,
256 WINBIND_IDMAP_LEVEL_UID_TO_SID=3,
257 WINBIND_IDMAP_LEVEL_GID_TO_SID=4
260 { __donnot_use_enum_winbind_get_idmap_level=0x7FFFFFFF}
261 #define WINBIND_IDMAP_LEVEL_SID_TO_UID ( 1 )
262 #define WINBIND_IDMAP_LEVEL_SID_TO_GID ( 2 )
263 #define WINBIND_IDMAP_LEVEL_UID_TO_SID ( 3 )
264 #define WINBIND_IDMAP_LEVEL_GID_TO_SID ( 4 )
268 union winbind_get_idmap_req {
269 struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
270 uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
271 uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)] */
272 }/* [switch_type(winbind_get_idmap_level)] */;
274 union winbind_get_idmap_rep {
275 uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
276 uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)] */
277 struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
278 }/* [switch_type(winbind_get_idmap_level)] */;
280 enum winbind_set_idmap_level
281 #ifndef USE_UINT_ENUMS
283 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID=1,
284 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID=2,
285 WINBIND_SET_IDMAP_LEVEL_SET_MAPPING=3,
286 WINBIND_SET_IDMAP_LEVEL_SET_HWM=4
289 { __donnot_use_enum_winbind_set_idmap_level=0x7FFFFFFF}
290 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID ( 1 )
291 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID ( 2 )
292 #define WINBIND_SET_IDMAP_LEVEL_SET_MAPPING ( 3 )
293 #define WINBIND_SET_IDMAP_LEVEL_SET_HWM ( 4 )
297 union winbind_set_idmap_req {
298 struct id_map mapping;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)] */
299 struct unixid hwm;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)] */
300 }/* [switch_type(winbind_set_idmap_level)] */;
302 union winbind_set_idmap_rep {
303 uint64_t uid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)] */
304 uint64_t gid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)] */
305 }/* [switch_type(winbind_set_idmap_level)] */;
307 enum winbind_domain_info_level
308 #ifndef USE_UINT_ENUMS
310 WINBIND_DOMAIN_INFO_LEVEL_COMPAT=1,
311 WINBIND_DOMAIN_INFO_LEVEL_SEQNUM=2
314 { __donnot_use_enum_winbind_domain_info_level=0x7FFFFFFF}
315 #define WINBIND_DOMAIN_INFO_LEVEL_COMPAT ( 1 )
316 #define WINBIND_DOMAIN_INFO_LEVEL_SEQNUM ( 2 )
320 union winbind_domain_info {
321 struct winbind_domain_info_compat compat;/* [case(WINBIND_DOMAIN_INFO_LEVEL_COMPAT)] */
322 uint64_t seqnum;/* [case(WINBIND_DOMAIN_INFO_LEVEL_SEQNUM)] */
323 }/* [switch_type(winbind_domain_info_level)] */;
325 enum winbind_dc_info_level
326 #ifndef USE_UINT_ENUMS
328 WINBIND_DC_INFO_LEVEL_COMPAT_NT4=1,
329 WINBIND_DC_INFO_LEVEL_COMPAT_DS=2
332 { __donnot_use_enum_winbind_dc_info_level=0x7FFFFFFF}
333 #define WINBIND_DC_INFO_LEVEL_COMPAT_NT4 ( 1 )
334 #define WINBIND_DC_INFO_LEVEL_COMPAT_DS ( 2 )
338 union winbind_dc_info_params {
339 uint32_t flags;/* [case(WINBIND_DC_INFO_LEVEL_COMPAT_DS)] */
340 }/* [switch_type(winbind_dc_info_level)] */;
342 union winbind_dc_info {
343 const char *name;/* [unique,charset(UTF8),case(WINBIND_DC_INFO_LEVEL_COMPAT_NT4)] */
344 }/* [switch_type(winbind_dc_info_level)] */;
347 struct winbind_ping {
349 enum winbind_status result;
355 struct winbind_interface_details {
357 enum winbind_status result;
363 struct winbind_getpwnam {
365 enum winbind_status result;
371 struct winbind_getpwuid {
373 enum winbind_status result;
379 struct winbind_getgrnam {
381 enum winbind_status result;
387 struct winbind_getgrgid {
389 enum winbind_status result;
395 struct winbind_getgroups {
397 enum winbind_status result;
403 struct winbind_setpwent {
405 enum winbind_status result;
411 struct winbind_endpwent {
413 enum winbind_status result;
419 struct winbind_getpwent {
421 enum winbind_status result;
427 struct winbind_setgrent {
429 enum winbind_status result;
435 struct winbind_endgrent {
437 enum winbind_status result;
443 struct winbind_getgrent {
445 enum winbind_status result;
451 struct winbind_auth {
453 enum winbind_auth_level *level;/* [ref] */
454 union winbind_auth_req req;/* [switch_is(*level)] */
458 union winbind_auth_rep *rep;/* [ref,switch_is(*level)] */
459 enum winbind_status result;
465 struct winbind_pam_chng_paswd_auth_crap {
467 enum winbind_status result;
473 struct winbind_list_users {
475 enum winbind_status result;
481 struct winbind_list_groups {
483 enum winbind_status result;
489 struct winbind_trust {
491 enum winbind_trust_level *level;/* [ref] */
492 union winbind_trust_req req;/* [switch_is(*level)] */
496 union winbind_trust_rep *rep;/* [ref,switch_is(*level)] */
497 enum winbind_status result;
503 struct winbind_lookup {
505 enum winbind_lookup_level *level;/* [ref] */
506 union winbind_lookup_req req;/* [switch_is(*level)] */
510 union winbind_lookup_rep *rep;/* [ref,switch_is(*level)] */
511 enum winbind_status result;
517 struct winbind_get_idmap {
519 union winbind_get_idmap_req req;/* [switch_is(*level)] */
520 enum winbind_get_idmap_level *level;/* [ref] */
524 union winbind_get_idmap_rep *rep;/* [ref,switch_is(*level)] */
525 enum winbind_get_idmap_level *level;/* [ref] */
526 enum winbind_status result;
532 struct winbind_set_idmap {
534 union winbind_set_idmap_req req;/* [switch_is(*level)] */
535 enum winbind_set_idmap_level *level;/* [ref] */
539 union winbind_set_idmap_rep *rep;/* [ref,switch_is(*level)] */
540 enum winbind_set_idmap_level *level;/* [ref] */
541 enum winbind_status result;
547 struct winbind_info_fixname {
549 enum winbind_status result;
555 struct winbind_domain_name {
557 enum winbind_status result;
563 struct winbind_get_domain_info {
565 const char *domain_name;/* [charset(UTF8)] */
566 const char *dc_name;/* [unique,charset(UTF8)] */
567 enum winbind_domain_info_level *level;/* [ref] */
571 union winbind_domain_info *domain_info;/* [ref,switch_is(*level)] */
572 enum winbind_domain_info_level *level;/* [ref] */
573 enum winbind_status result;
579 struct winbind_get_dc_info {
581 const char *domain_name;/* [charset(UTF8)] */
582 union winbind_dc_info_params params;/* [switch_is(*level)] */
583 enum winbind_dc_info_level *level;/* [ref] */
587 union winbind_dc_info *dc_info;/* [ref,switch_is(*level)] */
588 enum winbind_dc_info_level *level;/* [ref] */
589 enum winbind_status result;
595 struct winbind_wins_byip {
597 enum winbind_status result;
603 struct winbind_wins_byname {
605 enum winbind_status result;
611 struct winbind_getgrlist {
613 enum winbind_status result;
619 struct winbind_netbios_name {
621 enum winbind_status result;
627 struct winbind_getusersids {
629 enum winbind_status result;
635 struct winbind_getuserdomgroups {
637 enum winbind_status result;
643 struct winbind_dual_userinfo {
645 enum winbind_status result;
651 struct winbind_dual_getsidaliases {
653 enum winbind_status result;
659 struct winbind_ccache_ntlmauth {
661 enum winbind_status result;
666 #endif /* _HEADER_winbind_protocol */