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 void winbind_debug_call_depth_setup(size_t *depth);
38 void winbind_call_flow(void *private_data,
39 enum tevent_thread_call_depth_cmd cmd,
40 struct tevent_req *req,
43 bool winbindd_reload_services_file(const char *lfile);
45 /* The following definitions come from winbindd/winbindd_ads.c */
47 /* The following definitions come from winbindd/winbindd_rpc.c */
49 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
50 struct winbindd_domain *domain,
52 const struct dom_sid *sids,
55 enum lsa_SidType **types);
56 NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
57 struct winbindd_domain *domain,
58 struct lsa_SidArray *sids,
59 struct lsa_RefDomainList **pdomains,
60 struct lsa_TransNameArray **pnames);
62 /* The following definitions come from winbindd/winbindd_cache.c */
64 NTSTATUS wb_cache_query_user_list(struct winbindd_domain *domain,
67 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
69 uint32_t *num_entries,
70 struct wb_acct_info **info);
71 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
73 uint32_t *num_entries,
74 struct wb_acct_info **info);
75 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
77 const char *domain_name,
81 enum lsa_SidType *type);
82 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
84 const struct dom_sid *sid,
87 enum lsa_SidType *type);
88 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
90 const struct dom_sid *domain_sid,
95 enum lsa_SidType **types);
96 NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain,
98 const struct dom_sid *user_sid,
100 struct dom_sid **psids);
101 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
104 const struct dom_sid *sids,
105 uint32_t *num_aliases,
106 uint32_t **alias_rids);
107 NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
109 const struct dom_sid *group_sid,
110 enum lsa_SidType type,
112 struct dom_sid **sid_mem,
114 uint32_t **name_types);
115 NTSTATUS wb_cache_lookup_aliasmem(struct winbindd_domain *domain,
117 const struct dom_sid *group_sid,
118 enum lsa_SidType type,
120 struct dom_sid **sid_mem);
121 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
123 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
125 struct samr_DomInfo12 *policy);
126 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
128 struct samr_DomInfo1 *policy);
129 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
131 struct netr_DomainTrustList *trusts);
133 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
134 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
136 const struct dom_sid *sid,
137 const uint8_t **cached_nt_pass,
138 const uint8_t **cached_salt);
139 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
140 const struct dom_sid *sid,
141 const uint8_t nt_pass[NT_HASH_LEN]);
142 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
143 const struct dom_sid *user_sid);
144 bool wcache_invalidate_cache(void);
145 bool wcache_invalidate_cache_noinit(void);
146 bool initialize_winbindd_cache(void);
147 void close_winbindd_cache(void);
148 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
149 char **domain_name, char **name,
150 enum lsa_SidType *type);
151 bool lookup_cached_name(const char *namespace,
152 const char *domain_name,
155 enum lsa_SidType *type);
156 void cache_name2sid_trusted(struct winbindd_domain *domain,
157 const char *domain_name,
159 enum lsa_SidType type,
160 const struct dom_sid *sid);
161 void cache_name2sid(struct winbindd_domain *domain,
162 const char *domain_name, const char *name,
163 enum lsa_SidType type, const struct dom_sid *sid);
164 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
166 const struct dom_sid *user_sid,
167 const char **full_name);
169 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
170 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
171 bool set_global_winbindd_state_offline(void);
172 void set_global_winbindd_state_online(void);
173 bool get_global_winbindd_state_offline(void);
174 int winbindd_validate_cache(void);
175 int winbindd_validate_cache_nobackup(void);
176 bool winbindd_cache_validate_and_initialize(void);
177 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
178 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
179 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
180 void wcache_tdc_clear( void );
181 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
182 time_t last_seq_check);
183 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
184 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
185 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
186 const DATA_BLOB *req, const DATA_BLOB *resp);
188 /* The following definitions come from winbindd/winbindd_ccache_access.c */
190 bool winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
191 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
192 struct winbindd_cli_state *state);
193 bool winbindd_ccache_save(struct winbindd_cli_state *state);
195 /* The following definitions come from winbindd/winbindd_cm.c */
196 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
199 struct server_id server_id,
201 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
204 struct server_id server_id,
207 void set_domain_offline(struct winbindd_domain *domain);
208 void set_domain_online_request(struct winbindd_domain *domain);
210 struct ndr_interface_table;
211 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
212 const struct ndr_interface_table *table,
213 struct rpc_pipe_client **ret_pipe);
214 void invalidate_cm_connection(struct winbindd_domain *domain);
215 void close_conns_after_fork(void);
216 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
217 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
219 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
220 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
221 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
222 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
224 struct rpc_pipe_client **cli,
225 struct policy_handle *lsa_policy);
226 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
227 struct rpc_pipe_client **cli);
228 NTSTATUS cm_connect_netlogon_secure(struct winbindd_domain *domain,
229 struct rpc_pipe_client **cli,
230 struct netlogon_creds_cli_context **ppdc);
231 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
232 const char *domain_name,
233 char **p_dc_name, char **p_dc_ip);
235 /* The following definitions come from winbindd/winbindd_cred_cache.c */
237 bool ccache_entry_exists(const char *username);
238 bool ccache_entry_identical(const char *username,
241 void ccache_remove_all_after_fork(void);
242 void ccache_regain_all_now(void);
243 NTSTATUS add_ccache_to_list(const char *princ_name,
245 const char *username,
246 const char *password,
252 bool postponed_request,
253 const char *canon_principal,
254 const char *canon_realm);
255 NTSTATUS remove_ccache(const char *username);
256 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
257 NTSTATUS winbindd_add_memory_creds(const char *username,
260 NTSTATUS winbindd_delete_memory_creds(const char *username);
261 NTSTATUS winbindd_replace_memory_creds(const char *username,
264 /* The following definitions come from winbindd/winbindd_creds.c */
266 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
268 const struct dom_sid *sid,
269 struct netr_SamInfo3 **info3,
270 const uint8_t **cached_nt_pass,
271 const uint8_t **cred_salt);
272 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
275 struct netr_SamInfo3 *info3);
276 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
279 struct netr_SamInfo3 *info3);
280 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
284 /* The following definitions come from winbindd/winbindd_domain.c */
286 void setup_domain_child(struct winbindd_domain *domain);
288 /* The following definitions come from winbindd/winbindd_dual.c */
290 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
292 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
293 struct tevent_context *ev,
294 struct winbindd_child *child,
295 struct winbindd_request *request);
296 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
297 struct winbindd_response **presponse, int *err);
298 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
299 struct tevent_context *ev,
300 struct winbindd_domain *domain,
301 struct winbindd_request *request);
302 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
303 struct winbindd_response **presponse, int *err);
305 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
306 const char *logprefix,
307 const char *logname);
308 void winbind_child_died(pid_t pid);
309 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
310 void winbind_msg_debug(struct messaging_context *msg_ctx,
313 struct server_id server_id,
315 void winbind_disconnect_dc_parent(struct messaging_context *msg_ctx,
318 struct server_id server_id,
320 void winbind_msg_offline(struct messaging_context *msg_ctx,
323 struct server_id server_id,
325 void winbind_msg_online(struct messaging_context *msg_ctx,
328 struct server_id server_id,
330 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
333 struct server_id server_id,
335 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
338 struct server_id server_id,
340 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
343 struct server_id server_id,
345 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
348 struct server_id server_id,
350 void winbind_msg_disconnect_dc(struct messaging_context *msg_ctx,
353 struct server_id server_id,
355 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
358 struct server_id server_id,
360 void winbindd_msg_reload_services_parent(struct messaging_context *msg,
363 struct server_id server_id,
365 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
366 const char *logfilename);
367 struct winbindd_domain *wb_child_domain(void);
369 /* The following definitions come from winbindd/winbindd_group.c */
370 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
371 const char *dom_name, const char *gr_name, gid_t unix_gid);
374 NTSTATUS winbindd_print_groupmembers(struct db_context *members,
376 int *num_members, char **result);
379 /* The following definitions come from winbindd/winbindd_idmap.c */
381 struct tevent_req *wb_parent_idmap_setup_send(TALLOC_CTX *mem_ctx,
382 struct tevent_context *ev);
383 NTSTATUS wb_parent_idmap_setup_recv(struct tevent_req *req,
384 const struct wb_parent_idmap_config **_cfg);
386 void init_idmap_child(void);
387 struct winbindd_child *idmap_child(void);
388 bool is_idmap_child(const struct winbindd_child *child);
389 pid_t idmap_child_pid(void);
390 struct dcerpc_binding_handle *idmap_child_handle(void);
391 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
392 const struct dom_sid *sid);
393 const char *idmap_config_const_string(const char *domname, const char *option,
395 bool idmap_config_bool(const char *domname, const char *option, bool def);
396 int idmap_config_int(const char *domname, const char *option, int def);
397 const char **idmap_config_string_list(const char *domname,
400 bool domain_has_idmap_config(const char *domname);
401 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
405 /* The following definitions come from winbindd/winbindd_locator.c */
407 void init_locator_child(void);
408 struct winbindd_child *locator_child(void);
409 struct dcerpc_binding_handle *locator_child_handle(void);
411 /* The following definitions come from winbindd/winbindd_misc.c */
413 bool winbindd_list_trusted_domains(struct winbindd_cli_state *state);
414 bool winbindd_dc_info(struct winbindd_cli_state *state);
415 bool winbindd_ping(struct winbindd_cli_state *state);
416 bool winbindd_info(struct winbindd_cli_state *state);
417 bool winbindd_interface_version(struct winbindd_cli_state *state);
418 bool winbindd_domain_name(struct winbindd_cli_state *state);
419 bool winbindd_netbios_name(struct winbindd_cli_state *state);
420 bool winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
422 /* The following definitions come from winbindd/winbindd_ndr.c */
424 void ndr_print_winbindd_child(struct ndr_print *ndr,
426 const struct winbindd_child *r);
427 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
429 const struct winbindd_cm_conn *r);
430 void ndr_print_winbindd_methods(struct ndr_print *ndr,
432 const struct winbindd_methods *r);
433 void ndr_print_winbindd_domain(struct ndr_print *ndr,
435 const struct winbindd_domain *r);
437 /* The following definitions come from winbindd/winbindd_pam.c */
439 bool check_request_flags(uint32_t flags);
440 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
441 struct winbindd_response *resp,
442 uint32_t request_flags,
443 uint16_t validation_level,
444 union netr_Validation *validation,
445 const char *name_domain,
446 const char *name_user);
447 NTSTATUS extra_data_to_sid_array(const char *group_sid,
449 struct wbint_SidArray **_sid_array);
450 uid_t get_uid_from_request(struct winbindd_request *request);
451 struct winbindd_domain *find_auth_domain(uint8_t flags,
452 const char *domain_name);
454 struct wbint_PamAuth;
455 NTSTATUS _wbint_PamAuth(struct pipes_struct *p,
456 struct wbint_PamAuth *r);
457 NTSTATUS _wbint_PamAuthCrap(struct pipes_struct *p,
458 struct wbint_PamAuthCrap *r);
459 NTSTATUS _wbint_PamAuthChangePassword(struct pipes_struct *p,
460 struct wbint_PamAuthChangePassword *r);
461 NTSTATUS _wbint_PamLogOff(struct pipes_struct *p,
462 struct wbint_PamLogOff *r);
463 NTSTATUS _wbint_PamAuthCrapChangePassword(struct pipes_struct *p,
464 struct wbint_PamAuthCrapChangePassword *r);
465 NTSTATUS winbindd_pam_auth_pac_verify(struct winbindd_cli_state *state,
468 uint16_t *p_validation_level,
469 union netr_Validation **p_validation);
471 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
474 uint32_t logon_parameters,
475 const char *name_user,
476 const char *name_domain,
477 const char *workstation,
478 const uint64_t logon_id,
479 const char *client_name,
482 DATA_BLOB lm_response,
483 DATA_BLOB nt_response,
484 const struct tsocket_address *remote,
485 const struct tsocket_address *local,
486 uint8_t *authoritative,
489 uint16_t *_validation_level,
490 union netr_Validation **_validation);
492 /* The following definitions come from winbindd/winbindd_util.c */
494 struct winbindd_domain *domain_list(void);
495 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
496 bool set_routing_domain(struct winbindd_domain *domain,
497 struct winbindd_domain *routing_domain);
498 bool add_trusted_domain_from_auth(uint16_t validation_level,
499 struct info3_text *info3,
500 struct info6_text *info6);
501 bool domain_is_forest_root(const struct winbindd_domain *domain);
502 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
503 struct timeval now, void *private_data);
504 void winbindd_ping_offline_domains(struct tevent_context *ev,
505 struct tevent_timer *te,
508 bool init_domain_list(void);
509 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
510 struct winbindd_domain *find_trust_from_name_noinit(const char *domain_name);
511 struct winbindd_domain *find_domain_from_name(const char *domain_name);
512 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
513 struct winbindd_domain *find_trust_from_sid_noinit(const struct dom_sid *sid);
514 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
515 struct winbindd_domain *find_our_domain(void);
516 struct winbindd_domain *find_default_route_domain(void);
517 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
518 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
519 bool parse_domain_user_fstr(const char *domuser,
524 * Ensure an incoming username from NSS is fully qualified. Replace the
525 * incoming username with DOMAIN <separator> user. Additionally returns
526 * the same values as parse_domain_user() as out params.
527 * Used to ensure all names are fully qualified within winbindd.
528 * Used by the NSS protocols of auth, chauthtok, logoff and ccache_ntlm_auth.
529 * The protocol definitions of auth_crap, chng_pswd_auth_crap
530 * really should be changed to use this instead of doing things
533 * @param[in] mem_ctx talloc context
534 * @param[in,out] username_inout populated with fully qualified name
535 with format 'DOMAIN <separator> user' where DOMAIN and
536 user are determined by the output of parse_domain_user()
537 * @param[out] namespace populated with namespace returned from
539 * @param[out] domain populated with domain returned from
541 * @param[out] populated with user returned from
543 * @return bool indicating success or failure
545 bool canonicalize_username(TALLOC_CTX *mem_ctx,
546 char **username_inout,
550 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
554 struct winbindd_cli_state *winbindd_client_list(void);
555 struct winbindd_cli_state *winbindd_client_list_tail(void);
556 struct winbindd_cli_state *
557 winbindd_client_list_prev(struct winbindd_cli_state *cli);
558 void winbindd_add_client(struct winbindd_cli_state *cli);
559 void winbindd_remove_client(struct winbindd_cli_state *cli);
560 void winbindd_promote_client(struct winbindd_cli_state *cli);
561 int winbindd_num_clients(void);
562 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
563 const struct dom_sid *user_sid,
564 uint32_t *p_num_groups, struct dom_sid **user_sids);
566 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
567 const char *domain_name,
570 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
574 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
575 struct winbindd_domain *domain,
576 const char *name, char **alias);
577 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
578 struct winbindd_domain *domain,
579 const char *alias, char **name);
581 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
582 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
583 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
584 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
585 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
586 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
587 bool is_domain_offline(const struct winbindd_domain *domain);
588 bool is_domain_online(const struct winbindd_domain *domain);
589 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
590 struct dom_sid **sids, uint32_t *num_sids);
591 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
592 struct unixid **pxids, uint32_t *pnum_xids);
594 /* The following definitions come from winbindd/winbindd_wins.c */
596 void winbindd_wins_byname(struct winbindd_cli_state *state);
598 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
599 struct winbindd_domain *domain,
600 struct winbindd_child *child);
601 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
602 struct winbindd_cli_state *state);
604 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
605 struct tevent_context *ev,
606 const struct dom_sid *sid);
607 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
608 enum lsa_SidType *type, const char **domain,
611 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
612 struct tevent_context *ev,
613 struct winbindd_cli_state *cli,
614 struct winbindd_request *request);
615 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
616 struct winbindd_response *response);
618 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
619 struct tevent_context *ev,
620 struct winbindd_cli_state *cli,
621 struct winbindd_request *request);
622 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
623 struct winbindd_response *response);
625 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
626 struct tevent_context *ev,
627 const char *namespace,
628 const char *dom_name,
631 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
632 enum lsa_SidType *type);
634 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
635 struct tevent_context *ev,
636 struct winbindd_cli_state *cli,
637 struct winbindd_request *request);
638 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
639 struct winbindd_response *response);
641 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
642 struct tevent_context *ev,
643 struct winbindd_cli_state *cli,
644 struct winbindd_request *request);
645 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
646 struct winbindd_response *response);
648 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
649 struct tevent_context *ev,
650 struct winbindd_cli_state *cli,
651 struct winbindd_request *request);
652 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
653 struct winbindd_response *response);
655 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
656 struct tevent_context *ev,
657 const struct dom_sid *user_sid);
658 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
659 struct wbint_userinfo **pinfo);
661 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
662 struct tevent_context *ev,
663 const struct dom_sid *user_sid,
664 struct winbindd_pw *pw);
665 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
667 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
668 struct tevent_context *ev,
669 struct winbindd_cli_state *cli,
670 struct winbindd_request *request);
671 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
672 struct winbindd_response *response);
674 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
675 struct tevent_context *ev,
676 struct winbindd_cli_state *cli,
677 struct winbindd_request *request);
678 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
679 struct winbindd_response *response);
681 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
682 struct tevent_context *ev,
683 struct winbindd_cli_state *cli,
684 struct winbindd_request *request);
685 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
686 struct winbindd_response *response);
687 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
688 struct tevent_context *ev,
689 struct winbindd_domain *domain,
691 const struct dom_sid *sids);
692 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
693 uint32_t *num_aliases, uint32_t **aliases);
694 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
695 struct tevent_context *ev,
696 struct winbindd_cli_state *cli,
697 struct winbindd_request *request);
698 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
699 struct winbindd_response *response);
700 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 const struct dom_sid *sid);
703 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
704 uint32_t *num_sids, struct dom_sid **sids);
706 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
707 struct tevent_context *ev,
708 struct winbindd_cli_state *cli,
709 struct winbindd_request *request);
710 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
711 struct winbindd_response *response);
712 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
713 struct tevent_context *ev,
714 const struct dom_sid *sid,
715 bool expand_local_aliases);
716 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
717 uint32_t *num_sids, struct dom_sid **sids);
718 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
719 struct tevent_context *ev,
720 struct winbindd_cli_state *cli,
721 struct winbindd_request *request);
722 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
723 struct winbindd_response *response);
725 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
726 struct tevent_context *ev,
727 struct winbindd_domain *domain);
728 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
730 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
731 struct tevent_context *ev);
732 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
733 int *num_domains, struct winbindd_domain ***domains,
734 NTSTATUS **statuses, uint32_t **seqnums);
736 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
737 struct tevent_context *ev,
738 struct winbindd_cli_state *cli,
739 struct winbindd_request *request);
740 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
741 struct winbindd_response *response);
743 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
744 struct tevent_context *ev,
745 const struct dom_sid *sid,
747 enum lsa_SidType *type,
749 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
750 struct db_context **members);
752 struct tevent_req *wb_alias_members_send(TALLOC_CTX *mem_ctx,
753 struct tevent_context *ev,
754 const struct dom_sid *sid,
755 enum lsa_SidType type,
757 NTSTATUS wb_alias_members_recv(struct tevent_req *req,
760 struct dom_sid **sids);
762 NTSTATUS add_member_to_db(struct db_context *db, struct dom_sid *sid,
765 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
766 struct tevent_context *ev,
767 const struct dom_sid *group_sid,
769 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
770 const char **domname, const char **name, gid_t *gid,
771 struct db_context **members);
773 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
774 struct tevent_context *ev,
775 struct winbindd_cli_state *cli,
776 struct winbindd_request *request);
777 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
778 struct winbindd_response *response);
780 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
781 struct tevent_context *ev,
782 struct winbindd_cli_state *cli,
783 struct winbindd_request *request);
784 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
785 struct winbindd_response *response);
787 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
788 struct tevent_context *ev,
789 struct winbindd_cli_state *cli,
790 struct winbindd_request *request);
791 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
792 struct winbindd_response *response);
794 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
795 struct tevent_context *ev,
796 struct winbindd_cli_state *cli,
797 struct winbindd_request *request);
798 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
799 struct winbindd_response *response);
801 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
802 struct tevent_context *ev,
803 struct winbindd_domain *domain);
804 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
807 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
808 struct tevent_context *ev,
809 struct winbindd_domain *domain);
810 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
812 struct wbint_Principal **groups);
814 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
815 struct tevent_context *ev,
816 struct getpwent_state *gstate,
817 struct winbindd_pw *pw);
818 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
820 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
821 struct tevent_context *ev,
822 struct winbindd_cli_state *cli,
823 struct winbindd_request *request);
824 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
825 struct winbindd_response *presp);
827 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
828 struct tevent_context *ev,
829 struct winbindd_cli_state *cli,
830 struct winbindd_request *request);
831 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
832 struct winbindd_response *response);
834 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
835 struct tevent_context *ev,
836 struct winbindd_cli_state *cli,
837 struct winbindd_request *request);
838 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
839 struct winbindd_response *response);
841 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
842 struct tevent_context *ev,
843 struct winbindd_cli_state *cli,
844 struct winbindd_request *request);
845 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
846 struct winbindd_response *response);
848 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
849 struct tevent_context *ev,
850 const char *domain_name,
851 const struct GUID *domain_guid,
852 const char *site_name,
854 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
855 struct netr_DsRGetDCNameInfo **pdcinfo);
856 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
857 struct netr_DsRGetDCNameInfo *dcinfo);
858 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
860 struct netr_DsRGetDCNameInfo **dcinfo);
862 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
863 struct tevent_context *ev,
864 struct winbindd_cli_state *cli,
865 struct winbindd_request *request);
866 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
867 struct winbindd_response *response);
869 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
870 struct tevent_context *ev,
872 struct getgrent_state *gstate,
873 struct winbindd_gr *gr);
874 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
875 struct db_context **members);
877 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
878 struct tevent_context *ev,
879 struct winbindd_cli_state *cli,
880 struct winbindd_request *request);
881 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
882 struct winbindd_response *response);
883 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
884 struct tevent_context *ev,
885 struct winbindd_cli_state *cli,
886 struct winbindd_request *request);
887 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
888 struct winbindd_response *response);
889 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
890 struct tevent_context *ev,
891 struct winbindd_cli_state *cli,
892 struct winbindd_request *request);
893 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
894 struct winbindd_response *response);
896 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
897 struct tevent_context *ev,
898 struct winbindd_cli_state *cli,
899 struct winbindd_request *request);
900 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
901 struct winbindd_response *response);
903 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
904 struct tevent_context *ev,
905 struct winbindd_cli_state *cli,
906 struct winbindd_request *request);
907 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
908 struct winbindd_response *response);
910 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
911 struct tevent_context *ev,
912 struct winbindd_cli_state *cli,
913 struct winbindd_request *request);
914 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
915 struct winbindd_response *presp);
917 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
918 struct tevent_context *ev,
919 struct winbindd_cli_state *cli,
920 struct winbindd_request *request);
921 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
922 struct winbindd_response *presp);
924 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
925 struct tevent_context *ev,
926 struct winbindd_cli_state *cli,
927 struct winbindd_request *request);
928 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
929 struct winbindd_response *presp);
931 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
932 struct tevent_context *ev,
933 struct winbindd_cli_state *cli,
934 struct winbindd_request *request);
935 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
936 struct winbindd_response *response);
938 struct tevent_req *winbindd_pam_auth_crap_send(
940 struct tevent_context *ev,
941 struct winbindd_cli_state *cli,
942 struct winbindd_request *request);
943 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
944 struct winbindd_response *response);
946 struct tevent_req *winbindd_pam_chauthtok_send(
948 struct tevent_context *ev,
949 struct winbindd_cli_state *cli,
950 struct winbindd_request *request);
951 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
952 struct winbindd_response *response);
954 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
955 struct tevent_context *ev,
956 struct winbindd_cli_state *cli,
957 struct winbindd_request *request);
958 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
959 struct winbindd_response *response);
961 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
963 struct tevent_context *ev,
964 struct winbindd_cli_state *cli,
965 struct winbindd_request *request);
966 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
967 struct tevent_req *req,
968 struct winbindd_response *response);
970 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
971 struct tevent_context *ev,
972 struct dom_sid *sids,
974 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
975 struct lsa_RefDomainList **domains,
976 struct lsa_TransNameArray **names);
978 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
979 struct tevent_context *ev,
980 const struct dom_sid *sids,
981 const uint32_t num_sids);
982 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
983 struct unixid xids[], uint32_t num_xids);
984 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
985 struct tevent_context *ev,
986 struct winbindd_cli_state *cli,
987 struct winbindd_request *request);
988 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
989 struct winbindd_response *response);
990 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
991 struct tevent_context *ev,
992 const struct unixid *xids,
994 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
995 struct dom_sid **sids);
996 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
997 struct tevent_context *ev,
998 struct winbindd_cli_state *cli,
999 struct winbindd_request *request);
1000 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
1001 struct winbindd_response *response);
1002 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
1003 struct tevent_context *ev,
1004 struct winbindd_cli_state *cli,
1005 struct winbindd_request *request);
1006 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
1007 struct winbindd_response *presp);
1008 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
1009 struct tevent_context *ev,
1010 struct winbindd_cli_state *cli,
1011 struct winbindd_request *request);
1012 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
1013 struct winbindd_response *presp);
1014 struct tevent_req *winbindd_domain_info_send(
1015 TALLOC_CTX *mem_ctx,
1016 struct tevent_context *ev,
1017 struct winbindd_cli_state *cli,
1018 struct winbindd_request *request);
1019 NTSTATUS winbindd_domain_info_recv(struct tevent_req *req,
1020 struct winbindd_response *response);
1022 /* The following definitions come from winbindd/winbindd_samr.c */
1024 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
1025 struct winbindd_domain *domain,
1026 struct rpc_pipe_client **samr_pipe,
1027 struct policy_handle *samr_domain_hnd);
1028 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
1029 struct rpc_pipe_client **lsa_pipe,
1030 struct policy_handle *lsa_hnd);
1032 /* The following definitions come from winbindd/winbindd_irpc.c */
1033 NTSTATUS wb_irpc_register(void);
1035 /* The following definitions come from winbindd/winbindd_reconnect.c */
1036 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
1038 /* The following definitions come from winbindd/winbindd_gpupdate.c */
1039 void gpupdate_init(void);
1040 void gpupdate_user_init(const char *user);
1042 /* The following comes from winbindd/winbindd_dual_srv.c */
1043 bool reset_cm_connection_on_error(struct winbindd_domain *domain,
1044 struct dcerpc_binding_handle *b,
1047 #endif /* _WINBINDD_PROTO_H_ */