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_
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,
48 const struct dom_sid *sids,
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 wb_cache_query_user_list(struct winbindd_domain *domain,
63 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
65 uint32_t *num_entries,
66 struct wb_acct_info **info);
67 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
69 uint32_t *num_entries,
70 struct wb_acct_info **info);
71 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
73 const char *domain_name,
77 enum lsa_SidType *type);
78 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
80 const struct dom_sid *sid,
83 enum lsa_SidType *type);
84 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
86 const struct dom_sid *domain_sid,
91 enum lsa_SidType **types);
92 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
95 const struct dom_sid *sids,
96 uint32_t *num_aliases,
97 uint32_t **alias_rids);
98 NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
100 const struct dom_sid *group_sid,
101 enum lsa_SidType type,
103 struct dom_sid **sid_mem,
105 uint32_t **name_types);
106 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
108 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
110 struct samr_DomInfo12 *policy);
111 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
113 struct samr_DomInfo1 *policy);
114 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
116 struct netr_DomainTrustList *trusts);
118 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
119 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
121 const struct dom_sid *sid,
122 const uint8_t **cached_nt_pass,
123 const uint8_t **cached_salt);
124 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
125 const struct dom_sid *sid,
126 const uint8_t nt_pass[NT_HASH_LEN]);
127 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
128 const struct dom_sid *user_sid);
129 bool wcache_invalidate_cache(void);
130 bool wcache_invalidate_cache_noinit(void);
131 bool init_wcache(void);
132 bool initialize_winbindd_cache(void);
133 void close_winbindd_cache(void);
134 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
136 const struct dom_sid *group_sid,
138 struct dom_sid **sid_mem, char ***names,
139 uint32_t **name_types);
140 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
141 char **domain_name, char **name,
142 enum lsa_SidType *type);
143 bool lookup_cached_name(const char *domain_name,
146 enum lsa_SidType *type);
147 void cache_name2sid_trusted(struct winbindd_domain *domain,
148 const char *domain_name,
150 enum lsa_SidType type,
151 const struct dom_sid *sid);
152 void cache_name2sid(struct winbindd_domain *domain,
153 const char *domain_name, const char *name,
154 enum lsa_SidType type, const struct dom_sid *sid);
155 NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
156 const char *domain_name,
159 enum lsa_SidType *type);
160 NTSTATUS wcache_query_user(struct winbindd_domain *domain,
162 const struct dom_sid *user_sid,
163 struct wbint_userinfo *info);
164 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
166 const struct dom_sid *user_sid,
167 const char **full_name);
168 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
170 uint32_t num_sids, const struct dom_sid *sids,
171 uint32_t *pnum_aliases, uint32_t **paliases);
173 void wcache_flush_cache(void);
174 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
175 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
176 bool set_global_winbindd_state_offline(void);
177 void set_global_winbindd_state_online(void);
178 bool get_global_winbindd_state_offline(void);
179 int winbindd_validate_cache(void);
180 int winbindd_validate_cache_nobackup(void);
181 bool winbindd_cache_validate_and_initialize(void);
182 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
183 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
184 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
185 struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
186 void wcache_tdc_clear( void );
187 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
188 time_t last_seq_check);
189 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
190 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
191 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
192 const DATA_BLOB *req, const DATA_BLOB *resp);
194 /* The following definitions come from winbindd/winbindd_ccache_access.c */
196 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
197 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
198 struct winbindd_cli_state *state);
199 void winbindd_ccache_save(struct winbindd_cli_state *state);
201 /* The following definitions come from winbindd/winbindd_cm.c */
202 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
205 struct server_id server_id,
207 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
210 struct server_id server_id,
213 void set_domain_offline(struct winbindd_domain *domain);
214 void set_domain_online_request(struct winbindd_domain *domain);
216 struct ndr_interface_table;
217 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
218 const struct ndr_interface_table *table,
219 struct rpc_pipe_client **ret_pipe);
220 void invalidate_cm_connection(struct winbindd_domain *domain);
221 void close_conns_after_fork(void);
222 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
223 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
225 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
226 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
227 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
228 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
230 struct rpc_pipe_client **cli,
231 struct policy_handle *lsa_policy);
232 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
233 struct rpc_pipe_client **cli);
234 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
235 const char *domain_name,
236 char **p_dc_name, char **p_dc_ip);
238 /* The following definitions come from winbindd/winbindd_cred_cache.c */
240 bool ccache_entry_exists(const char *username);
241 bool ccache_entry_identical(const char *username,
244 void ccache_remove_all_after_fork(void);
245 void ccache_regain_all_now(void);
246 NTSTATUS add_ccache_to_list(const char *princ_name,
249 const char *username,
250 const char *password,
256 bool postponed_request);
257 NTSTATUS remove_ccache(const char *username);
258 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
259 NTSTATUS winbindd_add_memory_creds(const char *username,
262 NTSTATUS winbindd_delete_memory_creds(const char *username);
263 NTSTATUS winbindd_replace_memory_creds(const char *username,
266 /* The following definitions come from winbindd/winbindd_creds.c */
268 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
270 const struct dom_sid *sid,
271 struct netr_SamInfo3 **info3,
272 const uint8_t *cached_nt_pass[NT_HASH_LEN],
273 const uint8_t *cred_salt[NT_HASH_LEN]);
274 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
277 struct netr_SamInfo3 *info3);
278 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
281 struct netr_SamInfo3 *info3);
282 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
286 /* The following definitions come from winbindd/winbindd_domain.c */
288 void setup_domain_child(struct winbindd_domain *domain);
290 /* The following definitions come from winbindd/winbindd_dual.c */
292 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
293 struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
295 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
296 struct tevent_context *ev,
297 struct winbindd_child *child,
298 struct winbindd_request *request);
299 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
300 struct winbindd_response **presponse, int *err);
301 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
302 struct tevent_context *ev,
303 struct winbindd_domain *domain,
304 struct winbindd_request *request);
305 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
306 struct winbindd_response **presponse, int *err);
308 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
309 const struct winbindd_child_dispatch_table *table,
310 const char *logprefix,
311 const char *logname);
312 void winbind_child_died(pid_t pid);
313 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
314 void winbind_msg_debug(struct messaging_context *msg_ctx,
317 struct server_id server_id,
319 void winbind_msg_offline(struct messaging_context *msg_ctx,
322 struct server_id server_id,
324 void winbind_msg_online(struct messaging_context *msg_ctx,
327 struct server_id server_id,
329 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
332 struct server_id server_id,
334 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
337 struct server_id server_id,
339 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
342 struct server_id server_id,
344 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
347 struct server_id server_id,
349 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
352 struct server_id server_id,
354 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
355 const char *logfilename);
356 struct winbindd_domain *wb_child_domain(void);
358 /* The following definitions come from winbindd/winbindd_group.c */
359 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
360 const char *dom_name, const char *gr_name, gid_t unix_gid);
361 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
363 int *num_members, char **result);
366 /* The following definitions come from winbindd/winbindd_idmap.c */
368 void init_idmap_child(void);
369 struct winbindd_child *idmap_child(void);
370 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
371 const struct dom_sid *sid);
372 bool domain_has_idmap_config(const char *domname);
373 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
377 /* The following definitions come from winbindd/winbindd_locator.c */
379 void init_locator_child(void);
380 struct winbindd_child *locator_child(void);
382 /* The following definitions come from winbindd/winbindd_misc.c */
384 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
385 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
386 struct winbindd_cli_state *state);
387 void winbindd_show_sequence(struct winbindd_cli_state *state);
388 void winbindd_domain_info(struct winbindd_cli_state *state);
389 void winbindd_dc_info(struct winbindd_cli_state *state);
390 void winbindd_ping(struct winbindd_cli_state *state);
391 void winbindd_info(struct winbindd_cli_state *state);
392 void winbindd_interface_version(struct winbindd_cli_state *state);
393 void winbindd_domain_name(struct winbindd_cli_state *state);
394 void winbindd_netbios_name(struct winbindd_cli_state *state);
395 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
397 /* The following definitions come from winbindd/winbindd_ndr.c */
399 void ndr_print_winbindd_child(struct ndr_print *ndr,
401 const struct winbindd_child *r);
402 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
404 const struct winbindd_cm_conn *r);
405 void ndr_print_winbindd_methods(struct ndr_print *ndr,
407 const struct winbindd_methods *r);
408 void ndr_print_winbindd_domain(struct ndr_print *ndr,
410 const struct winbindd_domain *r);
412 /* The following definitions come from winbindd/winbindd_pam.c */
414 bool check_request_flags(uint32_t flags);
415 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
416 struct winbindd_response *resp,
417 uint32_t request_flags,
418 struct netr_SamInfo3 *info3,
419 const char *name_domain,
420 const char *name_user);
421 uid_t get_uid_from_request(struct winbindd_request *request);
422 struct winbindd_domain *find_auth_domain(uint8_t flags,
423 const char *domain_name);
424 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
425 struct winbindd_cli_state *state) ;
426 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
427 struct winbindd_cli_state *state) ;
428 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
429 struct winbindd_cli_state *state);
430 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
431 struct winbindd_cli_state *state) ;
432 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
433 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
434 struct netr_SamInfo3 **info3);
436 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
438 uint32_t logon_parameters,
439 const char *name_user,
440 const char *name_domain,
441 const char *workstation,
442 const uint8_t chal[8],
443 DATA_BLOB lm_response,
444 DATA_BLOB nt_response,
445 struct netr_SamInfo3 **info3);
447 /* The following definitions come from winbindd/winbindd_util.c */
449 struct winbindd_domain *domain_list(void);
450 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
451 bool domain_is_forest_root(const struct winbindd_domain *domain);
452 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
453 struct timeval now, void *private_data);
454 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
455 struct winbindd_cli_state *state);
456 bool init_domain_list(void);
457 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
458 struct winbindd_domain *find_domain_from_name(const char *domain_name);
459 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
460 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
461 struct winbindd_domain *find_our_domain(void);
462 struct winbindd_domain *find_root_domain(void);
463 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
464 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
465 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
466 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
467 char **domain, char **user);
468 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
469 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
470 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
474 struct winbindd_cli_state *winbindd_client_list(void);
475 struct winbindd_cli_state *winbindd_client_list_tail(void);
476 struct winbindd_cli_state *
477 winbindd_client_list_prev(struct winbindd_cli_state *cli);
478 void winbindd_add_client(struct winbindd_cli_state *cli);
479 void winbindd_remove_client(struct winbindd_cli_state *cli);
480 void winbindd_promote_client(struct winbindd_cli_state *cli);
481 int winbindd_num_clients(void);
482 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
483 const struct dom_sid *user_sid,
484 uint32_t *p_num_groups, struct dom_sid **user_sids);
486 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
487 struct winbindd_domain *domain,
490 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
494 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
495 struct winbindd_domain *domain,
496 const char *name, char **alias);
497 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
498 struct winbindd_domain *domain,
499 const char *alias, char **name);
501 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
502 bool winbindd_internal_child(struct winbindd_child *child);
503 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
504 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
505 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
506 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
507 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
508 bool is_domain_offline(const struct winbindd_domain *domain);
509 bool is_domain_online(const struct winbindd_domain *domain);
510 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
511 struct dom_sid **sids, uint32_t *num_sids);
512 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
513 struct unixid **pxids, uint32_t *pnum_xids);
515 /* The following definitions come from winbindd/winbindd_wins.c */
517 void winbindd_wins_byname(struct winbindd_cli_state *state);
519 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
520 struct winbindd_cli_state *cli,
521 struct winbindd_request *request);
522 NTSTATUS wb_ping_recv(struct tevent_req *req,
523 struct winbindd_response *resp);
525 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
526 struct winbindd_cli_state *state);
528 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
529 struct winbindd_domain *domain,
530 struct winbindd_child *child);
531 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
532 struct winbindd_cli_state *state);
534 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
535 struct tevent_context *ev,
536 const struct dom_sid *sid);
537 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
538 enum lsa_SidType *type, const char **domain,
541 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
542 struct tevent_context *ev,
543 struct winbindd_cli_state *cli,
544 struct winbindd_request *request);
545 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
546 struct winbindd_response *response);
548 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
549 struct tevent_context *ev,
550 struct winbindd_cli_state *cli,
551 struct winbindd_request *request);
552 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
553 struct winbindd_response *response);
555 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
556 struct tevent_context *ev,
557 const char *dom_name, const char *name,
559 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
560 enum lsa_SidType *type);
562 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
563 struct tevent_context *ev,
564 struct winbindd_cli_state *cli,
565 struct winbindd_request *request);
566 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
567 struct winbindd_response *response);
569 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
570 struct tevent_context *ev,
571 struct winbindd_cli_state *cli,
572 struct winbindd_request *request);
573 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
574 struct winbindd_response *response);
576 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
577 struct tevent_context *ev,
578 struct winbindd_cli_state *cli,
579 struct winbindd_request *request);
580 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
581 struct winbindd_response *response);
583 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
584 struct tevent_context *ev,
585 struct winbindd_cli_state *cli,
586 struct winbindd_request *request);
587 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
588 struct winbindd_response *response);
590 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
591 struct tevent_context *ev,
592 struct winbindd_cli_state *cli,
593 struct winbindd_request *request);
594 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
595 struct winbindd_response *response);
597 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
598 struct tevent_context *ev,
599 struct winbindd_cli_state *cli,
600 struct winbindd_request *request);
601 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
602 struct winbindd_response *response);
604 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
605 struct tevent_context *ev,
606 struct winbindd_cli_state *cli,
607 struct winbindd_request *request);
608 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
609 struct winbindd_response *response);
611 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
612 struct tevent_context *ev,
613 const struct dom_sid *user_sid);
614 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
615 struct wbint_userinfo **pinfo);
617 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
618 struct tevent_context *ev,
619 const struct dom_sid *user_sid,
620 struct winbindd_pw *pw);
621 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
623 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
624 struct tevent_context *ev,
625 struct winbindd_cli_state *cli,
626 struct winbindd_request *request);
627 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
628 struct winbindd_response *response);
630 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
631 struct tevent_context *ev,
632 struct winbindd_cli_state *cli,
633 struct winbindd_request *request);
634 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
635 struct winbindd_response *response);
637 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
638 struct tevent_context *ev,
639 struct winbindd_cli_state *cli,
640 struct winbindd_request *request);
641 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
642 struct winbindd_response *response);
643 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
644 struct tevent_context *ev,
645 struct winbindd_domain *domain,
647 const struct dom_sid *sids);
648 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
649 uint32_t *num_aliases, uint32_t **aliases);
650 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
651 struct tevent_context *ev,
652 struct winbindd_cli_state *cli,
653 struct winbindd_request *request);
654 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
655 struct winbindd_response *response);
657 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
658 struct tevent_context *ev,
659 struct winbindd_cli_state *cli,
660 struct winbindd_request *request);
661 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
662 struct winbindd_response *response);
663 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
664 struct tevent_context *ev,
665 const struct dom_sid *sid,
666 bool expand_local_aliases);
667 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
668 int *num_sids, struct dom_sid **sids);
669 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
670 struct tevent_context *ev,
671 struct winbindd_cli_state *cli,
672 struct winbindd_request *request);
673 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
674 struct winbindd_response *response);
676 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
677 struct tevent_context *ev,
678 struct winbindd_domain *domain);
679 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
681 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
682 struct tevent_context *ev);
683 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
684 int *num_domains, struct winbindd_domain ***domains,
685 NTSTATUS **stati, uint32_t **seqnums);
687 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
688 struct tevent_context *ev,
689 struct winbindd_cli_state *cli,
690 struct winbindd_request *request);
691 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
692 struct winbindd_response *response);
694 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
695 struct tevent_context *ev,
696 const struct dom_sid *sid,
697 enum lsa_SidType type,
699 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
700 struct talloc_dict **members);
701 NTSTATUS add_wbint_Principal_to_dict(TALLOC_CTX *mem_ctx,
704 enum lsa_SidType type,
705 struct talloc_dict *dict);
707 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 const struct dom_sid *group_sid,
711 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
712 const char **domname, const char **name, gid_t *gid,
713 struct talloc_dict **members);
715 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
716 struct tevent_context *ev,
717 struct winbindd_cli_state *cli,
718 struct winbindd_request *request);
719 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
720 struct winbindd_response *response);
722 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
723 struct tevent_context *ev,
724 struct winbindd_cli_state *cli,
725 struct winbindd_request *request);
726 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
727 struct winbindd_response *response);
729 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
730 struct tevent_context *ev,
731 struct winbindd_cli_state *cli,
732 struct winbindd_request *request);
733 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
734 struct winbindd_response *response);
736 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
737 struct tevent_context *ev,
738 struct winbindd_cli_state *cli,
739 struct winbindd_request *request);
740 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
741 struct winbindd_response *response);
743 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
744 struct tevent_context *ev,
745 struct winbindd_domain *domain);
746 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
749 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
750 struct tevent_context *ev,
751 struct winbindd_domain *domain);
752 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
754 struct wbint_Principal **groups);
756 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
757 struct tevent_context *ev,
758 struct getpwent_state *gstate,
759 struct winbindd_pw *pw);
760 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
762 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
763 struct tevent_context *ev,
764 struct winbindd_cli_state *cli,
765 struct winbindd_request *request);
766 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
767 struct winbindd_response *presp);
769 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
770 struct tevent_context *ev,
771 struct winbindd_cli_state *cli,
772 struct winbindd_request *request);
773 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
774 struct winbindd_response *response);
776 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
777 struct tevent_context *ev,
778 struct winbindd_cli_state *cli,
779 struct winbindd_request *request);
780 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
781 struct winbindd_response *response);
783 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
784 struct tevent_context *ev,
785 struct winbindd_cli_state *cli,
786 struct winbindd_request *request);
787 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
788 struct winbindd_response *response);
790 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
791 struct tevent_context *ev,
792 const char *domain_name,
793 const struct GUID *domain_guid,
794 const char *site_name,
796 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
797 struct netr_DsRGetDCNameInfo **pdcinfo);
798 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
799 struct netr_DsRGetDCNameInfo *dcinfo);
800 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
802 struct netr_DsRGetDCNameInfo **dcinfo);
804 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
805 struct tevent_context *ev,
806 struct winbindd_cli_state *cli,
807 struct winbindd_request *request);
808 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
809 struct winbindd_response *response);
811 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
812 struct tevent_context *ev,
814 struct getgrent_state *gstate,
815 struct winbindd_gr *gr);
816 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
817 struct talloc_dict **members);
819 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
820 struct tevent_context *ev,
821 struct winbindd_cli_state *cli,
822 struct winbindd_request *request);
823 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
824 struct winbindd_response *response);
825 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
826 struct tevent_context *ev,
827 struct winbindd_cli_state *cli,
828 struct winbindd_request *request);
829 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
830 struct winbindd_response *response);
831 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
832 struct tevent_context *ev,
833 struct winbindd_cli_state *cli,
834 struct winbindd_request *request);
835 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
836 struct winbindd_response *response);
838 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
839 struct tevent_context *ev,
840 struct winbindd_cli_state *cli,
841 struct winbindd_request *request);
842 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
843 struct winbindd_response *response);
845 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
846 struct tevent_context *ev,
847 struct winbindd_cli_state *cli,
848 struct winbindd_request *request);
849 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
850 struct winbindd_response *response);
852 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
853 struct tevent_context *ev,
854 struct winbindd_cli_state *cli,
855 struct winbindd_request *request);
856 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
857 struct winbindd_response *presp);
859 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
860 struct tevent_context *ev,
861 struct winbindd_cli_state *cli,
862 struct winbindd_request *request);
863 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
864 struct winbindd_response *presp);
866 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
867 struct tevent_context *ev,
868 struct winbindd_cli_state *cli,
869 struct winbindd_request *request);
870 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
871 struct winbindd_response *presp);
873 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
874 struct tevent_context *ev,
875 struct winbindd_cli_state *cli,
876 struct winbindd_request *request);
877 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
878 struct winbindd_response *response);
880 struct tevent_req *winbindd_pam_auth_crap_send(
882 struct tevent_context *ev,
883 struct winbindd_cli_state *cli,
884 struct winbindd_request *request);
885 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
886 struct winbindd_response *response);
888 struct tevent_req *winbindd_pam_chauthtok_send(
890 struct tevent_context *ev,
891 struct winbindd_cli_state *cli,
892 struct winbindd_request *request);
893 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
894 struct winbindd_response *response);
896 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
897 struct tevent_context *ev,
898 struct winbindd_cli_state *cli,
899 struct winbindd_request *request);
900 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
901 struct winbindd_response *response);
903 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
905 struct tevent_context *ev,
906 struct winbindd_cli_state *cli,
907 struct winbindd_request *request);
908 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
909 struct tevent_req *req,
910 struct winbindd_response *response);
912 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
913 struct tevent_context *ev,
914 struct dom_sid *sids,
916 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
917 struct lsa_RefDomainList **domains,
918 struct lsa_TransNameArray **names);
920 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
921 struct tevent_context *ev,
922 const struct dom_sid *sids,
923 const uint32_t num_sids);
924 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
925 struct unixid xids[], uint32_t num_xids);
926 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
927 struct tevent_context *ev,
928 struct winbindd_cli_state *cli,
929 struct winbindd_request *request);
930 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
931 struct winbindd_response *response);
932 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
933 struct tevent_context *ev,
936 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
937 struct dom_sid **sids);
938 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
939 struct tevent_context *ev,
940 struct winbindd_cli_state *cli,
941 struct winbindd_request *request);
942 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
943 struct winbindd_response *response);
944 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
945 struct tevent_context *ev,
946 struct winbindd_cli_state *cli,
947 struct winbindd_request *request);
948 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
949 struct winbindd_response *presp);
950 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
951 struct tevent_context *ev,
952 struct winbindd_cli_state *cli,
953 struct winbindd_request *request);
954 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
955 struct winbindd_response *presp);
958 /* The following definitions come from winbindd/winbindd_samr.c */
960 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
961 struct winbindd_domain *domain,
962 struct rpc_pipe_client **samr_pipe,
963 struct policy_handle *samr_domain_hnd);
964 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
965 struct rpc_pipe_client **lsa_pipe,
966 struct policy_handle *lsa_hnd);
968 /* The following definitions come from winbindd/winbindd_ads.c */
969 ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
971 /* The following definitions come from winbindd/winbindd_irpc.c */
972 NTSTATUS wb_irpc_register(void);
974 /* The following definitions come from winbindd/winbindd_reconnect.c */
975 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
977 #endif /* _WINBINDD_PROTO_H_ */