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_
27 /* The following definitions come from auth/token_util.c */
29 bool nt_token_check_sid ( const DOM_SID *sid, const NT_USER_TOKEN *token );
30 bool nt_token_check_domain_rid( NT_USER_TOKEN *token, uint32 rid );
31 NT_USER_TOKEN *get_root_nt_token( void );
32 NTSTATUS add_aliases(const DOM_SID *domain_sid,
33 struct nt_user_token *token);
34 struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
35 const DOM_SID *user_sid,
38 const DOM_SID *groupsids);
39 void debug_nt_user_token(int dbg_class, int dbg_lev, NT_USER_TOKEN *token);
40 void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
41 int n_groups, gid_t *groups);
43 /* The following definitions come from smbd/connection.c */
45 bool yield_connection(connection_struct *conn, const char *name);
46 int count_current_connections( const char *sharename, bool clear );
47 int count_all_current_connections(void);
48 bool claim_connection(connection_struct *conn, const char *name,
50 bool register_message_flags(bool doreg, uint32 msg_flags);
52 /* The following definitions come from winbindd/winbindd.c */
54 struct event_context *winbind_event_context(void);
55 struct messaging_context *winbind_messaging_context(void);
56 void request_error(struct winbindd_cli_state *state);
57 void request_ok(struct winbindd_cli_state *state);
58 bool winbindd_setup_sig_term_handler(bool parent);
59 bool winbindd_setup_sig_hup_handler(const char *lfile);
60 bool winbindd_use_idmap_cache(void);
61 bool winbindd_use_cache(void);
62 int main(int argc, char **argv, char **envp);
64 /* The following definitions come from winbindd/winbindd_ads.c */
66 /* The following definitions come from winbindd/winbindd_rpc.c */
68 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
69 struct winbindd_domain *domain,
71 const struct dom_sid *sids,
74 enum lsa_SidType **types);
75 NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
76 struct winbindd_domain *domain,
79 const char ***domains,
80 struct dom_sid **sids,
81 enum lsa_SidType **types);
83 /* The following definitions come from winbindd/winbindd_async.c */
85 bool print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
86 size_t num_sids, char **result, ssize_t *len);
87 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
88 DOM_SID **sids, size_t *num_sids);
90 /* The following definitions come from winbindd/winbindd_cache.c */
92 void winbindd_check_cache_size(time_t t);
93 struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
94 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID *sid);
95 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
98 const uint8 **cached_nt_pass,
99 const uint8 **cached_salt);
100 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
103 const uint8 nt_pass[NT_HASH_LEN]);
104 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
105 struct netr_SamInfo3 *info3);
106 bool wcache_invalidate_cache(void);
107 bool init_wcache(void);
108 bool initialize_winbindd_cache(void);
109 void close_winbindd_cache(void);
110 NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,
111 const struct dom_sid *sid,
115 enum lsa_SidType *type);
116 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
118 const struct dom_sid *group_sid,
120 struct dom_sid **sid_mem, char ***names,
121 uint32_t **name_types);
122 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
123 char **domain_name, char **name,
124 enum lsa_SidType *type);
125 bool lookup_cached_name(TALLOC_CTX *mem_ctx,
126 const char *domain_name,
129 enum lsa_SidType *type);
130 void cache_name2sid(struct winbindd_domain *domain,
131 const char *domain_name, const char *name,
132 enum lsa_SidType type, const DOM_SID *sid);
133 NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
134 const char *domain_name,
137 enum lsa_SidType *type);
138 NTSTATUS wcache_query_user(struct winbindd_domain *domain,
140 const struct dom_sid *user_sid,
141 struct wbint_userinfo *info);
142 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
144 uint32 num_sids, const DOM_SID *sids,
145 uint32 *pnum_aliases, uint32 **paliases);
146 NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
148 const struct dom_sid *user_sid,
150 struct dom_sid **psids);
152 void wcache_flush_cache(void);
153 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
154 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const DOM_SID *sid) ;
155 bool set_global_winbindd_state_offline(void);
156 void set_global_winbindd_state_online(void);
157 bool get_global_winbindd_state_offline(void);
158 int winbindd_validate_cache(void);
159 int winbindd_validate_cache_nobackup(void);
160 bool winbindd_cache_validate_and_initialize(void);
161 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
162 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
163 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
164 void wcache_tdc_clear( void );
165 NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
166 const DOM_SID *user_sid,
168 ADS_STRUCT *ads, LDAPMessage *msg,
169 const char **homedir, const char **shell,
170 const char **gecos, gid_t *p_gid);
171 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
172 time_t last_seq_check);
173 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
174 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
175 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
176 const DATA_BLOB *req, const DATA_BLOB *resp);
178 /* The following definitions come from winbindd/winbindd_ccache_access.c */
180 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
181 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
182 struct winbindd_cli_state *state);
184 /* The following definitions come from winbindd/winbindd_cm.c */
186 void set_domain_offline(struct winbindd_domain *domain);
187 void set_domain_online_request(struct winbindd_domain *domain);
188 void winbind_add_failed_connection_entry(const struct winbindd_domain *domain,
191 void invalidate_cm_connection(struct winbindd_cm_conn *conn);
192 void close_conns_after_fork(void);
193 NTSTATUS init_dc_connection(struct winbindd_domain *domain);
194 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
195 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
196 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
197 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
198 NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain,
200 struct rpc_pipe_client **cli);
201 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
202 struct rpc_pipe_client **cli);
204 /* The following definitions come from winbindd/winbindd_cred_cache.c */
206 bool ccache_entry_exists(const char *username);
207 bool ccache_entry_identical(const char *username,
210 void ccache_remove_all_after_fork(void);
211 void ccache_regain_all_now(void);
212 NTSTATUS add_ccache_to_list(const char *princ_name,
215 const char *username,
221 bool postponed_request);
222 NTSTATUS remove_ccache(const char *username);
223 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
224 NTSTATUS winbindd_add_memory_creds(const char *username,
227 NTSTATUS winbindd_delete_memory_creds(const char *username);
228 NTSTATUS winbindd_replace_memory_creds(const char *username,
231 /* The following definitions come from winbindd/winbindd_creds.c */
233 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
236 struct netr_SamInfo3 **info3,
237 const uint8 *cached_nt_pass[NT_HASH_LEN],
238 const uint8 *cred_salt[NT_HASH_LEN]);
239 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
243 struct netr_SamInfo3 *info3,
244 const DOM_SID *user_sid);
245 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
249 struct netr_SamInfo3 *info3);
250 NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
254 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
259 /* The following definitions come from winbindd/winbindd_domain.c */
261 void setup_domain_child(struct winbindd_domain *domain,
262 struct winbindd_child *child);
264 /* The following definitions come from winbindd/winbindd_dual.c */
266 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
267 struct tevent_context *ev,
268 struct winbindd_child *child,
269 struct winbindd_request *request);
270 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
271 struct winbindd_response **presponse, int *err);
272 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
273 struct tevent_context *ev,
274 struct winbindd_domain *domain,
275 struct winbindd_request *request);
276 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
277 struct winbindd_response **presponse, int *err);
279 void async_domain_request(TALLOC_CTX *mem_ctx,
280 struct winbindd_domain *domain,
281 struct winbindd_request *request,
282 struct winbindd_response *response,
283 void (*continuation)(void *private_data_data, bool success),
284 void *private_data_data);
285 void sendto_domain(struct winbindd_cli_state *state,
286 struct winbindd_domain *domain);
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 bool winbindd_reinit_after_fork(const char *logfilename);
324 struct winbindd_domain *wb_child_domain(void);
326 /* The following definitions come from winbindd/winbindd_group.c */
328 void winbindd_getgrnam(struct winbindd_cli_state *state);
329 void winbindd_getgrgid(struct winbindd_cli_state *state);
330 void winbindd_setgrent(struct winbindd_cli_state *state);
331 void winbindd_endgrent(struct winbindd_cli_state *state);
332 void winbindd_getgrent(struct winbindd_cli_state *state);
333 void winbindd_list_groups(struct winbindd_cli_state *state);
334 void winbindd_getgroups(struct winbindd_cli_state *state);
335 void winbindd_getusersids(struct winbindd_cli_state *state);
336 void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
337 void winbindd_getsidaliases(struct winbindd_cli_state *state);
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);
340 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
342 int *num_members, char **result);
345 /* The following definitions come from winbindd/winbindd_idmap.c */
347 void init_idmap_child(void);
348 struct winbindd_child *idmap_child(void);
350 /* The following definitions come from winbindd/winbindd_locator.c */
352 void init_locator_child(void);
353 struct winbindd_child *locator_child(void);
355 /* The following definitions come from winbindd/winbindd_misc.c */
357 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
358 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
359 struct winbindd_cli_state *state);
360 void winbindd_show_sequence(struct winbindd_cli_state *state);
361 enum winbindd_result winbindd_dual_show_sequence(struct winbindd_domain *domain,
362 struct winbindd_cli_state *state);
363 void winbindd_domain_info(struct winbindd_cli_state *state);
364 void winbindd_ping(struct winbindd_cli_state *state);
365 void winbindd_info(struct winbindd_cli_state *state);
366 void winbindd_interface_version(struct winbindd_cli_state *state);
367 void winbindd_domain_name(struct winbindd_cli_state *state);
368 void winbindd_netbios_name(struct winbindd_cli_state *state);
369 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
371 /* The following definitions come from winbindd/winbindd_ndr.c */
373 void ndr_print_winbindd_child(struct ndr_print *ndr,
375 const struct winbindd_child *r);
376 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
378 const struct winbindd_cm_conn *r);
379 void ndr_print_winbindd_methods(struct ndr_print *ndr,
381 const struct winbindd_methods *r);
382 void ndr_print_winbindd_domain(struct ndr_print *ndr,
384 const struct winbindd_domain *r);
386 /* The following definitions come from winbindd/winbindd_pam.c */
388 bool check_request_flags(uint32_t flags);
389 struct winbindd_domain *find_auth_domain(uint8_t flags,
390 const char *domain_name);
391 NTSTATUS check_info3_in_group(struct netr_SamInfo3 *info3,
392 const char *group_sid);
393 NTSTATUS append_auth_data(struct winbindd_cli_state *state,
394 struct netr_SamInfo3 *info3,
395 const char *name_domain,
396 const char *name_user);
397 void winbindd_pam_auth(struct winbindd_cli_state *state);
398 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
399 struct winbindd_cli_state *state) ;
400 void winbindd_pam_auth_crap(struct winbindd_cli_state *state);
401 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
402 struct winbindd_cli_state *state) ;
403 void winbindd_pam_chauthtok(struct winbindd_cli_state *state);
404 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
405 struct winbindd_cli_state *state);
406 void winbindd_pam_logoff(struct winbindd_cli_state *state);
407 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
408 struct winbindd_cli_state *state) ;
409 void winbindd_pam_chng_pswd_auth_crap(struct winbindd_cli_state *state);
410 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
412 /* The following definitions come from winbindd/winbindd_util.c */
414 struct winbindd_domain *domain_list(void);
415 void free_domain_list(void);
416 bool domain_is_forest_root(const struct winbindd_domain *domain);
417 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
418 struct timeval now, void *private_data);
419 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
420 struct winbindd_cli_state *state);
421 bool init_domain_list(void);
422 void check_domain_trusted( const char *name, const DOM_SID *user_sid );
423 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
424 struct winbindd_domain *find_domain_from_name(const char *domain_name);
425 struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid);
426 struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid);
427 struct winbindd_domain *find_our_domain(void);
428 struct winbindd_domain *find_root_domain(void);
429 struct winbindd_domain *find_builtin_domain(void);
430 struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid);
431 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
432 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
433 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
434 char **domain, char **user);
435 void parse_add_domuser(void *buf, char *domuser, int *len);
436 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
437 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
438 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
442 const char *get_winbind_pipe_dir(void) ;
443 char *get_winbind_priv_pipe_dir(void) ;
444 int open_winbindd_socket(void);
445 int open_winbindd_priv_socket(void);
446 struct winbindd_cli_state *winbindd_client_list(void);
447 void winbindd_add_client(struct winbindd_cli_state *cli);
448 void winbindd_remove_client(struct winbindd_cli_state *cli);
449 void winbindd_kill_all_clients(void);
450 int winbindd_num_clients(void);
451 NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
453 const DOM_SID *user_sid,
454 uint32 *p_num_groups, DOM_SID **user_sids);
456 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
457 struct winbindd_domain *domain,
460 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
464 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
465 struct winbindd_domain *domain,
466 const char *name, char **alias);
467 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
468 struct winbindd_domain *domain,
469 const char *alias, char **name);
471 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
472 bool winbindd_internal_child(struct winbindd_child *child);
473 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
474 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
475 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
476 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
477 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
478 bool is_domain_offline(const struct winbindd_domain *domain);
480 /* The following definitions come from winbindd/winbindd_wins.c */
482 void winbindd_wins_byip(struct winbindd_cli_state *state);
483 void winbindd_wins_byname(struct winbindd_cli_state *state);
485 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
486 struct winbindd_cli_state *cli,
487 struct winbindd_request *request);
488 NTSTATUS wb_ping_recv(struct tevent_req *req,
489 struct winbindd_response *resp);
491 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
492 struct winbindd_cli_state *state);
494 struct rpc_pipe_client *wbint_rpccli_create(TALLOC_CTX *mem_ctx,
495 struct winbindd_domain *domain,
496 struct winbindd_child *child);
497 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
498 struct winbindd_cli_state *state);
500 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
501 struct tevent_context *ev,
502 const struct dom_sid *sid);
503 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
504 enum lsa_SidType *type, const char **domain,
507 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
508 struct tevent_context *ev,
509 struct winbindd_cli_state *cli,
510 struct winbindd_request *request);
511 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
512 struct winbindd_response *response);
514 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
515 struct tevent_context *ev,
516 const char *dom_name, const char *name,
518 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
519 enum lsa_SidType *type);
521 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
522 struct tevent_context *ev,
523 struct winbindd_cli_state *cli,
524 struct winbindd_request *request);
525 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
526 struct winbindd_response *response);
528 struct tevent_req *wb_sid2uid_send(TALLOC_CTX *mem_ctx,
529 struct tevent_context *ev,
530 const struct dom_sid *sid);
531 NTSTATUS wb_sid2uid_recv(struct tevent_req *req, uid_t *uid);
533 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
534 struct tevent_context *ev,
535 struct winbindd_cli_state *cli,
536 struct winbindd_request *request);
537 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
538 struct winbindd_response *response);
540 struct tevent_req *wb_sid2gid_send(TALLOC_CTX *mem_ctx,
541 struct tevent_context *ev,
542 const struct dom_sid *sid);
543 NTSTATUS wb_sid2gid_recv(struct tevent_req *req, gid_t *gid);
545 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
546 struct tevent_context *ev,
547 struct winbindd_cli_state *cli,
548 struct winbindd_request *request);
549 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
550 struct winbindd_response *response);
552 struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
553 struct tevent_context *ev,
555 NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
557 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
558 struct tevent_context *ev,
559 struct winbindd_cli_state *cli,
560 struct winbindd_request *request);
561 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
562 struct winbindd_response *response);
564 struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
565 struct tevent_context *ev,
567 NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
569 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
570 struct tevent_context *ev,
571 struct winbindd_cli_state *cli,
572 struct winbindd_request *request);
573 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
574 struct winbindd_response *response);
576 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
577 struct tevent_context *ev,
578 struct winbindd_cli_state *cli,
579 struct winbindd_request *request);
580 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
581 struct winbindd_response *response);
583 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
584 struct tevent_context *ev,
585 struct winbindd_cli_state *cli,
586 struct winbindd_request *request);
587 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
588 struct winbindd_response *response);
590 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
591 struct tevent_context *ev,
592 const struct dom_sid *user_sid);
593 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
594 struct wbint_userinfo **pinfo);
596 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 const struct dom_sid *user_sid,
599 struct winbindd_pw *pw);
600 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
602 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
603 struct tevent_context *ev,
604 struct winbindd_cli_state *cli,
605 struct winbindd_request *request);
606 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
607 struct winbindd_response *response);
609 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
610 struct tevent_context *ev,
611 struct winbindd_cli_state *cli,
612 struct winbindd_request *request);
613 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
614 struct winbindd_response *response);
616 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
617 struct tevent_context *ev,
618 struct winbindd_cli_state *cli,
619 struct winbindd_request *request);
620 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
621 struct winbindd_response *response);
622 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
623 struct tevent_context *ev,
624 struct winbindd_domain *domain,
626 const struct dom_sid *sids);
627 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
628 uint32_t *num_aliases, uint32_t **aliases);
629 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
630 struct tevent_context *ev,
631 struct winbindd_cli_state *cli,
632 struct winbindd_request *request);
633 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
634 struct winbindd_response *response);
635 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
636 struct tevent_context *ev,
637 struct winbindd_domain *domain,
638 const struct dom_sid *sid);
639 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
640 int *num_sids, struct dom_sid **sids);
642 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
643 struct tevent_context *ev,
644 struct winbindd_cli_state *cli,
645 struct winbindd_request *request);
646 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
647 struct winbindd_response *response);
648 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
649 struct tevent_context *ev,
650 const struct dom_sid *sid);
651 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
652 int *num_sids, struct dom_sid **sids);
653 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
654 struct tevent_context *ev,
655 struct winbindd_cli_state *cli,
656 struct winbindd_request *request);
657 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
658 struct winbindd_response *response);
660 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
661 struct tevent_context *ev,
662 struct winbindd_domain *domain);
663 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
665 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev);
667 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
668 int *num_domains, struct winbindd_domain ***domains,
669 NTSTATUS **stati, uint32_t **seqnums);
671 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
672 struct tevent_context *ev,
673 struct winbindd_cli_state *cli,
674 struct winbindd_request *request);
675 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
676 struct winbindd_response *response);
678 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
679 struct tevent_context *ev,
680 const struct dom_sid *sid,
681 enum lsa_SidType type,
683 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
684 struct talloc_dict **members);
686 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
687 struct tevent_context *ev,
688 const struct dom_sid *group_sid,
690 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
691 const char **domname, const char **name, gid_t *gid,
692 struct talloc_dict **members);
694 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
695 struct tevent_context *ev,
696 struct winbindd_cli_state *cli,
697 struct winbindd_request *request);
698 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
699 struct winbindd_response *response);
701 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
702 struct tevent_context *ev,
703 struct winbindd_cli_state *cli,
704 struct winbindd_request *request);
705 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
706 struct winbindd_response *response);
708 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
709 struct tevent_context *ev,
710 struct winbindd_cli_state *cli,
711 struct winbindd_request *request);
712 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
713 struct winbindd_response *response);
715 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
716 struct tevent_context *ev,
717 struct winbindd_cli_state *cli,
718 struct winbindd_request *request);
719 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
720 struct winbindd_response *response);
722 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
723 struct tevent_context *ev,
724 struct winbindd_domain *domain);
725 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
727 struct wbint_userinfo **users);
729 struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
730 struct tevent_context *ev,
731 struct wbint_userinfo *info,
732 struct winbindd_pw *pw);
733 NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
735 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
736 struct tevent_context *ev,
737 struct getpwent_state *gstate,
738 struct winbindd_pw *pw);
739 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
741 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
742 struct tevent_context *ev,
743 struct winbindd_cli_state *cli,
744 struct winbindd_request *request);
745 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
746 struct winbindd_response *presp);
748 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
749 struct tevent_context *ev,
750 struct winbindd_cli_state *cli,
751 struct winbindd_request *request);
752 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
753 struct winbindd_response *response);
755 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
756 struct tevent_context *ev,
757 struct winbindd_cli_state *cli,
758 struct winbindd_request *request);
759 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
760 struct winbindd_response *response);
762 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
763 struct tevent_context *ev,
764 struct winbindd_cli_state *cli,
765 struct winbindd_request *request);
766 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
767 struct winbindd_response *response);
769 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
770 struct tevent_context *ev,
771 const char *domain_name,
772 const struct GUID *domain_guid,
773 const char *site_name,
775 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
776 struct netr_DsRGetDCNameInfo **pdcinfo);
778 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
779 struct tevent_context *ev,
780 struct winbindd_cli_state *cli,
781 struct winbindd_request *request);
782 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
783 struct winbindd_response *response);
785 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
786 struct tevent_context *ev,
788 struct getgrent_state *gstate,
789 struct winbindd_gr *gr);
790 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
791 struct talloc_dict **members);
793 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
794 struct tevent_context *ev,
795 struct winbindd_cli_state *cli,
796 struct winbindd_request *request);
797 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
798 struct winbindd_response *response);
799 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
800 struct tevent_context *ev,
801 struct winbindd_cli_state *cli,
802 struct winbindd_request *request);
803 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
804 struct winbindd_response *response);
805 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
806 struct tevent_context *ev,
807 struct winbindd_cli_state *cli,
808 struct winbindd_request *request);
809 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
810 struct winbindd_response *response);
812 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
813 struct tevent_context *ev,
814 struct winbindd_cli_state *cli,
815 struct winbindd_request *request);
816 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
817 struct winbindd_response *response);
819 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
820 struct tevent_context *ev,
821 struct winbindd_cli_state *cli,
822 struct winbindd_request *request);
823 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
824 struct winbindd_response *response);
826 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
827 struct tevent_context *ev,
828 struct winbindd_cli_state *cli,
829 struct winbindd_request *request);
830 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
831 struct winbindd_response *presp);
833 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
834 struct tevent_context *ev,
835 struct winbindd_cli_state *cli,
836 struct winbindd_request *request);
837 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
838 struct winbindd_response *presp);
840 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
841 struct tevent_context *ev,
842 struct winbindd_cli_state *cli,
843 struct winbindd_request *request);
844 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
845 struct winbindd_response *presp);
847 struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
848 struct tevent_context *ev,
849 struct winbindd_cli_state *cli,
850 struct winbindd_request *request);
851 NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
852 struct winbindd_response *response);
854 struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
855 struct tevent_context *ev,
856 struct winbindd_cli_state *cli,
857 struct winbindd_request *request);
858 NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
859 struct winbindd_response *response);
861 struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
862 struct tevent_context *ev,
863 struct winbindd_cli_state *cli,
864 struct winbindd_request *request);
865 NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
866 struct winbindd_response *response);
868 #endif /* _WINBINDD_PROTO_H_ */