2 * Unix SMB/CIFS implementation.
3 * collected prototypes header
5 * frozen from "make proto" in May 2008
7 * Copyright (C) Michael Adam 2008
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef _WINBINDD_PROTO_H_
24 #define _WINBINDD_PROTO_H_
26 /* The following definitions come from winbindd/winbindd.c */
27 struct messaging_context
*winbind_messaging_context(void);
28 struct imessaging_context
*winbind_imessaging_context(void);
29 void request_error(struct winbindd_cli_state
*state
);
30 void request_ok(struct winbindd_cli_state
*state
);
31 bool winbindd_setup_sig_term_handler(bool parent
);
32 bool winbindd_setup_stdin_handler(bool parent
, bool foreground
);
33 bool winbindd_setup_sig_hup_handler(const char *lfile
);
34 bool winbindd_use_idmap_cache(void);
35 bool winbindd_use_cache(void);
36 char *get_winbind_priv_pipe_dir(void);
37 struct tevent_context
*winbind_event_context(void);
39 /* The following definitions come from winbindd/winbindd_ads.c */
41 /* The following definitions come from winbindd/winbindd_rpc.c */
43 NTSTATUS
winbindd_lookup_sids(TALLOC_CTX
*mem_ctx
,
44 struct winbindd_domain
*domain
,
46 const struct dom_sid
*sids
,
49 enum lsa_SidType
**types
);
50 NTSTATUS
rpc_lookup_sids(TALLOC_CTX
*mem_ctx
,
51 struct winbindd_domain
*domain
,
52 struct lsa_SidArray
*sids
,
53 struct lsa_RefDomainList
**pdomains
,
54 struct lsa_TransNameArray
**pnames
);
56 /* The following definitions come from winbindd/winbindd_cache.c */
58 NTSTATUS
wb_cache_query_user_list(struct winbindd_domain
*domain
,
61 NTSTATUS
wb_cache_enum_dom_groups(struct winbindd_domain
*domain
,
63 uint32_t *num_entries
,
64 struct wb_acct_info
**info
);
65 NTSTATUS
wb_cache_enum_local_groups(struct winbindd_domain
*domain
,
67 uint32_t *num_entries
,
68 struct wb_acct_info
**info
);
69 NTSTATUS
wb_cache_name_to_sid(struct winbindd_domain
*domain
,
71 const char *domain_name
,
75 enum lsa_SidType
*type
);
76 NTSTATUS
wb_cache_sid_to_name(struct winbindd_domain
*domain
,
78 const struct dom_sid
*sid
,
81 enum lsa_SidType
*type
);
82 NTSTATUS
wb_cache_rids_to_names(struct winbindd_domain
*domain
,
84 const struct dom_sid
*domain_sid
,
89 enum lsa_SidType
**types
);
90 NTSTATUS
wb_cache_lookup_usergroups(struct winbindd_domain
*domain
,
92 const struct dom_sid
*user_sid
,
94 struct dom_sid
**psids
);
95 NTSTATUS
wb_cache_lookup_useraliases(struct winbindd_domain
*domain
,
98 const struct dom_sid
*sids
,
99 uint32_t *num_aliases
,
100 uint32_t **alias_rids
);
101 NTSTATUS
wb_cache_lookup_groupmem(struct winbindd_domain
*domain
,
103 const struct dom_sid
*group_sid
,
104 enum lsa_SidType type
,
106 struct dom_sid
**sid_mem
,
108 uint32_t **name_types
);
109 NTSTATUS
wb_cache_sequence_number(struct winbindd_domain
*domain
,
111 NTSTATUS
wb_cache_lockout_policy(struct winbindd_domain
*domain
,
113 struct samr_DomInfo12
*policy
);
114 NTSTATUS
wb_cache_password_policy(struct winbindd_domain
*domain
,
116 struct samr_DomInfo1
*policy
);
117 NTSTATUS
wb_cache_trusted_domains(struct winbindd_domain
*domain
,
119 struct netr_DomainTrustList
*trusts
);
121 NTSTATUS
wcache_cached_creds_exist(struct winbindd_domain
*domain
, const struct dom_sid
*sid
);
122 NTSTATUS
wcache_get_creds(struct winbindd_domain
*domain
,
124 const struct dom_sid
*sid
,
125 const uint8_t **cached_nt_pass
,
126 const uint8_t **cached_salt
);
127 NTSTATUS
wcache_save_creds(struct winbindd_domain
*domain
,
128 const struct dom_sid
*sid
,
129 const uint8_t nt_pass
[NT_HASH_LEN
]);
130 void wcache_invalidate_samlogon(struct winbindd_domain
*domain
,
131 const struct dom_sid
*user_sid
);
132 bool wcache_invalidate_cache(void);
133 bool wcache_invalidate_cache_noinit(void);
134 bool init_wcache(void);
135 bool initialize_winbindd_cache(void);
136 void close_winbindd_cache(void);
137 NTSTATUS
wcache_lookup_groupmem(struct winbindd_domain
*domain
,
139 const struct dom_sid
*group_sid
,
141 struct dom_sid
**sid_mem
, char ***names
,
142 uint32_t **name_types
);
143 bool lookup_cached_sid(TALLOC_CTX
*mem_ctx
, const struct dom_sid
*sid
,
144 char **domain_name
, char **name
,
145 enum lsa_SidType
*type
);
146 bool lookup_cached_name(const char *domain_name
,
149 enum lsa_SidType
*type
);
150 void cache_name2sid_trusted(struct winbindd_domain
*domain
,
151 const char *domain_name
,
153 enum lsa_SidType type
,
154 const struct dom_sid
*sid
);
155 void cache_name2sid(struct winbindd_domain
*domain
,
156 const char *domain_name
, const char *name
,
157 enum lsa_SidType type
, const struct dom_sid
*sid
);
158 NTSTATUS
wcache_name_to_sid(struct winbindd_domain
*domain
,
159 const char *domain_name
,
162 enum lsa_SidType
*type
);
163 NTSTATUS
wcache_query_user(struct winbindd_domain
*domain
,
165 const struct dom_sid
*user_sid
,
166 struct wbint_userinfo
*info
);
167 NTSTATUS
wcache_query_user_fullname(struct winbindd_domain
*domain
,
169 const struct dom_sid
*user_sid
,
170 const char **full_name
);
171 NTSTATUS
wcache_lookup_useraliases(struct winbindd_domain
*domain
,
173 uint32_t num_sids
, const struct dom_sid
*sids
,
174 uint32_t *pnum_aliases
, uint32_t **paliases
);
175 NTSTATUS
wcache_lookup_usergroups(struct winbindd_domain
*domain
,
177 const struct dom_sid
*user_sid
,
179 struct dom_sid
**psids
);
181 void wcache_flush_cache(void);
182 NTSTATUS
wcache_count_cached_creds(struct winbindd_domain
*domain
, int *count
);
183 NTSTATUS
wcache_remove_oldest_cached_creds(struct winbindd_domain
*domain
, const struct dom_sid
*sid
) ;
184 bool set_global_winbindd_state_offline(void);
185 void set_global_winbindd_state_online(void);
186 bool get_global_winbindd_state_offline(void);
187 int winbindd_validate_cache(void);
188 int winbindd_validate_cache_nobackup(void);
189 bool winbindd_cache_validate_and_initialize(void);
190 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain
**domains
, size_t *num_domains
);
191 bool wcache_tdc_add_domain( struct winbindd_domain
*domain
);
192 struct winbindd_tdc_domain
* wcache_tdc_fetch_domain( TALLOC_CTX
*ctx
, const char *name
);
193 void wcache_tdc_clear( void );
194 bool wcache_store_seqnum(const char *domain_name
, uint32_t seqnum
,
195 time_t last_seq_check
);
196 bool wcache_fetch_ndr(TALLOC_CTX
*mem_ctx
, struct winbindd_domain
*domain
,
197 uint32_t opnum
, const DATA_BLOB
*req
, DATA_BLOB
*resp
);
198 void wcache_store_ndr(struct winbindd_domain
*domain
, uint32_t opnum
,
199 const DATA_BLOB
*req
, const DATA_BLOB
*resp
);
201 /* The following definitions come from winbindd/winbindd_ccache_access.c */
203 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state
*state
);
204 enum winbindd_result
winbindd_dual_ccache_ntlm_auth(struct winbindd_domain
*domain
,
205 struct winbindd_cli_state
*state
);
206 void winbindd_ccache_save(struct winbindd_cli_state
*state
);
208 /* The following definitions come from winbindd/winbindd_cm.c */
209 void winbind_msg_domain_offline(struct messaging_context
*msg_ctx
,
212 struct server_id server_id
,
214 void winbind_msg_domain_online(struct messaging_context
*msg_ctx
,
217 struct server_id server_id
,
220 void set_domain_offline(struct winbindd_domain
*domain
);
221 void set_domain_online_request(struct winbindd_domain
*domain
);
223 struct ndr_interface_table
;
224 NTSTATUS
wb_open_internal_pipe(TALLOC_CTX
*mem_ctx
,
225 const struct ndr_interface_table
*table
,
226 struct rpc_pipe_client
**ret_pipe
);
227 void invalidate_cm_connection(struct winbindd_domain
*domain
);
228 void close_conns_after_fork(void);
229 NTSTATUS
init_dc_connection(struct winbindd_domain
*domain
, bool need_rw_dc
);
230 NTSTATUS
cm_connect_sam(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
232 struct rpc_pipe_client
**cli
, struct policy_handle
*sam_handle
);
233 NTSTATUS
cm_connect_lsa(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
234 struct rpc_pipe_client
**cli
, struct policy_handle
*lsa_policy
);
235 NTSTATUS
cm_connect_lsat(struct winbindd_domain
*domain
,
237 struct rpc_pipe_client
**cli
,
238 struct policy_handle
*lsa_policy
);
239 NTSTATUS
cm_connect_netlogon(struct winbindd_domain
*domain
,
240 struct rpc_pipe_client
**cli
);
241 bool fetch_current_dc_from_gencache(TALLOC_CTX
*mem_ctx
,
242 const char *domain_name
,
243 char **p_dc_name
, char **p_dc_ip
);
245 /* The following definitions come from winbindd/winbindd_cred_cache.c */
247 bool ccache_entry_exists(const char *username
);
248 bool ccache_entry_identical(const char *username
,
251 void ccache_remove_all_after_fork(void);
252 void ccache_regain_all_now(void);
253 NTSTATUS
add_ccache_to_list(const char *princ_name
,
256 const char *username
,
257 const char *password
,
263 bool postponed_request
);
264 NTSTATUS
remove_ccache(const char *username
);
265 struct WINBINDD_MEMORY_CREDS
*find_memory_creds_by_name(const char *username
);
266 NTSTATUS
winbindd_add_memory_creds(const char *username
,
269 NTSTATUS
winbindd_delete_memory_creds(const char *username
);
270 NTSTATUS
winbindd_replace_memory_creds(const char *username
,
273 /* The following definitions come from winbindd/winbindd_creds.c */
275 NTSTATUS
winbindd_get_creds(struct winbindd_domain
*domain
,
277 const struct dom_sid
*sid
,
278 struct netr_SamInfo3
**info3
,
279 const uint8_t *cached_nt_pass
[NT_HASH_LEN
],
280 const uint8_t *cred_salt
[NT_HASH_LEN
]);
281 NTSTATUS
winbindd_store_creds(struct winbindd_domain
*domain
,
284 struct netr_SamInfo3
*info3
);
285 NTSTATUS
winbindd_update_creds_by_info3(struct winbindd_domain
*domain
,
288 struct netr_SamInfo3
*info3
);
289 NTSTATUS
winbindd_update_creds_by_name(struct winbindd_domain
*domain
,
293 /* The following definitions come from winbindd/winbindd_domain.c */
295 void setup_domain_child(struct winbindd_domain
*domain
);
297 /* The following definitions come from winbindd/winbindd_dual.c */
299 struct dcerpc_binding_handle
*dom_child_handle(struct winbindd_domain
*domain
);
300 struct winbindd_child
*choose_domain_child(struct winbindd_domain
*domain
);
302 struct tevent_req
*wb_child_request_send(TALLOC_CTX
*mem_ctx
,
303 struct tevent_context
*ev
,
304 struct winbindd_child
*child
,
305 struct winbindd_request
*request
);
306 int wb_child_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
307 struct winbindd_response
**presponse
, int *err
);
308 struct tevent_req
*wb_domain_request_send(TALLOC_CTX
*mem_ctx
,
309 struct tevent_context
*ev
,
310 struct winbindd_domain
*domain
,
311 struct winbindd_request
*request
);
312 int wb_domain_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
313 struct winbindd_response
**presponse
, int *err
);
315 void setup_child(struct winbindd_domain
*domain
, struct winbindd_child
*child
,
316 const struct winbindd_child_dispatch_table
*table
,
317 const char *logprefix
,
318 const char *logname
);
319 void winbind_child_died(pid_t pid
);
320 void winbindd_flush_negative_conn_cache(struct winbindd_domain
*domain
);
321 void winbind_msg_debug(struct messaging_context
*msg_ctx
,
324 struct server_id server_id
,
326 void winbind_msg_offline(struct messaging_context
*msg_ctx
,
329 struct server_id server_id
,
331 void winbind_msg_online(struct messaging_context
*msg_ctx
,
334 struct server_id server_id
,
336 void winbind_msg_onlinestatus(struct messaging_context
*msg_ctx
,
339 struct server_id server_id
,
341 void winbind_msg_dump_event_list(struct messaging_context
*msg_ctx
,
344 struct server_id server_id
,
346 void winbind_msg_dump_domain_list(struct messaging_context
*msg_ctx
,
349 struct server_id server_id
,
351 void winbind_msg_ip_dropped(struct messaging_context
*msg_ctx
,
354 struct server_id server_id
,
356 void winbind_msg_ip_dropped_parent(struct messaging_context
*msg_ctx
,
359 struct server_id server_id
,
361 NTSTATUS
winbindd_reinit_after_fork(const struct winbindd_child
*myself
,
362 const char *logfilename
);
363 struct winbindd_domain
*wb_child_domain(void);
365 /* The following definitions come from winbindd/winbindd_group.c */
366 bool fill_grent(TALLOC_CTX
*mem_ctx
, struct winbindd_gr
*gr
,
367 const char *dom_name
, const char *gr_name
, gid_t unix_gid
);
368 NTSTATUS
winbindd_print_groupmembers(struct talloc_dict
*members
,
370 int *num_members
, char **result
);
373 /* The following definitions come from winbindd/winbindd_idmap.c */
375 void init_idmap_child(void);
376 struct winbindd_child
*idmap_child(void);
377 struct idmap_domain
*idmap_find_domain_with_sid(const char *domname
,
378 const struct dom_sid
*sid
);
379 const char *idmap_config_const_string(const char *domname
, const char *option
,
381 bool idmap_config_bool(const char *domname
, const char *option
, bool def
);
382 int idmap_config_int(const char *domname
, const char *option
, int def
);
383 bool domain_has_idmap_config(const char *domname
);
384 bool lp_scan_idmap_domains(bool (*fn
)(const char *domname
,
388 /* The following definitions come from winbindd/winbindd_locator.c */
390 void init_locator_child(void);
391 struct winbindd_child
*locator_child(void);
393 /* The following definitions come from winbindd/winbindd_misc.c */
395 void winbindd_list_trusted_domains(struct winbindd_cli_state
*state
);
396 enum winbindd_result
winbindd_dual_list_trusted_domains(struct winbindd_domain
*domain
,
397 struct winbindd_cli_state
*state
);
398 void winbindd_show_sequence(struct winbindd_cli_state
*state
);
399 void winbindd_domain_info(struct winbindd_cli_state
*state
);
400 void winbindd_dc_info(struct winbindd_cli_state
*state
);
401 void winbindd_ping(struct winbindd_cli_state
*state
);
402 void winbindd_info(struct winbindd_cli_state
*state
);
403 void winbindd_interface_version(struct winbindd_cli_state
*state
);
404 void winbindd_domain_name(struct winbindd_cli_state
*state
);
405 void winbindd_netbios_name(struct winbindd_cli_state
*state
);
406 void winbindd_priv_pipe_dir(struct winbindd_cli_state
*state
);
408 /* The following definitions come from winbindd/winbindd_ndr.c */
410 void ndr_print_winbindd_child(struct ndr_print
*ndr
,
412 const struct winbindd_child
*r
);
413 void ndr_print_winbindd_cm_conn(struct ndr_print
*ndr
,
415 const struct winbindd_cm_conn
*r
);
416 void ndr_print_winbindd_methods(struct ndr_print
*ndr
,
418 const struct winbindd_methods
*r
);
419 void ndr_print_winbindd_domain(struct ndr_print
*ndr
,
421 const struct winbindd_domain
*r
);
423 /* The following definitions come from winbindd/winbindd_pam.c */
425 bool check_request_flags(uint32_t flags
);
426 NTSTATUS
append_auth_data(TALLOC_CTX
*mem_ctx
,
427 struct winbindd_response
*resp
,
428 uint32_t request_flags
,
429 struct netr_SamInfo3
*info3
,
430 const char *name_domain
,
431 const char *name_user
);
432 uid_t
get_uid_from_request(struct winbindd_request
*request
);
433 struct winbindd_domain
*find_auth_domain(uint8_t flags
,
434 const char *domain_name
);
435 enum winbindd_result
winbindd_dual_pam_auth(struct winbindd_domain
*domain
,
436 struct winbindd_cli_state
*state
) ;
437 enum winbindd_result
winbindd_dual_pam_auth_crap(struct winbindd_domain
*domain
,
438 struct winbindd_cli_state
*state
) ;
439 enum winbindd_result
winbindd_dual_pam_chauthtok(struct winbindd_domain
*contact_domain
,
440 struct winbindd_cli_state
*state
);
441 enum winbindd_result
winbindd_dual_pam_logoff(struct winbindd_domain
*domain
,
442 struct winbindd_cli_state
*state
) ;
443 enum winbindd_result
winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain
*domainSt
, struct winbindd_cli_state
*state
);
444 NTSTATUS
winbindd_pam_auth_pac_send(struct winbindd_cli_state
*state
,
445 struct netr_SamInfo3
**info3
);
447 NTSTATUS
winbind_dual_SamLogon(struct winbindd_domain
*domain
,
449 uint32_t logon_parameters
,
450 const char *name_user
,
451 const char *name_domain
,
452 const char *workstation
,
453 const uint8_t chal
[8],
454 DATA_BLOB lm_response
,
455 DATA_BLOB nt_response
,
456 uint8_t *authoritative
,
459 struct netr_SamInfo3
**info3
);
461 /* The following definitions come from winbindd/winbindd_util.c */
463 struct winbindd_domain
*domain_list(void);
464 struct winbindd_domain
*wb_next_domain(struct winbindd_domain
*domain
);
465 bool domain_is_forest_root(const struct winbindd_domain
*domain
);
466 void rescan_trusted_domains(struct tevent_context
*ev
, struct tevent_timer
*te
,
467 struct timeval now
, void *private_data
);
468 enum winbindd_result
winbindd_dual_init_connection(struct winbindd_domain
*domain
,
469 struct winbindd_cli_state
*state
);
470 bool init_domain_list(void);
471 struct winbindd_domain
*find_domain_from_name_noinit(const char *domain_name
);
472 struct winbindd_domain
*find_domain_from_name(const char *domain_name
);
473 struct winbindd_domain
*find_domain_from_sid_noinit(const struct dom_sid
*sid
);
474 struct winbindd_domain
*find_domain_from_sid(const struct dom_sid
*sid
);
475 struct winbindd_domain
*find_our_domain(void);
476 struct winbindd_domain
*find_lookup_domain_from_sid(const struct dom_sid
*sid
);
477 struct winbindd_domain
*find_lookup_domain_from_name(const char *domain_name
);
478 bool parse_domain_user(const char *domuser
, fstring domain
, fstring user
);
479 bool parse_domain_user_talloc(TALLOC_CTX
*mem_ctx
, const char *domuser
,
480 char **domain
, char **user
);
481 bool canonicalize_username(fstring username_inout
, fstring domain
, fstring user
);
482 void fill_domain_username(fstring name
, const char *domain
, const char *user
, bool can_assume
);
483 char *fill_domain_username_talloc(TALLOC_CTX
*ctx
,
487 struct winbindd_cli_state
*winbindd_client_list(void);
488 struct winbindd_cli_state
*winbindd_client_list_tail(void);
489 struct winbindd_cli_state
*
490 winbindd_client_list_prev(struct winbindd_cli_state
*cli
);
491 void winbindd_add_client(struct winbindd_cli_state
*cli
);
492 void winbindd_remove_client(struct winbindd_cli_state
*cli
);
493 void winbindd_promote_client(struct winbindd_cli_state
*cli
);
494 int winbindd_num_clients(void);
495 NTSTATUS
lookup_usergroups_cached(TALLOC_CTX
*mem_ctx
,
496 const struct dom_sid
*user_sid
,
497 uint32_t *p_num_groups
, struct dom_sid
**user_sids
);
499 NTSTATUS
normalize_name_map(TALLOC_CTX
*mem_ctx
,
500 struct winbindd_domain
*domain
,
503 NTSTATUS
normalize_name_unmap(TALLOC_CTX
*mem_ctx
,
507 NTSTATUS
resolve_username_to_alias(TALLOC_CTX
*mem_ctx
,
508 struct winbindd_domain
*domain
,
509 const char *name
, char **alias
);
510 NTSTATUS
resolve_alias_to_username(TALLOC_CTX
*mem_ctx
,
511 struct winbindd_domain
*domain
,
512 const char *alias
, char **name
);
514 bool winbindd_can_contact_domain(struct winbindd_domain
*domain
);
515 bool winbindd_internal_child(struct winbindd_child
*child
);
516 void winbindd_set_locator_kdc_envs(const struct winbindd_domain
*domain
);
517 void winbindd_unset_locator_kdc_env(const struct winbindd_domain
*domain
);
518 void winbindd_set_locator_kdc_envs(const struct winbindd_domain
*domain
);
519 void winbindd_unset_locator_kdc_env(const struct winbindd_domain
*domain
);
520 void set_auth_errors(struct winbindd_response
*resp
, NTSTATUS result
);
521 bool is_domain_offline(const struct winbindd_domain
*domain
);
522 bool is_domain_online(const struct winbindd_domain
*domain
);
523 bool parse_sidlist(TALLOC_CTX
*mem_ctx
, const char *sidstr
,
524 struct dom_sid
**sids
, uint32_t *num_sids
);
525 bool parse_xidlist(TALLOC_CTX
*mem_ctx
, const char *xidstr
,
526 struct unixid
**pxids
, uint32_t *pnum_xids
);
528 /* The following definitions come from winbindd/winbindd_wins.c */
530 void winbindd_wins_byname(struct winbindd_cli_state
*state
);
532 struct tevent_req
*wb_ping_send(TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
533 struct winbindd_cli_state
*cli
,
534 struct winbindd_request
*request
);
535 NTSTATUS
wb_ping_recv(struct tevent_req
*req
,
536 struct winbindd_response
*resp
);
538 enum winbindd_result
winbindd_dual_ping(struct winbindd_domain
*domain
,
539 struct winbindd_cli_state
*state
);
541 struct dcerpc_binding_handle
*wbint_binding_handle(TALLOC_CTX
*mem_ctx
,
542 struct winbindd_domain
*domain
,
543 struct winbindd_child
*child
);
544 enum winbindd_result
winbindd_dual_ndrcmd(struct winbindd_domain
*domain
,
545 struct winbindd_cli_state
*state
);
547 struct tevent_req
*wb_lookupsid_send(TALLOC_CTX
*mem_ctx
,
548 struct tevent_context
*ev
,
549 const struct dom_sid
*sid
);
550 NTSTATUS
wb_lookupsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
551 enum lsa_SidType
*type
, const char **domain
,
554 struct tevent_req
*winbindd_lookupsid_send(TALLOC_CTX
*mem_ctx
,
555 struct tevent_context
*ev
,
556 struct winbindd_cli_state
*cli
,
557 struct winbindd_request
*request
);
558 NTSTATUS
winbindd_lookupsid_recv(struct tevent_req
*req
,
559 struct winbindd_response
*response
);
561 struct tevent_req
*winbindd_lookupsids_send(TALLOC_CTX
*mem_ctx
,
562 struct tevent_context
*ev
,
563 struct winbindd_cli_state
*cli
,
564 struct winbindd_request
*request
);
565 NTSTATUS
winbindd_lookupsids_recv(struct tevent_req
*req
,
566 struct winbindd_response
*response
);
568 struct tevent_req
*wb_lookupname_send(TALLOC_CTX
*mem_ctx
,
569 struct tevent_context
*ev
,
570 const char *dom_name
, const char *name
,
572 NTSTATUS
wb_lookupname_recv(struct tevent_req
*req
, struct dom_sid
*sid
,
573 enum lsa_SidType
*type
);
575 struct tevent_req
*winbindd_lookupname_send(TALLOC_CTX
*mem_ctx
,
576 struct tevent_context
*ev
,
577 struct winbindd_cli_state
*cli
,
578 struct winbindd_request
*request
);
579 NTSTATUS
winbindd_lookupname_recv(struct tevent_req
*req
,
580 struct winbindd_response
*response
);
582 struct tevent_req
*winbindd_allocate_uid_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_uid_recv(struct tevent_req
*req
,
587 struct winbindd_response
*response
);
589 struct tevent_req
*winbindd_allocate_gid_send(TALLOC_CTX
*mem_ctx
,
590 struct tevent_context
*ev
,
591 struct winbindd_cli_state
*cli
,
592 struct winbindd_request
*request
);
593 NTSTATUS
winbindd_allocate_gid_recv(struct tevent_req
*req
,
594 struct winbindd_response
*response
);
596 struct tevent_req
*wb_queryuser_send(TALLOC_CTX
*mem_ctx
,
597 struct tevent_context
*ev
,
598 const struct dom_sid
*user_sid
);
599 NTSTATUS
wb_queryuser_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
600 struct wbint_userinfo
**pinfo
);
602 struct tevent_req
*wb_getpwsid_send(TALLOC_CTX
*mem_ctx
,
603 struct tevent_context
*ev
,
604 const struct dom_sid
*user_sid
,
605 struct winbindd_pw
*pw
);
606 NTSTATUS
wb_getpwsid_recv(struct tevent_req
*req
);
608 struct tevent_req
*winbindd_getpwsid_send(TALLOC_CTX
*mem_ctx
,
609 struct tevent_context
*ev
,
610 struct winbindd_cli_state
*cli
,
611 struct winbindd_request
*request
);
612 NTSTATUS
winbindd_getpwsid_recv(struct tevent_req
*req
,
613 struct winbindd_response
*response
);
615 struct tevent_req
*winbindd_getpwnam_send(TALLOC_CTX
*mem_ctx
,
616 struct tevent_context
*ev
,
617 struct winbindd_cli_state
*cli
,
618 struct winbindd_request
*request
);
619 NTSTATUS
winbindd_getpwnam_recv(struct tevent_req
*req
,
620 struct winbindd_response
*response
);
622 struct tevent_req
*winbindd_getpwuid_send(TALLOC_CTX
*mem_ctx
,
623 struct tevent_context
*ev
,
624 struct winbindd_cli_state
*cli
,
625 struct winbindd_request
*request
);
626 NTSTATUS
winbindd_getpwuid_recv(struct tevent_req
*req
,
627 struct winbindd_response
*response
);
628 struct tevent_req
*wb_lookupuseraliases_send(TALLOC_CTX
*mem_ctx
,
629 struct tevent_context
*ev
,
630 struct winbindd_domain
*domain
,
632 const struct dom_sid
*sids
);
633 NTSTATUS
wb_lookupuseraliases_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
634 uint32_t *num_aliases
, uint32_t **aliases
);
635 struct tevent_req
*winbindd_getsidaliases_send(TALLOC_CTX
*mem_ctx
,
636 struct tevent_context
*ev
,
637 struct winbindd_cli_state
*cli
,
638 struct winbindd_request
*request
);
639 NTSTATUS
winbindd_getsidaliases_recv(struct tevent_req
*req
,
640 struct winbindd_response
*response
);
641 struct tevent_req
*wb_lookupusergroups_send(TALLOC_CTX
*mem_ctx
,
642 struct tevent_context
*ev
,
643 const struct dom_sid
*sid
);
644 NTSTATUS
wb_lookupusergroups_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
645 int *num_sids
, struct dom_sid
**sids
);
647 struct tevent_req
*winbindd_getuserdomgroups_send(TALLOC_CTX
*mem_ctx
,
648 struct tevent_context
*ev
,
649 struct winbindd_cli_state
*cli
,
650 struct winbindd_request
*request
);
651 NTSTATUS
winbindd_getuserdomgroups_recv(struct tevent_req
*req
,
652 struct winbindd_response
*response
);
653 struct tevent_req
*wb_gettoken_send(TALLOC_CTX
*mem_ctx
,
654 struct tevent_context
*ev
,
655 const struct dom_sid
*sid
,
656 bool expand_local_aliases
);
657 NTSTATUS
wb_gettoken_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
658 int *num_sids
, struct dom_sid
**sids
);
659 struct tevent_req
*winbindd_getgroups_send(TALLOC_CTX
*mem_ctx
,
660 struct tevent_context
*ev
,
661 struct winbindd_cli_state
*cli
,
662 struct winbindd_request
*request
);
663 NTSTATUS
winbindd_getgroups_recv(struct tevent_req
*req
,
664 struct winbindd_response
*response
);
666 struct tevent_req
*wb_seqnum_send(TALLOC_CTX
*mem_ctx
,
667 struct tevent_context
*ev
,
668 struct winbindd_domain
*domain
);
669 NTSTATUS
wb_seqnum_recv(struct tevent_req
*req
, uint32_t *seqnum
);
671 struct tevent_req
*wb_seqnums_send(TALLOC_CTX
*mem_ctx
,
672 struct tevent_context
*ev
);
673 NTSTATUS
wb_seqnums_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
674 int *num_domains
, struct winbindd_domain
***domains
,
675 NTSTATUS
**stati
, uint32_t **seqnums
);
677 struct tevent_req
*winbindd_show_sequence_send(TALLOC_CTX
*mem_ctx
,
678 struct tevent_context
*ev
,
679 struct winbindd_cli_state
*cli
,
680 struct winbindd_request
*request
);
681 NTSTATUS
winbindd_show_sequence_recv(struct tevent_req
*req
,
682 struct winbindd_response
*response
);
684 struct tevent_req
*wb_group_members_send(TALLOC_CTX
*mem_ctx
,
685 struct tevent_context
*ev
,
686 const struct dom_sid
*sid
,
687 enum lsa_SidType type
,
689 NTSTATUS
wb_group_members_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
690 struct talloc_dict
**members
);
691 NTSTATUS
add_wbint_Principal_to_dict(TALLOC_CTX
*mem_ctx
,
694 enum lsa_SidType type
,
695 struct talloc_dict
*dict
);
697 struct tevent_req
*wb_getgrsid_send(TALLOC_CTX
*mem_ctx
,
698 struct tevent_context
*ev
,
699 const struct dom_sid
*group_sid
,
701 NTSTATUS
wb_getgrsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
702 const char **domname
, const char **name
, gid_t
*gid
,
703 struct talloc_dict
**members
);
705 struct tevent_req
*winbindd_getgrgid_send(TALLOC_CTX
*mem_ctx
,
706 struct tevent_context
*ev
,
707 struct winbindd_cli_state
*cli
,
708 struct winbindd_request
*request
);
709 NTSTATUS
winbindd_getgrgid_recv(struct tevent_req
*req
,
710 struct winbindd_response
*response
);
712 struct tevent_req
*winbindd_getgrnam_send(TALLOC_CTX
*mem_ctx
,
713 struct tevent_context
*ev
,
714 struct winbindd_cli_state
*cli
,
715 struct winbindd_request
*request
);
716 NTSTATUS
winbindd_getgrnam_recv(struct tevent_req
*req
,
717 struct winbindd_response
*response
);
719 struct tevent_req
*winbindd_getusersids_send(TALLOC_CTX
*mem_ctx
,
720 struct tevent_context
*ev
,
721 struct winbindd_cli_state
*cli
,
722 struct winbindd_request
*request
);
723 NTSTATUS
winbindd_getusersids_recv(struct tevent_req
*req
,
724 struct winbindd_response
*response
);
726 struct tevent_req
*winbindd_lookuprids_send(TALLOC_CTX
*mem_ctx
,
727 struct tevent_context
*ev
,
728 struct winbindd_cli_state
*cli
,
729 struct winbindd_request
*request
);
730 NTSTATUS
winbindd_lookuprids_recv(struct tevent_req
*req
,
731 struct winbindd_response
*response
);
733 struct tevent_req
*wb_query_user_list_send(TALLOC_CTX
*mem_ctx
,
734 struct tevent_context
*ev
,
735 struct winbindd_domain
*domain
);
736 NTSTATUS
wb_query_user_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
739 struct tevent_req
*wb_query_group_list_send(TALLOC_CTX
*mem_ctx
,
740 struct tevent_context
*ev
,
741 struct winbindd_domain
*domain
);
742 NTSTATUS
wb_query_group_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
744 struct wbint_Principal
**groups
);
746 struct tevent_req
*wb_next_pwent_send(TALLOC_CTX
*mem_ctx
,
747 struct tevent_context
*ev
,
748 struct getpwent_state
*gstate
,
749 struct winbindd_pw
*pw
);
750 NTSTATUS
wb_next_pwent_recv(struct tevent_req
*req
);
752 struct tevent_req
*winbindd_setpwent_send(TALLOC_CTX
*mem_ctx
,
753 struct tevent_context
*ev
,
754 struct winbindd_cli_state
*cli
,
755 struct winbindd_request
*request
);
756 NTSTATUS
winbindd_setpwent_recv(struct tevent_req
*req
,
757 struct winbindd_response
*presp
);
759 struct tevent_req
*winbindd_getpwent_send(TALLOC_CTX
*mem_ctx
,
760 struct tevent_context
*ev
,
761 struct winbindd_cli_state
*cli
,
762 struct winbindd_request
*request
);
763 NTSTATUS
winbindd_getpwent_recv(struct tevent_req
*req
,
764 struct winbindd_response
*response
);
766 struct tevent_req
*winbindd_endpwent_send(TALLOC_CTX
*mem_ctx
,
767 struct tevent_context
*ev
,
768 struct winbindd_cli_state
*cli
,
769 struct winbindd_request
*request
);
770 NTSTATUS
winbindd_endpwent_recv(struct tevent_req
*req
,
771 struct winbindd_response
*response
);
773 struct tevent_req
*winbindd_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
774 struct tevent_context
*ev
,
775 struct winbindd_cli_state
*cli
,
776 struct winbindd_request
*request
);
777 NTSTATUS
winbindd_dsgetdcname_recv(struct tevent_req
*req
,
778 struct winbindd_response
*response
);
780 struct tevent_req
*wb_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
781 struct tevent_context
*ev
,
782 const char *domain_name
,
783 const struct GUID
*domain_guid
,
784 const char *site_name
,
786 NTSTATUS
wb_dsgetdcname_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
787 struct netr_DsRGetDCNameInfo
**pdcinfo
);
788 NTSTATUS
wb_dsgetdcname_gencache_set(const char *domname
,
789 struct netr_DsRGetDCNameInfo
*dcinfo
);
790 NTSTATUS
wb_dsgetdcname_gencache_get(TALLOC_CTX
*mem_ctx
,
792 struct netr_DsRGetDCNameInfo
**dcinfo
);
794 struct tevent_req
*winbindd_getdcname_send(TALLOC_CTX
*mem_ctx
,
795 struct tevent_context
*ev
,
796 struct winbindd_cli_state
*cli
,
797 struct winbindd_request
*request
);
798 NTSTATUS
winbindd_getdcname_recv(struct tevent_req
*req
,
799 struct winbindd_response
*response
);
801 struct tevent_req
*wb_next_grent_send(TALLOC_CTX
*mem_ctx
,
802 struct tevent_context
*ev
,
804 struct getgrent_state
*gstate
,
805 struct winbindd_gr
*gr
);
806 NTSTATUS
wb_next_grent_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
807 struct talloc_dict
**members
);
809 struct tevent_req
*winbindd_setgrent_send(TALLOC_CTX
*mem_ctx
,
810 struct tevent_context
*ev
,
811 struct winbindd_cli_state
*cli
,
812 struct winbindd_request
*request
);
813 NTSTATUS
winbindd_setgrent_recv(struct tevent_req
*req
,
814 struct winbindd_response
*response
);
815 struct tevent_req
*winbindd_getgrent_send(TALLOC_CTX
*mem_ctx
,
816 struct tevent_context
*ev
,
817 struct winbindd_cli_state
*cli
,
818 struct winbindd_request
*request
);
819 NTSTATUS
winbindd_getgrent_recv(struct tevent_req
*req
,
820 struct winbindd_response
*response
);
821 struct tevent_req
*winbindd_endgrent_send(TALLOC_CTX
*mem_ctx
,
822 struct tevent_context
*ev
,
823 struct winbindd_cli_state
*cli
,
824 struct winbindd_request
*request
);
825 NTSTATUS
winbindd_endgrent_recv(struct tevent_req
*req
,
826 struct winbindd_response
*response
);
828 struct tevent_req
*winbindd_list_users_send(TALLOC_CTX
*mem_ctx
,
829 struct tevent_context
*ev
,
830 struct winbindd_cli_state
*cli
,
831 struct winbindd_request
*request
);
832 NTSTATUS
winbindd_list_users_recv(struct tevent_req
*req
,
833 struct winbindd_response
*response
);
835 struct tevent_req
*winbindd_list_groups_send(TALLOC_CTX
*mem_ctx
,
836 struct tevent_context
*ev
,
837 struct winbindd_cli_state
*cli
,
838 struct winbindd_request
*request
);
839 NTSTATUS
winbindd_list_groups_recv(struct tevent_req
*req
,
840 struct winbindd_response
*response
);
842 struct tevent_req
*winbindd_check_machine_acct_send(TALLOC_CTX
*mem_ctx
,
843 struct tevent_context
*ev
,
844 struct winbindd_cli_state
*cli
,
845 struct winbindd_request
*request
);
846 NTSTATUS
winbindd_check_machine_acct_recv(struct tevent_req
*req
,
847 struct winbindd_response
*presp
);
849 struct tevent_req
*winbindd_ping_dc_send(TALLOC_CTX
*mem_ctx
,
850 struct tevent_context
*ev
,
851 struct winbindd_cli_state
*cli
,
852 struct winbindd_request
*request
);
853 NTSTATUS
winbindd_ping_dc_recv(struct tevent_req
*req
,
854 struct winbindd_response
*presp
);
856 struct tevent_req
*winbindd_change_machine_acct_send(TALLOC_CTX
*mem_ctx
,
857 struct tevent_context
*ev
,
858 struct winbindd_cli_state
*cli
,
859 struct winbindd_request
*request
);
860 NTSTATUS
winbindd_change_machine_acct_recv(struct tevent_req
*req
,
861 struct winbindd_response
*presp
);
863 struct tevent_req
*winbindd_pam_auth_send(TALLOC_CTX
*mem_ctx
,
864 struct tevent_context
*ev
,
865 struct winbindd_cli_state
*cli
,
866 struct winbindd_request
*request
);
867 NTSTATUS
winbindd_pam_auth_recv(struct tevent_req
*req
,
868 struct winbindd_response
*response
);
870 struct tevent_req
*winbindd_pam_auth_crap_send(
872 struct tevent_context
*ev
,
873 struct winbindd_cli_state
*cli
,
874 struct winbindd_request
*request
);
875 NTSTATUS
winbindd_pam_auth_crap_recv(struct tevent_req
*req
,
876 struct winbindd_response
*response
);
878 struct tevent_req
*winbindd_pam_chauthtok_send(
880 struct tevent_context
*ev
,
881 struct winbindd_cli_state
*cli
,
882 struct winbindd_request
*request
);
883 NTSTATUS
winbindd_pam_chauthtok_recv(struct tevent_req
*req
,
884 struct winbindd_response
*response
);
886 struct tevent_req
*winbindd_pam_logoff_send(TALLOC_CTX
*mem_ctx
,
887 struct tevent_context
*ev
,
888 struct winbindd_cli_state
*cli
,
889 struct winbindd_request
*request
);
890 NTSTATUS
winbindd_pam_logoff_recv(struct tevent_req
*req
,
891 struct winbindd_response
*response
);
893 struct tevent_req
*winbindd_pam_chng_pswd_auth_crap_send(
895 struct tevent_context
*ev
,
896 struct winbindd_cli_state
*cli
,
897 struct winbindd_request
*request
);
898 NTSTATUS
winbindd_pam_chng_pswd_auth_crap_recv(
899 struct tevent_req
*req
,
900 struct winbindd_response
*response
);
902 struct tevent_req
*wb_lookupsids_send(TALLOC_CTX
*mem_ctx
,
903 struct tevent_context
*ev
,
904 struct dom_sid
*sids
,
906 NTSTATUS
wb_lookupsids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
907 struct lsa_RefDomainList
**domains
,
908 struct lsa_TransNameArray
**names
);
910 struct tevent_req
*wb_sids2xids_send(TALLOC_CTX
*mem_ctx
,
911 struct tevent_context
*ev
,
912 const struct dom_sid
*sids
,
913 const uint32_t num_sids
);
914 NTSTATUS
wb_sids2xids_recv(struct tevent_req
*req
,
915 struct unixid xids
[], uint32_t num_xids
);
916 struct tevent_req
*winbindd_sids_to_xids_send(TALLOC_CTX
*mem_ctx
,
917 struct tevent_context
*ev
,
918 struct winbindd_cli_state
*cli
,
919 struct winbindd_request
*request
);
920 NTSTATUS
winbindd_sids_to_xids_recv(struct tevent_req
*req
,
921 struct winbindd_response
*response
);
922 struct tevent_req
*wb_xids2sids_send(TALLOC_CTX
*mem_ctx
,
923 struct tevent_context
*ev
,
926 NTSTATUS
wb_xids2sids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
927 struct dom_sid
**sids
);
928 struct tevent_req
*winbindd_xids_to_sids_send(TALLOC_CTX
*mem_ctx
,
929 struct tevent_context
*ev
,
930 struct winbindd_cli_state
*cli
,
931 struct winbindd_request
*request
);
932 NTSTATUS
winbindd_xids_to_sids_recv(struct tevent_req
*req
,
933 struct winbindd_response
*response
);
934 struct tevent_req
*winbindd_wins_byip_send(TALLOC_CTX
*mem_ctx
,
935 struct tevent_context
*ev
,
936 struct winbindd_cli_state
*cli
,
937 struct winbindd_request
*request
);
938 NTSTATUS
winbindd_wins_byip_recv(struct tevent_req
*req
,
939 struct winbindd_response
*presp
);
940 struct tevent_req
*winbindd_wins_byname_send(TALLOC_CTX
*mem_ctx
,
941 struct tevent_context
*ev
,
942 struct winbindd_cli_state
*cli
,
943 struct winbindd_request
*request
);
944 NTSTATUS
winbindd_wins_byname_recv(struct tevent_req
*req
,
945 struct winbindd_response
*presp
);
948 /* The following definitions come from winbindd/winbindd_samr.c */
950 NTSTATUS
open_internal_samr_conn(TALLOC_CTX
*mem_ctx
,
951 struct winbindd_domain
*domain
,
952 struct rpc_pipe_client
**samr_pipe
,
953 struct policy_handle
*samr_domain_hnd
);
954 NTSTATUS
open_internal_lsa_conn(TALLOC_CTX
*mem_ctx
,
955 struct rpc_pipe_client
**lsa_pipe
,
956 struct policy_handle
*lsa_hnd
);
958 /* The following definitions come from winbindd/winbindd_irpc.c */
959 NTSTATUS
wb_irpc_register(void);
961 /* The following definitions come from winbindd/winbindd_reconnect.c */
962 bool reconnect_need_retry(NTSTATUS status
, struct winbindd_domain
*domain
);
964 #endif /* _WINBINDD_PROTO_H_ */