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 struct 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 struct 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 struct dom_sid *user_sid,
38 const struct 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 winbindd/winbindd_event.c */
44 const char *get_winbind_pipe_dir(void);
45 char *get_winbind_priv_pipe_dir(void);
46 struct event_context *winbind_event_context(void);
47 bool winbindd_setup_listeners(void);
48 void request_finished(struct winbindd_cli_state *state);
49 void winbindd_remove_client(struct winbindd_cli_state *state);
51 /* The following definitions come from winbindd/winbindd.c */
52 struct messaging_context *winbind_messaging_context(void);
54 /* The following definitions come from winbindd/winbindd_process.c */
55 void wb_process_request(struct winbindd_cli_state *state);
56 void request_error(struct winbindd_cli_state *state);
57 void request_ok(struct winbindd_cli_state *state);
59 /* The following definitions come from winbindd/winbindd.c */
60 bool winbindd_setup_sig_term_handler(bool parent);
61 bool winbindd_setup_sig_hup_handler(const char *lfile);
62 bool winbindd_use_idmap_cache(void);
63 bool winbindd_use_cache(void);
64 void winbindd_register_handlers(void);
65 int main(int argc, char **argv, char **envp);
67 /* The following definitions come from winbindd/winbindd_ads.c */
69 /* The following definitions come from winbindd/winbindd_rpc.c */
71 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
72 struct winbindd_domain *domain,
74 const struct dom_sid *sids,
77 enum lsa_SidType **types);
78 NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
79 struct winbindd_domain *domain,
82 const char ***domains,
83 struct dom_sid **sids,
84 enum lsa_SidType **types);
86 /* The following definitions come from winbindd/winbindd_async.c */
88 bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
89 size_t num_sids, char **result, ssize_t *len);
90 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
91 struct dom_sid **sids, size_t *num_sids);
93 /* The following definitions come from winbindd/winbindd_cache.c */
95 void winbindd_check_cache_size(time_t t);
96 struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
97 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
98 NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
100 const struct dom_sid *sid,
101 const uint8 **cached_nt_pass,
102 const uint8 **cached_salt);
103 NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
105 const struct dom_sid *sid,
106 const uint8 nt_pass[NT_HASH_LEN]);
107 void wcache_invalidate_samlogon(struct winbindd_domain *domain,
108 struct netr_SamInfo3 *info3);
109 bool wcache_invalidate_cache(void);
110 bool wcache_invalidate_cache_noinit(void);
111 bool init_wcache(void);
112 bool initialize_winbindd_cache(void);
113 void close_winbindd_cache(void);
114 NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,
115 const struct dom_sid *sid,
119 enum lsa_SidType *type);
120 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
122 const struct dom_sid *group_sid,
124 struct dom_sid **sid_mem, char ***names,
125 uint32_t **name_types);
126 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
127 char **domain_name, char **name,
128 enum lsa_SidType *type);
129 bool lookup_cached_name(TALLOC_CTX *mem_ctx,
130 const char *domain_name,
133 enum lsa_SidType *type);
134 void cache_name2sid(struct winbindd_domain *domain,
135 const char *domain_name, const char *name,
136 enum lsa_SidType type, const struct dom_sid *sid);
137 NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
138 const char *domain_name,
141 enum lsa_SidType *type);
142 NTSTATUS wcache_query_user(struct winbindd_domain *domain,
144 const struct dom_sid *user_sid,
145 struct wbint_userinfo *info);
146 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
148 uint32 num_sids, const struct dom_sid *sids,
149 uint32 *pnum_aliases, uint32 **paliases);
150 NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
152 const struct dom_sid *user_sid,
154 struct dom_sid **psids);
156 void wcache_flush_cache(void);
157 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
158 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
159 bool set_global_winbindd_state_offline(void);
160 void set_global_winbindd_state_online(void);
161 bool get_global_winbindd_state_offline(void);
162 int winbindd_validate_cache(void);
163 int winbindd_validate_cache_nobackup(void);
164 bool winbindd_cache_validate_and_initialize(void);
165 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
166 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
167 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
168 void wcache_tdc_clear( void );
169 NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
170 const struct dom_sid *user_sid,
172 ADS_STRUCT *ads, LDAPMessage *msg,
173 const char **homedir, const char **shell,
174 const char **gecos, gid_t *p_gid);
175 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
176 time_t last_seq_check);
177 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
178 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
179 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
180 const DATA_BLOB *req, const DATA_BLOB *resp);
182 /* The following definitions come from winbindd/winbindd_ccache_access.c */
184 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
185 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
186 struct winbindd_cli_state *state);
187 void winbindd_ccache_save(struct winbindd_cli_state *state);
188 enum winbindd_result winbindd_dual_ccache_save(
189 struct winbindd_domain *domain, struct winbindd_cli_state *state);
191 /* The following definitions come from winbindd/winbindd_cm.c */
193 void set_domain_offline(struct winbindd_domain *domain);
194 void set_domain_online_request(struct winbindd_domain *domain);
195 void winbind_add_failed_connection_entry(const struct winbindd_domain *domain,
198 void invalidate_cm_connection(struct winbindd_cm_conn *conn);
199 void close_conns_after_fork(void);
200 NTSTATUS init_dc_connection(struct winbindd_domain *domain);
201 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
202 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
203 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
204 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
205 NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain,
207 struct rpc_pipe_client **cli);
208 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
209 struct rpc_pipe_client **cli);
211 /* The following definitions come from winbindd/winbindd_cred_cache.c */
213 bool ccache_entry_exists(const char *username);
214 bool ccache_entry_identical(const char *username,
217 void ccache_remove_all_after_fork(void);
218 void ccache_regain_all_now(void);
219 NTSTATUS add_ccache_to_list(const char *princ_name,
222 const char *username,
228 bool postponed_request);
229 NTSTATUS remove_ccache(const char *username);
230 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
231 NTSTATUS winbindd_add_memory_creds(const char *username,
234 NTSTATUS winbindd_delete_memory_creds(const char *username);
235 NTSTATUS winbindd_replace_memory_creds(const char *username,
238 /* The following definitions come from winbindd/winbindd_creds.c */
240 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
242 const struct dom_sid *sid,
243 struct netr_SamInfo3 **info3,
244 const uint8 *cached_nt_pass[NT_HASH_LEN],
245 const uint8 *cred_salt[NT_HASH_LEN]);
246 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
250 struct netr_SamInfo3 *info3,
251 const struct dom_sid *user_sid);
252 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
256 struct netr_SamInfo3 *info3);
257 NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
259 const struct dom_sid *sid,
261 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
266 /* The following definitions come from winbindd/winbindd_domain.c */
268 void setup_domain_child(struct winbindd_domain *domain);
270 /* The following definitions come from winbindd/winbindd_dual.c */
272 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
273 struct tevent_context *ev,
274 struct winbindd_child *child,
275 struct winbindd_request *request);
276 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
277 struct winbindd_response **presponse, int *err);
278 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
279 struct tevent_context *ev,
280 struct winbindd_domain *domain,
281 struct winbindd_request *request);
282 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
283 struct winbindd_response **presponse, int *err);
285 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
286 const struct winbindd_child_dispatch_table *table,
287 const char *logprefix,
288 const char *logname);
289 void winbind_child_died(pid_t pid);
290 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
291 void winbind_msg_debug(struct messaging_context *msg_ctx,
294 struct server_id server_id,
296 void winbind_msg_offline(struct messaging_context *msg_ctx,
299 struct server_id server_id,
301 void winbind_msg_online(struct messaging_context *msg_ctx,
304 struct server_id server_id,
306 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
309 struct server_id server_id,
311 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
314 struct server_id server_id,
316 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
319 struct server_id server_id,
321 bool winbindd_reinit_after_fork(const char *logfilename);
322 struct winbindd_domain *wb_child_domain(void);
324 /* The following definitions come from winbindd/winbindd_group.c */
326 void winbindd_getgrnam(struct winbindd_cli_state *state);
327 void winbindd_getgrgid(struct winbindd_cli_state *state);
328 void winbindd_setgrent(struct winbindd_cli_state *state);
329 void winbindd_endgrent(struct winbindd_cli_state *state);
330 void winbindd_getgrent(struct winbindd_cli_state *state);
331 void winbindd_list_groups(struct winbindd_cli_state *state);
332 void winbindd_getgroups(struct winbindd_cli_state *state);
333 void winbindd_getusersids(struct winbindd_cli_state *state);
334 void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
335 void winbindd_getsidaliases(struct winbindd_cli_state *state);
336 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
337 const char *dom_name, const char *gr_name, gid_t unix_gid);
338 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
340 int *num_members, char **result);
343 /* The following definitions come from winbindd/winbindd_idmap.c */
345 void init_idmap_child(void);
346 struct winbindd_child *idmap_child(void);
348 /* The following definitions come from winbindd/winbindd_locator.c */
350 void init_locator_child(void);
351 struct winbindd_child *locator_child(void);
353 /* The following definitions come from winbindd/winbindd_misc.c */
355 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
356 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
357 struct winbindd_cli_state *state);
358 void winbindd_show_sequence(struct winbindd_cli_state *state);
359 enum winbindd_result winbindd_dual_show_sequence(struct winbindd_domain *domain,
360 struct winbindd_cli_state *state);
361 void winbindd_domain_info(struct winbindd_cli_state *state);
362 void winbindd_ping(struct winbindd_cli_state *state);
363 void winbindd_info(struct winbindd_cli_state *state);
364 void winbindd_interface_version(struct winbindd_cli_state *state);
365 void winbindd_domain_name(struct winbindd_cli_state *state);
366 void winbindd_netbios_name(struct winbindd_cli_state *state);
367 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
369 /* The following definitions come from winbindd/winbindd_ndr.c */
371 void ndr_print_winbindd_child(struct ndr_print *ndr,
373 const struct winbindd_child *r);
374 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
376 const struct winbindd_cm_conn *r);
377 void ndr_print_winbindd_methods(struct ndr_print *ndr,
379 const struct winbindd_methods *r);
380 void ndr_print_winbindd_domain(struct ndr_print *ndr,
382 const struct winbindd_domain *r);
384 /* The following definitions come from winbindd/winbindd_pam.c */
386 bool check_request_flags(uint32_t flags);
387 uid_t get_uid_from_request(struct winbindd_request *request);
388 struct winbindd_domain *find_auth_domain(uint8_t flags,
389 const char *domain_name);
390 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
391 struct winbindd_cli_state *state) ;
392 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
393 struct winbindd_cli_state *state) ;
394 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
395 struct winbindd_cli_state *state);
396 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
397 struct winbindd_cli_state *state) ;
398 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
400 /* The following definitions come from winbindd/winbindd_util.c */
402 struct winbindd_domain *domain_list(void);
403 bool domain_is_forest_root(const struct winbindd_domain *domain);
404 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
405 struct timeval now, void *private_data);
406 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
407 struct winbindd_cli_state *state);
408 bool init_domain_list(void);
409 void check_domain_trusted( const char *name, const struct dom_sid *user_sid );
410 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
411 struct winbindd_domain *find_domain_from_name(const char *domain_name);
412 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
413 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
414 struct winbindd_domain *find_our_domain(void);
415 struct winbindd_domain *find_root_domain(void);
416 struct winbindd_domain *find_builtin_domain(void);
417 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
418 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
419 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
420 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
421 char **domain, char **user);
422 void parse_add_domuser(void *buf, char *domuser, int *len);
423 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
424 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
425 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
429 struct winbindd_cli_state *winbindd_client_list(void);
430 void winbindd_add_client(struct winbindd_cli_state *cli);
431 void winbindd_remove_client_from_list(struct winbindd_cli_state *cli);
432 int winbindd_num_clients(void);
433 NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
435 const struct dom_sid *user_sid,
436 uint32 *p_num_groups, struct dom_sid **user_sids);
438 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
439 struct winbindd_domain *domain,
442 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
446 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
447 struct winbindd_domain *domain,
448 const char *name, char **alias);
449 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
450 struct winbindd_domain *domain,
451 const char *alias, char **name);
453 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
454 bool winbindd_internal_child(struct winbindd_child *child);
455 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
456 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
457 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
458 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
459 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
460 bool is_domain_offline(const struct winbindd_domain *domain);
462 /* The following definitions come from winbindd/winbindd_wins.c */
464 void winbindd_wins_byip(struct winbindd_cli_state *state);
465 void winbindd_wins_byname(struct winbindd_cli_state *state);
467 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
468 struct winbindd_cli_state *cli,
469 struct winbindd_request *request);
470 NTSTATUS wb_ping_recv(struct tevent_req *req,
471 struct winbindd_response *resp);
473 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
474 struct winbindd_cli_state *state);
476 struct rpc_pipe_client *wbint_rpccli_create(TALLOC_CTX *mem_ctx,
477 struct winbindd_domain *domain,
478 struct winbindd_child *child);
479 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
480 struct winbindd_cli_state *state);
482 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
483 struct tevent_context *ev,
484 const struct dom_sid *sid);
485 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
486 enum lsa_SidType *type, const char **domain,
489 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
490 struct tevent_context *ev,
491 struct winbindd_cli_state *cli,
492 struct winbindd_request *request);
493 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
494 struct winbindd_response *response);
496 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
497 struct tevent_context *ev,
498 const char *dom_name, const char *name,
500 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
501 enum lsa_SidType *type);
503 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
504 struct tevent_context *ev,
505 struct winbindd_cli_state *cli,
506 struct winbindd_request *request);
507 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
508 struct winbindd_response *response);
510 struct tevent_req *wb_sid2uid_send(TALLOC_CTX *mem_ctx,
511 struct tevent_context *ev,
512 const struct dom_sid *sid);
513 NTSTATUS wb_sid2uid_recv(struct tevent_req *req, uid_t *uid);
515 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
516 struct tevent_context *ev,
517 struct winbindd_cli_state *cli,
518 struct winbindd_request *request);
519 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
520 struct winbindd_response *response);
522 struct tevent_req *wb_sid2gid_send(TALLOC_CTX *mem_ctx,
523 struct tevent_context *ev,
524 const struct dom_sid *sid);
525 NTSTATUS wb_sid2gid_recv(struct tevent_req *req, gid_t *gid);
527 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
528 struct tevent_context *ev,
529 struct winbindd_cli_state *cli,
530 struct winbindd_request *request);
531 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
532 struct winbindd_response *response);
534 struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
535 struct tevent_context *ev,
537 NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
539 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
540 struct tevent_context *ev,
541 struct winbindd_cli_state *cli,
542 struct winbindd_request *request);
543 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
544 struct winbindd_response *response);
546 struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
547 struct tevent_context *ev,
549 NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
551 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
552 struct tevent_context *ev,
553 struct winbindd_cli_state *cli,
554 struct winbindd_request *request);
555 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
556 struct winbindd_response *response);
558 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
559 struct tevent_context *ev,
560 struct winbindd_cli_state *cli,
561 struct winbindd_request *request);
562 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
563 struct winbindd_response *response);
565 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
566 struct tevent_context *ev,
567 struct winbindd_cli_state *cli,
568 struct winbindd_request *request);
569 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
570 struct winbindd_response *response);
572 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
573 struct tevent_context *ev,
574 const struct dom_sid *user_sid);
575 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
576 struct wbint_userinfo **pinfo);
578 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
579 struct tevent_context *ev,
580 const struct dom_sid *user_sid,
581 struct winbindd_pw *pw);
582 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
584 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
585 struct tevent_context *ev,
586 struct winbindd_cli_state *cli,
587 struct winbindd_request *request);
588 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
589 struct winbindd_response *response);
591 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
592 struct tevent_context *ev,
593 struct winbindd_cli_state *cli,
594 struct winbindd_request *request);
595 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
596 struct winbindd_response *response);
598 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
599 struct tevent_context *ev,
600 struct winbindd_cli_state *cli,
601 struct winbindd_request *request);
602 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
603 struct winbindd_response *response);
604 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
605 struct tevent_context *ev,
606 struct winbindd_domain *domain,
608 const struct dom_sid *sids);
609 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
610 uint32_t *num_aliases, uint32_t **aliases);
611 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
612 struct tevent_context *ev,
613 struct winbindd_cli_state *cli,
614 struct winbindd_request *request);
615 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
616 struct winbindd_response *response);
617 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
618 struct tevent_context *ev,
619 struct winbindd_domain *domain,
620 const struct dom_sid *sid);
621 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
622 int *num_sids, struct dom_sid **sids);
624 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
625 struct tevent_context *ev,
626 struct winbindd_cli_state *cli,
627 struct winbindd_request *request);
628 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
629 struct winbindd_response *response);
630 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
631 struct tevent_context *ev,
632 const struct dom_sid *sid);
633 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
634 int *num_sids, struct dom_sid **sids);
635 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
636 struct tevent_context *ev,
637 struct winbindd_cli_state *cli,
638 struct winbindd_request *request);
639 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
640 struct winbindd_response *response);
642 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
643 struct tevent_context *ev,
644 struct winbindd_domain *domain);
645 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
647 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
648 struct tevent_context *ev);
649 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
650 int *num_domains, struct winbindd_domain ***domains,
651 NTSTATUS **stati, uint32_t **seqnums);
653 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
654 struct tevent_context *ev,
655 struct winbindd_cli_state *cli,
656 struct winbindd_request *request);
657 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
658 struct winbindd_response *response);
660 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
661 struct tevent_context *ev,
662 const struct dom_sid *sid,
663 enum lsa_SidType type,
665 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
666 struct talloc_dict **members);
668 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
669 struct tevent_context *ev,
670 const struct dom_sid *group_sid,
672 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
673 const char **domname, const char **name, gid_t *gid,
674 struct talloc_dict **members);
676 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
677 struct tevent_context *ev,
678 struct winbindd_cli_state *cli,
679 struct winbindd_request *request);
680 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
681 struct winbindd_response *response);
683 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
684 struct tevent_context *ev,
685 struct winbindd_cli_state *cli,
686 struct winbindd_request *request);
687 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
688 struct winbindd_response *response);
690 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
691 struct tevent_context *ev,
692 struct winbindd_cli_state *cli,
693 struct winbindd_request *request);
694 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
695 struct winbindd_response *response);
697 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
698 struct tevent_context *ev,
699 struct winbindd_cli_state *cli,
700 struct winbindd_request *request);
701 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
702 struct winbindd_response *response);
704 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
705 struct tevent_context *ev,
706 struct winbindd_domain *domain);
707 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
709 struct wbint_userinfo **users);
711 struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
712 struct tevent_context *ev,
713 struct wbint_userinfo *info,
714 struct winbindd_pw *pw);
715 NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
717 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
718 struct tevent_context *ev,
719 struct getpwent_state *gstate,
720 struct winbindd_pw *pw);
721 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
723 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
724 struct tevent_context *ev,
725 struct winbindd_cli_state *cli,
726 struct winbindd_request *request);
727 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
728 struct winbindd_response *presp);
730 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
731 struct tevent_context *ev,
732 struct winbindd_cli_state *cli,
733 struct winbindd_request *request);
734 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
735 struct winbindd_response *response);
737 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
738 struct tevent_context *ev,
739 struct winbindd_cli_state *cli,
740 struct winbindd_request *request);
741 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
742 struct winbindd_response *response);
744 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
745 struct tevent_context *ev,
746 struct winbindd_cli_state *cli,
747 struct winbindd_request *request);
748 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
749 struct winbindd_response *response);
751 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
752 struct tevent_context *ev,
753 const char *domain_name,
754 const struct GUID *domain_guid,
755 const char *site_name,
757 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
758 struct netr_DsRGetDCNameInfo **pdcinfo);
760 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
761 struct tevent_context *ev,
762 struct winbindd_cli_state *cli,
763 struct winbindd_request *request);
764 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
765 struct winbindd_response *response);
767 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
768 struct tevent_context *ev,
770 struct getgrent_state *gstate,
771 struct winbindd_gr *gr);
772 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
773 struct talloc_dict **members);
775 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
776 struct tevent_context *ev,
777 struct winbindd_cli_state *cli,
778 struct winbindd_request *request);
779 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
780 struct winbindd_response *response);
781 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
782 struct tevent_context *ev,
783 struct winbindd_cli_state *cli,
784 struct winbindd_request *request);
785 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
786 struct winbindd_response *response);
787 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
788 struct tevent_context *ev,
789 struct winbindd_cli_state *cli,
790 struct winbindd_request *request);
791 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
792 struct winbindd_response *response);
794 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
795 struct tevent_context *ev,
796 struct winbindd_cli_state *cli,
797 struct winbindd_request *request);
798 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
799 struct winbindd_response *response);
801 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
802 struct tevent_context *ev,
803 struct winbindd_cli_state *cli,
804 struct winbindd_request *request);
805 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
806 struct winbindd_response *response);
808 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
809 struct tevent_context *ev,
810 struct winbindd_cli_state *cli,
811 struct winbindd_request *request);
812 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
813 struct winbindd_response *presp);
815 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
816 struct tevent_context *ev,
817 struct winbindd_cli_state *cli,
818 struct winbindd_request *request);
819 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
820 struct winbindd_response *presp);
822 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
823 struct tevent_context *ev,
824 struct winbindd_cli_state *cli,
825 struct winbindd_request *request);
826 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
827 struct winbindd_response *presp);
829 struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
830 struct tevent_context *ev,
831 struct winbindd_cli_state *cli,
832 struct winbindd_request *request);
833 NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
834 struct winbindd_response *response);
836 struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
837 struct tevent_context *ev,
838 struct winbindd_cli_state *cli,
839 struct winbindd_request *request);
840 NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
841 struct winbindd_response *response);
843 struct tevent_req *winbindd_set_hwm_send(TALLOC_CTX *mem_ctx,
844 struct tevent_context *ev,
845 struct winbindd_cli_state *cli,
846 struct winbindd_request *request);
847 NTSTATUS winbindd_set_hwm_recv(struct tevent_req *req,
848 struct winbindd_response *response);
850 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
851 struct tevent_context *ev,
852 struct winbindd_cli_state *cli,
853 struct winbindd_request *request);
854 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
855 struct winbindd_response *response);
857 struct tevent_req *winbindd_pam_auth_crap_send(
859 struct tevent_context *ev,
860 struct winbindd_cli_state *cli,
861 struct winbindd_request *request);
862 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
863 struct winbindd_response *response);
865 struct tevent_req *winbindd_pam_chauthtok_send(
867 struct tevent_context *ev,
868 struct winbindd_cli_state *cli,
869 struct winbindd_request *request);
870 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
871 struct winbindd_response *response);
873 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
874 struct tevent_context *ev,
875 struct winbindd_cli_state *cli,
876 struct winbindd_request *request);
877 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
878 struct winbindd_response *response);
880 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
882 struct tevent_context *ev,
883 struct winbindd_cli_state *cli,
884 struct winbindd_request *request);
885 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
886 struct tevent_req *req,
887 struct winbindd_response *response);
889 #endif /* _WINBINDD_PROTO_H_ */