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,
71 WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_CRYPT=5
74 { __donnot_use_enum_winbind_auth_level=0x7FFFFFFF}
75 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN ( 1 )
76 #define WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE ( 2 )
77 #define WINBIND_AUTH_LEVEL_COMPAT_LOGOFF ( 3 )
78 #define WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_PLAIN ( 4 )
79 #define WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_CRYPT ( 5 )
83 struct winbind_auth_compat_auth_plain_req {
85 const char *account_name;/* [charset(UTF8)] */
86 const char *domain_name;/* [unique,charset(UTF8)] */
87 const char *password;/* [charset(UTF8)] */
88 uint32_t num_require_membership_of_sids;
89 struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
90 const char *krb5_cc_type;/* [unique,charset(UTF8)] */
91 uint64_t *uid;/* [unique] */
94 struct winbind_auth_compat_auth_rep {
95 const char *unix_username;/* [unique,charset(UTF8)] */
96 const char *krb5_cc_name;/* [unique,charset(UTF8)] */
97 struct netr_SamInfo3 *info3;/* [unique] */
98 struct samr_DomInfo1 *password_policy;/* [unique] */
99 DATA_BLOB *afs_token;/* [unique] */
102 struct winbind_auth_compat_auth_response_req {
104 const char *account_name;/* [charset(UTF8)] */
105 const char *domain_name;/* [unique,charset(UTF8)] */
106 const char *workstation_name;/* [unique,charset(UTF8)] */
107 uint32_t num_require_membership_of_sids;
108 struct dom_sid *require_membership_of_sids;/* [unique,size_is(num_require_membership_of_sids)] */
109 uint32_t logon_parameters;
110 uint8_t challenge[8];
111 DATA_BLOB lm_response;
112 DATA_BLOB nt_response;
115 struct winbind_auth_compat_logoff_req {
117 const char *account_name;/* [charset(UTF8)] */
118 const char *domain_name;/* [unique,charset(UTF8)] */
119 const char *krb5_cc_name;/* [unique,charset(UTF8)] */
120 uint64_t *uid;/* [unique] */
123 struct winbind_auth_change_password_plain_req {
124 const char *account_name;/* [charset(UTF8)] */
125 const char *domain_name;/* [unique,charset(UTF8)] */
126 const char *old_password;/* [charset(UTF8)] */
127 const char *new_password;/* [charset(UTF8)] */
130 struct winbind_auth_change_password_crypt_req {
131 const char *account_name;/* [charset(UTF8)] */
132 const char *domain_name;/* [unique,charset(UTF8)] */
133 struct samr_CryptPassword nt_password;
134 struct samr_Password nt_verifier;
135 struct samr_CryptPassword *lm_password;/* [unique] */
136 struct samr_Password *lm_verifier;/* [unique] */
139 union winbind_auth_req {
140 struct winbind_auth_compat_auth_plain_req compat_auth_plain;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
141 struct winbind_auth_compat_auth_response_req compat_auth_response;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_RESPONSE)] */
142 struct winbind_auth_compat_logoff_req compat_logoff;/* [case(WINBIND_AUTH_LEVEL_COMPAT_LOGOFF)] */
143 struct winbind_auth_change_password_plain_req change_password_plain;/* [case(WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_PLAIN)] */
144 struct winbind_auth_change_password_crypt_req change_password_crypt;/* [case(WINBIND_AUTH_LEVEL_CHANGE_PASSWORD_CRYPT)] */
145 }/* [switch_type(winbind_auth_level)] */;
147 union winbind_auth_rep {
148 struct winbind_auth_compat_auth_rep compat_auth;/* [case(WINBIND_AUTH_LEVEL_COMPAT_AUTH_PLAIN)] */
149 }/* [switch_type(winbind_auth_level)] */;
151 enum winbind_trust_level
152 #ifndef USE_UINT_ENUMS
154 WINBIND_TRUST_LEVEL_COMPAT_LIST=1,
155 WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC=2
158 { __donnot_use_enum_winbind_trust_level=0x7FFFFFFF}
159 #define WINBIND_TRUST_LEVEL_COMPAT_LIST ( 1 )
160 #define WINBIND_TRUST_LEVEL_COMPAT_CHECK_MACHCC ( 2 )
164 struct winbind_domain_info_compat {
165 const char *netbios_name;/* [charset(UTF8)] */
166 const char *dns_name;/* [unique,charset(UTF8)] */
167 struct dom_sid *sid;/* [ref] */
168 uint32_t is_native_mode;
169 uint32_t is_active_directory;
173 struct winbind_domain_info_compat_array {
174 uint32_t num_domains;
175 struct winbind_domain_info_compat *domains;
178 struct winbind_domain_info_compat;
180 union winbind_trust_req {
181 }/* [switch_type(winbind_trust_level)] */;
183 union winbind_trust_rep {
184 struct winbind_domain_info_compat_array compat_trusts;/* [case(WINBIND_TRUST_LEVEL_COMPAT_LIST)] */
185 }/* [switch_type(winbind_trust_level)] */;
187 enum winbind_lookup_level
188 #ifndef USE_UINT_ENUMS
190 WINBIND_LOOKUP_LEVEL_SID2NAME=1,
191 WINBIND_LOOKUP_LEVEL_NAME2SID=2,
192 WINBIND_LOOKUP_LEVEL_RIDS2NAMES=3,
193 WINBIND_LOOKUP_LEVEL_SID2USERINFO=4,
194 WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS=5,
195 WINBIND_LOOKUP_LEVEL_EXPANDALIASES=6
198 { __donnot_use_enum_winbind_lookup_level=0x7FFFFFFF}
199 #define WINBIND_LOOKUP_LEVEL_SID2NAME ( 1 )
200 #define WINBIND_LOOKUP_LEVEL_NAME2SID ( 2 )
201 #define WINBIND_LOOKUP_LEVEL_RIDS2NAMES ( 3 )
202 #define WINBIND_LOOKUP_LEVEL_SID2USERINFO ( 4 )
203 #define WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS ( 5 )
204 #define WINBIND_LOOKUP_LEVEL_EXPANDALIASES ( 6 )
208 struct winbind_lookup_req_rids {
209 struct dom_sid *domain_sid;/* [unique] */
214 struct winbind_lookup_name_info {
215 const char *domain_name;/* [charset(UTF8)] */
216 const char *account_name;/* [charset(UTF8)] */
217 enum lsa_SidType type;
220 struct winbind_lookup_sid_info {
221 struct dom_sid *sid;/* [unique] */
222 enum lsa_SidType type;
225 struct winbind_lookup_name_info_array {
227 struct winbind_lookup_name_info *names;
230 struct winbind_lookup_name_info;
232 struct winbind_lookup_user_info {
233 const char *account;/* [charset(UTF8)] */
234 const char *gecos;/* [charset(UTF8)] */
235 const char *homedir;/* [charset(UTF8)] */
236 const char *shell;/* [charset(UTF8)] */
237 uint64_t primary_gid;
238 uint32_t primary_rid;
241 struct winbind_lookup_sid_info_array {
243 struct winbind_lookup_sid_info *sids;
246 struct winbind_lookup_sid_info;
248 union winbind_lookup_req {
249 struct dom_sid *sid;/* [unique,case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
250 const char *name;/* [charset(UTF8),case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
251 struct winbind_lookup_req_rids rids;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
252 struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_EXPANDALIASES)] */
253 }/* [switch_type(winbind_lookup_level)] */;
255 union winbind_lookup_rep {
256 struct winbind_lookup_name_info name_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2NAME)] */
257 struct winbind_lookup_sid_info sid_info;/* [case(WINBIND_LOOKUP_LEVEL_NAME2SID)] */
258 struct winbind_lookup_name_info_array name_array;/* [case(WINBIND_LOOKUP_LEVEL_RIDS2NAMES)] */
259 struct winbind_lookup_user_info user_info;/* [case(WINBIND_LOOKUP_LEVEL_SID2USERINFO)] */
260 struct winbind_lookup_sid_info_array sid_array;/* [case(WINBIND_LOOKUP_LEVEL_SID2DOMGROUPS)] */
261 }/* [switch_type(winbind_lookup_level)] */;
263 enum winbind_get_idmap_level
264 #ifndef USE_UINT_ENUMS
266 WINBIND_IDMAP_LEVEL_SID_TO_UID=1,
267 WINBIND_IDMAP_LEVEL_SID_TO_GID=2,
268 WINBIND_IDMAP_LEVEL_UID_TO_SID=3,
269 WINBIND_IDMAP_LEVEL_GID_TO_SID=4
272 { __donnot_use_enum_winbind_get_idmap_level=0x7FFFFFFF}
273 #define WINBIND_IDMAP_LEVEL_SID_TO_UID ( 1 )
274 #define WINBIND_IDMAP_LEVEL_SID_TO_GID ( 2 )
275 #define WINBIND_IDMAP_LEVEL_UID_TO_SID ( 3 )
276 #define WINBIND_IDMAP_LEVEL_GID_TO_SID ( 4 )
280 union winbind_get_idmap_req {
281 struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
282 uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
283 uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)] */
284 }/* [switch_type(winbind_get_idmap_level)] */;
286 union winbind_get_idmap_rep {
287 uint64_t uid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)] */
288 uint64_t gid;/* [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)] */
289 struct dom_sid *sid;/* [unique,case(WINBIND_IDMAP_LEVEL_UID_TO_SID)] */
290 }/* [switch_type(winbind_get_idmap_level)] */;
292 enum winbind_set_idmap_level
293 #ifndef USE_UINT_ENUMS
295 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID=1,
296 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID=2,
297 WINBIND_SET_IDMAP_LEVEL_SET_MAPPING=3,
298 WINBIND_SET_IDMAP_LEVEL_SET_HWM=4
301 { __donnot_use_enum_winbind_set_idmap_level=0x7FFFFFFF}
302 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID ( 1 )
303 #define WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID ( 2 )
304 #define WINBIND_SET_IDMAP_LEVEL_SET_MAPPING ( 3 )
305 #define WINBIND_SET_IDMAP_LEVEL_SET_HWM ( 4 )
309 union winbind_set_idmap_req {
310 struct id_map mapping;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)] */
311 struct unixid hwm;/* [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)] */
312 }/* [switch_type(winbind_set_idmap_level)] */;
314 union winbind_set_idmap_rep {
315 uint64_t uid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)] */
316 uint64_t gid;/* [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)] */
317 }/* [switch_type(winbind_set_idmap_level)] */;
319 enum winbind_domain_info_level
320 #ifndef USE_UINT_ENUMS
322 WINBIND_DOMAIN_INFO_LEVEL_COMPAT=1,
323 WINBIND_DOMAIN_INFO_LEVEL_SEQNUM=2
326 { __donnot_use_enum_winbind_domain_info_level=0x7FFFFFFF}
327 #define WINBIND_DOMAIN_INFO_LEVEL_COMPAT ( 1 )
328 #define WINBIND_DOMAIN_INFO_LEVEL_SEQNUM ( 2 )
332 union winbind_domain_info {
333 struct winbind_domain_info_compat compat;/* [case(WINBIND_DOMAIN_INFO_LEVEL_COMPAT)] */
334 uint64_t seqnum;/* [case(WINBIND_DOMAIN_INFO_LEVEL_SEQNUM)] */
335 }/* [switch_type(winbind_domain_info_level)] */;
337 enum winbind_dc_info_level
338 #ifndef USE_UINT_ENUMS
340 WINBIND_DC_INFO_LEVEL_COMPAT_NT4=1,
341 WINBIND_DC_INFO_LEVEL_COMPAT_DS=2
344 { __donnot_use_enum_winbind_dc_info_level=0x7FFFFFFF}
345 #define WINBIND_DC_INFO_LEVEL_COMPAT_NT4 ( 1 )
346 #define WINBIND_DC_INFO_LEVEL_COMPAT_DS ( 2 )
350 union winbind_dc_info_params {
351 uint32_t flags;/* [case(WINBIND_DC_INFO_LEVEL_COMPAT_DS)] */
352 }/* [switch_type(winbind_dc_info_level)] */;
354 union winbind_dc_info {
355 const char *name;/* [unique,charset(UTF8),case(WINBIND_DC_INFO_LEVEL_COMPAT_NT4)] */
356 }/* [switch_type(winbind_dc_info_level)] */;
359 struct winbind_ping {
361 enum winbind_status result;
367 struct winbind_interface_details {
369 enum winbind_status result;
375 struct winbind_getpwnam {
377 enum winbind_status result;
383 struct winbind_getpwuid {
385 enum winbind_status result;
391 struct winbind_getgrnam {
393 enum winbind_status result;
399 struct winbind_getgrgid {
401 enum winbind_status result;
407 struct winbind_getgroups {
409 enum winbind_status result;
415 struct winbind_setpwent {
417 enum winbind_status result;
423 struct winbind_endpwent {
425 enum winbind_status result;
431 struct winbind_getpwent {
433 enum winbind_status result;
439 struct winbind_setgrent {
441 enum winbind_status result;
447 struct winbind_endgrent {
449 enum winbind_status result;
455 struct winbind_getgrent {
457 enum winbind_status result;
463 struct winbind_auth {
465 enum winbind_auth_level *level;/* [ref] */
466 union winbind_auth_req req;/* [switch_is(*level)] */
470 union winbind_auth_rep *rep;/* [ref,switch_is(*level)] */
471 enum winbind_status result;
477 struct winbind_list_users {
479 enum winbind_status result;
485 struct winbind_list_groups {
487 enum winbind_status result;
493 struct winbind_trust {
495 enum winbind_trust_level *level;/* [ref] */
496 union winbind_trust_req req;/* [switch_is(*level)] */
500 union winbind_trust_rep *rep;/* [ref,switch_is(*level)] */
501 enum winbind_status result;
507 struct winbind_lookup {
509 enum winbind_lookup_level *level;/* [ref] */
510 union winbind_lookup_req req;/* [switch_is(*level)] */
514 union winbind_lookup_rep *rep;/* [ref,switch_is(*level)] */
515 enum winbind_status result;
521 struct winbind_get_idmap {
523 union winbind_get_idmap_req req;/* [switch_is(*level)] */
524 enum winbind_get_idmap_level *level;/* [ref] */
528 union winbind_get_idmap_rep *rep;/* [ref,switch_is(*level)] */
529 enum winbind_get_idmap_level *level;/* [ref] */
530 enum winbind_status result;
536 struct winbind_set_idmap {
538 union winbind_set_idmap_req req;/* [switch_is(*level)] */
539 enum winbind_set_idmap_level *level;/* [ref] */
543 union winbind_set_idmap_rep *rep;/* [ref,switch_is(*level)] */
544 enum winbind_set_idmap_level *level;/* [ref] */
545 enum winbind_status result;
551 struct winbind_info_fixname {
553 enum winbind_status result;
559 struct winbind_domain_name {
561 enum winbind_status result;
567 struct winbind_get_domain_info {
569 const char *domain_name;/* [charset(UTF8)] */
570 const char *dc_name;/* [unique,charset(UTF8)] */
571 enum winbind_domain_info_level *level;/* [ref] */
575 union winbind_domain_info *domain_info;/* [ref,switch_is(*level)] */
576 enum winbind_domain_info_level *level;/* [ref] */
577 enum winbind_status result;
583 struct winbind_get_dc_info {
585 const char *domain_name;/* [charset(UTF8)] */
586 union winbind_dc_info_params params;/* [switch_is(*level)] */
587 enum winbind_dc_info_level *level;/* [ref] */
591 union winbind_dc_info *dc_info;/* [ref,switch_is(*level)] */
592 enum winbind_dc_info_level *level;/* [ref] */
593 enum winbind_status result;
599 struct winbind_wins_byip {
601 enum winbind_status result;
607 struct winbind_wins_byname {
609 enum winbind_status result;
615 struct winbind_getgrlist {
617 enum winbind_status result;
623 struct winbind_netbios_name {
625 enum winbind_status result;
631 struct winbind_getusersids {
633 enum winbind_status result;
639 struct winbind_getuserdomgroups {
641 enum winbind_status result;
647 struct winbind_dual_userinfo {
649 enum winbind_status result;
655 struct winbind_dual_getsidaliases {
657 enum winbind_status result;
663 struct winbind_ccache_ntlmauth {
665 enum winbind_status result;
670 #endif /* _HEADER_winbind_protocol */