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_
28 /* The following definitions come from winbindd/winbindd.c */
29 struct messaging_context
*winbind_messaging_context(void);
30 struct imessaging_context
*winbind_imessaging_context(void);
31 void request_error(struct winbindd_cli_state
*state
);
32 void request_ok(struct winbindd_cli_state
*state
);
33 bool winbindd_setup_sig_term_handler(bool parent
);
34 bool winbindd_setup_stdin_handler(bool parent
, bool foreground
);
35 bool winbindd_setup_sig_hup_handler(const char *lfile
);
36 bool winbindd_use_idmap_cache(void);
37 bool winbindd_use_cache(void);
38 char *get_winbind_priv_pipe_dir(void);
39 struct tevent_context
*winbind_event_context(void);
41 /* The following definitions come from winbindd/winbindd_ads.c */
43 /* The following definitions come from winbindd/winbindd_rpc.c */
45 NTSTATUS
winbindd_lookup_sids(TALLOC_CTX
*mem_ctx
,
46 struct winbindd_domain
*domain
,
48 const struct dom_sid
*sids
,
51 enum lsa_SidType
**types
);
52 NTSTATUS
rpc_lookup_sids(TALLOC_CTX
*mem_ctx
,
53 struct winbindd_domain
*domain
,
54 struct lsa_SidArray
*sids
,
55 struct lsa_RefDomainList
**pdomains
,
56 struct lsa_TransNameArray
**pnames
);
58 /* The following definitions come from winbindd/winbindd_cache.c */
60 NTSTATUS
wcache_cached_creds_exist(struct winbindd_domain
*domain
, const struct dom_sid
*sid
);
61 NTSTATUS
wcache_get_creds(struct winbindd_domain
*domain
,
63 const struct dom_sid
*sid
,
64 const uint8_t **cached_nt_pass
,
65 const uint8_t **cached_salt
);
66 NTSTATUS
wcache_save_creds(struct winbindd_domain
*domain
,
67 const struct dom_sid
*sid
,
68 const uint8_t nt_pass
[NT_HASH_LEN
]);
69 void wcache_invalidate_samlogon(struct winbindd_domain
*domain
,
70 const struct dom_sid
*user_sid
);
71 bool wcache_invalidate_cache(void);
72 bool wcache_invalidate_cache_noinit(void);
73 bool init_wcache(void);
74 bool initialize_winbindd_cache(void);
75 void close_winbindd_cache(void);
76 NTSTATUS
wcache_lookup_groupmem(struct winbindd_domain
*domain
,
78 const struct dom_sid
*group_sid
,
80 struct dom_sid
**sid_mem
, char ***names
,
81 uint32_t **name_types
);
82 bool lookup_cached_sid(TALLOC_CTX
*mem_ctx
, const struct dom_sid
*sid
,
83 char **domain_name
, char **name
,
84 enum lsa_SidType
*type
);
85 bool lookup_cached_name(const char *domain_name
,
88 enum lsa_SidType
*type
);
89 void cache_name2sid(struct winbindd_domain
*domain
,
90 const char *domain_name
, const char *name
,
91 enum lsa_SidType type
, const struct dom_sid
*sid
);
92 NTSTATUS
wcache_name_to_sid(struct winbindd_domain
*domain
,
93 const char *domain_name
,
96 enum lsa_SidType
*type
);
97 NTSTATUS
wcache_query_user(struct winbindd_domain
*domain
,
99 const struct dom_sid
*user_sid
,
100 struct wbint_userinfo
*info
);
101 NTSTATUS
wcache_query_user_fullname(struct winbindd_domain
*domain
,
103 const struct dom_sid
*user_sid
,
104 const char **full_name
);
105 NTSTATUS
wcache_lookup_useraliases(struct winbindd_domain
*domain
,
107 uint32_t num_sids
, const struct dom_sid
*sids
,
108 uint32_t *pnum_aliases
, uint32_t **paliases
);
109 NTSTATUS
wcache_lookup_usergroups(struct winbindd_domain
*domain
,
111 const struct dom_sid
*user_sid
,
113 struct dom_sid
**psids
);
115 void wcache_flush_cache(void);
116 NTSTATUS
wcache_count_cached_creds(struct winbindd_domain
*domain
, int *count
);
117 NTSTATUS
wcache_remove_oldest_cached_creds(struct winbindd_domain
*domain
, const struct dom_sid
*sid
) ;
118 bool set_global_winbindd_state_offline(void);
119 void set_global_winbindd_state_online(void);
120 bool get_global_winbindd_state_offline(void);
121 int winbindd_validate_cache(void);
122 int winbindd_validate_cache_nobackup(void);
123 bool winbindd_cache_validate_and_initialize(void);
124 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain
**domains
, size_t *num_domains
);
125 bool wcache_tdc_add_domain( struct winbindd_domain
*domain
);
126 struct winbindd_tdc_domain
* wcache_tdc_fetch_domain( TALLOC_CTX
*ctx
, const char *name
);
127 struct winbindd_tdc_domain
* wcache_tdc_fetch_domainbysid(TALLOC_CTX
*ctx
, const struct dom_sid
*sid
);
128 void wcache_tdc_clear( void );
131 NTSTATUS
nss_get_info_cached( struct winbindd_domain
*domain
,
132 const struct dom_sid
*user_sid
,
134 const char **homedir
, const char **shell
,
135 const char **gecos
, gid_t
*p_gid
);
137 bool wcache_store_seqnum(const char *domain_name
, uint32_t seqnum
,
138 time_t last_seq_check
);
139 bool wcache_fetch_ndr(TALLOC_CTX
*mem_ctx
, struct winbindd_domain
*domain
,
140 uint32_t opnum
, const DATA_BLOB
*req
, DATA_BLOB
*resp
);
141 void wcache_store_ndr(struct winbindd_domain
*domain
, uint32_t opnum
,
142 const DATA_BLOB
*req
, const DATA_BLOB
*resp
);
144 /* The following definitions come from winbindd/winbindd_ccache_access.c */
146 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state
*state
);
147 enum winbindd_result
winbindd_dual_ccache_ntlm_auth(struct winbindd_domain
*domain
,
148 struct winbindd_cli_state
*state
);
149 void winbindd_ccache_save(struct winbindd_cli_state
*state
);
151 /* The following definitions come from winbindd/winbindd_cm.c */
152 void winbind_msg_domain_offline(struct messaging_context
*msg_ctx
,
155 struct server_id server_id
,
157 void winbind_msg_domain_online(struct messaging_context
*msg_ctx
,
160 struct server_id server_id
,
163 void set_domain_offline(struct winbindd_domain
*domain
);
164 void set_domain_online_request(struct winbindd_domain
*domain
);
166 struct ndr_interface_table
;
167 NTSTATUS
wb_open_internal_pipe(TALLOC_CTX
*mem_ctx
,
168 const struct ndr_interface_table
*table
,
169 struct rpc_pipe_client
**ret_pipe
);
170 void invalidate_cm_connection(struct winbindd_domain
*domain
);
171 void close_conns_after_fork(void);
172 NTSTATUS
init_dc_connection(struct winbindd_domain
*domain
, bool need_rw_dc
);
173 NTSTATUS
cm_connect_sam(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
175 struct rpc_pipe_client
**cli
, struct policy_handle
*sam_handle
);
176 NTSTATUS
cm_connect_lsa(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
177 struct rpc_pipe_client
**cli
, struct policy_handle
*lsa_policy
);
178 NTSTATUS
cm_connect_lsat(struct winbindd_domain
*domain
,
180 struct rpc_pipe_client
**cli
,
181 struct policy_handle
*lsa_policy
);
182 NTSTATUS
cm_connect_netlogon(struct winbindd_domain
*domain
,
183 struct rpc_pipe_client
**cli
);
184 bool fetch_current_dc_from_gencache(TALLOC_CTX
*mem_ctx
,
185 const char *domain_name
,
186 char **p_dc_name
, char **p_dc_ip
);
188 /* The following definitions come from winbindd/winbindd_cred_cache.c */
190 bool ccache_entry_exists(const char *username
);
191 bool ccache_entry_identical(const char *username
,
194 void ccache_remove_all_after_fork(void);
195 void ccache_regain_all_now(void);
196 NTSTATUS
add_ccache_to_list(const char *princ_name
,
199 const char *username
,
200 const char *password
,
206 bool postponed_request
);
207 NTSTATUS
remove_ccache(const char *username
);
208 struct WINBINDD_MEMORY_CREDS
*find_memory_creds_by_name(const char *username
);
209 NTSTATUS
winbindd_add_memory_creds(const char *username
,
212 NTSTATUS
winbindd_delete_memory_creds(const char *username
);
213 NTSTATUS
winbindd_replace_memory_creds(const char *username
,
216 /* The following definitions come from winbindd/winbindd_creds.c */
218 NTSTATUS
winbindd_get_creds(struct winbindd_domain
*domain
,
220 const struct dom_sid
*sid
,
221 struct netr_SamInfo3
**info3
,
222 const uint8_t *cached_nt_pass
[NT_HASH_LEN
],
223 const uint8_t *cred_salt
[NT_HASH_LEN
]);
224 NTSTATUS
winbindd_store_creds(struct winbindd_domain
*domain
,
227 struct netr_SamInfo3
*info3
);
228 NTSTATUS
winbindd_update_creds_by_info3(struct winbindd_domain
*domain
,
231 struct netr_SamInfo3
*info3
);
232 NTSTATUS
winbindd_update_creds_by_name(struct winbindd_domain
*domain
,
236 /* The following definitions come from winbindd/winbindd_domain.c */
238 void setup_domain_child(struct winbindd_domain
*domain
);
240 /* The following definitions come from winbindd/winbindd_dual.c */
242 struct dcerpc_binding_handle
*dom_child_handle(struct winbindd_domain
*domain
);
243 struct winbindd_child
*choose_domain_child(struct winbindd_domain
*domain
);
245 struct tevent_req
*wb_child_request_send(TALLOC_CTX
*mem_ctx
,
246 struct tevent_context
*ev
,
247 struct winbindd_child
*child
,
248 struct winbindd_request
*request
);
249 int wb_child_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
250 struct winbindd_response
**presponse
, int *err
);
251 struct tevent_req
*wb_domain_request_send(TALLOC_CTX
*mem_ctx
,
252 struct tevent_context
*ev
,
253 struct winbindd_domain
*domain
,
254 struct winbindd_request
*request
);
255 int wb_domain_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
256 struct winbindd_response
**presponse
, int *err
);
258 void setup_child(struct winbindd_domain
*domain
, struct winbindd_child
*child
,
259 const struct winbindd_child_dispatch_table
*table
,
260 const char *logprefix
,
261 const char *logname
);
262 void winbind_child_died(pid_t pid
);
263 void winbindd_flush_negative_conn_cache(struct winbindd_domain
*domain
);
264 void winbind_msg_debug(struct messaging_context
*msg_ctx
,
267 struct server_id server_id
,
269 void winbind_msg_offline(struct messaging_context
*msg_ctx
,
272 struct server_id server_id
,
274 void winbind_msg_online(struct messaging_context
*msg_ctx
,
277 struct server_id server_id
,
279 void winbind_msg_onlinestatus(struct messaging_context
*msg_ctx
,
282 struct server_id server_id
,
284 void winbind_msg_dump_event_list(struct messaging_context
*msg_ctx
,
287 struct server_id server_id
,
289 void winbind_msg_dump_domain_list(struct messaging_context
*msg_ctx
,
292 struct server_id server_id
,
294 void winbind_msg_ip_dropped(struct messaging_context
*msg_ctx
,
297 struct server_id server_id
,
299 void winbind_msg_ip_dropped_parent(struct messaging_context
*msg_ctx
,
302 struct server_id server_id
,
304 NTSTATUS
winbindd_reinit_after_fork(const struct winbindd_child
*myself
,
305 const char *logfilename
);
306 struct winbindd_domain
*wb_child_domain(void);
308 /* The following definitions come from winbindd/winbindd_group.c */
309 bool fill_grent(TALLOC_CTX
*mem_ctx
, struct winbindd_gr
*gr
,
310 const char *dom_name
, const char *gr_name
, gid_t unix_gid
);
311 NTSTATUS
winbindd_print_groupmembers(struct talloc_dict
*members
,
313 int *num_members
, char **result
);
316 /* The following definitions come from winbindd/winbindd_idmap.c */
318 void init_idmap_child(void);
319 struct winbindd_child
*idmap_child(void);
320 struct idmap_domain
*idmap_find_domain_with_sid(const char *domname
,
321 const struct dom_sid
*sid
);
322 bool domain_has_idmap_config(const char *domname
);
323 bool lp_scan_idmap_domains(bool (*fn
)(const char *domname
,
327 /* The following definitions come from winbindd/winbindd_locator.c */
329 void init_locator_child(void);
330 struct winbindd_child
*locator_child(void);
332 /* The following definitions come from winbindd/winbindd_misc.c */
334 void winbindd_list_trusted_domains(struct winbindd_cli_state
*state
);
335 enum winbindd_result
winbindd_dual_list_trusted_domains(struct winbindd_domain
*domain
,
336 struct winbindd_cli_state
*state
);
337 void winbindd_show_sequence(struct winbindd_cli_state
*state
);
338 void winbindd_domain_info(struct winbindd_cli_state
*state
);
339 void winbindd_dc_info(struct winbindd_cli_state
*state
);
340 void winbindd_ping(struct winbindd_cli_state
*state
);
341 void winbindd_info(struct winbindd_cli_state
*state
);
342 void winbindd_interface_version(struct winbindd_cli_state
*state
);
343 void winbindd_domain_name(struct winbindd_cli_state
*state
);
344 void winbindd_netbios_name(struct winbindd_cli_state
*state
);
345 void winbindd_priv_pipe_dir(struct winbindd_cli_state
*state
);
347 /* The following definitions come from winbindd/winbindd_ndr.c */
349 void ndr_print_winbindd_child(struct ndr_print
*ndr
,
351 const struct winbindd_child
*r
);
352 void ndr_print_winbindd_cm_conn(struct ndr_print
*ndr
,
354 const struct winbindd_cm_conn
*r
);
355 void ndr_print_winbindd_methods(struct ndr_print
*ndr
,
357 const struct winbindd_methods
*r
);
358 void ndr_print_winbindd_domain(struct ndr_print
*ndr
,
360 const struct winbindd_domain
*r
);
362 /* The following definitions come from winbindd/winbindd_pam.c */
364 bool check_request_flags(uint32_t flags
);
365 NTSTATUS
append_auth_data(TALLOC_CTX
*mem_ctx
,
366 struct winbindd_response
*resp
,
367 uint32_t request_flags
,
368 struct netr_SamInfo3
*info3
,
369 const char *name_domain
,
370 const char *name_user
);
371 uid_t
get_uid_from_request(struct winbindd_request
*request
);
372 struct winbindd_domain
*find_auth_domain(uint8_t flags
,
373 const char *domain_name
);
374 enum winbindd_result
winbindd_dual_pam_auth(struct winbindd_domain
*domain
,
375 struct winbindd_cli_state
*state
) ;
376 enum winbindd_result
winbindd_dual_pam_auth_crap(struct winbindd_domain
*domain
,
377 struct winbindd_cli_state
*state
) ;
378 enum winbindd_result
winbindd_dual_pam_chauthtok(struct winbindd_domain
*contact_domain
,
379 struct winbindd_cli_state
*state
);
380 enum winbindd_result
winbindd_dual_pam_logoff(struct winbindd_domain
*domain
,
381 struct winbindd_cli_state
*state
) ;
382 enum winbindd_result
winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain
*domainSt
, struct winbindd_cli_state
*state
);
383 NTSTATUS
winbindd_pam_auth_pac_send(struct winbindd_cli_state
*state
,
384 struct netr_SamInfo3
**info3
);
386 NTSTATUS
winbind_dual_SamLogon(struct winbindd_domain
*domain
,
388 uint32_t logon_parameters
,
389 const char *name_user
,
390 const char *name_domain
,
391 const char *workstation
,
392 const uint8_t chal
[8],
393 DATA_BLOB lm_response
,
394 DATA_BLOB nt_response
,
395 struct netr_SamInfo3
**info3
);
397 /* The following definitions come from winbindd/winbindd_util.c */
399 struct winbindd_domain
*domain_list(void);
400 struct winbindd_domain
*wb_next_domain(struct winbindd_domain
*domain
);
401 bool domain_is_forest_root(const struct winbindd_domain
*domain
);
402 void rescan_trusted_domains(struct tevent_context
*ev
, struct tevent_timer
*te
,
403 struct timeval now
, void *private_data
);
404 enum winbindd_result
winbindd_dual_init_connection(struct winbindd_domain
*domain
,
405 struct winbindd_cli_state
*state
);
406 bool init_domain_list(void);
407 struct winbindd_domain
*find_domain_from_name_noinit(const char *domain_name
);
408 struct winbindd_domain
*find_domain_from_name(const char *domain_name
);
409 struct winbindd_domain
*find_domain_from_sid_noinit(const struct dom_sid
*sid
);
410 struct winbindd_domain
*find_domain_from_sid(const struct dom_sid
*sid
);
411 struct winbindd_domain
*find_our_domain(void);
412 struct winbindd_domain
*find_root_domain(void);
413 struct winbindd_domain
*find_builtin_domain(void);
414 struct winbindd_domain
*find_lookup_domain_from_sid(const struct dom_sid
*sid
);
415 struct winbindd_domain
*find_lookup_domain_from_name(const char *domain_name
);
416 bool parse_domain_user(const char *domuser
, fstring domain
, fstring user
);
417 bool parse_domain_user_talloc(TALLOC_CTX
*mem_ctx
, const char *domuser
,
418 char **domain
, char **user
);
419 bool canonicalize_username(fstring username_inout
, fstring domain
, fstring user
);
420 void fill_domain_username(fstring name
, const char *domain
, const char *user
, bool can_assume
);
421 char *fill_domain_username_talloc(TALLOC_CTX
*ctx
,
425 struct winbindd_cli_state
*winbindd_client_list(void);
426 struct winbindd_cli_state
*winbindd_client_list_tail(void);
427 struct winbindd_cli_state
*
428 winbindd_client_list_prev(struct winbindd_cli_state
*cli
);
429 void winbindd_add_client(struct winbindd_cli_state
*cli
);
430 void winbindd_remove_client(struct winbindd_cli_state
*cli
);
431 void winbindd_promote_client(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_t *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
);
461 bool is_domain_online(const struct winbindd_domain
*domain
);
462 bool parse_sidlist(TALLOC_CTX
*mem_ctx
, const char *sidstr
,
463 struct dom_sid
**sids
, uint32_t *num_sids
);
464 bool parse_xidlist(TALLOC_CTX
*mem_ctx
, const char *xidstr
,
465 struct unixid
**pxids
, uint32_t *pnum_xids
);
467 /* The following definitions come from winbindd/winbindd_wins.c */
469 void winbindd_wins_byname(struct winbindd_cli_state
*state
);
471 struct tevent_req
*wb_ping_send(TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
472 struct winbindd_cli_state
*cli
,
473 struct winbindd_request
*request
);
474 NTSTATUS
wb_ping_recv(struct tevent_req
*req
,
475 struct winbindd_response
*resp
);
477 enum winbindd_result
winbindd_dual_ping(struct winbindd_domain
*domain
,
478 struct winbindd_cli_state
*state
);
480 struct dcerpc_binding_handle
*wbint_binding_handle(TALLOC_CTX
*mem_ctx
,
481 struct winbindd_domain
*domain
,
482 struct winbindd_child
*child
);
483 enum winbindd_result
winbindd_dual_ndrcmd(struct winbindd_domain
*domain
,
484 struct winbindd_cli_state
*state
);
486 struct tevent_req
*wb_lookupsid_send(TALLOC_CTX
*mem_ctx
,
487 struct tevent_context
*ev
,
488 const struct dom_sid
*sid
);
489 NTSTATUS
wb_lookupsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
490 enum lsa_SidType
*type
, const char **domain
,
493 struct tevent_req
*winbindd_lookupsid_send(TALLOC_CTX
*mem_ctx
,
494 struct tevent_context
*ev
,
495 struct winbindd_cli_state
*cli
,
496 struct winbindd_request
*request
);
497 NTSTATUS
winbindd_lookupsid_recv(struct tevent_req
*req
,
498 struct winbindd_response
*response
);
500 struct tevent_req
*winbindd_lookupsids_send(TALLOC_CTX
*mem_ctx
,
501 struct tevent_context
*ev
,
502 struct winbindd_cli_state
*cli
,
503 struct winbindd_request
*request
);
504 NTSTATUS
winbindd_lookupsids_recv(struct tevent_req
*req
,
505 struct winbindd_response
*response
);
507 struct tevent_req
*wb_lookupname_send(TALLOC_CTX
*mem_ctx
,
508 struct tevent_context
*ev
,
509 const char *dom_name
, const char *name
,
511 NTSTATUS
wb_lookupname_recv(struct tevent_req
*req
, struct dom_sid
*sid
,
512 enum lsa_SidType
*type
);
514 struct tevent_req
*winbindd_lookupname_send(TALLOC_CTX
*mem_ctx
,
515 struct tevent_context
*ev
,
516 struct winbindd_cli_state
*cli
,
517 struct winbindd_request
*request
);
518 NTSTATUS
winbindd_lookupname_recv(struct tevent_req
*req
,
519 struct winbindd_response
*response
);
521 struct tevent_req
*winbindd_sid_to_uid_send(TALLOC_CTX
*mem_ctx
,
522 struct tevent_context
*ev
,
523 struct winbindd_cli_state
*cli
,
524 struct winbindd_request
*request
);
525 NTSTATUS
winbindd_sid_to_uid_recv(struct tevent_req
*req
,
526 struct winbindd_response
*response
);
528 struct tevent_req
*winbindd_sid_to_gid_send(TALLOC_CTX
*mem_ctx
,
529 struct tevent_context
*ev
,
530 struct winbindd_cli_state
*cli
,
531 struct winbindd_request
*request
);
532 NTSTATUS
winbindd_sid_to_gid_recv(struct tevent_req
*req
,
533 struct winbindd_response
*response
);
535 struct tevent_req
*winbindd_uid_to_sid_send(TALLOC_CTX
*mem_ctx
,
536 struct tevent_context
*ev
,
537 struct winbindd_cli_state
*cli
,
538 struct winbindd_request
*request
);
539 NTSTATUS
winbindd_uid_to_sid_recv(struct tevent_req
*req
,
540 struct winbindd_response
*response
);
542 struct tevent_req
*winbindd_gid_to_sid_send(TALLOC_CTX
*mem_ctx
,
543 struct tevent_context
*ev
,
544 struct winbindd_cli_state
*cli
,
545 struct winbindd_request
*request
);
546 NTSTATUS
winbindd_gid_to_sid_recv(struct tevent_req
*req
,
547 struct winbindd_response
*response
);
549 struct tevent_req
*winbindd_allocate_uid_send(TALLOC_CTX
*mem_ctx
,
550 struct tevent_context
*ev
,
551 struct winbindd_cli_state
*cli
,
552 struct winbindd_request
*request
);
553 NTSTATUS
winbindd_allocate_uid_recv(struct tevent_req
*req
,
554 struct winbindd_response
*response
);
556 struct tevent_req
*winbindd_allocate_gid_send(TALLOC_CTX
*mem_ctx
,
557 struct tevent_context
*ev
,
558 struct winbindd_cli_state
*cli
,
559 struct winbindd_request
*request
);
560 NTSTATUS
winbindd_allocate_gid_recv(struct tevent_req
*req
,
561 struct winbindd_response
*response
);
563 struct tevent_req
*wb_queryuser_send(TALLOC_CTX
*mem_ctx
,
564 struct tevent_context
*ev
,
565 const struct dom_sid
*user_sid
);
566 NTSTATUS
wb_queryuser_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
567 struct wbint_userinfo
**pinfo
);
569 struct tevent_req
*wb_getpwsid_send(TALLOC_CTX
*mem_ctx
,
570 struct tevent_context
*ev
,
571 const struct dom_sid
*user_sid
,
572 struct winbindd_pw
*pw
);
573 NTSTATUS
wb_getpwsid_recv(struct tevent_req
*req
);
575 struct tevent_req
*winbindd_getpwsid_send(TALLOC_CTX
*mem_ctx
,
576 struct tevent_context
*ev
,
577 struct winbindd_cli_state
*cli
,
578 struct winbindd_request
*request
);
579 NTSTATUS
winbindd_getpwsid_recv(struct tevent_req
*req
,
580 struct winbindd_response
*response
);
582 struct tevent_req
*winbindd_getpwnam_send(TALLOC_CTX
*mem_ctx
,
583 struct tevent_context
*ev
,
584 struct winbindd_cli_state
*cli
,
585 struct winbindd_request
*request
);
586 NTSTATUS
winbindd_getpwnam_recv(struct tevent_req
*req
,
587 struct winbindd_response
*response
);
589 struct tevent_req
*winbindd_getpwuid_send(TALLOC_CTX
*mem_ctx
,
590 struct tevent_context
*ev
,
591 struct winbindd_cli_state
*cli
,
592 struct winbindd_request
*request
);
593 NTSTATUS
winbindd_getpwuid_recv(struct tevent_req
*req
,
594 struct winbindd_response
*response
);
595 struct tevent_req
*wb_lookupuseraliases_send(TALLOC_CTX
*mem_ctx
,
596 struct tevent_context
*ev
,
597 struct winbindd_domain
*domain
,
599 const struct dom_sid
*sids
);
600 NTSTATUS
wb_lookupuseraliases_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
601 uint32_t *num_aliases
, uint32_t **aliases
);
602 struct tevent_req
*winbindd_getsidaliases_send(TALLOC_CTX
*mem_ctx
,
603 struct tevent_context
*ev
,
604 struct winbindd_cli_state
*cli
,
605 struct winbindd_request
*request
);
606 NTSTATUS
winbindd_getsidaliases_recv(struct tevent_req
*req
,
607 struct winbindd_response
*response
);
608 struct tevent_req
*wb_lookupusergroups_send(TALLOC_CTX
*mem_ctx
,
609 struct tevent_context
*ev
,
610 struct winbindd_domain
*domain
,
611 const struct dom_sid
*sid
);
612 NTSTATUS
wb_lookupusergroups_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
613 int *num_sids
, struct dom_sid
**sids
);
615 struct tevent_req
*winbindd_getuserdomgroups_send(TALLOC_CTX
*mem_ctx
,
616 struct tevent_context
*ev
,
617 struct winbindd_cli_state
*cli
,
618 struct winbindd_request
*request
);
619 NTSTATUS
winbindd_getuserdomgroups_recv(struct tevent_req
*req
,
620 struct winbindd_response
*response
);
621 struct tevent_req
*wb_gettoken_send(TALLOC_CTX
*mem_ctx
,
622 struct tevent_context
*ev
,
623 const struct dom_sid
*sid
);
624 NTSTATUS
wb_gettoken_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
625 int *num_sids
, struct dom_sid
**sids
);
626 struct tevent_req
*winbindd_getgroups_send(TALLOC_CTX
*mem_ctx
,
627 struct tevent_context
*ev
,
628 struct winbindd_cli_state
*cli
,
629 struct winbindd_request
*request
);
630 NTSTATUS
winbindd_getgroups_recv(struct tevent_req
*req
,
631 struct winbindd_response
*response
);
633 struct tevent_req
*wb_seqnum_send(TALLOC_CTX
*mem_ctx
,
634 struct tevent_context
*ev
,
635 struct winbindd_domain
*domain
);
636 NTSTATUS
wb_seqnum_recv(struct tevent_req
*req
, uint32_t *seqnum
);
638 struct tevent_req
*wb_seqnums_send(TALLOC_CTX
*mem_ctx
,
639 struct tevent_context
*ev
);
640 NTSTATUS
wb_seqnums_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
641 int *num_domains
, struct winbindd_domain
***domains
,
642 NTSTATUS
**stati
, uint32_t **seqnums
);
644 struct tevent_req
*winbindd_show_sequence_send(TALLOC_CTX
*mem_ctx
,
645 struct tevent_context
*ev
,
646 struct winbindd_cli_state
*cli
,
647 struct winbindd_request
*request
);
648 NTSTATUS
winbindd_show_sequence_recv(struct tevent_req
*req
,
649 struct winbindd_response
*response
);
651 struct tevent_req
*wb_group_members_send(TALLOC_CTX
*mem_ctx
,
652 struct tevent_context
*ev
,
653 const struct dom_sid
*sid
,
654 enum lsa_SidType type
,
656 NTSTATUS
wb_group_members_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
657 struct talloc_dict
**members
);
658 NTSTATUS
add_wbint_Principal_to_dict(TALLOC_CTX
*mem_ctx
,
661 enum lsa_SidType type
,
662 struct talloc_dict
*dict
);
664 struct tevent_req
*wb_getgrsid_send(TALLOC_CTX
*mem_ctx
,
665 struct tevent_context
*ev
,
666 const struct dom_sid
*group_sid
,
668 NTSTATUS
wb_getgrsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
669 const char **domname
, const char **name
, gid_t
*gid
,
670 struct talloc_dict
**members
);
672 struct tevent_req
*winbindd_getgrgid_send(TALLOC_CTX
*mem_ctx
,
673 struct tevent_context
*ev
,
674 struct winbindd_cli_state
*cli
,
675 struct winbindd_request
*request
);
676 NTSTATUS
winbindd_getgrgid_recv(struct tevent_req
*req
,
677 struct winbindd_response
*response
);
679 struct tevent_req
*winbindd_getgrnam_send(TALLOC_CTX
*mem_ctx
,
680 struct tevent_context
*ev
,
681 struct winbindd_cli_state
*cli
,
682 struct winbindd_request
*request
);
683 NTSTATUS
winbindd_getgrnam_recv(struct tevent_req
*req
,
684 struct winbindd_response
*response
);
686 struct tevent_req
*winbindd_getusersids_send(TALLOC_CTX
*mem_ctx
,
687 struct tevent_context
*ev
,
688 struct winbindd_cli_state
*cli
,
689 struct winbindd_request
*request
);
690 NTSTATUS
winbindd_getusersids_recv(struct tevent_req
*req
,
691 struct winbindd_response
*response
);
693 struct tevent_req
*winbindd_lookuprids_send(TALLOC_CTX
*mem_ctx
,
694 struct tevent_context
*ev
,
695 struct winbindd_cli_state
*cli
,
696 struct winbindd_request
*request
);
697 NTSTATUS
winbindd_lookuprids_recv(struct tevent_req
*req
,
698 struct winbindd_response
*response
);
700 struct tevent_req
*wb_query_user_list_send(TALLOC_CTX
*mem_ctx
,
701 struct tevent_context
*ev
,
702 struct winbindd_domain
*domain
);
703 NTSTATUS
wb_query_user_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
705 struct wbint_userinfo
**users
);
707 struct tevent_req
*wb_query_group_list_send(TALLOC_CTX
*mem_ctx
,
708 struct tevent_context
*ev
,
709 struct winbindd_domain
*domain
);
710 NTSTATUS
wb_query_group_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
712 struct wbint_Principal
**groups
);
715 struct tevent_req
*wb_fill_pwent_send(TALLOC_CTX
*mem_ctx
,
716 struct tevent_context
*ev
,
717 const struct wbint_userinfo
*info
,
718 struct winbindd_pw
*pw
);
719 NTSTATUS
wb_fill_pwent_recv(struct tevent_req
*req
);
721 struct tevent_req
*wb_next_pwent_send(TALLOC_CTX
*mem_ctx
,
722 struct tevent_context
*ev
,
723 struct getpwent_state
*gstate
,
724 struct winbindd_pw
*pw
);
725 NTSTATUS
wb_next_pwent_recv(struct tevent_req
*req
);
727 struct tevent_req
*winbindd_setpwent_send(TALLOC_CTX
*mem_ctx
,
728 struct tevent_context
*ev
,
729 struct winbindd_cli_state
*cli
,
730 struct winbindd_request
*request
);
731 NTSTATUS
winbindd_setpwent_recv(struct tevent_req
*req
,
732 struct winbindd_response
*presp
);
734 struct tevent_req
*winbindd_getpwent_send(TALLOC_CTX
*mem_ctx
,
735 struct tevent_context
*ev
,
736 struct winbindd_cli_state
*cli
,
737 struct winbindd_request
*request
);
738 NTSTATUS
winbindd_getpwent_recv(struct tevent_req
*req
,
739 struct winbindd_response
*response
);
741 struct tevent_req
*winbindd_endpwent_send(TALLOC_CTX
*mem_ctx
,
742 struct tevent_context
*ev
,
743 struct winbindd_cli_state
*cli
,
744 struct winbindd_request
*request
);
745 NTSTATUS
winbindd_endpwent_recv(struct tevent_req
*req
,
746 struct winbindd_response
*response
);
748 struct tevent_req
*winbindd_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
749 struct tevent_context
*ev
,
750 struct winbindd_cli_state
*cli
,
751 struct winbindd_request
*request
);
752 NTSTATUS
winbindd_dsgetdcname_recv(struct tevent_req
*req
,
753 struct winbindd_response
*response
);
755 struct tevent_req
*wb_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
756 struct tevent_context
*ev
,
757 const char *domain_name
,
758 const struct GUID
*domain_guid
,
759 const char *site_name
,
761 NTSTATUS
wb_dsgetdcname_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
762 struct netr_DsRGetDCNameInfo
**pdcinfo
);
763 NTSTATUS
wb_dsgetdcname_gencache_set(const char *domname
,
764 struct netr_DsRGetDCNameInfo
*dcinfo
);
765 NTSTATUS
wb_dsgetdcname_gencache_get(TALLOC_CTX
*mem_ctx
,
767 struct netr_DsRGetDCNameInfo
**dcinfo
);
769 struct tevent_req
*winbindd_getdcname_send(TALLOC_CTX
*mem_ctx
,
770 struct tevent_context
*ev
,
771 struct winbindd_cli_state
*cli
,
772 struct winbindd_request
*request
);
773 NTSTATUS
winbindd_getdcname_recv(struct tevent_req
*req
,
774 struct winbindd_response
*response
);
776 struct tevent_req
*wb_next_grent_send(TALLOC_CTX
*mem_ctx
,
777 struct tevent_context
*ev
,
779 struct getgrent_state
*gstate
,
780 struct winbindd_gr
*gr
);
781 NTSTATUS
wb_next_grent_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
782 struct talloc_dict
**members
);
784 struct tevent_req
*winbindd_setgrent_send(TALLOC_CTX
*mem_ctx
,
785 struct tevent_context
*ev
,
786 struct winbindd_cli_state
*cli
,
787 struct winbindd_request
*request
);
788 NTSTATUS
winbindd_setgrent_recv(struct tevent_req
*req
,
789 struct winbindd_response
*response
);
790 struct tevent_req
*winbindd_getgrent_send(TALLOC_CTX
*mem_ctx
,
791 struct tevent_context
*ev
,
792 struct winbindd_cli_state
*cli
,
793 struct winbindd_request
*request
);
794 NTSTATUS
winbindd_getgrent_recv(struct tevent_req
*req
,
795 struct winbindd_response
*response
);
796 struct tevent_req
*winbindd_endgrent_send(TALLOC_CTX
*mem_ctx
,
797 struct tevent_context
*ev
,
798 struct winbindd_cli_state
*cli
,
799 struct winbindd_request
*request
);
800 NTSTATUS
winbindd_endgrent_recv(struct tevent_req
*req
,
801 struct winbindd_response
*response
);
803 struct tevent_req
*winbindd_list_users_send(TALLOC_CTX
*mem_ctx
,
804 struct tevent_context
*ev
,
805 struct winbindd_cli_state
*cli
,
806 struct winbindd_request
*request
);
807 NTSTATUS
winbindd_list_users_recv(struct tevent_req
*req
,
808 struct winbindd_response
*response
);
810 struct tevent_req
*winbindd_list_groups_send(TALLOC_CTX
*mem_ctx
,
811 struct tevent_context
*ev
,
812 struct winbindd_cli_state
*cli
,
813 struct winbindd_request
*request
);
814 NTSTATUS
winbindd_list_groups_recv(struct tevent_req
*req
,
815 struct winbindd_response
*response
);
817 struct tevent_req
*winbindd_check_machine_acct_send(TALLOC_CTX
*mem_ctx
,
818 struct tevent_context
*ev
,
819 struct winbindd_cli_state
*cli
,
820 struct winbindd_request
*request
);
821 NTSTATUS
winbindd_check_machine_acct_recv(struct tevent_req
*req
,
822 struct winbindd_response
*presp
);
824 struct tevent_req
*winbindd_ping_dc_send(TALLOC_CTX
*mem_ctx
,
825 struct tevent_context
*ev
,
826 struct winbindd_cli_state
*cli
,
827 struct winbindd_request
*request
);
828 NTSTATUS
winbindd_ping_dc_recv(struct tevent_req
*req
,
829 struct winbindd_response
*presp
);
831 struct tevent_req
*winbindd_change_machine_acct_send(TALLOC_CTX
*mem_ctx
,
832 struct tevent_context
*ev
,
833 struct winbindd_cli_state
*cli
,
834 struct winbindd_request
*request
);
835 NTSTATUS
winbindd_change_machine_acct_recv(struct tevent_req
*req
,
836 struct winbindd_response
*presp
);
838 struct tevent_req
*winbindd_pam_auth_send(TALLOC_CTX
*mem_ctx
,
839 struct tevent_context
*ev
,
840 struct winbindd_cli_state
*cli
,
841 struct winbindd_request
*request
);
842 NTSTATUS
winbindd_pam_auth_recv(struct tevent_req
*req
,
843 struct winbindd_response
*response
);
845 struct tevent_req
*winbindd_pam_auth_crap_send(
847 struct tevent_context
*ev
,
848 struct winbindd_cli_state
*cli
,
849 struct winbindd_request
*request
);
850 NTSTATUS
winbindd_pam_auth_crap_recv(struct tevent_req
*req
,
851 struct winbindd_response
*response
);
853 struct tevent_req
*winbindd_pam_chauthtok_send(
855 struct tevent_context
*ev
,
856 struct winbindd_cli_state
*cli
,
857 struct winbindd_request
*request
);
858 NTSTATUS
winbindd_pam_chauthtok_recv(struct tevent_req
*req
,
859 struct winbindd_response
*response
);
861 struct tevent_req
*winbindd_pam_logoff_send(TALLOC_CTX
*mem_ctx
,
862 struct tevent_context
*ev
,
863 struct winbindd_cli_state
*cli
,
864 struct winbindd_request
*request
);
865 NTSTATUS
winbindd_pam_logoff_recv(struct tevent_req
*req
,
866 struct winbindd_response
*response
);
868 struct tevent_req
*winbindd_pam_chng_pswd_auth_crap_send(
870 struct tevent_context
*ev
,
871 struct winbindd_cli_state
*cli
,
872 struct winbindd_request
*request
);
873 NTSTATUS
winbindd_pam_chng_pswd_auth_crap_recv(
874 struct tevent_req
*req
,
875 struct winbindd_response
*response
);
877 struct tevent_req
*wb_lookupsids_send(TALLOC_CTX
*mem_ctx
,
878 struct tevent_context
*ev
,
879 struct dom_sid
*sids
,
881 NTSTATUS
wb_lookupsids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
882 struct lsa_RefDomainList
**domains
,
883 struct lsa_TransNameArray
**names
);
885 struct tevent_req
*wb_sids2xids_send(TALLOC_CTX
*mem_ctx
,
886 struct tevent_context
*ev
,
887 const struct dom_sid
*sids
,
888 const uint32_t num_sids
);
889 NTSTATUS
wb_sids2xids_recv(struct tevent_req
*req
,
890 struct unixid xids
[], uint32_t num_xids
);
891 struct tevent_req
*winbindd_sids_to_xids_send(TALLOC_CTX
*mem_ctx
,
892 struct tevent_context
*ev
,
893 struct winbindd_cli_state
*cli
,
894 struct winbindd_request
*request
);
895 NTSTATUS
winbindd_sids_to_xids_recv(struct tevent_req
*req
,
896 struct winbindd_response
*response
);
897 struct tevent_req
*wb_xids2sids_send(TALLOC_CTX
*mem_ctx
,
898 struct tevent_context
*ev
,
901 NTSTATUS
wb_xids2sids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
902 struct dom_sid
**sids
);
903 struct tevent_req
*winbindd_xids_to_sids_send(TALLOC_CTX
*mem_ctx
,
904 struct tevent_context
*ev
,
905 struct winbindd_cli_state
*cli
,
906 struct winbindd_request
*request
);
907 NTSTATUS
winbindd_xids_to_sids_recv(struct tevent_req
*req
,
908 struct winbindd_response
*response
);
909 struct tevent_req
*winbindd_wins_byip_send(TALLOC_CTX
*mem_ctx
,
910 struct tevent_context
*ev
,
911 struct winbindd_cli_state
*cli
,
912 struct winbindd_request
*request
);
913 NTSTATUS
winbindd_wins_byip_recv(struct tevent_req
*req
,
914 struct winbindd_response
*presp
);
915 struct tevent_req
*winbindd_wins_byname_send(TALLOC_CTX
*mem_ctx
,
916 struct tevent_context
*ev
,
917 struct winbindd_cli_state
*cli
,
918 struct winbindd_request
*request
);
919 NTSTATUS
winbindd_wins_byname_recv(struct tevent_req
*req
,
920 struct winbindd_response
*presp
);
923 /* The following definitions come from winbindd/winbindd_samr.c */
925 NTSTATUS
open_internal_samr_conn(TALLOC_CTX
*mem_ctx
,
926 struct winbindd_domain
*domain
,
927 struct rpc_pipe_client
**samr_pipe
,
928 struct policy_handle
*samr_domain_hnd
);
929 NTSTATUS
open_internal_lsa_conn(TALLOC_CTX
*mem_ctx
,
930 struct rpc_pipe_client
**lsa_pipe
,
931 struct policy_handle
*lsa_hnd
);
933 /* The following definitions come from winbindd/winbindd_ads.c */
934 ADS_STATUS
ads_idmap_cached_connection(ADS_STRUCT
**adsp
, const char *dom_name
);
936 /* The following definitions come from winbindd/winbindd_irpc.c */
937 NTSTATUS
wb_irpc_register(void);
939 /* The following definitions come from winbindd/winbindd_reconnect.c */
940 bool reconnect_need_retry(NTSTATUS status
, struct winbindd_domain
*domain
);
942 #endif /* _WINBINDD_PROTO_H_ */