2 * Winbind (NDR-based) Protocol
7 [ uuid("b6608c99-0407-401b-96d3-7bcda67232af"),
9 pointer_default(unique)
10 ] interface winbind_protocol
12 const uint32 WINBIND_MAX_LENGTH_PRIVILEGED = 0x0FFFFFFF;
13 const uint32 WINBIND_MAX_LENGTH_UNPRIVILEGED = 0x00020000;
15 typedef [public,v1_enum] enum {
16 WINBIND_STATUS_OK = 0x00000000,
17 WINBIND_STATUS_UNKNOWN_ERROR = 0x57420001,
18 WINBIND_STATUS_NOT_IMPLEMENTED = 0x57420002,
19 WINBIND_STATUS_NOT_SUPPORTED = 0x57420003,
20 WINBIND_STATUS_NO_MEMORY = 0x57420004,
21 WINBIND_STATUS_INVALID_PARAMETER = 0x57420005,
22 WINBIND_STATUS_INVALID_LEVEL = 0x57420006,
23 WINBIND_STATUS_UNKNOWN_LEVEL = 0x57420007,
24 WINBIND_STATUS_DOMAIN_OFFLINE = 0x57420008
27 const uint32 WINBIND_STATUS_FOOBAR = WINBIND_STATUS_UNKNOWN_ERROR;
29 typedef [bitmap16bit] bitmap {
30 WINBIND_HEADER_VERSION = 0x0001
31 } winbind_header_version;
33 typedef [bitmap32bit] bitmap {
34 WINBIND_HEADER_FLAGS_RESPONSE = 0x00000001,
35 WINBIND_HEADER_FLAGS_ERROR = 0x00000002
36 } winbind_header_flags;
38 const uint32 WINBIND_HEADER_SIZE = 0x10;
39 [public] struct winbind_header {
41 [charset(DOS),value("WBPT")] uint8 magic[4];
42 [value(WINBIND_HEADER_VERSION)] winbind_header_version version;
44 winbind_header_flags flags;
48 * Just tell me winbindd is running
50 winbind_status winbind_ping();
53 * - Get the interface version
54 * - Find the location of the privileged pipe
56 winbind_status winbind_interface_details(/*TODO*/);
59 * Get users and groups
61 winbind_status winbind_getpwnam(/*TODO*/);
62 winbind_status winbind_getpwuid(/*TODO*/);
64 winbind_status winbind_getgrnam(/*TODO*/);
65 winbind_status winbind_getgrgid(/*TODO*/);
67 winbind_status winbind_getgroups(/*TODO*/);
70 * Enumerate users and groups
72 winbind_status winbind_setpwent(/*TODO*/);
73 winbind_status winbind_endpwent(/*TODO*/);
74 winbind_status winbind_getpwent(/*TODO*/);
76 winbind_status winbind_setgrent(/*TODO*/);
77 winbind_status winbind_endgrent(/*TODO*/);
78 winbind_status winbind_getgrent(/*TODO*/);
81 * PAM authenticate and password change
83 winbind_status winbind_pam_auth(/*TODO*/);
84 winbind_status winbind_pam_auth_crap(/*TODO*/);
85 winbind_status winbind_pam_chauthtok(/*TODO*/);
86 winbind_status winbind_pam_logoff(/*TODO*/);
87 winbind_status winbind_pam_chng_paswd_auth_crap(/*TODO*/);
93 /* List w/o rid->id mapping */
94 winbind_status winbind_list_users(/*TODO*/);
96 /* List w/o rid->id mapping */
97 winbind_status winbind_list_groups(/*TODO*/);
99 winbind_status winbind_list_trustdom(/*TODO*/);
105 winbind_status winbind_lookup_sid(/*TODO*/);
106 winbind_status winbind_lookup_name(/*TODO*/);
107 winbind_status winbind_lookup_rids(/*TODO*/);
112 typedef [v1_enum] enum {
113 WINBIND_IDMAP_LEVEL_SID_TO_UID = 1,
114 WINBIND_IDMAP_LEVEL_SID_TO_GID = 2,
115 WINBIND_IDMAP_LEVEL_UID_TO_SID = 3,
116 WINBIND_IDMAP_LEVEL_GID_TO_SID = 4
117 } winbind_get_idmap_level;
119 typedef [switch_type(winbind_get_idmap_level)] union {
120 [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)]
121 /*TODO [ref]*/ dom_sid *sid;
122 [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)]
123 /*TODO [ref]*/ dom_sid *sid;
124 [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)]
126 [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)]
128 } winbind_get_idmap_req;
130 typedef [switch_type(winbind_get_idmap_level)] union {
131 [case(WINBIND_IDMAP_LEVEL_SID_TO_UID)]
133 [case(WINBIND_IDMAP_LEVEL_SID_TO_GID)]
135 [case(WINBIND_IDMAP_LEVEL_UID_TO_SID)]
136 /*TODO [ref]*/ dom_sid *sid;
137 [case(WINBIND_IDMAP_LEVEL_GID_TO_SID)]
138 /*TODO [ref]*/ dom_sid *sid;
139 } winbind_get_idmap_rep;
141 winbind_status winbind_get_idmap(
142 [in,out] winbind_get_idmap_level *level,
143 [in,switch_is(*level)] winbind_get_idmap_req req,
144 [out,switch_is(*level)] winbind_get_idmap_rep *rep
147 typedef [v1_enum] enum {
148 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID = 1,
149 WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID = 2,
150 WINBIND_SET_IDMAP_LEVEL_SET_MAPPING = 3,
151 WINBIND_SET_IDMAP_LEVEL_SET_HWM = 4
152 } winbind_set_idmap_level;
154 typedef [switch_type(winbind_set_idmap_level)] union {
155 [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)];
156 [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)];
157 [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)]
159 [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)]
161 } winbind_set_idmap_req;
163 typedef [switch_type(winbind_set_idmap_level)] union {
164 [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_UID)]
166 [case(WINBIND_SET_IDMAP_LEVEL_ALLOCATE_GID)]
168 [case(WINBIND_SET_IDMAP_LEVEL_SET_MAPPING)];
169 [case(WINBIND_SET_IDMAP_LEVEL_SET_HWM)];
170 } winbind_set_idmap_rep;
172 winbind_status winbind_set_idmap(
173 [in,out] winbind_set_idmap_level *level,
174 [in,switch_is(*level)] winbind_set_idmap_req req,
175 [out,switch_is(*level)] winbind_set_idmap_rep *rep
178 /* Check machine account pw works */
179 winbind_status winbind_check_machcc(/*TODO*/);
180 /* Various bit of info. Currently just tidbits */
181 winbind_status winbind_info_fixname(/*TODO*/);
182 /* The domain this winbind server is a member of (lp_workgroup()) */
183 winbind_status winbind_domain_name(/*TODO*/);
185 /* Most of what we know from struct winbind_domain */
186 struct winbind_domain_info_compat {
187 [string,charset(UTF8)] uint8 netbios_name[];
188 [string,charset(UTF8)] uint8 *dns_name;
190 boolean32 is_native_mode;
191 boolean32 is_active_directory;
192 boolean32 is_primary;
195 typedef [v1_enum] enum {
196 WINBIND_DOMAIN_INFO_LEVEL_COMPAT = 1,
197 WINBIND_DOMAIN_INFO_LEVEL_SEQNUM = 2
198 } winbind_domain_info_level;
200 typedef [switch_type(winbind_domain_info_level)] union {
201 [case(WINBIND_DOMAIN_INFO_LEVEL_COMPAT)]
202 struct winbind_domain_info_compat compat;
203 [case(WINBIND_DOMAIN_INFO_LEVEL_SEQNUM)]
205 } winbind_domain_info;
207 winbind_status winbind_get_domain_info(
208 [in,string,charset(UTF8)] uint8 domain_name[],
209 [in,unique,string,charset(UTF8)] uint8 *dc_name,
210 [in,out] winbind_domain_info_level *level,
211 [out,switch_is(*level)] winbind_domain_info *domain_info
214 /* Issue a GetDCName or DsGetDCName Request */
215 typedef [v1_enum] enum {
216 WINBIND_DC_INFO_LEVEL_COMPAT_NT4 = 1,
217 WINBIND_DC_INFO_LEVEL_COMPAT_DS = 2
218 } winbind_dc_info_level;
220 typedef [switch_type(winbind_dc_info_level)] union {
221 [case(WINBIND_DC_INFO_LEVEL_COMPAT_NT4)];
222 [case(WINBIND_DC_INFO_LEVEL_COMPAT_DS)]
224 } winbind_dc_info_params;
226 typedef [switch_type(winbind_dc_info_level)] union {
227 [case(WINBIND_DC_INFO_LEVEL_COMPAT_NT4)]
228 [string,charset(UTF8)] uint8 *name;
229 [case(WINBIND_DC_INFO_LEVEL_COMPAT_DS)]
230 [string,charset(UTF8)] uint8 *name;
233 winbind_status winbind_get_dc_info(
234 [in,string,charset(UTF8)] uint8 domain_name[],
235 [in,out] winbind_dc_info_level *level,
236 [in,switch_is(*level)] winbind_dc_info_params params,
237 [out,switch_is(*level)] winbind_dc_info *dc_info
244 winbind_status winbind_wins_byip(/*TODO*/);
245 winbind_status winbind_wins_byname(/*TODO*/);
247 /* this is like GETGRENT but gives an empty group list */
248 winbind_status winbind_getgrlist(/*TODO*/);
250 /* The netbios name of the server */
251 winbind_status winbind_netbios_name(/*TODO*/);
254 /* return a list of group sids for a user sid */
255 winbind_status winbind_getusersids(/*TODO*/);
257 /* Various group queries */
258 winbind_status winbind_getuserdomgroups(/*TODO*/);
261 * Wrapper around possibly blocking unix nss calls
264 winbind_status winbind_dual_userinfo(/*TODO*/);
265 winbind_status winbind_dual_getsidaliases(/*TODO*/);
268 * Complete the challenge phase of the NTLM authentication
269 * protocol using cached password.
271 winbind_status winbind_ccache_ntlmauth(/*TODO*/);