s3-libnet: Improve error message.
[Samba.git] / source3 / winbindd / winbindd_proto.h
blobdfd61621c6abae204f10693a58a017159748db2b
1 /*
2 * Unix SMB/CIFS implementation.
3 * collected prototypes header
5 * frozen from "make proto" in May 2008
7 * Copyright (C) Michael Adam 2008
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef _WINBINDD_PROTO_H_
24 #define _WINBINDD_PROTO_H_
26 #include "ads.h"
28 /* The following definitions come from winbindd/winbindd.c */
29 struct messaging_context *winbind_messaging_context(void);
30 struct imessaging_context *winbind_imessaging_context(void);
31 void request_error(struct winbindd_cli_state *state);
32 void request_ok(struct winbindd_cli_state *state);
33 bool winbindd_setup_sig_term_handler(bool parent);
34 bool winbindd_setup_stdin_handler(bool parent, bool foreground);
35 bool winbindd_setup_sig_hup_handler(const char *lfile);
36 bool winbindd_use_idmap_cache(void);
37 bool winbindd_use_cache(void);
38 char *get_winbind_priv_pipe_dir(void);
39 struct tevent_context *winbind_event_context(void);
41 /* The following definitions come from winbindd/winbindd_ads.c */
43 /* The following definitions come from winbindd/winbindd_rpc.c */
45 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
46 struct winbindd_domain *domain,
47 uint32_t num_sids,
48 const struct dom_sid *sids,
49 char ***domains,
50 char ***names,
51 enum lsa_SidType **types);
52 NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
53 struct winbindd_domain *domain,
54 struct lsa_SidArray *sids,
55 struct lsa_RefDomainList **pdomains,
56 struct lsa_TransNameArray **pnames);
58 /* The following definitions come from winbindd/winbindd_cache.c */
60 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
61 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
62 TALLOC_CTX *mem_ctx,
63 const struct dom_sid *sid,
64 const uint8 **cached_nt_pass,
65 const uint8 **cached_salt);
66 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
67 const struct dom_sid *sid,
68 const uint8 nt_pass[NT_HASH_LEN]);
69 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
70 const struct dom_sid *user_sid);
71 bool wcache_invalidate_cache(void);
72 bool wcache_invalidate_cache_noinit(void);
73 bool init_wcache(void);
74 bool initialize_winbindd_cache(void);
75 void close_winbindd_cache(void);
76 NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,
77 const struct dom_sid *sid,
78 TALLOC_CTX *mem_ctx,
79 char **domain_name,
80 char **name,
81 enum lsa_SidType *type);
82 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
83 TALLOC_CTX *mem_ctx,
84 const struct dom_sid *group_sid,
85 uint32_t *num_names,
86 struct dom_sid **sid_mem, char ***names,
87 uint32_t **name_types);
88 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
89 char **domain_name, char **name,
90 enum lsa_SidType *type);
91 bool lookup_cached_name(const char *domain_name,
92 const char *name,
93 struct dom_sid *sid,
94 enum lsa_SidType *type);
95 void cache_name2sid(struct winbindd_domain *domain,
96 const char *domain_name, const char *name,
97 enum lsa_SidType type, const struct dom_sid *sid);
98 NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
99 const char *domain_name,
100 const char *name,
101 struct dom_sid *sid,
102 enum lsa_SidType *type);
103 NTSTATUS wcache_query_user(struct winbindd_domain *domain,
104 TALLOC_CTX *mem_ctx,
105 const struct dom_sid *user_sid,
106 struct wbint_userinfo *info);
107 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
108 TALLOC_CTX *mem_ctx,
109 uint32 num_sids, const struct dom_sid *sids,
110 uint32 *pnum_aliases, uint32 **paliases);
111 NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
112 TALLOC_CTX *mem_ctx,
113 const struct dom_sid *user_sid,
114 uint32_t *pnum_sids,
115 struct dom_sid **psids);
117 void wcache_flush_cache(void);
118 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
119 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
120 bool set_global_winbindd_state_offline(void);
121 void set_global_winbindd_state_online(void);
122 bool get_global_winbindd_state_offline(void);
123 int winbindd_validate_cache(void);
124 int winbindd_validate_cache_nobackup(void);
125 bool winbindd_cache_validate_and_initialize(void);
126 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
127 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
128 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
129 struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
130 void wcache_tdc_clear( void );
131 #ifdef HAVE_ADS
132 struct ads_struct;
133 NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
134 const struct dom_sid *user_sid,
135 TALLOC_CTX *ctx,
136 const char **homedir, const char **shell,
137 const char **gecos, gid_t *p_gid);
138 #endif
139 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
140 time_t last_seq_check);
141 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
142 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
143 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
144 const DATA_BLOB *req, const DATA_BLOB *resp);
146 /* The following definitions come from winbindd/winbindd_ccache_access.c */
148 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
149 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
150 struct winbindd_cli_state *state);
151 void winbindd_ccache_save(struct winbindd_cli_state *state);
153 /* The following definitions come from winbindd/winbindd_cm.c */
154 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
155 void *private_data,
156 uint32_t msg_type,
157 struct server_id server_id,
158 DATA_BLOB *data);
159 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
160 void *private_data,
161 uint32_t msg_type,
162 struct server_id server_id,
163 DATA_BLOB *data);
165 void set_domain_offline(struct winbindd_domain *domain);
166 void set_domain_online_request(struct winbindd_domain *domain);
168 struct ndr_interface_table;
169 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
170 const struct ndr_interface_table *table,
171 struct rpc_pipe_client **ret_pipe);
172 void invalidate_cm_connection(struct winbindd_cm_conn *conn);
173 void close_conns_after_fork(void);
174 NTSTATUS init_dc_connection(struct winbindd_domain *domain);
175 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
176 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
177 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
178 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
179 NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain,
180 TALLOC_CTX *mem_ctx,
181 struct rpc_pipe_client **cli);
182 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
183 TALLOC_CTX *mem_ctx,
184 struct rpc_pipe_client **cli,
185 struct policy_handle *lsa_policy);
186 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
187 struct rpc_pipe_client **cli);
188 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
189 const char *domain_name,
190 char **p_dc_name, char **p_dc_ip);
192 /* The following definitions come from winbindd/winbindd_cred_cache.c */
194 bool ccache_entry_exists(const char *username);
195 bool ccache_entry_identical(const char *username,
196 uid_t uid,
197 const char *ccname);
198 void ccache_remove_all_after_fork(void);
199 void ccache_regain_all_now(void);
200 NTSTATUS add_ccache_to_list(const char *princ_name,
201 const char *ccname,
202 const char *service,
203 const char *username,
204 const char *password,
205 const char *realm,
206 uid_t uid,
207 time_t create_time,
208 time_t ticket_end,
209 time_t renew_until,
210 bool postponed_request);
211 NTSTATUS remove_ccache(const char *username);
212 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
213 NTSTATUS winbindd_add_memory_creds(const char *username,
214 uid_t uid,
215 const char *pass);
216 NTSTATUS winbindd_delete_memory_creds(const char *username);
217 NTSTATUS winbindd_replace_memory_creds(const char *username,
218 const char *pass);
220 /* The following definitions come from winbindd/winbindd_creds.c */
222 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
223 TALLOC_CTX *mem_ctx,
224 const struct dom_sid *sid,
225 struct netr_SamInfo3 **info3,
226 const uint8 *cached_nt_pass[NT_HASH_LEN],
227 const uint8 *cred_salt[NT_HASH_LEN]);
228 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
229 const char *user,
230 const char *pass,
231 struct netr_SamInfo3 *info3);
232 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
233 const char *user,
234 const char *pass,
235 struct netr_SamInfo3 *info3);
236 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
237 const char *user,
238 const char *pass);
240 /* The following definitions come from winbindd/winbindd_domain.c */
242 void setup_domain_child(struct winbindd_domain *domain);
244 /* The following definitions come from winbindd/winbindd_dual.c */
246 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
247 struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
249 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
250 struct tevent_context *ev,
251 struct winbindd_child *child,
252 struct winbindd_request *request);
253 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
254 struct winbindd_response **presponse, int *err);
255 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
256 struct tevent_context *ev,
257 struct winbindd_domain *domain,
258 struct winbindd_request *request);
259 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
260 struct winbindd_response **presponse, int *err);
262 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
263 const struct winbindd_child_dispatch_table *table,
264 const char *logprefix,
265 const char *logname);
266 void winbind_child_died(pid_t pid);
267 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
268 void winbind_msg_debug(struct messaging_context *msg_ctx,
269 void *private_data,
270 uint32_t msg_type,
271 struct server_id server_id,
272 DATA_BLOB *data);
273 void winbind_msg_offline(struct messaging_context *msg_ctx,
274 void *private_data,
275 uint32_t msg_type,
276 struct server_id server_id,
277 DATA_BLOB *data);
278 void winbind_msg_online(struct messaging_context *msg_ctx,
279 void *private_data,
280 uint32_t msg_type,
281 struct server_id server_id,
282 DATA_BLOB *data);
283 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
284 void *private_data,
285 uint32_t msg_type,
286 struct server_id server_id,
287 DATA_BLOB *data);
288 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
289 void *private_data,
290 uint32_t msg_type,
291 struct server_id server_id,
292 DATA_BLOB *data);
293 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
294 void *private_data,
295 uint32_t msg_type,
296 struct server_id server_id,
297 DATA_BLOB *data);
298 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
299 void *private_data,
300 uint32_t msg_type,
301 struct server_id server_id,
302 DATA_BLOB *data);
303 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
304 void *private_data,
305 uint32_t msg_type,
306 struct server_id server_id,
307 DATA_BLOB *data);
308 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
309 const char *logfilename);
310 struct winbindd_domain *wb_child_domain(void);
312 /* The following definitions come from winbindd/winbindd_group.c */
314 void winbindd_getgrnam(struct winbindd_cli_state *state);
315 void winbindd_getgrgid(struct winbindd_cli_state *state);
316 void winbindd_setgrent(struct winbindd_cli_state *state);
317 void winbindd_endgrent(struct winbindd_cli_state *state);
318 void winbindd_getgrent(struct winbindd_cli_state *state);
319 void winbindd_list_groups(struct winbindd_cli_state *state);
320 void winbindd_getgroups(struct winbindd_cli_state *state);
321 void winbindd_getusersids(struct winbindd_cli_state *state);
322 void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
323 void winbindd_getsidaliases(struct winbindd_cli_state *state);
324 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
325 const char *dom_name, const char *gr_name, gid_t unix_gid);
326 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
327 TALLOC_CTX *mem_ctx,
328 int *num_members, char **result);
331 /* The following definitions come from winbindd/winbindd_idmap.c */
333 void init_idmap_child(void);
334 struct winbindd_child *idmap_child(void);
335 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
336 const struct dom_sid *sid);
338 /* The following definitions come from winbindd/winbindd_locator.c */
340 void init_locator_child(void);
341 struct winbindd_child *locator_child(void);
343 /* The following definitions come from winbindd/winbindd_misc.c */
345 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
346 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
347 struct winbindd_cli_state *state);
348 void winbindd_show_sequence(struct winbindd_cli_state *state);
349 void winbindd_domain_info(struct winbindd_cli_state *state);
350 void winbindd_dc_info(struct winbindd_cli_state *state);
351 void winbindd_ping(struct winbindd_cli_state *state);
352 void winbindd_info(struct winbindd_cli_state *state);
353 void winbindd_interface_version(struct winbindd_cli_state *state);
354 void winbindd_domain_name(struct winbindd_cli_state *state);
355 void winbindd_netbios_name(struct winbindd_cli_state *state);
356 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
358 /* The following definitions come from winbindd/winbindd_ndr.c */
359 struct ndr_print;
360 void ndr_print_winbindd_child(struct ndr_print *ndr,
361 const char *name,
362 const struct winbindd_child *r);
363 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
364 const char *name,
365 const struct winbindd_cm_conn *r);
366 void ndr_print_winbindd_methods(struct ndr_print *ndr,
367 const char *name,
368 const struct winbindd_methods *r);
369 void ndr_print_winbindd_domain(struct ndr_print *ndr,
370 const char *name,
371 const struct winbindd_domain *r);
373 /* The following definitions come from winbindd/winbindd_pam.c */
375 bool check_request_flags(uint32_t flags);
376 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
377 struct winbindd_response *resp,
378 uint32_t request_flags,
379 struct netr_SamInfo3 *info3,
380 const char *name_domain,
381 const char *name_user);
382 uid_t get_uid_from_request(struct winbindd_request *request);
383 struct winbindd_domain *find_auth_domain(uint8_t flags,
384 const char *domain_name);
385 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
386 struct winbindd_cli_state *state) ;
387 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
388 struct winbindd_cli_state *state) ;
389 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
390 struct winbindd_cli_state *state);
391 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
392 struct winbindd_cli_state *state) ;
393 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
394 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
395 struct netr_SamInfo3 **info3);
397 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
398 TALLOC_CTX *mem_ctx,
399 uint32_t logon_parameters,
400 const char *name_user,
401 const char *name_domain,
402 const char *workstation,
403 const uint8_t chal[8],
404 DATA_BLOB lm_response,
405 DATA_BLOB nt_response,
406 struct netr_SamInfo3 **info3);
408 /* The following definitions come from winbindd/winbindd_util.c */
410 struct winbindd_domain *domain_list(void);
411 bool domain_is_forest_root(const struct winbindd_domain *domain);
412 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
413 struct timeval now, void *private_data);
414 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
415 struct winbindd_cli_state *state);
416 bool init_domain_list(void);
417 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
418 struct winbindd_domain *find_domain_from_name(const char *domain_name);
419 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
420 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
421 struct winbindd_domain *find_our_domain(void);
422 struct winbindd_domain *find_root_domain(void);
423 struct winbindd_domain *find_builtin_domain(void);
424 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
425 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
426 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
427 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
428 char **domain, char **user);
429 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
430 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
431 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
432 const char *domain,
433 const char *user,
434 bool can_assume);
435 struct winbindd_cli_state *winbindd_client_list(void);
436 void winbindd_add_client(struct winbindd_cli_state *cli);
437 void winbindd_remove_client(struct winbindd_cli_state *cli);
438 int winbindd_num_clients(void);
439 NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
440 TALLOC_CTX *mem_ctx,
441 const struct dom_sid *user_sid,
442 uint32 *p_num_groups, struct dom_sid **user_sids);
444 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
445 struct winbindd_domain *domain,
446 const char *name,
447 char **normalized);
448 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
449 char *name,
450 char **normalized);
452 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
453 struct winbindd_domain *domain,
454 const char *name, char **alias);
455 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
456 struct winbindd_domain *domain,
457 const char *alias, char **name);
459 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
460 bool winbindd_internal_child(struct winbindd_child *child);
461 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
462 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
463 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
464 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
465 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
466 bool is_domain_offline(const struct winbindd_domain *domain);
467 bool is_domain_online(const struct winbindd_domain *domain);
468 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
469 struct dom_sid **sids, uint32_t *num_sids);
471 /* The following definitions come from winbindd/winbindd_wins.c */
473 void winbindd_wins_byname(struct winbindd_cli_state *state);
475 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
476 struct winbindd_cli_state *cli,
477 struct winbindd_request *request);
478 NTSTATUS wb_ping_recv(struct tevent_req *req,
479 struct winbindd_response *resp);
481 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
482 struct winbindd_cli_state *state);
484 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
485 struct winbindd_domain *domain,
486 struct winbindd_child *child);
487 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
488 struct winbindd_cli_state *state);
490 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
491 struct tevent_context *ev,
492 const struct dom_sid *sid);
493 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
494 enum lsa_SidType *type, const char **domain,
495 const char **name);
497 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
498 struct tevent_context *ev,
499 struct winbindd_cli_state *cli,
500 struct winbindd_request *request);
501 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
502 struct winbindd_response *response);
504 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
505 struct tevent_context *ev,
506 struct winbindd_cli_state *cli,
507 struct winbindd_request *request);
508 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
509 struct winbindd_response *response);
511 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
512 struct tevent_context *ev,
513 const char *dom_name, const char *name,
514 uint32_t flags);
515 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
516 enum lsa_SidType *type);
518 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
519 struct tevent_context *ev,
520 struct winbindd_cli_state *cli,
521 struct winbindd_request *request);
522 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
523 struct winbindd_response *response);
525 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
526 struct tevent_context *ev,
527 struct winbindd_cli_state *cli,
528 struct winbindd_request *request);
529 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
530 struct winbindd_response *response);
532 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
533 struct tevent_context *ev,
534 struct winbindd_cli_state *cli,
535 struct winbindd_request *request);
536 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
537 struct winbindd_response *response);
539 struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
540 struct tevent_context *ev,
541 uid_t uid);
542 NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
544 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
545 struct tevent_context *ev,
546 struct winbindd_cli_state *cli,
547 struct winbindd_request *request);
548 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
549 struct winbindd_response *response);
551 struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
552 struct tevent_context *ev,
553 gid_t gid);
554 NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
556 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
557 struct tevent_context *ev,
558 struct winbindd_cli_state *cli,
559 struct winbindd_request *request);
560 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
561 struct winbindd_response *response);
563 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
564 struct tevent_context *ev,
565 struct winbindd_cli_state *cli,
566 struct winbindd_request *request);
567 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
568 struct winbindd_response *response);
570 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
571 struct tevent_context *ev,
572 struct winbindd_cli_state *cli,
573 struct winbindd_request *request);
574 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
575 struct winbindd_response *response);
577 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
578 struct tevent_context *ev,
579 const struct dom_sid *user_sid);
580 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
581 struct wbint_userinfo **pinfo);
583 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
584 struct tevent_context *ev,
585 const struct dom_sid *user_sid,
586 struct winbindd_pw *pw);
587 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
589 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
590 struct tevent_context *ev,
591 struct winbindd_cli_state *cli,
592 struct winbindd_request *request);
593 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
594 struct winbindd_response *response);
596 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 struct winbindd_cli_state *cli,
599 struct winbindd_request *request);
600 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
601 struct winbindd_response *response);
603 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
604 struct tevent_context *ev,
605 struct winbindd_cli_state *cli,
606 struct winbindd_request *request);
607 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
608 struct winbindd_response *response);
609 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
610 struct tevent_context *ev,
611 struct winbindd_domain *domain,
612 int num_sids,
613 const struct dom_sid *sids);
614 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
615 uint32_t *num_aliases, uint32_t **aliases);
616 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
617 struct tevent_context *ev,
618 struct winbindd_cli_state *cli,
619 struct winbindd_request *request);
620 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
621 struct winbindd_response *response);
622 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
623 struct tevent_context *ev,
624 struct winbindd_domain *domain,
625 const struct dom_sid *sid);
626 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
627 int *num_sids, struct dom_sid **sids);
629 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
630 struct tevent_context *ev,
631 struct winbindd_cli_state *cli,
632 struct winbindd_request *request);
633 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
634 struct winbindd_response *response);
635 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
636 struct tevent_context *ev,
637 const struct dom_sid *sid);
638 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
639 int *num_sids, struct dom_sid **sids);
640 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
641 struct tevent_context *ev,
642 struct winbindd_cli_state *cli,
643 struct winbindd_request *request);
644 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
645 struct winbindd_response *response);
647 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
648 struct tevent_context *ev,
649 struct winbindd_domain *domain);
650 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
652 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev);
654 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
655 int *num_domains, struct winbindd_domain ***domains,
656 NTSTATUS **stati, uint32_t **seqnums);
658 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
659 struct tevent_context *ev,
660 struct winbindd_cli_state *cli,
661 struct winbindd_request *request);
662 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
663 struct winbindd_response *response);
665 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 const struct dom_sid *sid,
668 enum lsa_SidType type,
669 int max_depth);
670 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
671 struct talloc_dict **members);
672 NTSTATUS add_wbint_Principal_to_dict(TALLOC_CTX *mem_ctx,
673 struct dom_sid *sid,
674 const char **name,
675 enum lsa_SidType type,
676 struct talloc_dict *dict);
678 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
679 struct tevent_context *ev,
680 const struct dom_sid *group_sid,
681 int max_nesting);
682 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
683 const char **domname, const char **name, gid_t *gid,
684 struct talloc_dict **members);
686 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
687 struct tevent_context *ev,
688 struct winbindd_cli_state *cli,
689 struct winbindd_request *request);
690 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
691 struct winbindd_response *response);
693 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
694 struct tevent_context *ev,
695 struct winbindd_cli_state *cli,
696 struct winbindd_request *request);
697 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
698 struct winbindd_response *response);
700 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 struct winbindd_cli_state *cli,
703 struct winbindd_request *request);
704 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
705 struct winbindd_response *response);
707 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 struct winbindd_cli_state *cli,
710 struct winbindd_request *request);
711 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
712 struct winbindd_response *response);
714 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
715 struct tevent_context *ev,
716 struct winbindd_domain *domain);
717 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
718 int *num_users,
719 struct wbint_userinfo **users);
721 struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
722 struct tevent_context *ev,
723 struct wbint_userinfo *info,
724 struct winbindd_pw *pw);
725 NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
727 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
728 struct tevent_context *ev,
729 struct getpwent_state *gstate,
730 struct winbindd_pw *pw);
731 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
733 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
734 struct tevent_context *ev,
735 struct winbindd_cli_state *cli,
736 struct winbindd_request *request);
737 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
738 struct winbindd_response *presp);
740 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
741 struct tevent_context *ev,
742 struct winbindd_cli_state *cli,
743 struct winbindd_request *request);
744 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
745 struct winbindd_response *response);
747 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
748 struct tevent_context *ev,
749 struct winbindd_cli_state *cli,
750 struct winbindd_request *request);
751 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
752 struct winbindd_response *response);
754 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
755 struct tevent_context *ev,
756 struct winbindd_cli_state *cli,
757 struct winbindd_request *request);
758 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
759 struct winbindd_response *response);
761 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
762 struct tevent_context *ev,
763 const char *domain_name,
764 const struct GUID *domain_guid,
765 const char *site_name,
766 uint32_t flags);
767 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
768 struct netr_DsRGetDCNameInfo **pdcinfo);
770 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
771 struct tevent_context *ev,
772 struct winbindd_cli_state *cli,
773 struct winbindd_request *request);
774 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
775 struct winbindd_response *response);
777 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
778 struct tevent_context *ev,
779 int max_nesting,
780 struct getgrent_state *gstate,
781 struct winbindd_gr *gr);
782 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
783 struct talloc_dict **members);
785 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
786 struct tevent_context *ev,
787 struct winbindd_cli_state *cli,
788 struct winbindd_request *request);
789 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
790 struct winbindd_response *response);
791 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
792 struct tevent_context *ev,
793 struct winbindd_cli_state *cli,
794 struct winbindd_request *request);
795 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
796 struct winbindd_response *response);
797 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
798 struct tevent_context *ev,
799 struct winbindd_cli_state *cli,
800 struct winbindd_request *request);
801 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
802 struct winbindd_response *response);
804 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
805 struct tevent_context *ev,
806 struct winbindd_cli_state *cli,
807 struct winbindd_request *request);
808 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
809 struct winbindd_response *response);
811 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
812 struct tevent_context *ev,
813 struct winbindd_cli_state *cli,
814 struct winbindd_request *request);
815 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
816 struct winbindd_response *response);
818 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
819 struct tevent_context *ev,
820 struct winbindd_cli_state *cli,
821 struct winbindd_request *request);
822 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
823 struct winbindd_response *presp);
825 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
826 struct tevent_context *ev,
827 struct winbindd_cli_state *cli,
828 struct winbindd_request *request);
829 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
830 struct winbindd_response *presp);
832 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
833 struct tevent_context *ev,
834 struct winbindd_cli_state *cli,
835 struct winbindd_request *request);
836 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
837 struct winbindd_response *presp);
839 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
840 struct tevent_context *ev,
841 struct winbindd_cli_state *cli,
842 struct winbindd_request *request);
843 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
844 struct winbindd_response *response);
846 struct tevent_req *winbindd_pam_auth_crap_send(
847 TALLOC_CTX *mem_ctx,
848 struct tevent_context *ev,
849 struct winbindd_cli_state *cli,
850 struct winbindd_request *request);
851 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
852 struct winbindd_response *response);
854 struct tevent_req *winbindd_pam_chauthtok_send(
855 TALLOC_CTX *mem_ctx,
856 struct tevent_context *ev,
857 struct winbindd_cli_state *cli,
858 struct winbindd_request *request);
859 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
860 struct winbindd_response *response);
862 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
863 struct tevent_context *ev,
864 struct winbindd_cli_state *cli,
865 struct winbindd_request *request);
866 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
867 struct winbindd_response *response);
869 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
870 TALLOC_CTX *mem_ctx,
871 struct tevent_context *ev,
872 struct winbindd_cli_state *cli,
873 struct winbindd_request *request);
874 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
875 struct tevent_req *req,
876 struct winbindd_response *response);
878 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
879 struct tevent_context *ev,
880 struct dom_sid *sids,
881 uint32_t num_sids);
882 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
883 struct lsa_RefDomainList **domains,
884 struct lsa_TransNameArray **names);
886 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
887 struct tevent_context *ev,
888 const struct dom_sid *sids,
889 const uint32_t num_sids);
890 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
891 struct unixid *xids);
892 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
893 struct tevent_context *ev,
894 struct winbindd_cli_state *cli,
895 struct winbindd_request *request);
896 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
897 struct winbindd_response *response);
898 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
899 struct tevent_context *ev,
900 struct winbindd_cli_state *cli,
901 struct winbindd_request *request);
902 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
903 struct winbindd_response *presp);
904 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
905 struct tevent_context *ev,
906 struct winbindd_cli_state *cli,
907 struct winbindd_request *request);
908 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
909 struct winbindd_response *presp);
912 /* The following definitions come from winbindd/winbindd_samr.c */
914 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
915 struct winbindd_domain *domain,
916 struct rpc_pipe_client **samr_pipe,
917 struct policy_handle *samr_domain_hnd);
919 /* The following definitions come from winbindd/winbindd_ads.c */
920 ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
922 /* The following definitions come from winbindd/winbindd_irpc.c */
923 NTSTATUS wb_irpc_register(void);
924 #endif /* _WINBINDD_PROTO_H_ */