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 /* The following definitions come from winbindd/winbindd.c */
27 struct imessaging_context *winbind_imessaging_context(void);
28 void winbindd_terminate(bool is_parent);
29 bool winbindd_setup_sig_term_handler(bool parent);
30 bool winbindd_setup_stdin_handler(bool parent, bool foreground);
31 bool winbindd_setup_sig_hup_handler(const char *lfile);
32 bool winbindd_use_idmap_cache(void);
33 bool winbindd_use_cache(void);
34 void winbindd_set_use_cache(bool use_cache);
35 char *get_winbind_priv_pipe_dir(void);
36 void winbindd_flush_caches(void);
37 bool winbindd_reload_services_file(const char *lfile);
39 /* The following definitions come from winbindd/winbindd_ads.c */
41 /* The following definitions come from winbindd/winbindd_rpc.c */
43 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
44 struct winbindd_domain *domain,
46 const struct dom_sid *sids,
49 enum lsa_SidType **types);
50 NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
51 struct winbindd_domain *domain,
52 struct lsa_SidArray *sids,
53 struct lsa_RefDomainList **pdomains,
54 struct lsa_TransNameArray **pnames);
56 /* The following definitions come from winbindd/winbindd_cache.c */
58 NTSTATUS wb_cache_query_user_list(struct winbindd_domain *domain,
61 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
63 uint32_t *num_entries,
64 struct wb_acct_info **info);
65 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
67 uint32_t *num_entries,
68 struct wb_acct_info **info);
69 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
71 const char *domain_name,
75 enum lsa_SidType *type);
76 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
78 const struct dom_sid *sid,
81 enum lsa_SidType *type);
82 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
84 const struct dom_sid *domain_sid,
89 enum lsa_SidType **types);
90 NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain,
92 const struct dom_sid *user_sid,
94 struct dom_sid **psids);
95 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
98 const struct dom_sid *sids,
99 uint32_t *num_aliases,
100 uint32_t **alias_rids);
101 NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
103 const struct dom_sid *group_sid,
104 enum lsa_SidType type,
106 struct dom_sid **sid_mem,
108 uint32_t **name_types);
109 NTSTATUS wb_cache_lookup_aliasmem(struct winbindd_domain *domain,
111 const struct dom_sid *group_sid,
112 enum lsa_SidType type,
114 struct dom_sid **sid_mem);
115 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
117 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
119 struct samr_DomInfo12 *policy);
120 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
122 struct samr_DomInfo1 *policy);
123 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
125 struct netr_DomainTrustList *trusts);
127 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
128 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
130 const struct dom_sid *sid,
131 const uint8_t **cached_nt_pass,
132 const uint8_t **cached_salt);
133 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
134 const struct dom_sid *sid,
135 const uint8_t nt_pass[NT_HASH_LEN]);
136 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
137 const struct dom_sid *user_sid);
138 bool wcache_invalidate_cache(void);
139 bool wcache_invalidate_cache_noinit(void);
140 bool initialize_winbindd_cache(void);
141 void close_winbindd_cache(void);
142 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
143 char **domain_name, char **name,
144 enum lsa_SidType *type);
145 bool lookup_cached_name(const char *namespace,
146 const char *domain_name,
149 enum lsa_SidType *type);
150 void cache_name2sid_trusted(struct winbindd_domain *domain,
151 const char *domain_name,
153 enum lsa_SidType type,
154 const struct dom_sid *sid);
155 void cache_name2sid(struct winbindd_domain *domain,
156 const char *domain_name, const char *name,
157 enum lsa_SidType type, const struct dom_sid *sid);
158 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
160 const struct dom_sid *user_sid,
161 const char **full_name);
163 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
164 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
165 bool set_global_winbindd_state_offline(void);
166 void set_global_winbindd_state_online(void);
167 bool get_global_winbindd_state_offline(void);
168 int winbindd_validate_cache(void);
169 int winbindd_validate_cache_nobackup(void);
170 bool winbindd_cache_validate_and_initialize(void);
171 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
172 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
173 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
174 void wcache_tdc_clear( void );
175 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
176 time_t last_seq_check);
177 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
178 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
179 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
180 const DATA_BLOB *req, const DATA_BLOB *resp);
182 /* The following definitions come from winbindd/winbindd_ccache_access.c */
184 bool winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
185 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
186 struct winbindd_cli_state *state);
187 bool winbindd_ccache_save(struct winbindd_cli_state *state);
189 /* The following definitions come from winbindd/winbindd_cm.c */
190 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
193 struct server_id server_id,
195 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
198 struct server_id server_id,
201 void set_domain_offline(struct winbindd_domain *domain);
202 void set_domain_online_request(struct winbindd_domain *domain);
204 struct ndr_interface_table;
205 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
206 const struct ndr_interface_table *table,
207 struct rpc_pipe_client **ret_pipe);
208 void invalidate_cm_connection(struct winbindd_domain *domain);
209 void close_conns_after_fork(void);
210 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
211 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
213 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
214 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
215 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
216 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
218 struct rpc_pipe_client **cli,
219 struct policy_handle *lsa_policy);
220 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
221 struct rpc_pipe_client **cli);
222 NTSTATUS cm_connect_netlogon_secure(struct winbindd_domain *domain,
223 struct rpc_pipe_client **cli,
224 struct netlogon_creds_cli_context **ppdc);
225 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
226 const char *domain_name,
227 char **p_dc_name, char **p_dc_ip);
229 /* The following definitions come from winbindd/winbindd_cred_cache.c */
231 bool ccache_entry_exists(const char *username);
232 bool ccache_entry_identical(const char *username,
235 void ccache_remove_all_after_fork(void);
236 void ccache_regain_all_now(void);
237 NTSTATUS add_ccache_to_list(const char *princ_name,
239 const char *username,
240 const char *password,
246 bool postponed_request,
247 const char *canon_principal,
248 const char *canon_realm);
249 NTSTATUS remove_ccache(const char *username);
250 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
251 NTSTATUS winbindd_add_memory_creds(const char *username,
254 NTSTATUS winbindd_delete_memory_creds(const char *username);
255 NTSTATUS winbindd_replace_memory_creds(const char *username,
258 /* The following definitions come from winbindd/winbindd_creds.c */
260 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
262 const struct dom_sid *sid,
263 struct netr_SamInfo3 **info3,
264 const uint8_t **cached_nt_pass,
265 const uint8_t **cred_salt);
266 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
269 struct netr_SamInfo3 *info3);
270 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
273 struct netr_SamInfo3 *info3);
274 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
278 /* The following definitions come from winbindd/winbindd_domain.c */
280 void setup_domain_child(struct winbindd_domain *domain);
282 /* The following definitions come from winbindd/winbindd_dual.c */
284 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
286 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
287 struct tevent_context *ev,
288 struct winbindd_child *child,
289 struct winbindd_request *request);
290 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
291 struct winbindd_response **presponse, int *err);
292 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
293 struct tevent_context *ev,
294 struct winbindd_domain *domain,
295 struct winbindd_request *request);
296 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
297 struct winbindd_response **presponse, int *err);
299 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
300 const char *logprefix,
301 const char *logname);
302 void winbind_child_died(pid_t pid);
303 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
304 void winbind_msg_debug(struct messaging_context *msg_ctx,
307 struct server_id server_id,
309 void winbind_disconnect_dc_parent(struct messaging_context *msg_ctx,
312 struct server_id server_id,
314 void winbind_msg_offline(struct messaging_context *msg_ctx,
317 struct server_id server_id,
319 void winbind_msg_online(struct messaging_context *msg_ctx,
322 struct server_id server_id,
324 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
327 struct server_id server_id,
329 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
332 struct server_id server_id,
334 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
337 struct server_id server_id,
339 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
342 struct server_id server_id,
344 void winbind_msg_disconnect_dc(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 void winbindd_msg_reload_services_parent(struct messaging_context *msg,
357 struct server_id server_id,
359 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
360 const char *logfilename);
361 struct winbindd_domain *wb_child_domain(void);
363 /* The following definitions come from winbindd/winbindd_group.c */
364 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
365 const char *dom_name, const char *gr_name, gid_t unix_gid);
368 NTSTATUS winbindd_print_groupmembers(struct db_context *members,
370 int *num_members, char **result);
373 /* The following definitions come from winbindd/winbindd_idmap.c */
375 struct tevent_req *wb_parent_idmap_setup_send(TALLOC_CTX *mem_ctx,
376 struct tevent_context *ev);
377 NTSTATUS wb_parent_idmap_setup_recv(struct tevent_req *req,
378 const struct wb_parent_idmap_config **_cfg);
380 void init_idmap_child(void);
381 struct winbindd_child *idmap_child(void);
382 bool is_idmap_child(const struct winbindd_child *child);
383 pid_t idmap_child_pid(void);
384 struct dcerpc_binding_handle *idmap_child_handle(void);
385 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
386 const struct dom_sid *sid);
387 const char *idmap_config_const_string(const char *domname, const char *option,
389 bool idmap_config_bool(const char *domname, const char *option, bool def);
390 int idmap_config_int(const char *domname, const char *option, int def);
391 const char **idmap_config_string_list(const char *domname,
394 bool domain_has_idmap_config(const char *domname);
395 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
399 /* The following definitions come from winbindd/winbindd_locator.c */
401 void init_locator_child(void);
402 struct winbindd_child *locator_child(void);
403 struct dcerpc_binding_handle *locator_child_handle(void);
405 /* The following definitions come from winbindd/winbindd_misc.c */
407 bool winbindd_list_trusted_domains(struct winbindd_cli_state *state);
408 bool winbindd_dc_info(struct winbindd_cli_state *state);
409 bool winbindd_ping(struct winbindd_cli_state *state);
410 bool winbindd_info(struct winbindd_cli_state *state);
411 bool winbindd_interface_version(struct winbindd_cli_state *state);
412 bool winbindd_domain_name(struct winbindd_cli_state *state);
413 bool winbindd_netbios_name(struct winbindd_cli_state *state);
414 bool winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
416 /* The following definitions come from winbindd/winbindd_ndr.c */
418 void ndr_print_winbindd_child(struct ndr_print *ndr,
420 const struct winbindd_child *r);
421 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
423 const struct winbindd_cm_conn *r);
424 void ndr_print_winbindd_methods(struct ndr_print *ndr,
426 const struct winbindd_methods *r);
427 void ndr_print_winbindd_domain(struct ndr_print *ndr,
429 const struct winbindd_domain *r);
431 /* The following definitions come from winbindd/winbindd_pam.c */
433 bool check_request_flags(uint32_t flags);
434 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
435 struct winbindd_response *resp,
436 uint32_t request_flags,
437 uint16_t validation_level,
438 union netr_Validation *validation,
439 const char *name_domain,
440 const char *name_user);
441 NTSTATUS extra_data_to_sid_array(const char *group_sid,
443 struct wbint_SidArray **_sid_array);
444 uid_t get_uid_from_request(struct winbindd_request *request);
445 struct winbindd_domain *find_auth_domain(uint8_t flags,
446 const char *domain_name);
448 struct wbint_PamAuth;
449 NTSTATUS _wbint_PamAuth(struct pipes_struct *p,
450 struct wbint_PamAuth *r);
451 NTSTATUS _wbint_PamAuthCrap(struct pipes_struct *p,
452 struct wbint_PamAuthCrap *r);
453 NTSTATUS _wbint_PamAuthChangePassword(struct pipes_struct *p,
454 struct wbint_PamAuthChangePassword *r);
455 NTSTATUS _wbint_PamLogOff(struct pipes_struct *p,
456 struct wbint_PamLogOff *r);
457 NTSTATUS _wbint_PamAuthCrapChangePassword(struct pipes_struct *p,
458 struct wbint_PamAuthCrapChangePassword *r);
459 NTSTATUS winbindd_pam_auth_pac_verify(struct winbindd_cli_state *state,
462 uint16_t *p_validation_level,
463 union netr_Validation **p_validation);
465 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
468 uint32_t logon_parameters,
469 const char *name_user,
470 const char *name_domain,
471 const char *workstation,
472 const uint64_t logon_id,
473 const char *client_name,
476 DATA_BLOB lm_response,
477 DATA_BLOB nt_response,
478 const struct tsocket_address *remote,
479 const struct tsocket_address *local,
480 uint8_t *authoritative,
483 uint16_t *_validation_level,
484 union netr_Validation **_validation);
486 /* The following definitions come from winbindd/winbindd_util.c */
488 struct winbindd_domain *domain_list(void);
489 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
490 bool set_routing_domain(struct winbindd_domain *domain,
491 struct winbindd_domain *routing_domain);
492 bool add_trusted_domain_from_auth(uint16_t validation_level,
493 struct info3_text *info3,
494 struct info6_text *info6);
495 bool domain_is_forest_root(const struct winbindd_domain *domain);
496 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
497 struct timeval now, void *private_data);
498 void winbindd_ping_offline_domains(struct tevent_context *ev,
499 struct tevent_timer *te,
502 bool init_domain_list(void);
503 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
504 struct winbindd_domain *find_trust_from_name_noinit(const char *domain_name);
505 struct winbindd_domain *find_domain_from_name(const char *domain_name);
506 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
507 struct winbindd_domain *find_trust_from_sid_noinit(const struct dom_sid *sid);
508 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
509 struct winbindd_domain *find_our_domain(void);
510 struct winbindd_domain *find_default_route_domain(void);
511 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
512 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
513 bool parse_domain_user(const char *domuser,
517 bool canonicalize_username(fstring username_inout,
521 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
525 struct winbindd_cli_state *winbindd_client_list(void);
526 struct winbindd_cli_state *winbindd_client_list_tail(void);
527 struct winbindd_cli_state *
528 winbindd_client_list_prev(struct winbindd_cli_state *cli);
529 void winbindd_add_client(struct winbindd_cli_state *cli);
530 void winbindd_remove_client(struct winbindd_cli_state *cli);
531 void winbindd_promote_client(struct winbindd_cli_state *cli);
532 int winbindd_num_clients(void);
533 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
534 const struct dom_sid *user_sid,
535 uint32_t *p_num_groups, struct dom_sid **user_sids);
537 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
538 const char *domain_name,
541 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
545 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
546 struct winbindd_domain *domain,
547 const char *name, char **alias);
548 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
549 struct winbindd_domain *domain,
550 const char *alias, char **name);
552 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
553 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
554 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
555 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
556 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
557 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
558 bool is_domain_offline(const struct winbindd_domain *domain);
559 bool is_domain_online(const struct winbindd_domain *domain);
560 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
561 struct dom_sid **sids, uint32_t *num_sids);
562 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
563 struct unixid **pxids, uint32_t *pnum_xids);
565 /* The following definitions come from winbindd/winbindd_wins.c */
567 void winbindd_wins_byname(struct winbindd_cli_state *state);
569 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
570 struct winbindd_domain *domain,
571 struct winbindd_child *child);
572 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
573 struct winbindd_cli_state *state);
575 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
576 struct tevent_context *ev,
577 const struct dom_sid *sid);
578 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
579 enum lsa_SidType *type, const char **domain,
582 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
583 struct tevent_context *ev,
584 struct winbindd_cli_state *cli,
585 struct winbindd_request *request);
586 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
587 struct winbindd_response *response);
589 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
590 struct tevent_context *ev,
591 struct winbindd_cli_state *cli,
592 struct winbindd_request *request);
593 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
594 struct winbindd_response *response);
596 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 const char *namespace,
599 const char *dom_name,
602 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
603 enum lsa_SidType *type);
605 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
606 struct tevent_context *ev,
607 struct winbindd_cli_state *cli,
608 struct winbindd_request *request);
609 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
610 struct winbindd_response *response);
612 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
613 struct tevent_context *ev,
614 struct winbindd_cli_state *cli,
615 struct winbindd_request *request);
616 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
617 struct winbindd_response *response);
619 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
620 struct tevent_context *ev,
621 struct winbindd_cli_state *cli,
622 struct winbindd_request *request);
623 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
624 struct winbindd_response *response);
626 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
627 struct tevent_context *ev,
628 const struct dom_sid *user_sid);
629 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
630 struct wbint_userinfo **pinfo);
632 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
633 struct tevent_context *ev,
634 const struct dom_sid *user_sid,
635 struct winbindd_pw *pw);
636 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
638 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
639 struct tevent_context *ev,
640 struct winbindd_cli_state *cli,
641 struct winbindd_request *request);
642 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
643 struct winbindd_response *response);
645 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
646 struct tevent_context *ev,
647 struct winbindd_cli_state *cli,
648 struct winbindd_request *request);
649 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
650 struct winbindd_response *response);
652 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev,
654 struct winbindd_cli_state *cli,
655 struct winbindd_request *request);
656 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
657 struct winbindd_response *response);
658 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
659 struct tevent_context *ev,
660 struct winbindd_domain *domain,
662 const struct dom_sid *sids);
663 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
664 uint32_t *num_aliases, uint32_t **aliases);
665 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 struct winbindd_cli_state *cli,
668 struct winbindd_request *request);
669 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
670 struct winbindd_response *response);
671 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
672 struct tevent_context *ev,
673 const struct dom_sid *sid);
674 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
675 uint32_t *num_sids, struct dom_sid **sids);
677 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
678 struct tevent_context *ev,
679 struct winbindd_cli_state *cli,
680 struct winbindd_request *request);
681 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
682 struct winbindd_response *response);
683 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
684 struct tevent_context *ev,
685 const struct dom_sid *sid,
686 bool expand_local_aliases);
687 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
688 uint32_t *num_sids, struct dom_sid **sids);
689 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
690 struct tevent_context *ev,
691 struct winbindd_cli_state *cli,
692 struct winbindd_request *request);
693 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
694 struct winbindd_response *response);
696 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
697 struct tevent_context *ev,
698 struct winbindd_domain *domain);
699 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
701 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
702 struct tevent_context *ev);
703 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
704 int *num_domains, struct winbindd_domain ***domains,
705 NTSTATUS **stati, uint32_t **seqnums);
707 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 struct winbindd_cli_state *cli,
710 struct winbindd_request *request);
711 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
712 struct winbindd_response *response);
714 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
715 struct tevent_context *ev,
716 const struct dom_sid *sid,
718 enum lsa_SidType *type,
720 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
721 struct db_context **members);
723 struct tevent_req *wb_alias_members_send(TALLOC_CTX *mem_ctx,
724 struct tevent_context *ev,
725 const struct dom_sid *sid,
726 enum lsa_SidType type,
728 NTSTATUS wb_alias_members_recv(struct tevent_req *req,
731 struct dom_sid **sids);
733 NTSTATUS add_member_to_db(struct db_context *db, struct dom_sid *sid,
736 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
737 struct tevent_context *ev,
738 const struct dom_sid *group_sid,
740 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
741 const char **domname, const char **name, gid_t *gid,
742 struct db_context **members);
744 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
745 struct tevent_context *ev,
746 struct winbindd_cli_state *cli,
747 struct winbindd_request *request);
748 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
749 struct winbindd_response *response);
751 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
752 struct tevent_context *ev,
753 struct winbindd_cli_state *cli,
754 struct winbindd_request *request);
755 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
756 struct winbindd_response *response);
758 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
759 struct tevent_context *ev,
760 struct winbindd_cli_state *cli,
761 struct winbindd_request *request);
762 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
763 struct winbindd_response *response);
765 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
766 struct tevent_context *ev,
767 struct winbindd_cli_state *cli,
768 struct winbindd_request *request);
769 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
770 struct winbindd_response *response);
772 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
773 struct tevent_context *ev,
774 struct winbindd_domain *domain);
775 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
778 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
779 struct tevent_context *ev,
780 struct winbindd_domain *domain);
781 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
783 struct wbint_Principal **groups);
785 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
786 struct tevent_context *ev,
787 struct getpwent_state *gstate,
788 struct winbindd_pw *pw);
789 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
791 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
792 struct tevent_context *ev,
793 struct winbindd_cli_state *cli,
794 struct winbindd_request *request);
795 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
796 struct winbindd_response *presp);
798 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
799 struct tevent_context *ev,
800 struct winbindd_cli_state *cli,
801 struct winbindd_request *request);
802 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
803 struct winbindd_response *response);
805 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
806 struct tevent_context *ev,
807 struct winbindd_cli_state *cli,
808 struct winbindd_request *request);
809 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
810 struct winbindd_response *response);
812 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
813 struct tevent_context *ev,
814 struct winbindd_cli_state *cli,
815 struct winbindd_request *request);
816 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
817 struct winbindd_response *response);
819 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
820 struct tevent_context *ev,
821 const char *domain_name,
822 const struct GUID *domain_guid,
823 const char *site_name,
825 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
826 struct netr_DsRGetDCNameInfo **pdcinfo);
827 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
828 struct netr_DsRGetDCNameInfo *dcinfo);
829 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
831 struct netr_DsRGetDCNameInfo **dcinfo);
833 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
834 struct tevent_context *ev,
835 struct winbindd_cli_state *cli,
836 struct winbindd_request *request);
837 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
838 struct winbindd_response *response);
840 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
841 struct tevent_context *ev,
843 struct getgrent_state *gstate,
844 struct winbindd_gr *gr);
845 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
846 struct db_context **members);
848 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
849 struct tevent_context *ev,
850 struct winbindd_cli_state *cli,
851 struct winbindd_request *request);
852 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
853 struct winbindd_response *response);
854 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
855 struct tevent_context *ev,
856 struct winbindd_cli_state *cli,
857 struct winbindd_request *request);
858 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
859 struct winbindd_response *response);
860 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
861 struct tevent_context *ev,
862 struct winbindd_cli_state *cli,
863 struct winbindd_request *request);
864 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
865 struct winbindd_response *response);
867 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
868 struct tevent_context *ev,
869 struct winbindd_cli_state *cli,
870 struct winbindd_request *request);
871 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
872 struct winbindd_response *response);
874 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
875 struct tevent_context *ev,
876 struct winbindd_cli_state *cli,
877 struct winbindd_request *request);
878 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
879 struct winbindd_response *response);
881 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
882 struct tevent_context *ev,
883 struct winbindd_cli_state *cli,
884 struct winbindd_request *request);
885 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
886 struct winbindd_response *presp);
888 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
889 struct tevent_context *ev,
890 struct winbindd_cli_state *cli,
891 struct winbindd_request *request);
892 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
893 struct winbindd_response *presp);
895 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
896 struct tevent_context *ev,
897 struct winbindd_cli_state *cli,
898 struct winbindd_request *request);
899 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
900 struct winbindd_response *presp);
902 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
903 struct tevent_context *ev,
904 struct winbindd_cli_state *cli,
905 struct winbindd_request *request);
906 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
907 struct winbindd_response *response);
909 struct tevent_req *winbindd_pam_auth_crap_send(
911 struct tevent_context *ev,
912 struct winbindd_cli_state *cli,
913 struct winbindd_request *request);
914 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
915 struct winbindd_response *response);
917 struct tevent_req *winbindd_pam_chauthtok_send(
919 struct tevent_context *ev,
920 struct winbindd_cli_state *cli,
921 struct winbindd_request *request);
922 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
923 struct winbindd_response *response);
925 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
926 struct tevent_context *ev,
927 struct winbindd_cli_state *cli,
928 struct winbindd_request *request);
929 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
930 struct winbindd_response *response);
932 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
934 struct tevent_context *ev,
935 struct winbindd_cli_state *cli,
936 struct winbindd_request *request);
937 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
938 struct tevent_req *req,
939 struct winbindd_response *response);
941 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
942 struct tevent_context *ev,
943 struct dom_sid *sids,
945 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
946 struct lsa_RefDomainList **domains,
947 struct lsa_TransNameArray **names);
949 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
950 struct tevent_context *ev,
951 const struct dom_sid *sids,
952 const uint32_t num_sids);
953 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
954 struct unixid xids[], uint32_t num_xids);
955 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
956 struct tevent_context *ev,
957 struct winbindd_cli_state *cli,
958 struct winbindd_request *request);
959 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
960 struct winbindd_response *response);
961 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
962 struct tevent_context *ev,
963 const struct unixid *xids,
965 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
966 struct dom_sid **sids);
967 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
968 struct tevent_context *ev,
969 struct winbindd_cli_state *cli,
970 struct winbindd_request *request);
971 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
972 struct winbindd_response *response);
973 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
974 struct tevent_context *ev,
975 struct winbindd_cli_state *cli,
976 struct winbindd_request *request);
977 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
978 struct winbindd_response *presp);
979 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
980 struct tevent_context *ev,
981 struct winbindd_cli_state *cli,
982 struct winbindd_request *request);
983 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
984 struct winbindd_response *presp);
985 struct tevent_req *winbindd_domain_info_send(
987 struct tevent_context *ev,
988 struct winbindd_cli_state *cli,
989 struct winbindd_request *request);
990 NTSTATUS winbindd_domain_info_recv(struct tevent_req *req,
991 struct winbindd_response *response);
993 /* The following definitions come from winbindd/winbindd_samr.c */
995 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
996 struct winbindd_domain *domain,
997 struct rpc_pipe_client **samr_pipe,
998 struct policy_handle *samr_domain_hnd);
999 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
1000 struct rpc_pipe_client **lsa_pipe,
1001 struct policy_handle *lsa_hnd);
1003 /* The following definitions come from winbindd/winbindd_irpc.c */
1004 NTSTATUS wb_irpc_register(void);
1006 /* The following definitions come from winbindd/winbindd_reconnect.c */
1007 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
1009 /* The following definitions come from winbindd/winbindd_gpupdate.c */
1010 void gpupdate_init(void);
1011 void gpupdate_user_init(const char *user);
1013 /* The following comes from winbindd/winbindd_dual_srv.c */
1014 bool reset_cm_connection_on_error(struct winbindd_domain *domain,
1015 struct dcerpc_binding_handle *b,
1018 #endif /* _WINBINDD_PROTO_H_ */