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 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
417 struct timeval now, void *private_data);
418 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
419 struct winbindd_cli_state *state);
420 bool init_domain_list(void);
421 void check_domain_trusted( const char *name, const DOM_SID *user_sid );
422 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
423 struct winbindd_domain *find_domain_from_name(const char *domain_name);
424 struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid);
425 struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid);
426 struct winbindd_domain *find_our_domain(void);
427 struct winbindd_domain *find_root_domain(void);
428 struct winbindd_domain *find_builtin_domain(void);
429 struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid);
430 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
431 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
432 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
433 char **domain, char **user);
434 void parse_add_domuser(void *buf, char *domuser, int *len);
435 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
436 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
437 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
441 const char *get_winbind_pipe_dir(void) ;
442 char *get_winbind_priv_pipe_dir(void) ;
443 int open_winbindd_socket(void);
444 int open_winbindd_priv_socket(void);
445 struct winbindd_cli_state *winbindd_client_list(void);
446 void winbindd_add_client(struct winbindd_cli_state *cli);
447 void winbindd_remove_client(struct winbindd_cli_state *cli);
448 void winbindd_kill_all_clients(void);
449 int winbindd_num_clients(void);
450 NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
452 const DOM_SID *user_sid,
453 uint32 *p_num_groups, DOM_SID **user_sids);
455 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
456 struct winbindd_domain *domain,
459 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
463 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
464 struct winbindd_domain *domain,
465 const char *name, char **alias);
466 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
467 struct winbindd_domain *domain,
468 const char *alias, char **name);
470 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
471 bool winbindd_internal_child(struct winbindd_child *child);
472 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
473 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
474 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
475 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
476 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
477 bool is_domain_offline(const struct winbindd_domain *domain);
479 /* The following definitions come from winbindd/winbindd_wins.c */
481 void winbindd_wins_byip(struct winbindd_cli_state *state);
482 void winbindd_wins_byname(struct winbindd_cli_state *state);
484 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
485 struct winbindd_cli_state *cli,
486 struct winbindd_request *request);
487 NTSTATUS wb_ping_recv(struct tevent_req *req,
488 struct winbindd_response *resp);
490 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
491 struct winbindd_cli_state *state);
493 struct rpc_pipe_client *wbint_rpccli_create(TALLOC_CTX *mem_ctx,
494 struct winbindd_domain *domain,
495 struct winbindd_child *child);
496 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
497 struct winbindd_cli_state *state);
499 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
500 struct tevent_context *ev,
501 const struct dom_sid *sid);
502 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
503 enum lsa_SidType *type, const char **domain,
506 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
507 struct tevent_context *ev,
508 struct winbindd_cli_state *cli,
509 struct winbindd_request *request);
510 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
511 struct winbindd_response *response);
513 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
514 struct tevent_context *ev,
515 const char *dom_name, const char *name,
517 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
518 enum lsa_SidType *type);
520 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
521 struct tevent_context *ev,
522 struct winbindd_cli_state *cli,
523 struct winbindd_request *request);
524 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
525 struct winbindd_response *response);
527 struct tevent_req *wb_sid2uid_send(TALLOC_CTX *mem_ctx,
528 struct tevent_context *ev,
529 const struct dom_sid *sid);
530 NTSTATUS wb_sid2uid_recv(struct tevent_req *req, uid_t *uid);
532 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
533 struct tevent_context *ev,
534 struct winbindd_cli_state *cli,
535 struct winbindd_request *request);
536 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
537 struct winbindd_response *response);
539 struct tevent_req *wb_sid2gid_send(TALLOC_CTX *mem_ctx,
540 struct tevent_context *ev,
541 const struct dom_sid *sid);
542 NTSTATUS wb_sid2gid_recv(struct tevent_req *req, gid_t *gid);
544 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
545 struct tevent_context *ev,
546 struct winbindd_cli_state *cli,
547 struct winbindd_request *request);
548 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
549 struct winbindd_response *response);
551 struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
552 struct tevent_context *ev,
554 NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
556 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
557 struct tevent_context *ev,
558 struct winbindd_cli_state *cli,
559 struct winbindd_request *request);
560 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
561 struct winbindd_response *response);
563 struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
564 struct tevent_context *ev,
566 NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
568 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
569 struct tevent_context *ev,
570 struct winbindd_cli_state *cli,
571 struct winbindd_request *request);
572 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
573 struct winbindd_response *response);
575 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
576 struct tevent_context *ev,
577 struct winbindd_cli_state *cli,
578 struct winbindd_request *request);
579 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
580 struct winbindd_response *response);
582 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
583 struct tevent_context *ev,
584 struct winbindd_cli_state *cli,
585 struct winbindd_request *request);
586 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
587 struct winbindd_response *response);
589 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
590 struct tevent_context *ev,
591 const struct dom_sid *user_sid);
592 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
593 struct wbint_userinfo **pinfo);
595 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
596 struct tevent_context *ev,
597 const struct dom_sid *user_sid,
598 struct winbindd_pw *pw);
599 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
601 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
602 struct tevent_context *ev,
603 struct winbindd_cli_state *cli,
604 struct winbindd_request *request);
605 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
606 struct winbindd_response *response);
608 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
609 struct tevent_context *ev,
610 struct winbindd_cli_state *cli,
611 struct winbindd_request *request);
612 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
613 struct winbindd_response *response);
615 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
616 struct tevent_context *ev,
617 struct winbindd_cli_state *cli,
618 struct winbindd_request *request);
619 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
620 struct winbindd_response *response);
621 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
622 struct tevent_context *ev,
623 struct winbindd_domain *domain,
625 const struct dom_sid *sids);
626 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
627 uint32_t *num_aliases, uint32_t **aliases);
628 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
629 struct tevent_context *ev,
630 struct winbindd_cli_state *cli,
631 struct winbindd_request *request);
632 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
633 struct winbindd_response *response);
634 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
635 struct tevent_context *ev,
636 struct winbindd_domain *domain,
637 const struct dom_sid *sid);
638 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
639 int *num_sids, struct dom_sid **sids);
641 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
642 struct tevent_context *ev,
643 struct winbindd_cli_state *cli,
644 struct winbindd_request *request);
645 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
646 struct winbindd_response *response);
647 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
648 struct tevent_context *ev,
649 const struct dom_sid *sid);
650 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
651 int *num_sids, struct dom_sid **sids);
652 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
653 struct tevent_context *ev,
654 struct winbindd_cli_state *cli,
655 struct winbindd_request *request);
656 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
657 struct winbindd_response *response);
659 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
660 struct tevent_context *ev,
661 struct winbindd_domain *domain);
662 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
664 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
665 struct tevent_context *ev);
666 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
667 int *num_domains, struct winbindd_domain ***domains,
668 NTSTATUS **stati, uint32_t **seqnums);
670 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
671 struct tevent_context *ev,
672 struct winbindd_cli_state *cli,
673 struct winbindd_request *request);
674 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
675 struct winbindd_response *response);
677 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
678 struct tevent_context *ev,
679 const struct dom_sid *sid,
680 enum lsa_SidType type,
682 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
683 struct talloc_dict **members);
685 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
686 struct tevent_context *ev,
687 const struct dom_sid *group_sid,
689 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
690 const char **domname, const char **name, gid_t *gid,
691 struct talloc_dict **members);
693 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
694 struct tevent_context *ev,
695 struct winbindd_cli_state *cli,
696 struct winbindd_request *request);
697 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
698 struct winbindd_response *response);
700 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 struct winbindd_cli_state *cli,
703 struct winbindd_request *request);
704 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
705 struct winbindd_response *response);
707 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 struct winbindd_cli_state *cli,
710 struct winbindd_request *request);
711 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
712 struct winbindd_response *response);
714 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
715 struct tevent_context *ev,
716 struct winbindd_cli_state *cli,
717 struct winbindd_request *request);
718 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
719 struct winbindd_response *response);
721 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
722 struct tevent_context *ev,
723 struct winbindd_domain *domain);
724 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
726 struct wbint_userinfo **users);
728 struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
729 struct tevent_context *ev,
730 struct wbint_userinfo *info,
731 struct winbindd_pw *pw);
732 NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
734 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
735 struct tevent_context *ev,
736 struct getpwent_state *gstate,
737 struct winbindd_pw *pw);
738 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
740 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
741 struct tevent_context *ev,
742 struct winbindd_cli_state *cli,
743 struct winbindd_request *request);
744 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
745 struct winbindd_response *presp);
747 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
748 struct tevent_context *ev,
749 struct winbindd_cli_state *cli,
750 struct winbindd_request *request);
751 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
752 struct winbindd_response *response);
754 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
755 struct tevent_context *ev,
756 struct winbindd_cli_state *cli,
757 struct winbindd_request *request);
758 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
759 struct winbindd_response *response);
761 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
762 struct tevent_context *ev,
763 struct winbindd_cli_state *cli,
764 struct winbindd_request *request);
765 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
766 struct winbindd_response *response);
768 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
769 struct tevent_context *ev,
770 const char *domain_name,
771 const struct GUID *domain_guid,
772 const char *site_name,
774 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
775 struct netr_DsRGetDCNameInfo **pdcinfo);
777 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
778 struct tevent_context *ev,
779 struct winbindd_cli_state *cli,
780 struct winbindd_request *request);
781 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
782 struct winbindd_response *response);
784 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
785 struct tevent_context *ev,
787 struct getgrent_state *gstate,
788 struct winbindd_gr *gr);
789 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
790 struct talloc_dict **members);
792 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
793 struct tevent_context *ev,
794 struct winbindd_cli_state *cli,
795 struct winbindd_request *request);
796 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
797 struct winbindd_response *response);
798 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
799 struct tevent_context *ev,
800 struct winbindd_cli_state *cli,
801 struct winbindd_request *request);
802 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
803 struct winbindd_response *response);
804 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
805 struct tevent_context *ev,
806 struct winbindd_cli_state *cli,
807 struct winbindd_request *request);
808 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
809 struct winbindd_response *response);
811 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
812 struct tevent_context *ev,
813 struct winbindd_cli_state *cli,
814 struct winbindd_request *request);
815 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
816 struct winbindd_response *response);
818 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
819 struct tevent_context *ev,
820 struct winbindd_cli_state *cli,
821 struct winbindd_request *request);
822 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
823 struct winbindd_response *response);
825 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
826 struct tevent_context *ev,
827 struct winbindd_cli_state *cli,
828 struct winbindd_request *request);
829 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
830 struct winbindd_response *presp);
832 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
833 struct tevent_context *ev,
834 struct winbindd_cli_state *cli,
835 struct winbindd_request *request);
836 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
837 struct winbindd_response *presp);
839 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
840 struct tevent_context *ev,
841 struct winbindd_cli_state *cli,
842 struct winbindd_request *request);
843 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
844 struct winbindd_response *presp);
846 struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
847 struct tevent_context *ev,
848 struct winbindd_cli_state *cli,
849 struct winbindd_request *request);
850 NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
851 struct winbindd_response *response);
853 struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
854 struct tevent_context *ev,
855 struct winbindd_cli_state *cli,
856 struct winbindd_request *request);
857 NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
858 struct winbindd_response *response);
860 struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
861 struct tevent_context *ev,
862 struct winbindd_cli_state *cli,
863 struct winbindd_request *request);
864 NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
865 struct winbindd_response *response);
867 #endif /* _WINBINDD_PROTO_H_ */