build: Do not recurse on symlinks to directories when building tarballs
[Samba.git] / source3 / winbindd / winbindd_proto.h
blob7560fc53bae04b1f63fc8482c9e488b082fd8a52
1 /*
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 messaging_context *winbind_messaging_context(void);
28 struct imessaging_context *winbind_imessaging_context(void);
29 void request_error(struct winbindd_cli_state *state);
30 void request_ok(struct winbindd_cli_state *state);
31 bool winbindd_setup_sig_term_handler(bool parent);
32 bool winbindd_setup_stdin_handler(bool parent, bool foreground);
33 bool winbindd_setup_sig_hup_handler(const char *lfile);
34 bool winbindd_use_idmap_cache(void);
35 bool winbindd_use_cache(void);
36 char *get_winbind_priv_pipe_dir(void);
37 struct tevent_context *winbind_event_context(void);
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,
45 uint32_t num_sids,
46 const struct dom_sid *sids,
47 char ***domains,
48 char ***names,
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,
59 TALLOC_CTX *mem_ctx,
60 uint32_t **prids);
61 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
62 TALLOC_CTX *mem_ctx,
63 uint32_t *num_entries,
64 struct wb_acct_info **info);
65 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
66 TALLOC_CTX *mem_ctx,
67 uint32_t *num_entries,
68 struct wb_acct_info **info);
69 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
70 TALLOC_CTX *mem_ctx,
71 const char *domain_name,
72 const char *name,
73 uint32_t flags,
74 struct dom_sid *sid,
75 enum lsa_SidType *type);
76 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
77 TALLOC_CTX *mem_ctx,
78 const struct dom_sid *sid,
79 char **domain_name,
80 char **name,
81 enum lsa_SidType *type);
82 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
83 TALLOC_CTX *mem_ctx,
84 const struct dom_sid *domain_sid,
85 uint32_t *rids,
86 size_t num_rids,
87 char **domain_name,
88 char ***names,
89 enum lsa_SidType **types);
90 NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain,
91 TALLOC_CTX *mem_ctx,
92 const struct dom_sid *user_sid,
93 uint32_t *pnum_sids,
94 struct dom_sid **psids);
95 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
96 TALLOC_CTX *mem_ctx,
97 uint32_t num_sids,
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,
102 TALLOC_CTX *mem_ctx,
103 const struct dom_sid *group_sid,
104 enum lsa_SidType type,
105 uint32_t *num_names,
106 struct dom_sid **sid_mem,
107 char ***names,
108 uint32_t **name_types);
109 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
110 uint32_t *seq);
111 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
112 TALLOC_CTX *mem_ctx,
113 struct samr_DomInfo12 *policy);
114 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
115 TALLOC_CTX *mem_ctx,
116 struct samr_DomInfo1 *policy);
117 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
118 TALLOC_CTX *mem_ctx,
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,
123 TALLOC_CTX *mem_ctx,
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 *domain_name,
140 const char *name,
141 struct dom_sid *sid,
142 enum lsa_SidType *type);
143 void cache_name2sid_trusted(struct winbindd_domain *domain,
144 const char *domain_name,
145 const char *name,
146 enum lsa_SidType type,
147 const struct dom_sid *sid);
148 void cache_name2sid(struct winbindd_domain *domain,
149 const char *domain_name, const char *name,
150 enum lsa_SidType type, const struct dom_sid *sid);
151 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
152 TALLOC_CTX *mem_ctx,
153 const struct dom_sid *user_sid,
154 const char **full_name);
156 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
157 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
158 bool set_global_winbindd_state_offline(void);
159 void set_global_winbindd_state_online(void);
160 bool get_global_winbindd_state_offline(void);
161 int winbindd_validate_cache(void);
162 int winbindd_validate_cache_nobackup(void);
163 bool winbindd_cache_validate_and_initialize(void);
164 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
165 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
166 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
167 void wcache_tdc_clear( void );
168 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
169 time_t last_seq_check);
170 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
171 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
172 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
173 const DATA_BLOB *req, const DATA_BLOB *resp);
175 /* The following definitions come from winbindd/winbindd_ccache_access.c */
177 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
178 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
179 struct winbindd_cli_state *state);
180 void winbindd_ccache_save(struct winbindd_cli_state *state);
182 /* The following definitions come from winbindd/winbindd_cm.c */
183 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
184 void *private_data,
185 uint32_t msg_type,
186 struct server_id server_id,
187 DATA_BLOB *data);
188 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
189 void *private_data,
190 uint32_t msg_type,
191 struct server_id server_id,
192 DATA_BLOB *data);
194 void set_domain_offline(struct winbindd_domain *domain);
195 void set_domain_online_request(struct winbindd_domain *domain);
197 struct ndr_interface_table;
198 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
199 const struct ndr_interface_table *table,
200 struct rpc_pipe_client **ret_pipe);
201 void invalidate_cm_connection(struct winbindd_domain *domain);
202 void close_conns_after_fork(void);
203 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
204 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
205 bool need_rw_dc,
206 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
207 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
208 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
209 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
210 TALLOC_CTX *mem_ctx,
211 struct rpc_pipe_client **cli,
212 struct policy_handle *lsa_policy);
213 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
214 struct rpc_pipe_client **cli);
215 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
216 const char *domain_name,
217 char **p_dc_name, char **p_dc_ip);
219 /* The following definitions come from winbindd/winbindd_cred_cache.c */
221 bool ccache_entry_exists(const char *username);
222 bool ccache_entry_identical(const char *username,
223 uid_t uid,
224 const char *ccname);
225 void ccache_remove_all_after_fork(void);
226 void ccache_regain_all_now(void);
227 NTSTATUS add_ccache_to_list(const char *princ_name,
228 const char *ccname,
229 const char *service,
230 const char *username,
231 const char *password,
232 const char *realm,
233 uid_t uid,
234 time_t create_time,
235 time_t ticket_end,
236 time_t renew_until,
237 bool postponed_request);
238 NTSTATUS remove_ccache(const char *username);
239 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
240 NTSTATUS winbindd_add_memory_creds(const char *username,
241 uid_t uid,
242 const char *pass);
243 NTSTATUS winbindd_delete_memory_creds(const char *username);
244 NTSTATUS winbindd_replace_memory_creds(const char *username,
245 const char *pass);
247 /* The following definitions come from winbindd/winbindd_creds.c */
249 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
250 TALLOC_CTX *mem_ctx,
251 const struct dom_sid *sid,
252 struct netr_SamInfo3 **info3,
253 const uint8_t *cached_nt_pass[NT_HASH_LEN],
254 const uint8_t *cred_salt[NT_HASH_LEN]);
255 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
256 const char *user,
257 const char *pass,
258 struct netr_SamInfo3 *info3);
259 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
260 const char *user,
261 const char *pass,
262 struct netr_SamInfo3 *info3);
263 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
264 const char *user,
265 const char *pass);
267 /* The following definitions come from winbindd/winbindd_domain.c */
269 void setup_domain_child(struct winbindd_domain *domain);
271 /* The following definitions come from winbindd/winbindd_dual.c */
273 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
274 struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
276 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
277 struct tevent_context *ev,
278 struct winbindd_child *child,
279 struct winbindd_request *request);
280 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
281 struct winbindd_response **presponse, int *err);
282 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
283 struct tevent_context *ev,
284 struct winbindd_domain *domain,
285 struct winbindd_request *request);
286 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
287 struct winbindd_response **presponse, int *err);
289 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
290 const struct winbindd_child_dispatch_table *table,
291 const char *logprefix,
292 const char *logname);
293 void winbind_child_died(pid_t pid);
294 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
295 void winbind_msg_debug(struct messaging_context *msg_ctx,
296 void *private_data,
297 uint32_t msg_type,
298 struct server_id server_id,
299 DATA_BLOB *data);
300 void winbind_msg_offline(struct messaging_context *msg_ctx,
301 void *private_data,
302 uint32_t msg_type,
303 struct server_id server_id,
304 DATA_BLOB *data);
305 void winbind_msg_online(struct messaging_context *msg_ctx,
306 void *private_data,
307 uint32_t msg_type,
308 struct server_id server_id,
309 DATA_BLOB *data);
310 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
311 void *private_data,
312 uint32_t msg_type,
313 struct server_id server_id,
314 DATA_BLOB *data);
315 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
316 void *private_data,
317 uint32_t msg_type,
318 struct server_id server_id,
319 DATA_BLOB *data);
320 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
321 void *private_data,
322 uint32_t msg_type,
323 struct server_id server_id,
324 DATA_BLOB *data);
325 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
326 void *private_data,
327 uint32_t msg_type,
328 struct server_id server_id,
329 DATA_BLOB *data);
330 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
331 void *private_data,
332 uint32_t msg_type,
333 struct server_id server_id,
334 DATA_BLOB *data);
335 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
336 const char *logfilename);
337 struct winbindd_domain *wb_child_domain(void);
339 /* The following definitions come from winbindd/winbindd_group.c */
340 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
341 const char *dom_name, const char *gr_name, gid_t unix_gid);
342 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
343 TALLOC_CTX *mem_ctx,
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,
354 const char *def);
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,
359 void *private_data),
360 void *private_data);
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 */
383 struct ndr_print;
384 void ndr_print_winbindd_child(struct ndr_print *ndr,
385 const char *name,
386 const struct winbindd_child *r);
387 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
388 const char *name,
389 const struct winbindd_cm_conn *r);
390 void ndr_print_winbindd_methods(struct ndr_print *ndr,
391 const char *name,
392 const struct winbindd_methods *r);
393 void ndr_print_winbindd_domain(struct ndr_print *ndr,
394 const char *name,
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 struct netr_SamInfo3 *info3,
404 const char *name_domain,
405 const char *name_user);
406 uid_t get_uid_from_request(struct winbindd_request *request);
407 struct winbindd_domain *find_auth_domain(uint8_t flags,
408 const char *domain_name);
409 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
410 struct winbindd_cli_state *state) ;
411 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
412 struct winbindd_cli_state *state) ;
413 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
414 struct winbindd_cli_state *state);
415 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
416 struct winbindd_cli_state *state) ;
417 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
418 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
419 struct netr_SamInfo3 **info3);
421 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
422 TALLOC_CTX *mem_ctx,
423 uint32_t logon_parameters,
424 const char *name_user,
425 const char *name_domain,
426 const char *workstation,
427 const uint8_t chal[8],
428 DATA_BLOB lm_response,
429 DATA_BLOB nt_response,
430 uint8_t *authoritative,
431 bool skip_sam,
432 uint32_t *flags,
433 struct netr_SamInfo3 **info3);
435 /* The following definitions come from winbindd/winbindd_util.c */
437 struct winbindd_domain *domain_list(void);
438 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
439 bool domain_is_forest_root(const struct winbindd_domain *domain);
440 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
441 struct timeval now, void *private_data);
442 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
443 struct winbindd_cli_state *state);
444 bool init_domain_list(void);
445 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
446 struct winbindd_domain *find_domain_from_name(const char *domain_name);
447 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
448 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
449 struct winbindd_domain *find_our_domain(void);
450 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
451 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
452 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
453 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
454 char **domain, char **user);
455 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
456 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
457 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
458 const char *domain,
459 const char *user,
460 bool can_assume);
461 struct winbindd_cli_state *winbindd_client_list(void);
462 struct winbindd_cli_state *winbindd_client_list_tail(void);
463 struct winbindd_cli_state *
464 winbindd_client_list_prev(struct winbindd_cli_state *cli);
465 void winbindd_add_client(struct winbindd_cli_state *cli);
466 void winbindd_remove_client(struct winbindd_cli_state *cli);
467 void winbindd_promote_client(struct winbindd_cli_state *cli);
468 int winbindd_num_clients(void);
469 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
470 const struct dom_sid *user_sid,
471 uint32_t *p_num_groups, struct dom_sid **user_sids);
473 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
474 struct winbindd_domain *domain,
475 const char *name,
476 char **normalized);
477 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
478 char *name,
479 char **normalized);
481 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
482 struct winbindd_domain *domain,
483 const char *name, char **alias);
484 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
485 struct winbindd_domain *domain,
486 const char *alias, char **name);
488 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
489 bool winbindd_internal_child(struct winbindd_child *child);
490 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
491 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
492 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
493 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
494 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
495 bool is_domain_offline(const struct winbindd_domain *domain);
496 bool is_domain_online(const struct winbindd_domain *domain);
497 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
498 struct dom_sid **sids, uint32_t *num_sids);
499 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
500 struct unixid **pxids, uint32_t *pnum_xids);
502 /* The following definitions come from winbindd/winbindd_wins.c */
504 void winbindd_wins_byname(struct winbindd_cli_state *state);
506 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
507 struct winbindd_cli_state *cli,
508 struct winbindd_request *request);
509 NTSTATUS wb_ping_recv(struct tevent_req *req,
510 struct winbindd_response *resp);
512 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
513 struct winbindd_cli_state *state);
515 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
516 struct winbindd_domain *domain,
517 struct winbindd_child *child);
518 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
519 struct winbindd_cli_state *state);
521 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
522 struct tevent_context *ev,
523 const struct dom_sid *sid);
524 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
525 enum lsa_SidType *type, const char **domain,
526 const char **name);
528 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
529 struct tevent_context *ev,
530 struct winbindd_cli_state *cli,
531 struct winbindd_request *request);
532 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
533 struct winbindd_response *response);
535 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
536 struct tevent_context *ev,
537 struct winbindd_cli_state *cli,
538 struct winbindd_request *request);
539 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
540 struct winbindd_response *response);
542 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
543 struct tevent_context *ev,
544 const char *dom_name, const char *name,
545 uint32_t flags);
546 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
547 enum lsa_SidType *type);
549 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
550 struct tevent_context *ev,
551 struct winbindd_cli_state *cli,
552 struct winbindd_request *request);
553 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
554 struct winbindd_response *response);
556 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
557 struct tevent_context *ev,
558 struct winbindd_cli_state *cli,
559 struct winbindd_request *request);
560 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
561 struct winbindd_response *response);
563 struct tevent_req *winbindd_allocate_gid_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_gid_recv(struct tevent_req *req,
568 struct winbindd_response *response);
570 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
571 struct tevent_context *ev,
572 const struct dom_sid *user_sid);
573 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
574 struct wbint_userinfo **pinfo);
576 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
577 struct tevent_context *ev,
578 const struct dom_sid *user_sid,
579 struct winbindd_pw *pw);
580 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
582 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
583 struct tevent_context *ev,
584 struct winbindd_cli_state *cli,
585 struct winbindd_request *request);
586 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
587 struct winbindd_response *response);
589 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
590 struct tevent_context *ev,
591 struct winbindd_cli_state *cli,
592 struct winbindd_request *request);
593 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
594 struct winbindd_response *response);
596 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 struct winbindd_cli_state *cli,
599 struct winbindd_request *request);
600 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
601 struct winbindd_response *response);
602 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
603 struct tevent_context *ev,
604 struct winbindd_domain *domain,
605 int num_sids,
606 const struct dom_sid *sids);
607 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
608 uint32_t *num_aliases, uint32_t **aliases);
609 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
610 struct tevent_context *ev,
611 struct winbindd_cli_state *cli,
612 struct winbindd_request *request);
613 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
614 struct winbindd_response *response);
615 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
616 struct tevent_context *ev,
617 const struct dom_sid *sid);
618 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
619 int *num_sids, struct dom_sid **sids);
621 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
622 struct tevent_context *ev,
623 struct winbindd_cli_state *cli,
624 struct winbindd_request *request);
625 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
626 struct winbindd_response *response);
627 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
628 struct tevent_context *ev,
629 const struct dom_sid *sid,
630 bool expand_local_aliases);
631 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
632 int *num_sids, struct dom_sid **sids);
633 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
634 struct tevent_context *ev,
635 struct winbindd_cli_state *cli,
636 struct winbindd_request *request);
637 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
638 struct winbindd_response *response);
640 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
641 struct tevent_context *ev,
642 struct winbindd_domain *domain);
643 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
645 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
646 struct tevent_context *ev);
647 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
648 int *num_domains, struct winbindd_domain ***domains,
649 NTSTATUS **stati, uint32_t **seqnums);
651 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
652 struct tevent_context *ev,
653 struct winbindd_cli_state *cli,
654 struct winbindd_request *request);
655 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
656 struct winbindd_response *response);
658 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
659 struct tevent_context *ev,
660 const struct dom_sid *sid,
661 enum lsa_SidType type,
662 int max_depth);
663 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
664 struct talloc_dict **members);
665 NTSTATUS add_wbint_Principal_to_dict(TALLOC_CTX *mem_ctx,
666 struct dom_sid *sid,
667 const char **name,
668 enum lsa_SidType type,
669 struct talloc_dict *dict);
671 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
672 struct tevent_context *ev,
673 const struct dom_sid *group_sid,
674 int max_nesting);
675 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
676 const char **domname, const char **name, gid_t *gid,
677 struct talloc_dict **members);
679 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
680 struct tevent_context *ev,
681 struct winbindd_cli_state *cli,
682 struct winbindd_request *request);
683 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
684 struct winbindd_response *response);
686 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
687 struct tevent_context *ev,
688 struct winbindd_cli_state *cli,
689 struct winbindd_request *request);
690 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
691 struct winbindd_response *response);
693 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
694 struct tevent_context *ev,
695 struct winbindd_cli_state *cli,
696 struct winbindd_request *request);
697 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
698 struct winbindd_response *response);
700 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 struct winbindd_cli_state *cli,
703 struct winbindd_request *request);
704 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
705 struct winbindd_response *response);
707 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 struct winbindd_domain *domain);
710 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
711 char **users);
713 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
714 struct tevent_context *ev,
715 struct winbindd_domain *domain);
716 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
717 int *num_users,
718 struct wbint_Principal **groups);
720 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
721 struct tevent_context *ev,
722 struct getpwent_state *gstate,
723 struct winbindd_pw *pw);
724 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
726 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
727 struct tevent_context *ev,
728 struct winbindd_cli_state *cli,
729 struct winbindd_request *request);
730 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
731 struct winbindd_response *presp);
733 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
734 struct tevent_context *ev,
735 struct winbindd_cli_state *cli,
736 struct winbindd_request *request);
737 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
738 struct winbindd_response *response);
740 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
741 struct tevent_context *ev,
742 struct winbindd_cli_state *cli,
743 struct winbindd_request *request);
744 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
745 struct winbindd_response *response);
747 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
748 struct tevent_context *ev,
749 struct winbindd_cli_state *cli,
750 struct winbindd_request *request);
751 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
752 struct winbindd_response *response);
754 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
755 struct tevent_context *ev,
756 const char *domain_name,
757 const struct GUID *domain_guid,
758 const char *site_name,
759 uint32_t flags);
760 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
761 struct netr_DsRGetDCNameInfo **pdcinfo);
762 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
763 struct netr_DsRGetDCNameInfo *dcinfo);
764 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
765 const char *domname,
766 struct netr_DsRGetDCNameInfo **dcinfo);
768 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
769 struct tevent_context *ev,
770 struct winbindd_cli_state *cli,
771 struct winbindd_request *request);
772 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
773 struct winbindd_response *response);
775 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
776 struct tevent_context *ev,
777 int max_nesting,
778 struct getgrent_state *gstate,
779 struct winbindd_gr *gr);
780 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
781 struct talloc_dict **members);
783 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
784 struct tevent_context *ev,
785 struct winbindd_cli_state *cli,
786 struct winbindd_request *request);
787 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
788 struct winbindd_response *response);
789 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
790 struct tevent_context *ev,
791 struct winbindd_cli_state *cli,
792 struct winbindd_request *request);
793 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
794 struct winbindd_response *response);
795 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
796 struct tevent_context *ev,
797 struct winbindd_cli_state *cli,
798 struct winbindd_request *request);
799 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
800 struct winbindd_response *response);
802 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
803 struct tevent_context *ev,
804 struct winbindd_cli_state *cli,
805 struct winbindd_request *request);
806 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
807 struct winbindd_response *response);
809 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
810 struct tevent_context *ev,
811 struct winbindd_cli_state *cli,
812 struct winbindd_request *request);
813 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
814 struct winbindd_response *response);
816 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
817 struct tevent_context *ev,
818 struct winbindd_cli_state *cli,
819 struct winbindd_request *request);
820 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
821 struct winbindd_response *presp);
823 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
824 struct tevent_context *ev,
825 struct winbindd_cli_state *cli,
826 struct winbindd_request *request);
827 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
828 struct winbindd_response *presp);
830 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
831 struct tevent_context *ev,
832 struct winbindd_cli_state *cli,
833 struct winbindd_request *request);
834 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
835 struct winbindd_response *presp);
837 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
838 struct tevent_context *ev,
839 struct winbindd_cli_state *cli,
840 struct winbindd_request *request);
841 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
842 struct winbindd_response *response);
844 struct tevent_req *winbindd_pam_auth_crap_send(
845 TALLOC_CTX *mem_ctx,
846 struct tevent_context *ev,
847 struct winbindd_cli_state *cli,
848 struct winbindd_request *request);
849 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
850 struct winbindd_response *response);
852 struct tevent_req *winbindd_pam_chauthtok_send(
853 TALLOC_CTX *mem_ctx,
854 struct tevent_context *ev,
855 struct winbindd_cli_state *cli,
856 struct winbindd_request *request);
857 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
858 struct winbindd_response *response);
860 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
861 struct tevent_context *ev,
862 struct winbindd_cli_state *cli,
863 struct winbindd_request *request);
864 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
865 struct winbindd_response *response);
867 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
868 TALLOC_CTX *mem_ctx,
869 struct tevent_context *ev,
870 struct winbindd_cli_state *cli,
871 struct winbindd_request *request);
872 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
873 struct tevent_req *req,
874 struct winbindd_response *response);
876 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
877 struct tevent_context *ev,
878 struct dom_sid *sids,
879 uint32_t num_sids);
880 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
881 struct lsa_RefDomainList **domains,
882 struct lsa_TransNameArray **names);
884 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
885 struct tevent_context *ev,
886 const struct dom_sid *sids,
887 const uint32_t num_sids);
888 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
889 struct unixid xids[], uint32_t num_xids);
890 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
891 struct tevent_context *ev,
892 struct winbindd_cli_state *cli,
893 struct winbindd_request *request);
894 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
895 struct winbindd_response *response);
896 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
897 struct tevent_context *ev,
898 struct unixid *xids,
899 uint32_t num_xids);
900 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
901 struct dom_sid **sids);
902 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
903 struct tevent_context *ev,
904 struct winbindd_cli_state *cli,
905 struct winbindd_request *request);
906 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
907 struct winbindd_response *response);
908 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
909 struct tevent_context *ev,
910 struct winbindd_cli_state *cli,
911 struct winbindd_request *request);
912 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
913 struct winbindd_response *presp);
914 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
915 struct tevent_context *ev,
916 struct winbindd_cli_state *cli,
917 struct winbindd_request *request);
918 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
919 struct winbindd_response *presp);
922 /* The following definitions come from winbindd/winbindd_samr.c */
924 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
925 struct winbindd_domain *domain,
926 struct rpc_pipe_client **samr_pipe,
927 struct policy_handle *samr_domain_hnd);
928 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
929 struct rpc_pipe_client **lsa_pipe,
930 struct policy_handle *lsa_hnd);
932 /* The following definitions come from winbindd/winbindd_irpc.c */
933 NTSTATUS wb_irpc_register(void);
935 /* The following definitions come from winbindd/winbindd_reconnect.c */
936 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
938 #endif /* _WINBINDD_PROTO_H_ */