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 bool lookup_cached_sid(TALLOC_CTX
*mem_ctx
, const struct dom_sid
*sid
,
138 char **domain_name
, char **name
,
139 enum lsa_SidType
*type
);
140 bool lookup_cached_name(const char *domain_name
,
143 enum lsa_SidType
*type
);
144 void cache_name2sid_trusted(struct winbindd_domain
*domain
,
145 const char *domain_name
,
147 enum lsa_SidType type
,
148 const struct dom_sid
*sid
);
149 void cache_name2sid(struct winbindd_domain
*domain
,
150 const char *domain_name
, const char *name
,
151 enum lsa_SidType type
, const struct dom_sid
*sid
);
152 NTSTATUS
wcache_query_user(struct winbindd_domain
*domain
,
154 const struct dom_sid
*user_sid
,
155 struct wbint_userinfo
*info
);
156 NTSTATUS
wcache_query_user_fullname(struct winbindd_domain
*domain
,
158 const struct dom_sid
*user_sid
,
159 const char **full_name
);
160 NTSTATUS
wcache_lookup_usergroups(struct winbindd_domain
*domain
,
162 const struct dom_sid
*user_sid
,
164 struct dom_sid
**psids
);
166 NTSTATUS
wcache_count_cached_creds(struct winbindd_domain
*domain
, int *count
);
167 NTSTATUS
wcache_remove_oldest_cached_creds(struct winbindd_domain
*domain
, const struct dom_sid
*sid
) ;
168 bool set_global_winbindd_state_offline(void);
169 void set_global_winbindd_state_online(void);
170 bool get_global_winbindd_state_offline(void);
171 int winbindd_validate_cache(void);
172 int winbindd_validate_cache_nobackup(void);
173 bool winbindd_cache_validate_and_initialize(void);
174 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain
**domains
, size_t *num_domains
);
175 bool wcache_tdc_add_domain( struct winbindd_domain
*domain
);
176 struct winbindd_tdc_domain
* wcache_tdc_fetch_domain( TALLOC_CTX
*ctx
, const char *name
);
177 void wcache_tdc_clear( void );
178 bool wcache_store_seqnum(const char *domain_name
, uint32_t seqnum
,
179 time_t last_seq_check
);
180 bool wcache_fetch_ndr(TALLOC_CTX
*mem_ctx
, struct winbindd_domain
*domain
,
181 uint32_t opnum
, const DATA_BLOB
*req
, DATA_BLOB
*resp
);
182 void wcache_store_ndr(struct winbindd_domain
*domain
, uint32_t opnum
,
183 const DATA_BLOB
*req
, const DATA_BLOB
*resp
);
185 /* The following definitions come from winbindd/winbindd_ccache_access.c */
187 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state
*state
);
188 enum winbindd_result
winbindd_dual_ccache_ntlm_auth(struct winbindd_domain
*domain
,
189 struct winbindd_cli_state
*state
);
190 void winbindd_ccache_save(struct winbindd_cli_state
*state
);
192 /* The following definitions come from winbindd/winbindd_cm.c */
193 void winbind_msg_domain_offline(struct messaging_context
*msg_ctx
,
196 struct server_id server_id
,
198 void winbind_msg_domain_online(struct messaging_context
*msg_ctx
,
201 struct server_id server_id
,
204 void set_domain_offline(struct winbindd_domain
*domain
);
205 void set_domain_online_request(struct winbindd_domain
*domain
);
207 struct ndr_interface_table
;
208 NTSTATUS
wb_open_internal_pipe(TALLOC_CTX
*mem_ctx
,
209 const struct ndr_interface_table
*table
,
210 struct rpc_pipe_client
**ret_pipe
);
211 void invalidate_cm_connection(struct winbindd_domain
*domain
);
212 void close_conns_after_fork(void);
213 NTSTATUS
init_dc_connection(struct winbindd_domain
*domain
, bool need_rw_dc
);
214 NTSTATUS
cm_connect_sam(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
216 struct rpc_pipe_client
**cli
, struct policy_handle
*sam_handle
);
217 NTSTATUS
cm_connect_lsa(struct winbindd_domain
*domain
, TALLOC_CTX
*mem_ctx
,
218 struct rpc_pipe_client
**cli
, struct policy_handle
*lsa_policy
);
219 NTSTATUS
cm_connect_lsat(struct winbindd_domain
*domain
,
221 struct rpc_pipe_client
**cli
,
222 struct policy_handle
*lsa_policy
);
223 NTSTATUS
cm_connect_netlogon(struct winbindd_domain
*domain
,
224 struct rpc_pipe_client
**cli
);
225 bool fetch_current_dc_from_gencache(TALLOC_CTX
*mem_ctx
,
226 const char *domain_name
,
227 char **p_dc_name
, char **p_dc_ip
);
229 /* The following definitions come from winbindd/winbindd_cred_cache.c */
231 bool ccache_entry_exists(const char *username
);
232 bool ccache_entry_identical(const char *username
,
235 void ccache_remove_all_after_fork(void);
236 void ccache_regain_all_now(void);
237 NTSTATUS
add_ccache_to_list(const char *princ_name
,
240 const char *username
,
241 const char *password
,
247 bool postponed_request
);
248 NTSTATUS
remove_ccache(const char *username
);
249 struct WINBINDD_MEMORY_CREDS
*find_memory_creds_by_name(const char *username
);
250 NTSTATUS
winbindd_add_memory_creds(const char *username
,
253 NTSTATUS
winbindd_delete_memory_creds(const char *username
);
254 NTSTATUS
winbindd_replace_memory_creds(const char *username
,
257 /* The following definitions come from winbindd/winbindd_creds.c */
259 NTSTATUS
winbindd_get_creds(struct winbindd_domain
*domain
,
261 const struct dom_sid
*sid
,
262 struct netr_SamInfo3
**info3
,
263 const uint8_t *cached_nt_pass
[NT_HASH_LEN
],
264 const uint8_t *cred_salt
[NT_HASH_LEN
]);
265 NTSTATUS
winbindd_store_creds(struct winbindd_domain
*domain
,
268 struct netr_SamInfo3
*info3
);
269 NTSTATUS
winbindd_update_creds_by_info3(struct winbindd_domain
*domain
,
272 struct netr_SamInfo3
*info3
);
273 NTSTATUS
winbindd_update_creds_by_name(struct winbindd_domain
*domain
,
277 /* The following definitions come from winbindd/winbindd_domain.c */
279 void setup_domain_child(struct winbindd_domain
*domain
);
281 /* The following definitions come from winbindd/winbindd_dual.c */
283 struct dcerpc_binding_handle
*dom_child_handle(struct winbindd_domain
*domain
);
284 struct winbindd_child
*choose_domain_child(struct winbindd_domain
*domain
);
286 struct tevent_req
*wb_child_request_send(TALLOC_CTX
*mem_ctx
,
287 struct tevent_context
*ev
,
288 struct winbindd_child
*child
,
289 struct winbindd_request
*request
);
290 int wb_child_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
291 struct winbindd_response
**presponse
, int *err
);
292 struct tevent_req
*wb_domain_request_send(TALLOC_CTX
*mem_ctx
,
293 struct tevent_context
*ev
,
294 struct winbindd_domain
*domain
,
295 struct winbindd_request
*request
);
296 int wb_domain_request_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
297 struct winbindd_response
**presponse
, int *err
);
299 void setup_child(struct winbindd_domain
*domain
, struct winbindd_child
*child
,
300 const struct winbindd_child_dispatch_table
*table
,
301 const char *logprefix
,
302 const char *logname
);
303 void winbind_child_died(pid_t pid
);
304 void winbindd_flush_negative_conn_cache(struct winbindd_domain
*domain
);
305 void winbind_msg_debug(struct messaging_context
*msg_ctx
,
308 struct server_id server_id
,
310 void winbind_msg_offline(struct messaging_context
*msg_ctx
,
313 struct server_id server_id
,
315 void winbind_msg_online(struct messaging_context
*msg_ctx
,
318 struct server_id server_id
,
320 void winbind_msg_onlinestatus(struct messaging_context
*msg_ctx
,
323 struct server_id server_id
,
325 void winbind_msg_dump_event_list(struct messaging_context
*msg_ctx
,
328 struct server_id server_id
,
330 void winbind_msg_dump_domain_list(struct messaging_context
*msg_ctx
,
333 struct server_id server_id
,
335 void winbind_msg_ip_dropped(struct messaging_context
*msg_ctx
,
338 struct server_id server_id
,
340 void winbind_msg_ip_dropped_parent(struct messaging_context
*msg_ctx
,
343 struct server_id server_id
,
345 NTSTATUS
winbindd_reinit_after_fork(const struct winbindd_child
*myself
,
346 const char *logfilename
);
347 struct winbindd_domain
*wb_child_domain(void);
349 /* The following definitions come from winbindd/winbindd_group.c */
350 bool fill_grent(TALLOC_CTX
*mem_ctx
, struct winbindd_gr
*gr
,
351 const char *dom_name
, const char *gr_name
, gid_t unix_gid
);
352 NTSTATUS
winbindd_print_groupmembers(struct talloc_dict
*members
,
354 int *num_members
, char **result
);
357 /* The following definitions come from winbindd/winbindd_idmap.c */
359 void init_idmap_child(void);
360 struct winbindd_child
*idmap_child(void);
361 struct idmap_domain
*idmap_find_domain_with_sid(const char *domname
,
362 const struct dom_sid
*sid
);
363 const char *idmap_config_const_string(const char *domname
, const char *option
,
365 bool idmap_config_bool(const char *domname
, const char *option
, bool def
);
366 int idmap_config_int(const char *domname
, const char *option
, int def
);
367 bool domain_has_idmap_config(const char *domname
);
368 bool lp_scan_idmap_domains(bool (*fn
)(const char *domname
,
372 /* The following definitions come from winbindd/winbindd_locator.c */
374 void init_locator_child(void);
375 struct winbindd_child
*locator_child(void);
377 /* The following definitions come from winbindd/winbindd_misc.c */
379 void winbindd_list_trusted_domains(struct winbindd_cli_state
*state
);
380 enum winbindd_result
winbindd_dual_list_trusted_domains(struct winbindd_domain
*domain
,
381 struct winbindd_cli_state
*state
);
382 void winbindd_show_sequence(struct winbindd_cli_state
*state
);
383 void winbindd_domain_info(struct winbindd_cli_state
*state
);
384 void winbindd_dc_info(struct winbindd_cli_state
*state
);
385 void winbindd_ping(struct winbindd_cli_state
*state
);
386 void winbindd_info(struct winbindd_cli_state
*state
);
387 void winbindd_interface_version(struct winbindd_cli_state
*state
);
388 void winbindd_domain_name(struct winbindd_cli_state
*state
);
389 void winbindd_netbios_name(struct winbindd_cli_state
*state
);
390 void winbindd_priv_pipe_dir(struct winbindd_cli_state
*state
);
392 /* The following definitions come from winbindd/winbindd_ndr.c */
394 void ndr_print_winbindd_child(struct ndr_print
*ndr
,
396 const struct winbindd_child
*r
);
397 void ndr_print_winbindd_cm_conn(struct ndr_print
*ndr
,
399 const struct winbindd_cm_conn
*r
);
400 void ndr_print_winbindd_methods(struct ndr_print
*ndr
,
402 const struct winbindd_methods
*r
);
403 void ndr_print_winbindd_domain(struct ndr_print
*ndr
,
405 const struct winbindd_domain
*r
);
407 /* The following definitions come from winbindd/winbindd_pam.c */
409 bool check_request_flags(uint32_t flags
);
410 NTSTATUS
append_auth_data(TALLOC_CTX
*mem_ctx
,
411 struct winbindd_response
*resp
,
412 uint32_t request_flags
,
413 struct netr_SamInfo3
*info3
,
414 const char *name_domain
,
415 const char *name_user
);
416 uid_t
get_uid_from_request(struct winbindd_request
*request
);
417 struct winbindd_domain
*find_auth_domain(uint8_t flags
,
418 const char *domain_name
);
419 enum winbindd_result
winbindd_dual_pam_auth(struct winbindd_domain
*domain
,
420 struct winbindd_cli_state
*state
) ;
421 enum winbindd_result
winbindd_dual_pam_auth_crap(struct winbindd_domain
*domain
,
422 struct winbindd_cli_state
*state
) ;
423 enum winbindd_result
winbindd_dual_pam_chauthtok(struct winbindd_domain
*contact_domain
,
424 struct winbindd_cli_state
*state
);
425 enum winbindd_result
winbindd_dual_pam_logoff(struct winbindd_domain
*domain
,
426 struct winbindd_cli_state
*state
) ;
427 enum winbindd_result
winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain
*domainSt
, struct winbindd_cli_state
*state
);
428 NTSTATUS
winbindd_pam_auth_pac_send(struct winbindd_cli_state
*state
,
429 struct netr_SamInfo3
**info3
);
431 NTSTATUS
winbind_dual_SamLogon(struct winbindd_domain
*domain
,
433 uint32_t logon_parameters
,
434 const char *name_user
,
435 const char *name_domain
,
436 const char *workstation
,
437 const uint8_t chal
[8],
438 DATA_BLOB lm_response
,
439 DATA_BLOB nt_response
,
440 uint8_t *authoritative
,
443 struct netr_SamInfo3
**info3
);
445 /* The following definitions come from winbindd/winbindd_util.c */
447 struct winbindd_domain
*domain_list(void);
448 struct winbindd_domain
*wb_next_domain(struct winbindd_domain
*domain
);
449 bool domain_is_forest_root(const struct winbindd_domain
*domain
);
450 void rescan_trusted_domains(struct tevent_context
*ev
, struct tevent_timer
*te
,
451 struct timeval now
, void *private_data
);
452 enum winbindd_result
winbindd_dual_init_connection(struct winbindd_domain
*domain
,
453 struct winbindd_cli_state
*state
);
454 bool init_domain_list(void);
455 struct winbindd_domain
*find_domain_from_name_noinit(const char *domain_name
);
456 struct winbindd_domain
*find_domain_from_name(const char *domain_name
);
457 struct winbindd_domain
*find_domain_from_sid_noinit(const struct dom_sid
*sid
);
458 struct winbindd_domain
*find_domain_from_sid(const struct dom_sid
*sid
);
459 struct winbindd_domain
*find_our_domain(void);
460 struct winbindd_domain
*find_lookup_domain_from_sid(const struct dom_sid
*sid
);
461 struct winbindd_domain
*find_lookup_domain_from_name(const char *domain_name
);
462 bool parse_domain_user(const char *domuser
, fstring domain
, fstring user
);
463 bool parse_domain_user_talloc(TALLOC_CTX
*mem_ctx
, const char *domuser
,
464 char **domain
, char **user
);
465 bool canonicalize_username(fstring username_inout
, fstring domain
, fstring user
);
466 void fill_domain_username(fstring name
, const char *domain
, const char *user
, bool can_assume
);
467 char *fill_domain_username_talloc(TALLOC_CTX
*ctx
,
471 struct winbindd_cli_state
*winbindd_client_list(void);
472 struct winbindd_cli_state
*winbindd_client_list_tail(void);
473 struct winbindd_cli_state
*
474 winbindd_client_list_prev(struct winbindd_cli_state
*cli
);
475 void winbindd_add_client(struct winbindd_cli_state
*cli
);
476 void winbindd_remove_client(struct winbindd_cli_state
*cli
);
477 void winbindd_promote_client(struct winbindd_cli_state
*cli
);
478 int winbindd_num_clients(void);
479 NTSTATUS
lookup_usergroups_cached(TALLOC_CTX
*mem_ctx
,
480 const struct dom_sid
*user_sid
,
481 uint32_t *p_num_groups
, struct dom_sid
**user_sids
);
483 NTSTATUS
normalize_name_map(TALLOC_CTX
*mem_ctx
,
484 struct winbindd_domain
*domain
,
487 NTSTATUS
normalize_name_unmap(TALLOC_CTX
*mem_ctx
,
491 NTSTATUS
resolve_username_to_alias(TALLOC_CTX
*mem_ctx
,
492 struct winbindd_domain
*domain
,
493 const char *name
, char **alias
);
494 NTSTATUS
resolve_alias_to_username(TALLOC_CTX
*mem_ctx
,
495 struct winbindd_domain
*domain
,
496 const char *alias
, char **name
);
498 bool winbindd_can_contact_domain(struct winbindd_domain
*domain
);
499 bool winbindd_internal_child(struct winbindd_child
*child
);
500 void winbindd_set_locator_kdc_envs(const struct winbindd_domain
*domain
);
501 void winbindd_unset_locator_kdc_env(const struct winbindd_domain
*domain
);
502 void winbindd_set_locator_kdc_envs(const struct winbindd_domain
*domain
);
503 void winbindd_unset_locator_kdc_env(const struct winbindd_domain
*domain
);
504 void set_auth_errors(struct winbindd_response
*resp
, NTSTATUS result
);
505 bool is_domain_offline(const struct winbindd_domain
*domain
);
506 bool is_domain_online(const struct winbindd_domain
*domain
);
507 bool parse_sidlist(TALLOC_CTX
*mem_ctx
, const char *sidstr
,
508 struct dom_sid
**sids
, uint32_t *num_sids
);
509 bool parse_xidlist(TALLOC_CTX
*mem_ctx
, const char *xidstr
,
510 struct unixid
**pxids
, uint32_t *pnum_xids
);
512 /* The following definitions come from winbindd/winbindd_wins.c */
514 void winbindd_wins_byname(struct winbindd_cli_state
*state
);
516 struct tevent_req
*wb_ping_send(TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
517 struct winbindd_cli_state
*cli
,
518 struct winbindd_request
*request
);
519 NTSTATUS
wb_ping_recv(struct tevent_req
*req
,
520 struct winbindd_response
*resp
);
522 enum winbindd_result
winbindd_dual_ping(struct winbindd_domain
*domain
,
523 struct winbindd_cli_state
*state
);
525 struct dcerpc_binding_handle
*wbint_binding_handle(TALLOC_CTX
*mem_ctx
,
526 struct winbindd_domain
*domain
,
527 struct winbindd_child
*child
);
528 enum winbindd_result
winbindd_dual_ndrcmd(struct winbindd_domain
*domain
,
529 struct winbindd_cli_state
*state
);
531 struct tevent_req
*wb_lookupsid_send(TALLOC_CTX
*mem_ctx
,
532 struct tevent_context
*ev
,
533 const struct dom_sid
*sid
);
534 NTSTATUS
wb_lookupsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
535 enum lsa_SidType
*type
, const char **domain
,
538 struct tevent_req
*winbindd_lookupsid_send(TALLOC_CTX
*mem_ctx
,
539 struct tevent_context
*ev
,
540 struct winbindd_cli_state
*cli
,
541 struct winbindd_request
*request
);
542 NTSTATUS
winbindd_lookupsid_recv(struct tevent_req
*req
,
543 struct winbindd_response
*response
);
545 struct tevent_req
*winbindd_lookupsids_send(TALLOC_CTX
*mem_ctx
,
546 struct tevent_context
*ev
,
547 struct winbindd_cli_state
*cli
,
548 struct winbindd_request
*request
);
549 NTSTATUS
winbindd_lookupsids_recv(struct tevent_req
*req
,
550 struct winbindd_response
*response
);
552 struct tevent_req
*wb_lookupname_send(TALLOC_CTX
*mem_ctx
,
553 struct tevent_context
*ev
,
554 const char *dom_name
, const char *name
,
556 NTSTATUS
wb_lookupname_recv(struct tevent_req
*req
, struct dom_sid
*sid
,
557 enum lsa_SidType
*type
);
559 struct tevent_req
*winbindd_lookupname_send(TALLOC_CTX
*mem_ctx
,
560 struct tevent_context
*ev
,
561 struct winbindd_cli_state
*cli
,
562 struct winbindd_request
*request
);
563 NTSTATUS
winbindd_lookupname_recv(struct tevent_req
*req
,
564 struct winbindd_response
*response
);
566 struct tevent_req
*winbindd_allocate_uid_send(TALLOC_CTX
*mem_ctx
,
567 struct tevent_context
*ev
,
568 struct winbindd_cli_state
*cli
,
569 struct winbindd_request
*request
);
570 NTSTATUS
winbindd_allocate_uid_recv(struct tevent_req
*req
,
571 struct winbindd_response
*response
);
573 struct tevent_req
*winbindd_allocate_gid_send(TALLOC_CTX
*mem_ctx
,
574 struct tevent_context
*ev
,
575 struct winbindd_cli_state
*cli
,
576 struct winbindd_request
*request
);
577 NTSTATUS
winbindd_allocate_gid_recv(struct tevent_req
*req
,
578 struct winbindd_response
*response
);
580 struct tevent_req
*wb_queryuser_send(TALLOC_CTX
*mem_ctx
,
581 struct tevent_context
*ev
,
582 const struct dom_sid
*user_sid
);
583 NTSTATUS
wb_queryuser_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
584 struct wbint_userinfo
**pinfo
);
586 struct tevent_req
*wb_getpwsid_send(TALLOC_CTX
*mem_ctx
,
587 struct tevent_context
*ev
,
588 const struct dom_sid
*user_sid
,
589 struct winbindd_pw
*pw
);
590 NTSTATUS
wb_getpwsid_recv(struct tevent_req
*req
);
592 struct tevent_req
*winbindd_getpwsid_send(TALLOC_CTX
*mem_ctx
,
593 struct tevent_context
*ev
,
594 struct winbindd_cli_state
*cli
,
595 struct winbindd_request
*request
);
596 NTSTATUS
winbindd_getpwsid_recv(struct tevent_req
*req
,
597 struct winbindd_response
*response
);
599 struct tevent_req
*winbindd_getpwnam_send(TALLOC_CTX
*mem_ctx
,
600 struct tevent_context
*ev
,
601 struct winbindd_cli_state
*cli
,
602 struct winbindd_request
*request
);
603 NTSTATUS
winbindd_getpwnam_recv(struct tevent_req
*req
,
604 struct winbindd_response
*response
);
606 struct tevent_req
*winbindd_getpwuid_send(TALLOC_CTX
*mem_ctx
,
607 struct tevent_context
*ev
,
608 struct winbindd_cli_state
*cli
,
609 struct winbindd_request
*request
);
610 NTSTATUS
winbindd_getpwuid_recv(struct tevent_req
*req
,
611 struct winbindd_response
*response
);
612 struct tevent_req
*wb_lookupuseraliases_send(TALLOC_CTX
*mem_ctx
,
613 struct tevent_context
*ev
,
614 struct winbindd_domain
*domain
,
616 const struct dom_sid
*sids
);
617 NTSTATUS
wb_lookupuseraliases_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
618 uint32_t *num_aliases
, uint32_t **aliases
);
619 struct tevent_req
*winbindd_getsidaliases_send(TALLOC_CTX
*mem_ctx
,
620 struct tevent_context
*ev
,
621 struct winbindd_cli_state
*cli
,
622 struct winbindd_request
*request
);
623 NTSTATUS
winbindd_getsidaliases_recv(struct tevent_req
*req
,
624 struct winbindd_response
*response
);
625 struct tevent_req
*wb_lookupusergroups_send(TALLOC_CTX
*mem_ctx
,
626 struct tevent_context
*ev
,
627 const struct dom_sid
*sid
);
628 NTSTATUS
wb_lookupusergroups_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
629 int *num_sids
, struct dom_sid
**sids
);
631 struct tevent_req
*winbindd_getuserdomgroups_send(TALLOC_CTX
*mem_ctx
,
632 struct tevent_context
*ev
,
633 struct winbindd_cli_state
*cli
,
634 struct winbindd_request
*request
);
635 NTSTATUS
winbindd_getuserdomgroups_recv(struct tevent_req
*req
,
636 struct winbindd_response
*response
);
637 struct tevent_req
*wb_gettoken_send(TALLOC_CTX
*mem_ctx
,
638 struct tevent_context
*ev
,
639 const struct dom_sid
*sid
,
640 bool expand_local_aliases
);
641 NTSTATUS
wb_gettoken_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
642 int *num_sids
, struct dom_sid
**sids
);
643 struct tevent_req
*winbindd_getgroups_send(TALLOC_CTX
*mem_ctx
,
644 struct tevent_context
*ev
,
645 struct winbindd_cli_state
*cli
,
646 struct winbindd_request
*request
);
647 NTSTATUS
winbindd_getgroups_recv(struct tevent_req
*req
,
648 struct winbindd_response
*response
);
650 struct tevent_req
*wb_seqnum_send(TALLOC_CTX
*mem_ctx
,
651 struct tevent_context
*ev
,
652 struct winbindd_domain
*domain
);
653 NTSTATUS
wb_seqnum_recv(struct tevent_req
*req
, uint32_t *seqnum
);
655 struct tevent_req
*wb_seqnums_send(TALLOC_CTX
*mem_ctx
,
656 struct tevent_context
*ev
);
657 NTSTATUS
wb_seqnums_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
658 int *num_domains
, struct winbindd_domain
***domains
,
659 NTSTATUS
**stati
, uint32_t **seqnums
);
661 struct tevent_req
*winbindd_show_sequence_send(TALLOC_CTX
*mem_ctx
,
662 struct tevent_context
*ev
,
663 struct winbindd_cli_state
*cli
,
664 struct winbindd_request
*request
);
665 NTSTATUS
winbindd_show_sequence_recv(struct tevent_req
*req
,
666 struct winbindd_response
*response
);
668 struct tevent_req
*wb_group_members_send(TALLOC_CTX
*mem_ctx
,
669 struct tevent_context
*ev
,
670 const struct dom_sid
*sid
,
671 enum lsa_SidType type
,
673 NTSTATUS
wb_group_members_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
674 struct talloc_dict
**members
);
675 NTSTATUS
add_wbint_Principal_to_dict(TALLOC_CTX
*mem_ctx
,
678 enum lsa_SidType type
,
679 struct talloc_dict
*dict
);
681 struct tevent_req
*wb_getgrsid_send(TALLOC_CTX
*mem_ctx
,
682 struct tevent_context
*ev
,
683 const struct dom_sid
*group_sid
,
685 NTSTATUS
wb_getgrsid_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
686 const char **domname
, const char **name
, gid_t
*gid
,
687 struct talloc_dict
**members
);
689 struct tevent_req
*winbindd_getgrgid_send(TALLOC_CTX
*mem_ctx
,
690 struct tevent_context
*ev
,
691 struct winbindd_cli_state
*cli
,
692 struct winbindd_request
*request
);
693 NTSTATUS
winbindd_getgrgid_recv(struct tevent_req
*req
,
694 struct winbindd_response
*response
);
696 struct tevent_req
*winbindd_getgrnam_send(TALLOC_CTX
*mem_ctx
,
697 struct tevent_context
*ev
,
698 struct winbindd_cli_state
*cli
,
699 struct winbindd_request
*request
);
700 NTSTATUS
winbindd_getgrnam_recv(struct tevent_req
*req
,
701 struct winbindd_response
*response
);
703 struct tevent_req
*winbindd_getusersids_send(TALLOC_CTX
*mem_ctx
,
704 struct tevent_context
*ev
,
705 struct winbindd_cli_state
*cli
,
706 struct winbindd_request
*request
);
707 NTSTATUS
winbindd_getusersids_recv(struct tevent_req
*req
,
708 struct winbindd_response
*response
);
710 struct tevent_req
*winbindd_lookuprids_send(TALLOC_CTX
*mem_ctx
,
711 struct tevent_context
*ev
,
712 struct winbindd_cli_state
*cli
,
713 struct winbindd_request
*request
);
714 NTSTATUS
winbindd_lookuprids_recv(struct tevent_req
*req
,
715 struct winbindd_response
*response
);
717 struct tevent_req
*wb_query_user_list_send(TALLOC_CTX
*mem_ctx
,
718 struct tevent_context
*ev
,
719 struct winbindd_domain
*domain
);
720 NTSTATUS
wb_query_user_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
723 struct tevent_req
*wb_query_group_list_send(TALLOC_CTX
*mem_ctx
,
724 struct tevent_context
*ev
,
725 struct winbindd_domain
*domain
);
726 NTSTATUS
wb_query_group_list_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
728 struct wbint_Principal
**groups
);
730 struct tevent_req
*wb_next_pwent_send(TALLOC_CTX
*mem_ctx
,
731 struct tevent_context
*ev
,
732 struct getpwent_state
*gstate
,
733 struct winbindd_pw
*pw
);
734 NTSTATUS
wb_next_pwent_recv(struct tevent_req
*req
);
736 struct tevent_req
*winbindd_setpwent_send(TALLOC_CTX
*mem_ctx
,
737 struct tevent_context
*ev
,
738 struct winbindd_cli_state
*cli
,
739 struct winbindd_request
*request
);
740 NTSTATUS
winbindd_setpwent_recv(struct tevent_req
*req
,
741 struct winbindd_response
*presp
);
743 struct tevent_req
*winbindd_getpwent_send(TALLOC_CTX
*mem_ctx
,
744 struct tevent_context
*ev
,
745 struct winbindd_cli_state
*cli
,
746 struct winbindd_request
*request
);
747 NTSTATUS
winbindd_getpwent_recv(struct tevent_req
*req
,
748 struct winbindd_response
*response
);
750 struct tevent_req
*winbindd_endpwent_send(TALLOC_CTX
*mem_ctx
,
751 struct tevent_context
*ev
,
752 struct winbindd_cli_state
*cli
,
753 struct winbindd_request
*request
);
754 NTSTATUS
winbindd_endpwent_recv(struct tevent_req
*req
,
755 struct winbindd_response
*response
);
757 struct tevent_req
*winbindd_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
758 struct tevent_context
*ev
,
759 struct winbindd_cli_state
*cli
,
760 struct winbindd_request
*request
);
761 NTSTATUS
winbindd_dsgetdcname_recv(struct tevent_req
*req
,
762 struct winbindd_response
*response
);
764 struct tevent_req
*wb_dsgetdcname_send(TALLOC_CTX
*mem_ctx
,
765 struct tevent_context
*ev
,
766 const char *domain_name
,
767 const struct GUID
*domain_guid
,
768 const char *site_name
,
770 NTSTATUS
wb_dsgetdcname_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
771 struct netr_DsRGetDCNameInfo
**pdcinfo
);
772 NTSTATUS
wb_dsgetdcname_gencache_set(const char *domname
,
773 struct netr_DsRGetDCNameInfo
*dcinfo
);
774 NTSTATUS
wb_dsgetdcname_gencache_get(TALLOC_CTX
*mem_ctx
,
776 struct netr_DsRGetDCNameInfo
**dcinfo
);
778 struct tevent_req
*winbindd_getdcname_send(TALLOC_CTX
*mem_ctx
,
779 struct tevent_context
*ev
,
780 struct winbindd_cli_state
*cli
,
781 struct winbindd_request
*request
);
782 NTSTATUS
winbindd_getdcname_recv(struct tevent_req
*req
,
783 struct winbindd_response
*response
);
785 struct tevent_req
*wb_next_grent_send(TALLOC_CTX
*mem_ctx
,
786 struct tevent_context
*ev
,
788 struct getgrent_state
*gstate
,
789 struct winbindd_gr
*gr
);
790 NTSTATUS
wb_next_grent_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
791 struct talloc_dict
**members
);
793 struct tevent_req
*winbindd_setgrent_send(TALLOC_CTX
*mem_ctx
,
794 struct tevent_context
*ev
,
795 struct winbindd_cli_state
*cli
,
796 struct winbindd_request
*request
);
797 NTSTATUS
winbindd_setgrent_recv(struct tevent_req
*req
,
798 struct winbindd_response
*response
);
799 struct tevent_req
*winbindd_getgrent_send(TALLOC_CTX
*mem_ctx
,
800 struct tevent_context
*ev
,
801 struct winbindd_cli_state
*cli
,
802 struct winbindd_request
*request
);
803 NTSTATUS
winbindd_getgrent_recv(struct tevent_req
*req
,
804 struct winbindd_response
*response
);
805 struct tevent_req
*winbindd_endgrent_send(TALLOC_CTX
*mem_ctx
,
806 struct tevent_context
*ev
,
807 struct winbindd_cli_state
*cli
,
808 struct winbindd_request
*request
);
809 NTSTATUS
winbindd_endgrent_recv(struct tevent_req
*req
,
810 struct winbindd_response
*response
);
812 struct tevent_req
*winbindd_list_users_send(TALLOC_CTX
*mem_ctx
,
813 struct tevent_context
*ev
,
814 struct winbindd_cli_state
*cli
,
815 struct winbindd_request
*request
);
816 NTSTATUS
winbindd_list_users_recv(struct tevent_req
*req
,
817 struct winbindd_response
*response
);
819 struct tevent_req
*winbindd_list_groups_send(TALLOC_CTX
*mem_ctx
,
820 struct tevent_context
*ev
,
821 struct winbindd_cli_state
*cli
,
822 struct winbindd_request
*request
);
823 NTSTATUS
winbindd_list_groups_recv(struct tevent_req
*req
,
824 struct winbindd_response
*response
);
826 struct tevent_req
*winbindd_check_machine_acct_send(TALLOC_CTX
*mem_ctx
,
827 struct tevent_context
*ev
,
828 struct winbindd_cli_state
*cli
,
829 struct winbindd_request
*request
);
830 NTSTATUS
winbindd_check_machine_acct_recv(struct tevent_req
*req
,
831 struct winbindd_response
*presp
);
833 struct tevent_req
*winbindd_ping_dc_send(TALLOC_CTX
*mem_ctx
,
834 struct tevent_context
*ev
,
835 struct winbindd_cli_state
*cli
,
836 struct winbindd_request
*request
);
837 NTSTATUS
winbindd_ping_dc_recv(struct tevent_req
*req
,
838 struct winbindd_response
*presp
);
840 struct tevent_req
*winbindd_change_machine_acct_send(TALLOC_CTX
*mem_ctx
,
841 struct tevent_context
*ev
,
842 struct winbindd_cli_state
*cli
,
843 struct winbindd_request
*request
);
844 NTSTATUS
winbindd_change_machine_acct_recv(struct tevent_req
*req
,
845 struct winbindd_response
*presp
);
847 struct tevent_req
*winbindd_pam_auth_send(TALLOC_CTX
*mem_ctx
,
848 struct tevent_context
*ev
,
849 struct winbindd_cli_state
*cli
,
850 struct winbindd_request
*request
);
851 NTSTATUS
winbindd_pam_auth_recv(struct tevent_req
*req
,
852 struct winbindd_response
*response
);
854 struct tevent_req
*winbindd_pam_auth_crap_send(
856 struct tevent_context
*ev
,
857 struct winbindd_cli_state
*cli
,
858 struct winbindd_request
*request
);
859 NTSTATUS
winbindd_pam_auth_crap_recv(struct tevent_req
*req
,
860 struct winbindd_response
*response
);
862 struct tevent_req
*winbindd_pam_chauthtok_send(
864 struct tevent_context
*ev
,
865 struct winbindd_cli_state
*cli
,
866 struct winbindd_request
*request
);
867 NTSTATUS
winbindd_pam_chauthtok_recv(struct tevent_req
*req
,
868 struct winbindd_response
*response
);
870 struct tevent_req
*winbindd_pam_logoff_send(TALLOC_CTX
*mem_ctx
,
871 struct tevent_context
*ev
,
872 struct winbindd_cli_state
*cli
,
873 struct winbindd_request
*request
);
874 NTSTATUS
winbindd_pam_logoff_recv(struct tevent_req
*req
,
875 struct winbindd_response
*response
);
877 struct tevent_req
*winbindd_pam_chng_pswd_auth_crap_send(
879 struct tevent_context
*ev
,
880 struct winbindd_cli_state
*cli
,
881 struct winbindd_request
*request
);
882 NTSTATUS
winbindd_pam_chng_pswd_auth_crap_recv(
883 struct tevent_req
*req
,
884 struct winbindd_response
*response
);
886 struct tevent_req
*wb_lookupsids_send(TALLOC_CTX
*mem_ctx
,
887 struct tevent_context
*ev
,
888 struct dom_sid
*sids
,
890 NTSTATUS
wb_lookupsids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
891 struct lsa_RefDomainList
**domains
,
892 struct lsa_TransNameArray
**names
);
894 struct tevent_req
*wb_sids2xids_send(TALLOC_CTX
*mem_ctx
,
895 struct tevent_context
*ev
,
896 const struct dom_sid
*sids
,
897 const uint32_t num_sids
);
898 NTSTATUS
wb_sids2xids_recv(struct tevent_req
*req
,
899 struct unixid xids
[], uint32_t num_xids
);
900 struct tevent_req
*winbindd_sids_to_xids_send(TALLOC_CTX
*mem_ctx
,
901 struct tevent_context
*ev
,
902 struct winbindd_cli_state
*cli
,
903 struct winbindd_request
*request
);
904 NTSTATUS
winbindd_sids_to_xids_recv(struct tevent_req
*req
,
905 struct winbindd_response
*response
);
906 struct tevent_req
*wb_xids2sids_send(TALLOC_CTX
*mem_ctx
,
907 struct tevent_context
*ev
,
910 NTSTATUS
wb_xids2sids_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
911 struct dom_sid
**sids
);
912 struct tevent_req
*winbindd_xids_to_sids_send(TALLOC_CTX
*mem_ctx
,
913 struct tevent_context
*ev
,
914 struct winbindd_cli_state
*cli
,
915 struct winbindd_request
*request
);
916 NTSTATUS
winbindd_xids_to_sids_recv(struct tevent_req
*req
,
917 struct winbindd_response
*response
);
918 struct tevent_req
*winbindd_wins_byip_send(TALLOC_CTX
*mem_ctx
,
919 struct tevent_context
*ev
,
920 struct winbindd_cli_state
*cli
,
921 struct winbindd_request
*request
);
922 NTSTATUS
winbindd_wins_byip_recv(struct tevent_req
*req
,
923 struct winbindd_response
*presp
);
924 struct tevent_req
*winbindd_wins_byname_send(TALLOC_CTX
*mem_ctx
,
925 struct tevent_context
*ev
,
926 struct winbindd_cli_state
*cli
,
927 struct winbindd_request
*request
);
928 NTSTATUS
winbindd_wins_byname_recv(struct tevent_req
*req
,
929 struct winbindd_response
*presp
);
932 /* The following definitions come from winbindd/winbindd_samr.c */
934 NTSTATUS
open_internal_samr_conn(TALLOC_CTX
*mem_ctx
,
935 struct winbindd_domain
*domain
,
936 struct rpc_pipe_client
**samr_pipe
,
937 struct policy_handle
*samr_domain_hnd
);
938 NTSTATUS
open_internal_lsa_conn(TALLOC_CTX
*mem_ctx
,
939 struct rpc_pipe_client
**lsa_pipe
,
940 struct policy_handle
*lsa_hnd
);
942 /* The following definitions come from winbindd/winbindd_irpc.c */
943 NTSTATUS
wb_irpc_register(void);
945 /* The following definitions come from winbindd/winbindd_reconnect.c */
946 bool reconnect_need_retry(NTSTATUS status
, struct winbindd_domain
*domain
);
948 #endif /* _WINBINDD_PROTO_H_ */