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_sequence_number(struct winbindd_domain *domain,
111 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
113 struct samr_DomInfo12 *policy);
114 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
116 struct samr_DomInfo1 *policy);
117 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
119 struct netr_DomainTrustList *trusts);
121 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
122 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
124 const struct dom_sid *sid,
125 const uint8_t **cached_nt_pass,
126 const uint8_t **cached_salt);
127 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
128 const struct dom_sid *sid,
129 const uint8_t nt_pass[NT_HASH_LEN]);
130 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
131 const struct dom_sid *user_sid);
132 bool wcache_invalidate_cache(void);
133 bool wcache_invalidate_cache_noinit(void);
134 bool initialize_winbindd_cache(void);
135 void close_winbindd_cache(void);
136 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
137 char **domain_name, char **name,
138 enum lsa_SidType *type);
139 bool lookup_cached_name(const char *namespace,
140 const char *domain_name,
143 enum lsa_SidType *type);
144 void cache_name2sid_trusted(struct winbindd_domain *domain,
145 const char *domain_name,
147 enum lsa_SidType type,
148 const struct dom_sid *sid);
149 void cache_name2sid(struct winbindd_domain *domain,
150 const char *domain_name, const char *name,
151 enum lsa_SidType type, const struct dom_sid *sid);
152 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
154 const struct dom_sid *user_sid,
155 const char **full_name);
157 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
158 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
159 bool set_global_winbindd_state_offline(void);
160 void set_global_winbindd_state_online(void);
161 bool get_global_winbindd_state_offline(void);
162 int winbindd_validate_cache(void);
163 int winbindd_validate_cache_nobackup(void);
164 bool winbindd_cache_validate_and_initialize(void);
165 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
166 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
167 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
168 void wcache_tdc_clear( void );
169 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
170 time_t last_seq_check);
171 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
172 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
173 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
174 const DATA_BLOB *req, const DATA_BLOB *resp);
176 /* The following definitions come from winbindd/winbindd_ccache_access.c */
178 bool winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
179 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
180 struct winbindd_cli_state *state);
181 bool winbindd_ccache_save(struct winbindd_cli_state *state);
183 /* The following definitions come from winbindd/winbindd_cm.c */
184 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
187 struct server_id server_id,
189 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
192 struct server_id server_id,
195 void set_domain_offline(struct winbindd_domain *domain);
196 void set_domain_online_request(struct winbindd_domain *domain);
198 struct ndr_interface_table;
199 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
200 const struct ndr_interface_table *table,
201 struct rpc_pipe_client **ret_pipe);
202 void invalidate_cm_connection(struct winbindd_domain *domain);
203 void close_conns_after_fork(void);
204 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
205 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
207 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
208 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
209 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
210 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
212 struct rpc_pipe_client **cli,
213 struct policy_handle *lsa_policy);
214 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
215 struct rpc_pipe_client **cli);
216 NTSTATUS cm_connect_netlogon_secure(struct winbindd_domain *domain,
217 struct rpc_pipe_client **cli,
218 struct netlogon_creds_cli_context **ppdc);
219 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
220 const char *domain_name,
221 char **p_dc_name, char **p_dc_ip);
223 /* The following definitions come from winbindd/winbindd_cred_cache.c */
225 bool ccache_entry_exists(const char *username);
226 bool ccache_entry_identical(const char *username,
229 void ccache_remove_all_after_fork(void);
230 void ccache_regain_all_now(void);
231 NTSTATUS add_ccache_to_list(const char *princ_name,
233 const char *username,
234 const char *password,
240 bool postponed_request,
241 const char *canon_principal,
242 const char *canon_realm);
243 NTSTATUS remove_ccache(const char *username);
244 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
245 NTSTATUS winbindd_add_memory_creds(const char *username,
248 NTSTATUS winbindd_delete_memory_creds(const char *username);
249 NTSTATUS winbindd_replace_memory_creds(const char *username,
252 /* The following definitions come from winbindd/winbindd_creds.c */
254 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
256 const struct dom_sid *sid,
257 struct netr_SamInfo3 **info3,
258 const uint8_t **cached_nt_pass,
259 const uint8_t **cred_salt);
260 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
263 struct netr_SamInfo3 *info3);
264 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
267 struct netr_SamInfo3 *info3);
268 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
272 /* The following definitions come from winbindd/winbindd_domain.c */
274 void setup_domain_child(struct winbindd_domain *domain);
276 /* The following definitions come from winbindd/winbindd_dual.c */
278 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
280 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
281 struct tevent_context *ev,
282 struct winbindd_child *child,
283 struct winbindd_request *request);
284 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
285 struct winbindd_response **presponse, int *err);
286 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
287 struct tevent_context *ev,
288 struct winbindd_domain *domain,
289 struct winbindd_request *request);
290 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
291 struct winbindd_response **presponse, int *err);
293 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
294 const char *logprefix,
295 const char *logname);
296 void winbind_child_died(pid_t pid);
297 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
298 void winbind_msg_debug(struct messaging_context *msg_ctx,
301 struct server_id server_id,
303 void winbind_disconnect_dc_parent(struct messaging_context *msg_ctx,
306 struct server_id server_id,
308 void winbind_msg_offline(struct messaging_context *msg_ctx,
311 struct server_id server_id,
313 void winbind_msg_online(struct messaging_context *msg_ctx,
316 struct server_id server_id,
318 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
321 struct server_id server_id,
323 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
326 struct server_id server_id,
328 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
331 struct server_id server_id,
333 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
336 struct server_id server_id,
338 void winbind_msg_disconnect_dc(struct messaging_context *msg_ctx,
341 struct server_id server_id,
343 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
346 struct server_id server_id,
348 void winbindd_msg_reload_services_parent(struct messaging_context *msg,
351 struct server_id server_id,
353 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
354 const char *logfilename);
355 struct winbindd_domain *wb_child_domain(void);
357 /* The following definitions come from winbindd/winbindd_group.c */
358 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
359 const char *dom_name, const char *gr_name, gid_t unix_gid);
362 NTSTATUS winbindd_print_groupmembers(struct db_context *members,
364 int *num_members, char **result);
367 /* The following definitions come from winbindd/winbindd_idmap.c */
369 struct tevent_req *wb_parent_idmap_setup_send(TALLOC_CTX *mem_ctx,
370 struct tevent_context *ev);
371 NTSTATUS wb_parent_idmap_setup_recv(struct tevent_req *req,
372 const struct wb_parent_idmap_config **_cfg);
374 void init_idmap_child(void);
375 struct winbindd_child *idmap_child(void);
376 bool is_idmap_child(const struct winbindd_child *child);
377 pid_t idmap_child_pid(void);
378 struct dcerpc_binding_handle *idmap_child_handle(void);
379 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
380 const struct dom_sid *sid);
381 const char *idmap_config_const_string(const char *domname, const char *option,
383 bool idmap_config_bool(const char *domname, const char *option, bool def);
384 int idmap_config_int(const char *domname, const char *option, int def);
385 const char **idmap_config_string_list(const char *domname,
388 bool domain_has_idmap_config(const char *domname);
389 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
393 /* The following definitions come from winbindd/winbindd_locator.c */
395 void init_locator_child(void);
396 struct winbindd_child *locator_child(void);
397 struct dcerpc_binding_handle *locator_child_handle(void);
399 /* The following definitions come from winbindd/winbindd_misc.c */
401 bool winbindd_list_trusted_domains(struct winbindd_cli_state *state);
402 bool winbindd_dc_info(struct winbindd_cli_state *state);
403 bool winbindd_ping(struct winbindd_cli_state *state);
404 bool winbindd_info(struct winbindd_cli_state *state);
405 bool winbindd_interface_version(struct winbindd_cli_state *state);
406 bool winbindd_domain_name(struct winbindd_cli_state *state);
407 bool winbindd_netbios_name(struct winbindd_cli_state *state);
408 bool winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
410 /* The following definitions come from winbindd/winbindd_ndr.c */
412 void ndr_print_winbindd_child(struct ndr_print *ndr,
414 const struct winbindd_child *r);
415 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
417 const struct winbindd_cm_conn *r);
418 void ndr_print_winbindd_methods(struct ndr_print *ndr,
420 const struct winbindd_methods *r);
421 void ndr_print_winbindd_domain(struct ndr_print *ndr,
423 const struct winbindd_domain *r);
425 /* The following definitions come from winbindd/winbindd_pam.c */
427 bool check_request_flags(uint32_t flags);
428 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
429 struct winbindd_response *resp,
430 uint32_t request_flags,
431 uint16_t validation_level,
432 union netr_Validation *validation,
433 const char *name_domain,
434 const char *name_user);
435 NTSTATUS extra_data_to_sid_array(const char *group_sid,
437 struct wbint_SidArray **_sid_array);
438 uid_t get_uid_from_request(struct winbindd_request *request);
439 struct winbindd_domain *find_auth_domain(uint8_t flags,
440 const char *domain_name);
442 struct wbint_PamAuth;
443 NTSTATUS _wbint_PamAuth(struct pipes_struct *p,
444 struct wbint_PamAuth *r);
445 NTSTATUS _wbint_PamAuthCrap(struct pipes_struct *p,
446 struct wbint_PamAuthCrap *r);
447 NTSTATUS _wbint_PamAuthChangePassword(struct pipes_struct *p,
448 struct wbint_PamAuthChangePassword *r);
449 NTSTATUS _wbint_PamLogOff(struct pipes_struct *p,
450 struct wbint_PamLogOff *r);
451 NTSTATUS _wbint_PamAuthCrapChangePassword(struct pipes_struct *p,
452 struct wbint_PamAuthCrapChangePassword *r);
453 NTSTATUS winbindd_pam_auth_pac_verify(struct winbindd_cli_state *state,
456 uint16_t *p_validation_level,
457 union netr_Validation **p_validation);
459 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
462 uint32_t logon_parameters,
463 const char *name_user,
464 const char *name_domain,
465 const char *workstation,
466 const uint64_t logon_id,
467 const char *client_name,
470 DATA_BLOB lm_response,
471 DATA_BLOB nt_response,
472 const struct tsocket_address *remote,
473 const struct tsocket_address *local,
474 uint8_t *authoritative,
477 uint16_t *_validation_level,
478 union netr_Validation **_validation);
480 /* The following definitions come from winbindd/winbindd_util.c */
482 struct winbindd_domain *domain_list(void);
483 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
484 bool set_routing_domain(struct winbindd_domain *domain,
485 struct winbindd_domain *routing_domain);
486 bool add_trusted_domain_from_auth(uint16_t validation_level,
487 struct info3_text *info3,
488 struct info6_text *info6);
489 bool domain_is_forest_root(const struct winbindd_domain *domain);
490 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
491 struct timeval now, void *private_data);
492 void winbindd_ping_offline_domains(struct tevent_context *ev,
493 struct tevent_timer *te,
496 bool init_domain_list(void);
497 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
498 struct winbindd_domain *find_trust_from_name_noinit(const char *domain_name);
499 struct winbindd_domain *find_domain_from_name(const char *domain_name);
500 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
501 struct winbindd_domain *find_trust_from_sid_noinit(const struct dom_sid *sid);
502 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
503 struct winbindd_domain *find_our_domain(void);
504 struct winbindd_domain *find_default_route_domain(void);
505 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
506 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
507 bool parse_domain_user(const char *domuser,
511 bool canonicalize_username(fstring username_inout,
515 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
519 struct winbindd_cli_state *winbindd_client_list(void);
520 struct winbindd_cli_state *winbindd_client_list_tail(void);
521 struct winbindd_cli_state *
522 winbindd_client_list_prev(struct winbindd_cli_state *cli);
523 void winbindd_add_client(struct winbindd_cli_state *cli);
524 void winbindd_remove_client(struct winbindd_cli_state *cli);
525 void winbindd_promote_client(struct winbindd_cli_state *cli);
526 int winbindd_num_clients(void);
527 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
528 const struct dom_sid *user_sid,
529 uint32_t *p_num_groups, struct dom_sid **user_sids);
531 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
532 const char *domain_name,
535 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
539 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
540 struct winbindd_domain *domain,
541 const char *name, char **alias);
542 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
543 struct winbindd_domain *domain,
544 const char *alias, char **name);
546 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
547 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
548 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
549 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
550 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
551 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
552 bool is_domain_offline(const struct winbindd_domain *domain);
553 bool is_domain_online(const struct winbindd_domain *domain);
554 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
555 struct dom_sid **sids, uint32_t *num_sids);
556 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
557 struct unixid **pxids, uint32_t *pnum_xids);
559 /* The following definitions come from winbindd/winbindd_wins.c */
561 void winbindd_wins_byname(struct winbindd_cli_state *state);
563 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
564 struct winbindd_domain *domain,
565 struct winbindd_child *child);
566 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
567 struct winbindd_cli_state *state);
569 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
570 struct tevent_context *ev,
571 const struct dom_sid *sid);
572 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
573 enum lsa_SidType *type, const char **domain,
576 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
577 struct tevent_context *ev,
578 struct winbindd_cli_state *cli,
579 struct winbindd_request *request);
580 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
581 struct winbindd_response *response);
583 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
584 struct tevent_context *ev,
585 struct winbindd_cli_state *cli,
586 struct winbindd_request *request);
587 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
588 struct winbindd_response *response);
590 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
591 struct tevent_context *ev,
592 const char *namespace,
593 const char *dom_name,
596 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
597 enum lsa_SidType *type);
599 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
600 struct tevent_context *ev,
601 struct winbindd_cli_state *cli,
602 struct winbindd_request *request);
603 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
604 struct winbindd_response *response);
606 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
607 struct tevent_context *ev,
608 struct winbindd_cli_state *cli,
609 struct winbindd_request *request);
610 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
611 struct winbindd_response *response);
613 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
614 struct tevent_context *ev,
615 struct winbindd_cli_state *cli,
616 struct winbindd_request *request);
617 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
618 struct winbindd_response *response);
620 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
621 struct tevent_context *ev,
622 const struct dom_sid *user_sid);
623 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
624 struct wbint_userinfo **pinfo);
626 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
627 struct tevent_context *ev,
628 const struct dom_sid *user_sid,
629 struct winbindd_pw *pw);
630 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
632 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
633 struct tevent_context *ev,
634 struct winbindd_cli_state *cli,
635 struct winbindd_request *request);
636 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
637 struct winbindd_response *response);
639 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
640 struct tevent_context *ev,
641 struct winbindd_cli_state *cli,
642 struct winbindd_request *request);
643 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
644 struct winbindd_response *response);
646 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
647 struct tevent_context *ev,
648 struct winbindd_cli_state *cli,
649 struct winbindd_request *request);
650 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
651 struct winbindd_response *response);
652 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev,
654 struct winbindd_domain *domain,
656 const struct dom_sid *sids);
657 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
658 uint32_t *num_aliases, uint32_t **aliases);
659 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
660 struct tevent_context *ev,
661 struct winbindd_cli_state *cli,
662 struct winbindd_request *request);
663 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
664 struct winbindd_response *response);
665 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 const struct dom_sid *sid);
668 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
669 uint32_t *num_sids, struct dom_sid **sids);
671 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
672 struct tevent_context *ev,
673 struct winbindd_cli_state *cli,
674 struct winbindd_request *request);
675 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
676 struct winbindd_response *response);
677 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
678 struct tevent_context *ev,
679 const struct dom_sid *sid,
680 bool expand_local_aliases);
681 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
682 uint32_t *num_sids, struct dom_sid **sids);
683 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
684 struct tevent_context *ev,
685 struct winbindd_cli_state *cli,
686 struct winbindd_request *request);
687 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
688 struct winbindd_response *response);
690 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
691 struct tevent_context *ev,
692 struct winbindd_domain *domain);
693 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
695 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
696 struct tevent_context *ev);
697 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
698 int *num_domains, struct winbindd_domain ***domains,
699 NTSTATUS **stati, uint32_t **seqnums);
701 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
702 struct tevent_context *ev,
703 struct winbindd_cli_state *cli,
704 struct winbindd_request *request);
705 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
706 struct winbindd_response *response);
708 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
709 struct tevent_context *ev,
710 const struct dom_sid *sid,
711 enum lsa_SidType type,
713 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
714 struct db_context **members);
715 NTSTATUS add_member_to_db(struct db_context *db, struct dom_sid *sid,
718 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
719 struct tevent_context *ev,
720 const struct dom_sid *group_sid,
722 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
723 const char **domname, const char **name, gid_t *gid,
724 struct db_context **members);
726 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
727 struct tevent_context *ev,
728 struct winbindd_cli_state *cli,
729 struct winbindd_request *request);
730 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
731 struct winbindd_response *response);
733 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
734 struct tevent_context *ev,
735 struct winbindd_cli_state *cli,
736 struct winbindd_request *request);
737 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
738 struct winbindd_response *response);
740 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
741 struct tevent_context *ev,
742 struct winbindd_cli_state *cli,
743 struct winbindd_request *request);
744 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
745 struct winbindd_response *response);
747 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
748 struct tevent_context *ev,
749 struct winbindd_cli_state *cli,
750 struct winbindd_request *request);
751 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
752 struct winbindd_response *response);
754 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
755 struct tevent_context *ev,
756 struct winbindd_domain *domain);
757 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
760 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
761 struct tevent_context *ev,
762 struct winbindd_domain *domain);
763 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
765 struct wbint_Principal **groups);
767 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
768 struct tevent_context *ev,
769 struct getpwent_state *gstate,
770 struct winbindd_pw *pw);
771 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
773 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
774 struct tevent_context *ev,
775 struct winbindd_cli_state *cli,
776 struct winbindd_request *request);
777 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
778 struct winbindd_response *presp);
780 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
781 struct tevent_context *ev,
782 struct winbindd_cli_state *cli,
783 struct winbindd_request *request);
784 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
785 struct winbindd_response *response);
787 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
788 struct tevent_context *ev,
789 struct winbindd_cli_state *cli,
790 struct winbindd_request *request);
791 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
792 struct winbindd_response *response);
794 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
795 struct tevent_context *ev,
796 struct winbindd_cli_state *cli,
797 struct winbindd_request *request);
798 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
799 struct winbindd_response *response);
801 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
802 struct tevent_context *ev,
803 const char *domain_name,
804 const struct GUID *domain_guid,
805 const char *site_name,
807 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
808 struct netr_DsRGetDCNameInfo **pdcinfo);
809 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
810 struct netr_DsRGetDCNameInfo *dcinfo);
811 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
813 struct netr_DsRGetDCNameInfo **dcinfo);
815 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
816 struct tevent_context *ev,
817 struct winbindd_cli_state *cli,
818 struct winbindd_request *request);
819 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
820 struct winbindd_response *response);
822 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
823 struct tevent_context *ev,
825 struct getgrent_state *gstate,
826 struct winbindd_gr *gr);
827 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
828 struct db_context **members);
830 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
831 struct tevent_context *ev,
832 struct winbindd_cli_state *cli,
833 struct winbindd_request *request);
834 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
835 struct winbindd_response *response);
836 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
837 struct tevent_context *ev,
838 struct winbindd_cli_state *cli,
839 struct winbindd_request *request);
840 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
841 struct winbindd_response *response);
842 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
843 struct tevent_context *ev,
844 struct winbindd_cli_state *cli,
845 struct winbindd_request *request);
846 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
847 struct winbindd_response *response);
849 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
850 struct tevent_context *ev,
851 struct winbindd_cli_state *cli,
852 struct winbindd_request *request);
853 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
854 struct winbindd_response *response);
856 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
857 struct tevent_context *ev,
858 struct winbindd_cli_state *cli,
859 struct winbindd_request *request);
860 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
861 struct winbindd_response *response);
863 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
864 struct tevent_context *ev,
865 struct winbindd_cli_state *cli,
866 struct winbindd_request *request);
867 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
868 struct winbindd_response *presp);
870 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
871 struct tevent_context *ev,
872 struct winbindd_cli_state *cli,
873 struct winbindd_request *request);
874 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
875 struct winbindd_response *presp);
877 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
878 struct tevent_context *ev,
879 struct winbindd_cli_state *cli,
880 struct winbindd_request *request);
881 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
882 struct winbindd_response *presp);
884 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
885 struct tevent_context *ev,
886 struct winbindd_cli_state *cli,
887 struct winbindd_request *request);
888 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
889 struct winbindd_response *response);
891 struct tevent_req *winbindd_pam_auth_crap_send(
893 struct tevent_context *ev,
894 struct winbindd_cli_state *cli,
895 struct winbindd_request *request);
896 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
897 struct winbindd_response *response);
899 struct tevent_req *winbindd_pam_chauthtok_send(
901 struct tevent_context *ev,
902 struct winbindd_cli_state *cli,
903 struct winbindd_request *request);
904 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
905 struct winbindd_response *response);
907 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
908 struct tevent_context *ev,
909 struct winbindd_cli_state *cli,
910 struct winbindd_request *request);
911 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
912 struct winbindd_response *response);
914 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
916 struct tevent_context *ev,
917 struct winbindd_cli_state *cli,
918 struct winbindd_request *request);
919 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
920 struct tevent_req *req,
921 struct winbindd_response *response);
923 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
924 struct tevent_context *ev,
925 struct dom_sid *sids,
927 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
928 struct lsa_RefDomainList **domains,
929 struct lsa_TransNameArray **names);
931 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
932 struct tevent_context *ev,
933 const struct dom_sid *sids,
934 const uint32_t num_sids);
935 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
936 struct unixid xids[], uint32_t num_xids);
937 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
938 struct tevent_context *ev,
939 struct winbindd_cli_state *cli,
940 struct winbindd_request *request);
941 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
942 struct winbindd_response *response);
943 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
944 struct tevent_context *ev,
945 const struct unixid *xids,
947 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
948 struct dom_sid **sids);
949 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
950 struct tevent_context *ev,
951 struct winbindd_cli_state *cli,
952 struct winbindd_request *request);
953 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
954 struct winbindd_response *response);
955 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
956 struct tevent_context *ev,
957 struct winbindd_cli_state *cli,
958 struct winbindd_request *request);
959 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
960 struct winbindd_response *presp);
961 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
962 struct tevent_context *ev,
963 struct winbindd_cli_state *cli,
964 struct winbindd_request *request);
965 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
966 struct winbindd_response *presp);
967 struct tevent_req *winbindd_domain_info_send(
969 struct tevent_context *ev,
970 struct winbindd_cli_state *cli,
971 struct winbindd_request *request);
972 NTSTATUS winbindd_domain_info_recv(struct tevent_req *req,
973 struct winbindd_response *response);
975 /* The following definitions come from winbindd/winbindd_samr.c */
977 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
978 struct winbindd_domain *domain,
979 struct rpc_pipe_client **samr_pipe,
980 struct policy_handle *samr_domain_hnd);
981 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
982 struct rpc_pipe_client **lsa_pipe,
983 struct policy_handle *lsa_hnd);
985 /* The following definitions come from winbindd/winbindd_irpc.c */
986 NTSTATUS wb_irpc_register(void);
988 /* The following definitions come from winbindd/winbindd_reconnect.c */
989 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
991 /* The following definitions come from winbindd/winbindd_gpupdate.c */
992 void gpupdate_init(void);
993 void gpupdate_user_init(const char *user);
995 /* The following comes from winbindd/winbindd_dual_srv.c */
996 bool reset_cm_connection_on_error(struct winbindd_domain *domain,
997 struct dcerpc_binding_handle *b,
1000 #endif /* _WINBINDD_PROTO_H_ */