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 request_error(struct winbindd_cli_state *state);
29 void request_ok(struct winbindd_cli_state *state);
30 bool winbindd_setup_sig_term_handler(bool parent);
31 bool winbindd_setup_stdin_handler(bool parent, bool foreground);
32 bool winbindd_setup_sig_hup_handler(const char *lfile);
33 bool winbindd_use_idmap_cache(void);
34 bool winbindd_use_cache(void);
35 char *get_winbind_priv_pipe_dir(void);
37 /* The following definitions come from winbindd/winbindd_ads.c */
39 /* The following definitions come from winbindd/winbindd_rpc.c */
41 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
42 struct winbindd_domain *domain,
44 const struct dom_sid *sids,
47 enum lsa_SidType **types);
48 NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
49 struct winbindd_domain *domain,
50 struct lsa_SidArray *sids,
51 struct lsa_RefDomainList **pdomains,
52 struct lsa_TransNameArray **pnames);
54 /* The following definitions come from winbindd/winbindd_cache.c */
56 NTSTATUS wb_cache_query_user_list(struct winbindd_domain *domain,
59 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
61 uint32_t *num_entries,
62 struct wb_acct_info **info);
63 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
65 uint32_t *num_entries,
66 struct wb_acct_info **info);
67 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
69 const char *domain_name,
73 enum lsa_SidType *type);
74 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
76 const struct dom_sid *sid,
79 enum lsa_SidType *type);
80 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
82 const struct dom_sid *domain_sid,
87 enum lsa_SidType **types);
88 NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain,
90 const struct dom_sid *user_sid,
92 struct dom_sid **psids);
93 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
96 const struct dom_sid *sids,
97 uint32_t *num_aliases,
98 uint32_t **alias_rids);
99 NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
101 const struct dom_sid *group_sid,
102 enum lsa_SidType type,
104 struct dom_sid **sid_mem,
106 uint32_t **name_types);
107 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
109 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
111 struct samr_DomInfo12 *policy);
112 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
114 struct samr_DomInfo1 *policy);
115 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
117 struct netr_DomainTrustList *trusts);
119 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
120 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
122 const struct dom_sid *sid,
123 const uint8_t **cached_nt_pass,
124 const uint8_t **cached_salt);
125 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
126 const struct dom_sid *sid,
127 const uint8_t nt_pass[NT_HASH_LEN]);
128 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
129 const struct dom_sid *user_sid);
130 bool wcache_invalidate_cache(void);
131 bool wcache_invalidate_cache_noinit(void);
132 bool initialize_winbindd_cache(void);
133 void close_winbindd_cache(void);
134 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
135 char **domain_name, char **name,
136 enum lsa_SidType *type);
137 bool lookup_cached_name(const char *domain_name,
140 enum lsa_SidType *type);
141 void cache_name2sid_trusted(struct winbindd_domain *domain,
142 const char *domain_name,
144 enum lsa_SidType type,
145 const struct dom_sid *sid);
146 void cache_name2sid(struct winbindd_domain *domain,
147 const char *domain_name, const char *name,
148 enum lsa_SidType type, const struct dom_sid *sid);
149 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
151 const struct dom_sid *user_sid,
152 const char **full_name);
154 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
155 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
156 bool set_global_winbindd_state_offline(void);
157 void set_global_winbindd_state_online(void);
158 bool get_global_winbindd_state_offline(void);
159 int winbindd_validate_cache(void);
160 int winbindd_validate_cache_nobackup(void);
161 bool winbindd_cache_validate_and_initialize(void);
162 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
163 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
164 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
165 void wcache_tdc_clear( void );
166 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
167 time_t last_seq_check);
168 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
169 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
170 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
171 const DATA_BLOB *req, const DATA_BLOB *resp);
173 /* The following definitions come from winbindd/winbindd_ccache_access.c */
175 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
176 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
177 struct winbindd_cli_state *state);
178 void winbindd_ccache_save(struct winbindd_cli_state *state);
180 /* The following definitions come from winbindd/winbindd_cm.c */
181 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
184 struct server_id server_id,
186 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
189 struct server_id server_id,
192 void set_domain_offline(struct winbindd_domain *domain);
193 void set_domain_online_request(struct winbindd_domain *domain);
195 struct ndr_interface_table;
196 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
197 const struct ndr_interface_table *table,
198 struct rpc_pipe_client **ret_pipe);
199 void invalidate_cm_connection(struct winbindd_domain *domain);
200 void close_conns_after_fork(void);
201 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
202 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
204 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
205 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
206 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
207 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
209 struct rpc_pipe_client **cli,
210 struct policy_handle *lsa_policy);
211 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
212 struct rpc_pipe_client **cli);
213 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
214 const char *domain_name,
215 char **p_dc_name, char **p_dc_ip);
217 /* The following definitions come from winbindd/winbindd_cred_cache.c */
219 bool ccache_entry_exists(const char *username);
220 bool ccache_entry_identical(const char *username,
223 void ccache_remove_all_after_fork(void);
224 void ccache_regain_all_now(void);
225 NTSTATUS add_ccache_to_list(const char *princ_name,
228 const char *username,
229 const char *password,
235 bool postponed_request);
236 NTSTATUS remove_ccache(const char *username);
237 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
238 NTSTATUS winbindd_add_memory_creds(const char *username,
241 NTSTATUS winbindd_delete_memory_creds(const char *username);
242 NTSTATUS winbindd_replace_memory_creds(const char *username,
245 /* The following definitions come from winbindd/winbindd_creds.c */
247 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
249 const struct dom_sid *sid,
250 struct netr_SamInfo3 **info3,
251 const uint8_t *cached_nt_pass[NT_HASH_LEN],
252 const uint8_t *cred_salt[NT_HASH_LEN]);
253 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
256 struct netr_SamInfo3 *info3);
257 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
260 struct netr_SamInfo3 *info3);
261 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
265 /* The following definitions come from winbindd/winbindd_domain.c */
267 void setup_domain_child(struct winbindd_domain *domain);
269 /* The following definitions come from winbindd/winbindd_dual.c */
271 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
272 struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
274 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
275 struct tevent_context *ev,
276 struct winbindd_child *child,
277 struct winbindd_request *request);
278 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
279 struct winbindd_response **presponse, int *err);
280 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
281 struct tevent_context *ev,
282 struct winbindd_domain *domain,
283 struct winbindd_request *request);
284 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
285 struct winbindd_response **presponse, int *err);
287 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
288 const struct winbindd_child_dispatch_table *table,
289 const char *logprefix,
290 const char *logname);
291 void winbind_child_died(pid_t pid);
292 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
293 void winbind_msg_debug(struct messaging_context *msg_ctx,
296 struct server_id server_id,
298 void winbind_msg_offline(struct messaging_context *msg_ctx,
301 struct server_id server_id,
303 void winbind_msg_online(struct messaging_context *msg_ctx,
306 struct server_id server_id,
308 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
311 struct server_id server_id,
313 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
316 struct server_id server_id,
318 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
321 struct server_id server_id,
323 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
326 struct server_id server_id,
328 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
331 struct server_id server_id,
333 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
334 const char *logfilename);
335 struct winbindd_domain *wb_child_domain(void);
337 /* The following definitions come from winbindd/winbindd_group.c */
338 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
339 const char *dom_name, const char *gr_name, gid_t unix_gid);
342 NTSTATUS winbindd_print_groupmembers(struct db_context *members,
344 int *num_members, char **result);
347 /* The following definitions come from winbindd/winbindd_idmap.c */
349 void init_idmap_child(void);
350 struct winbindd_child *idmap_child(void);
351 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
352 const struct dom_sid *sid);
353 const char *idmap_config_const_string(const char *domname, const char *option,
355 bool idmap_config_bool(const char *domname, const char *option, bool def);
356 int idmap_config_int(const char *domname, const char *option, int def);
357 bool domain_has_idmap_config(const char *domname);
358 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
362 /* The following definitions come from winbindd/winbindd_locator.c */
364 void init_locator_child(void);
365 struct winbindd_child *locator_child(void);
367 /* The following definitions come from winbindd/winbindd_misc.c */
369 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
370 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
371 struct winbindd_cli_state *state);
372 void winbindd_show_sequence(struct winbindd_cli_state *state);
373 void winbindd_domain_info(struct winbindd_cli_state *state);
374 void winbindd_dc_info(struct winbindd_cli_state *state);
375 void winbindd_ping(struct winbindd_cli_state *state);
376 void winbindd_info(struct winbindd_cli_state *state);
377 void winbindd_interface_version(struct winbindd_cli_state *state);
378 void winbindd_domain_name(struct winbindd_cli_state *state);
379 void winbindd_netbios_name(struct winbindd_cli_state *state);
380 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
382 /* The following definitions come from winbindd/winbindd_ndr.c */
384 void ndr_print_winbindd_child(struct ndr_print *ndr,
386 const struct winbindd_child *r);
387 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
389 const struct winbindd_cm_conn *r);
390 void ndr_print_winbindd_methods(struct ndr_print *ndr,
392 const struct winbindd_methods *r);
393 void ndr_print_winbindd_domain(struct ndr_print *ndr,
395 const struct winbindd_domain *r);
397 /* The following definitions come from winbindd/winbindd_pam.c */
399 bool check_request_flags(uint32_t flags);
400 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
401 struct winbindd_response *resp,
402 uint32_t request_flags,
403 uint16_t validation_level,
404 union netr_Validation *validation,
405 const char *name_domain,
406 const char *name_user);
407 uid_t get_uid_from_request(struct winbindd_request *request);
408 struct winbindd_domain *find_auth_domain(uint8_t flags,
409 const char *domain_name);
410 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
411 struct winbindd_cli_state *state) ;
412 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
413 struct winbindd_cli_state *state) ;
414 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
415 struct winbindd_cli_state *state);
416 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
417 struct winbindd_cli_state *state) ;
418 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
419 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
420 struct netr_SamInfo3 **info3);
422 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
424 uint32_t logon_parameters,
425 const char *name_user,
426 const char *name_domain,
427 const char *workstation,
428 const uint8_t chal[8],
429 DATA_BLOB lm_response,
430 DATA_BLOB nt_response,
431 uint8_t *authoritative,
434 uint16_t *_validation_level,
435 union netr_Validation **_validation);
437 /* The following definitions come from winbindd/winbindd_util.c */
439 struct winbindd_domain *domain_list(void);
440 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
441 bool set_routing_domain(struct winbindd_domain *domain,
442 const struct winbindd_domain *routing_domain);
443 bool domain_is_forest_root(const struct winbindd_domain *domain);
444 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
445 struct timeval now, void *private_data);
446 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
447 struct winbindd_cli_state *state);
448 bool init_domain_list(void);
449 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
450 struct winbindd_domain *find_trust_from_name_noinit(const char *domain_name);
451 struct winbindd_domain *find_domain_from_name(const char *domain_name);
452 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
453 struct winbindd_domain *find_trust_from_sid_noinit(const struct dom_sid *sid);
454 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
455 struct winbindd_domain *find_our_domain(void);
456 struct winbindd_domain *find_default_route_domain(void);
457 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
458 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
459 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
460 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
461 char **domain, char **user);
462 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
463 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
464 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
468 struct winbindd_cli_state *winbindd_client_list(void);
469 struct winbindd_cli_state *winbindd_client_list_tail(void);
470 struct winbindd_cli_state *
471 winbindd_client_list_prev(struct winbindd_cli_state *cli);
472 void winbindd_add_client(struct winbindd_cli_state *cli);
473 void winbindd_remove_client(struct winbindd_cli_state *cli);
474 void winbindd_promote_client(struct winbindd_cli_state *cli);
475 int winbindd_num_clients(void);
476 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
477 const struct dom_sid *user_sid,
478 uint32_t *p_num_groups, struct dom_sid **user_sids);
480 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
481 const char *domain_name,
484 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
488 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
489 struct winbindd_domain *domain,
490 const char *name, char **alias);
491 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
492 struct winbindd_domain *domain,
493 const char *alias, char **name);
495 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
496 bool winbindd_internal_child(struct winbindd_child *child);
497 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
498 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
499 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
500 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
501 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
502 bool is_domain_offline(const struct winbindd_domain *domain);
503 bool is_domain_online(const struct winbindd_domain *domain);
504 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
505 struct dom_sid **sids, uint32_t *num_sids);
506 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
507 struct unixid **pxids, uint32_t *pnum_xids);
509 /* The following definitions come from winbindd/winbindd_wins.c */
511 void winbindd_wins_byname(struct winbindd_cli_state *state);
513 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
514 struct winbindd_cli_state *cli,
515 struct winbindd_request *request);
516 NTSTATUS wb_ping_recv(struct tevent_req *req,
517 struct winbindd_response *resp);
519 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
520 struct winbindd_cli_state *state);
522 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
523 struct winbindd_domain *domain,
524 struct winbindd_child *child);
525 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
526 struct winbindd_cli_state *state);
528 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
529 struct tevent_context *ev,
530 const struct dom_sid *sid);
531 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
532 enum lsa_SidType *type, const char **domain,
535 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
536 struct tevent_context *ev,
537 struct winbindd_cli_state *cli,
538 struct winbindd_request *request);
539 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
540 struct winbindd_response *response);
542 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
543 struct tevent_context *ev,
544 struct winbindd_cli_state *cli,
545 struct winbindd_request *request);
546 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
547 struct winbindd_response *response);
549 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
550 struct tevent_context *ev,
551 const char *dom_name, const char *name,
553 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
554 enum lsa_SidType *type);
556 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
557 struct tevent_context *ev,
558 struct winbindd_cli_state *cli,
559 struct winbindd_request *request);
560 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
561 struct winbindd_response *response);
563 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
564 struct tevent_context *ev,
565 struct winbindd_cli_state *cli,
566 struct winbindd_request *request);
567 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
568 struct winbindd_response *response);
570 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
571 struct tevent_context *ev,
572 struct winbindd_cli_state *cli,
573 struct winbindd_request *request);
574 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
575 struct winbindd_response *response);
577 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
578 struct tevent_context *ev,
579 const struct dom_sid *user_sid);
580 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
581 struct wbint_userinfo **pinfo);
583 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
584 struct tevent_context *ev,
585 const struct dom_sid *user_sid,
586 struct winbindd_pw *pw);
587 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
589 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
590 struct tevent_context *ev,
591 struct winbindd_cli_state *cli,
592 struct winbindd_request *request);
593 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
594 struct winbindd_response *response);
596 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 struct winbindd_cli_state *cli,
599 struct winbindd_request *request);
600 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
601 struct winbindd_response *response);
603 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
604 struct tevent_context *ev,
605 struct winbindd_cli_state *cli,
606 struct winbindd_request *request);
607 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
608 struct winbindd_response *response);
609 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
610 struct tevent_context *ev,
611 struct winbindd_domain *domain,
613 const struct dom_sid *sids);
614 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
615 uint32_t *num_aliases, uint32_t **aliases);
616 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
617 struct tevent_context *ev,
618 struct winbindd_cli_state *cli,
619 struct winbindd_request *request);
620 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
621 struct winbindd_response *response);
622 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
623 struct tevent_context *ev,
624 const struct dom_sid *sid);
625 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
626 int *num_sids, struct dom_sid **sids);
628 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
629 struct tevent_context *ev,
630 struct winbindd_cli_state *cli,
631 struct winbindd_request *request);
632 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
633 struct winbindd_response *response);
634 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
635 struct tevent_context *ev,
636 const struct dom_sid *sid,
637 bool expand_local_aliases);
638 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
639 int *num_sids, struct dom_sid **sids);
640 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
641 struct tevent_context *ev,
642 struct winbindd_cli_state *cli,
643 struct winbindd_request *request);
644 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
645 struct winbindd_response *response);
647 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
648 struct tevent_context *ev,
649 struct winbindd_domain *domain);
650 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
652 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev);
654 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
655 int *num_domains, struct winbindd_domain ***domains,
656 NTSTATUS **stati, uint32_t **seqnums);
658 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
659 struct tevent_context *ev,
660 struct winbindd_cli_state *cli,
661 struct winbindd_request *request);
662 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
663 struct winbindd_response *response);
665 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 const struct dom_sid *sid,
668 enum lsa_SidType type,
670 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
671 struct db_context **members);
672 NTSTATUS add_member_to_db(struct db_context *db, struct dom_sid *sid,
675 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
676 struct tevent_context *ev,
677 const struct dom_sid *group_sid,
679 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
680 const char **domname, const char **name, gid_t *gid,
681 struct db_context **members);
683 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
684 struct tevent_context *ev,
685 struct winbindd_cli_state *cli,
686 struct winbindd_request *request);
687 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
688 struct winbindd_response *response);
690 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
691 struct tevent_context *ev,
692 struct winbindd_cli_state *cli,
693 struct winbindd_request *request);
694 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
695 struct winbindd_response *response);
697 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
698 struct tevent_context *ev,
699 struct winbindd_cli_state *cli,
700 struct winbindd_request *request);
701 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
702 struct winbindd_response *response);
704 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
705 struct tevent_context *ev,
706 struct winbindd_cli_state *cli,
707 struct winbindd_request *request);
708 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
709 struct winbindd_response *response);
711 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
712 struct tevent_context *ev,
713 struct winbindd_domain *domain);
714 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
717 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
718 struct tevent_context *ev,
719 struct winbindd_domain *domain);
720 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
722 struct wbint_Principal **groups);
724 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
725 struct tevent_context *ev,
726 struct getpwent_state *gstate,
727 struct winbindd_pw *pw);
728 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
730 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
731 struct tevent_context *ev,
732 struct winbindd_cli_state *cli,
733 struct winbindd_request *request);
734 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
735 struct winbindd_response *presp);
737 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
738 struct tevent_context *ev,
739 struct winbindd_cli_state *cli,
740 struct winbindd_request *request);
741 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
742 struct winbindd_response *response);
744 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
745 struct tevent_context *ev,
746 struct winbindd_cli_state *cli,
747 struct winbindd_request *request);
748 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
749 struct winbindd_response *response);
751 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
752 struct tevent_context *ev,
753 struct winbindd_cli_state *cli,
754 struct winbindd_request *request);
755 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
756 struct winbindd_response *response);
758 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
759 struct tevent_context *ev,
760 const char *domain_name,
761 const struct GUID *domain_guid,
762 const char *site_name,
764 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
765 struct netr_DsRGetDCNameInfo **pdcinfo);
766 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
767 struct netr_DsRGetDCNameInfo *dcinfo);
768 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
770 struct netr_DsRGetDCNameInfo **dcinfo);
772 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
773 struct tevent_context *ev,
774 struct winbindd_cli_state *cli,
775 struct winbindd_request *request);
776 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
777 struct winbindd_response *response);
779 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
780 struct tevent_context *ev,
782 struct getgrent_state *gstate,
783 struct winbindd_gr *gr);
784 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
785 struct db_context **members);
787 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
788 struct tevent_context *ev,
789 struct winbindd_cli_state *cli,
790 struct winbindd_request *request);
791 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
792 struct winbindd_response *response);
793 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
794 struct tevent_context *ev,
795 struct winbindd_cli_state *cli,
796 struct winbindd_request *request);
797 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
798 struct winbindd_response *response);
799 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
800 struct tevent_context *ev,
801 struct winbindd_cli_state *cli,
802 struct winbindd_request *request);
803 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
804 struct winbindd_response *response);
806 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
807 struct tevent_context *ev,
808 struct winbindd_cli_state *cli,
809 struct winbindd_request *request);
810 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
811 struct winbindd_response *response);
813 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
814 struct tevent_context *ev,
815 struct winbindd_cli_state *cli,
816 struct winbindd_request *request);
817 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
818 struct winbindd_response *response);
820 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
821 struct tevent_context *ev,
822 struct winbindd_cli_state *cli,
823 struct winbindd_request *request);
824 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
825 struct winbindd_response *presp);
827 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
828 struct tevent_context *ev,
829 struct winbindd_cli_state *cli,
830 struct winbindd_request *request);
831 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
832 struct winbindd_response *presp);
834 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
835 struct tevent_context *ev,
836 struct winbindd_cli_state *cli,
837 struct winbindd_request *request);
838 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
839 struct winbindd_response *presp);
841 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
842 struct tevent_context *ev,
843 struct winbindd_cli_state *cli,
844 struct winbindd_request *request);
845 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
846 struct winbindd_response *response);
848 struct tevent_req *winbindd_pam_auth_crap_send(
850 struct tevent_context *ev,
851 struct winbindd_cli_state *cli,
852 struct winbindd_request *request);
853 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
854 struct winbindd_response *response);
856 struct tevent_req *winbindd_pam_chauthtok_send(
858 struct tevent_context *ev,
859 struct winbindd_cli_state *cli,
860 struct winbindd_request *request);
861 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
862 struct winbindd_response *response);
864 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
865 struct tevent_context *ev,
866 struct winbindd_cli_state *cli,
867 struct winbindd_request *request);
868 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
869 struct winbindd_response *response);
871 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
873 struct tevent_context *ev,
874 struct winbindd_cli_state *cli,
875 struct winbindd_request *request);
876 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
877 struct tevent_req *req,
878 struct winbindd_response *response);
880 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
881 struct tevent_context *ev,
882 struct dom_sid *sids,
884 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
885 struct lsa_RefDomainList **domains,
886 struct lsa_TransNameArray **names);
888 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
889 struct tevent_context *ev,
890 const struct dom_sid *sids,
891 const uint32_t num_sids);
892 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
893 struct unixid xids[], uint32_t num_xids);
894 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
895 struct tevent_context *ev,
896 struct winbindd_cli_state *cli,
897 struct winbindd_request *request);
898 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
899 struct winbindd_response *response);
900 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
901 struct tevent_context *ev,
904 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
905 struct dom_sid **sids);
906 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
907 struct tevent_context *ev,
908 struct winbindd_cli_state *cli,
909 struct winbindd_request *request);
910 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
911 struct winbindd_response *response);
912 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
913 struct tevent_context *ev,
914 struct winbindd_cli_state *cli,
915 struct winbindd_request *request);
916 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
917 struct winbindd_response *presp);
918 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
919 struct tevent_context *ev,
920 struct winbindd_cli_state *cli,
921 struct winbindd_request *request);
922 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
923 struct winbindd_response *presp);
926 /* The following definitions come from winbindd/winbindd_samr.c */
928 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
929 struct winbindd_domain *domain,
930 struct rpc_pipe_client **samr_pipe,
931 struct policy_handle *samr_domain_hnd);
932 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
933 struct rpc_pipe_client **lsa_pipe,
934 struct policy_handle *lsa_hnd);
936 /* The following definitions come from winbindd/winbindd_irpc.c */
937 NTSTATUS wb_irpc_register(void);
939 /* The following definitions come from winbindd/winbindd_reconnect.c */
940 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
942 #endif /* _WINBINDD_PROTO_H_ */