source: vendor/current/source3/winbindd/winbindd_proto.h

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 38.5 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * collected prototypes header
4 *
5 * frozen from "make proto" in May 2008
6 *
7 * Copyright (C) Michael Adam 2008
8 *
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.
13 *
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.
18 *
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/>.
21 */
22
23#ifndef _WINBINDD_PROTO_H_
24#define _WINBINDD_PROTO_H_
25
26#include "ads.h"
27
28/* The following definitions come from winbindd/winbindd.c */
29struct messaging_context *winbind_messaging_context(void);
30struct imessaging_context *winbind_imessaging_context(void);
31void request_error(struct winbindd_cli_state *state);
32void request_ok(struct winbindd_cli_state *state);
33bool winbindd_setup_sig_term_handler(bool parent);
34bool winbindd_setup_stdin_handler(bool parent, bool foreground);
35bool winbindd_setup_sig_hup_handler(const char *lfile);
36bool winbindd_use_idmap_cache(void);
37bool winbindd_use_cache(void);
38char *get_winbind_priv_pipe_dir(void);
39struct tevent_context *winbind_event_context(void);
40
41/* The following definitions come from winbindd/winbindd_ads.c */
42
43/* The following definitions come from winbindd/winbindd_rpc.c */
44
45NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
46 struct winbindd_domain *domain,
47 uint32_t num_sids,
48 const struct dom_sid *sids,
49 char ***domains,
50 char ***names,
51 enum lsa_SidType **types);
52NTSTATUS 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);
57
58/* The following definitions come from winbindd/winbindd_cache.c */
59
60NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
61NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
62 TALLOC_CTX *mem_ctx,
63 const struct dom_sid *sid,
64 const uint8_t **cached_nt_pass,
65 const uint8_t **cached_salt);
66NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
67 const struct dom_sid *sid,
68 const uint8_t nt_pass[NT_HASH_LEN]);
69void wcache_invalidate_samlogon(struct winbindd_domain *domain,
70 const struct dom_sid *user_sid);
71bool wcache_invalidate_cache(void);
72bool wcache_invalidate_cache_noinit(void);
73bool init_wcache(void);
74bool initialize_winbindd_cache(void);
75void close_winbindd_cache(void);
76NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
77 TALLOC_CTX *mem_ctx,
78 const struct dom_sid *group_sid,
79 uint32_t *num_names,
80 struct dom_sid **sid_mem, char ***names,
81 uint32_t **name_types);
82bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
83 char **domain_name, char **name,
84 enum lsa_SidType *type);
85bool lookup_cached_name(const char *domain_name,
86 const char *name,
87 struct dom_sid *sid,
88 enum lsa_SidType *type);
89void cache_name2sid_trusted(struct winbindd_domain *domain,
90 const char *domain_name,
91 const char *name,
92 enum lsa_SidType type,
93 const struct dom_sid *sid);
94void cache_name2sid(struct winbindd_domain *domain,
95 const char *domain_name, const char *name,
96 enum lsa_SidType type, const struct dom_sid *sid);
97NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
98 const char *domain_name,
99 const char *name,
100 struct dom_sid *sid,
101 enum lsa_SidType *type);
102NTSTATUS wcache_query_user(struct winbindd_domain *domain,
103 TALLOC_CTX *mem_ctx,
104 const struct dom_sid *user_sid,
105 struct wbint_userinfo *info);
106NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
107 TALLOC_CTX *mem_ctx,
108 const struct dom_sid *user_sid,
109 const char **full_name);
110NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
111 TALLOC_CTX *mem_ctx,
112 uint32_t num_sids, const struct dom_sid *sids,
113 uint32_t *pnum_aliases, uint32_t **paliases);
114NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
115 TALLOC_CTX *mem_ctx,
116 const struct dom_sid *user_sid,
117 uint32_t *pnum_sids,
118 struct dom_sid **psids);
119
120void wcache_flush_cache(void);
121NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
122NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
123bool set_global_winbindd_state_offline(void);
124void set_global_winbindd_state_online(void);
125bool get_global_winbindd_state_offline(void);
126int winbindd_validate_cache(void);
127int winbindd_validate_cache_nobackup(void);
128bool winbindd_cache_validate_and_initialize(void);
129bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
130bool wcache_tdc_add_domain( struct winbindd_domain *domain );
131struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
132struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
133void wcache_tdc_clear( void );
134#ifdef HAVE_ADS
135struct ads_struct;
136NTSTATUS nss_get_info_cached( struct winbindd_domain *domain,
137 const struct dom_sid *user_sid,
138 TALLOC_CTX *ctx,
139 const char **homedir, const char **shell,
140 const char **gecos, gid_t *p_gid);
141#endif
142bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
143 time_t last_seq_check);
144bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
145 uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
146void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
147 const DATA_BLOB *req, const DATA_BLOB *resp);
148
149/* The following definitions come from winbindd/winbindd_ccache_access.c */
150
151void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
152enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
153 struct winbindd_cli_state *state);
154void winbindd_ccache_save(struct winbindd_cli_state *state);
155
156/* The following definitions come from winbindd/winbindd_cm.c */
157void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
158 void *private_data,
159 uint32_t msg_type,
160 struct server_id server_id,
161 DATA_BLOB *data);
162void winbind_msg_domain_online(struct messaging_context *msg_ctx,
163 void *private_data,
164 uint32_t msg_type,
165 struct server_id server_id,
166 DATA_BLOB *data);
167
168void set_domain_offline(struct winbindd_domain *domain);
169void set_domain_online_request(struct winbindd_domain *domain);
170
171struct ndr_interface_table;
172NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
173 const struct ndr_interface_table *table,
174 struct rpc_pipe_client **ret_pipe);
175void invalidate_cm_connection(struct winbindd_domain *domain);
176void close_conns_after_fork(void);
177NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
178NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
179 bool need_rw_dc,
180 struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
181NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
182 struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
183NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
184 TALLOC_CTX *mem_ctx,
185 struct rpc_pipe_client **cli,
186 struct policy_handle *lsa_policy);
187NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
188 struct rpc_pipe_client **cli);
189bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
190 const char *domain_name,
191 char **p_dc_name, char **p_dc_ip);
192
193/* The following definitions come from winbindd/winbindd_cred_cache.c */
194
195bool ccache_entry_exists(const char *username);
196bool ccache_entry_identical(const char *username,
197 uid_t uid,
198 const char *ccname);
199void ccache_remove_all_after_fork(void);
200void ccache_regain_all_now(void);
201NTSTATUS add_ccache_to_list(const char *princ_name,
202 const char *ccname,
203 const char *service,
204 const char *username,
205 const char *password,
206 const char *realm,
207 uid_t uid,
208 time_t create_time,
209 time_t ticket_end,
210 time_t renew_until,
211 bool postponed_request);
212NTSTATUS remove_ccache(const char *username);
213struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
214NTSTATUS winbindd_add_memory_creds(const char *username,
215 uid_t uid,
216 const char *pass);
217NTSTATUS winbindd_delete_memory_creds(const char *username);
218NTSTATUS winbindd_replace_memory_creds(const char *username,
219 const char *pass);
220
221/* The following definitions come from winbindd/winbindd_creds.c */
222
223NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
224 TALLOC_CTX *mem_ctx,
225 const struct dom_sid *sid,
226 struct netr_SamInfo3 **info3,
227 const uint8_t *cached_nt_pass[NT_HASH_LEN],
228 const uint8_t *cred_salt[NT_HASH_LEN]);
229NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
230 const char *user,
231 const char *pass,
232 struct netr_SamInfo3 *info3);
233NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
234 const char *user,
235 const char *pass,
236 struct netr_SamInfo3 *info3);
237NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
238 const char *user,
239 const char *pass);
240
241/* The following definitions come from winbindd/winbindd_domain.c */
242
243void setup_domain_child(struct winbindd_domain *domain);
244
245/* The following definitions come from winbindd/winbindd_dual.c */
246
247struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
248struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
249
250struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
251 struct tevent_context *ev,
252 struct winbindd_child *child,
253 struct winbindd_request *request);
254int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
255 struct winbindd_response **presponse, int *err);
256struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
257 struct tevent_context *ev,
258 struct winbindd_domain *domain,
259 struct winbindd_request *request);
260int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
261 struct winbindd_response **presponse, int *err);
262
263void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
264 const struct winbindd_child_dispatch_table *table,
265 const char *logprefix,
266 const char *logname);
267void winbind_child_died(pid_t pid);
268void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
269void winbind_msg_debug(struct messaging_context *msg_ctx,
270 void *private_data,
271 uint32_t msg_type,
272 struct server_id server_id,
273 DATA_BLOB *data);
274void winbind_msg_offline(struct messaging_context *msg_ctx,
275 void *private_data,
276 uint32_t msg_type,
277 struct server_id server_id,
278 DATA_BLOB *data);
279void winbind_msg_online(struct messaging_context *msg_ctx,
280 void *private_data,
281 uint32_t msg_type,
282 struct server_id server_id,
283 DATA_BLOB *data);
284void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
285 void *private_data,
286 uint32_t msg_type,
287 struct server_id server_id,
288 DATA_BLOB *data);
289void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
290 void *private_data,
291 uint32_t msg_type,
292 struct server_id server_id,
293 DATA_BLOB *data);
294void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
295 void *private_data,
296 uint32_t msg_type,
297 struct server_id server_id,
298 DATA_BLOB *data);
299void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
300 void *private_data,
301 uint32_t msg_type,
302 struct server_id server_id,
303 DATA_BLOB *data);
304void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
305 void *private_data,
306 uint32_t msg_type,
307 struct server_id server_id,
308 DATA_BLOB *data);
309NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
310 const char *logfilename);
311struct winbindd_domain *wb_child_domain(void);
312
313/* The following definitions come from winbindd/winbindd_group.c */
314
315void winbindd_getgrnam(struct winbindd_cli_state *state);
316void winbindd_getgrgid(struct winbindd_cli_state *state);
317void winbindd_setgrent(struct winbindd_cli_state *state);
318void winbindd_endgrent(struct winbindd_cli_state *state);
319void winbindd_getgrent(struct winbindd_cli_state *state);
320void winbindd_list_groups(struct winbindd_cli_state *state);
321void winbindd_getgroups(struct winbindd_cli_state *state);
322void winbindd_getusersids(struct winbindd_cli_state *state);
323void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
324void winbindd_getsidaliases(struct winbindd_cli_state *state);
325bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
326 const char *dom_name, const char *gr_name, gid_t unix_gid);
327NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
328 TALLOC_CTX *mem_ctx,
329 int *num_members, char **result);
330
331
332/* The following definitions come from winbindd/winbindd_idmap.c */
333
334void init_idmap_child(void);
335struct winbindd_child *idmap_child(void);
336struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
337 const struct dom_sid *sid);
338bool domain_has_idmap_config(const char *domname);
339
340/* The following definitions come from winbindd/winbindd_locator.c */
341
342void init_locator_child(void);
343struct winbindd_child *locator_child(void);
344
345/* The following definitions come from winbindd/winbindd_misc.c */
346
347void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
348enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
349 struct winbindd_cli_state *state);
350void winbindd_show_sequence(struct winbindd_cli_state *state);
351void winbindd_domain_info(struct winbindd_cli_state *state);
352void winbindd_dc_info(struct winbindd_cli_state *state);
353void winbindd_ping(struct winbindd_cli_state *state);
354void winbindd_info(struct winbindd_cli_state *state);
355void winbindd_interface_version(struct winbindd_cli_state *state);
356void winbindd_domain_name(struct winbindd_cli_state *state);
357void winbindd_netbios_name(struct winbindd_cli_state *state);
358void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
359
360/* The following definitions come from winbindd/winbindd_ndr.c */
361struct ndr_print;
362void ndr_print_winbindd_child(struct ndr_print *ndr,
363 const char *name,
364 const struct winbindd_child *r);
365void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
366 const char *name,
367 const struct winbindd_cm_conn *r);
368void ndr_print_winbindd_methods(struct ndr_print *ndr,
369 const char *name,
370 const struct winbindd_methods *r);
371void ndr_print_winbindd_domain(struct ndr_print *ndr,
372 const char *name,
373 const struct winbindd_domain *r);
374
375/* The following definitions come from winbindd/winbindd_pam.c */
376
377bool check_request_flags(uint32_t flags);
378NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
379 struct winbindd_response *resp,
380 uint32_t request_flags,
381 struct netr_SamInfo3 *info3,
382 const char *name_domain,
383 const char *name_user);
384uid_t get_uid_from_request(struct winbindd_request *request);
385struct winbindd_domain *find_auth_domain(uint8_t flags,
386 const char *domain_name);
387enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
388 struct winbindd_cli_state *state) ;
389enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
390 struct winbindd_cli_state *state) ;
391enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
392 struct winbindd_cli_state *state);
393enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
394 struct winbindd_cli_state *state) ;
395enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
396NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
397 struct netr_SamInfo3 **info3);
398
399NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
400 TALLOC_CTX *mem_ctx,
401 uint32_t logon_parameters,
402 const char *name_user,
403 const char *name_domain,
404 const char *workstation,
405 const uint8_t chal[8],
406 DATA_BLOB lm_response,
407 DATA_BLOB nt_response,
408 struct netr_SamInfo3 **info3);
409
410/* The following definitions come from winbindd/winbindd_util.c */
411
412struct winbindd_domain *domain_list(void);
413struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
414bool domain_is_forest_root(const struct winbindd_domain *domain);
415void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
416 struct timeval now, void *private_data);
417enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
418 struct winbindd_cli_state *state);
419bool init_domain_list(void);
420struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
421struct winbindd_domain *find_domain_from_name(const char *domain_name);
422struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
423struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
424struct winbindd_domain *find_our_domain(void);
425struct winbindd_domain *find_root_domain(void);
426struct winbindd_domain *find_builtin_domain(void);
427struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
428struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
429bool parse_domain_user(const char *domuser, fstring domain, fstring user);
430bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
431 char **domain, char **user);
432bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
433void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
434char *fill_domain_username_talloc(TALLOC_CTX *ctx,
435 const char *domain,
436 const char *user,
437 bool can_assume);
438struct winbindd_cli_state *winbindd_client_list(void);
439struct winbindd_cli_state *winbindd_client_list_tail(void);
440struct winbindd_cli_state *
441winbindd_client_list_prev(struct winbindd_cli_state *cli);
442void winbindd_add_client(struct winbindd_cli_state *cli);
443void winbindd_remove_client(struct winbindd_cli_state *cli);
444void winbindd_promote_client(struct winbindd_cli_state *cli);
445int winbindd_num_clients(void);
446NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
447 TALLOC_CTX *mem_ctx,
448 const struct dom_sid *user_sid,
449 uint32_t *p_num_groups, struct dom_sid **user_sids);
450
451NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
452 struct winbindd_domain *domain,
453 const char *name,
454 char **normalized);
455NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
456 char *name,
457 char **normalized);
458
459NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
460 struct winbindd_domain *domain,
461 const char *name, char **alias);
462NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
463 struct winbindd_domain *domain,
464 const char *alias, char **name);
465
466bool winbindd_can_contact_domain(struct winbindd_domain *domain);
467bool winbindd_internal_child(struct winbindd_child *child);
468void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
469void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
470void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
471void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
472void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
473bool is_domain_offline(const struct winbindd_domain *domain);
474bool is_domain_online(const struct winbindd_domain *domain);
475bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
476 struct dom_sid **sids, uint32_t *num_sids);
477
478/* The following definitions come from winbindd/winbindd_wins.c */
479
480void winbindd_wins_byname(struct winbindd_cli_state *state);
481
482struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
483 struct winbindd_cli_state *cli,
484 struct winbindd_request *request);
485NTSTATUS wb_ping_recv(struct tevent_req *req,
486 struct winbindd_response *resp);
487
488enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
489 struct winbindd_cli_state *state);
490
491struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
492 struct winbindd_domain *domain,
493 struct winbindd_child *child);
494enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
495 struct winbindd_cli_state *state);
496
497struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
498 struct tevent_context *ev,
499 const struct dom_sid *sid);
500NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
501 enum lsa_SidType *type, const char **domain,
502 const char **name);
503
504struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
505 struct tevent_context *ev,
506 struct winbindd_cli_state *cli,
507 struct winbindd_request *request);
508NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
509 struct winbindd_response *response);
510
511struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
512 struct tevent_context *ev,
513 struct winbindd_cli_state *cli,
514 struct winbindd_request *request);
515NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
516 struct winbindd_response *response);
517
518struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
519 struct tevent_context *ev,
520 const char *dom_name, const char *name,
521 uint32_t flags);
522NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
523 enum lsa_SidType *type);
524
525struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
526 struct tevent_context *ev,
527 struct winbindd_cli_state *cli,
528 struct winbindd_request *request);
529NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
530 struct winbindd_response *response);
531
532struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
533 struct tevent_context *ev,
534 struct winbindd_cli_state *cli,
535 struct winbindd_request *request);
536NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
537 struct winbindd_response *response);
538
539struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
540 struct tevent_context *ev,
541 struct winbindd_cli_state *cli,
542 struct winbindd_request *request);
543NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
544 struct winbindd_response *response);
545
546struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
547 struct tevent_context *ev,
548 uid_t uid);
549NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
550
551struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
552 struct tevent_context *ev,
553 struct winbindd_cli_state *cli,
554 struct winbindd_request *request);
555NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
556 struct winbindd_response *response);
557
558struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
559 struct tevent_context *ev,
560 gid_t gid);
561NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
562
563struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
564 struct tevent_context *ev,
565 struct winbindd_cli_state *cli,
566 struct winbindd_request *request);
567NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
568 struct winbindd_response *response);
569
570struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
571 struct tevent_context *ev,
572 struct winbindd_cli_state *cli,
573 struct winbindd_request *request);
574NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
575 struct winbindd_response *response);
576
577struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
578 struct tevent_context *ev,
579 struct winbindd_cli_state *cli,
580 struct winbindd_request *request);
581NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
582 struct winbindd_response *response);
583
584struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
585 struct tevent_context *ev,
586 const struct dom_sid *user_sid);
587NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
588 struct wbint_userinfo **pinfo);
589
590struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
591 struct tevent_context *ev,
592 const struct dom_sid *user_sid,
593 struct winbindd_pw *pw);
594NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
595
596struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
597 struct tevent_context *ev,
598 struct winbindd_cli_state *cli,
599 struct winbindd_request *request);
600NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
601 struct winbindd_response *response);
602
603struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
604 struct tevent_context *ev,
605 struct winbindd_cli_state *cli,
606 struct winbindd_request *request);
607NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
608 struct winbindd_response *response);
609
610struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
611 struct tevent_context *ev,
612 struct winbindd_cli_state *cli,
613 struct winbindd_request *request);
614NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
615 struct winbindd_response *response);
616struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
617 struct tevent_context *ev,
618 struct winbindd_domain *domain,
619 int num_sids,
620 const struct dom_sid *sids);
621NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
622 uint32_t *num_aliases, uint32_t **aliases);
623struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
624 struct tevent_context *ev,
625 struct winbindd_cli_state *cli,
626 struct winbindd_request *request);
627NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
628 struct winbindd_response *response);
629struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
630 struct tevent_context *ev,
631 struct winbindd_domain *domain,
632 const struct dom_sid *sid);
633NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
634 int *num_sids, struct dom_sid **sids);
635
636struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
637 struct tevent_context *ev,
638 struct winbindd_cli_state *cli,
639 struct winbindd_request *request);
640NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
641 struct winbindd_response *response);
642struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
643 struct tevent_context *ev,
644 const struct dom_sid *sid);
645NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
646 int *num_sids, struct dom_sid **sids);
647struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
648 struct tevent_context *ev,
649 struct winbindd_cli_state *cli,
650 struct winbindd_request *request);
651NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
652 struct winbindd_response *response);
653
654struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
655 struct tevent_context *ev,
656 struct winbindd_domain *domain);
657NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
658
659struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
660 struct tevent_context *ev);
661NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
662 int *num_domains, struct winbindd_domain ***domains,
663 NTSTATUS **stati, uint32_t **seqnums);
664
665struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
666 struct tevent_context *ev,
667 struct winbindd_cli_state *cli,
668 struct winbindd_request *request);
669NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
670 struct winbindd_response *response);
671
672struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
673 struct tevent_context *ev,
674 const struct dom_sid *sid,
675 enum lsa_SidType type,
676 int max_depth);
677NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
678 struct talloc_dict **members);
679NTSTATUS add_wbint_Principal_to_dict(TALLOC_CTX *mem_ctx,
680 struct dom_sid *sid,
681 const char **name,
682 enum lsa_SidType type,
683 struct talloc_dict *dict);
684
685struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
686 struct tevent_context *ev,
687 const struct dom_sid *group_sid,
688 int max_nesting);
689NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
690 const char **domname, const char **name, gid_t *gid,
691 struct talloc_dict **members);
692
693struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
694 struct tevent_context *ev,
695 struct winbindd_cli_state *cli,
696 struct winbindd_request *request);
697NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
698 struct winbindd_response *response);
699
700struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
701 struct tevent_context *ev,
702 struct winbindd_cli_state *cli,
703 struct winbindd_request *request);
704NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
705 struct winbindd_response *response);
706
707struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
708 struct tevent_context *ev,
709 struct winbindd_cli_state *cli,
710 struct winbindd_request *request);
711NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
712 struct winbindd_response *response);
713
714struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
715 struct tevent_context *ev,
716 struct winbindd_cli_state *cli,
717 struct winbindd_request *request);
718NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
719 struct winbindd_response *response);
720
721struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
722 struct tevent_context *ev,
723 struct winbindd_domain *domain);
724NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
725 int *num_users,
726 struct wbint_userinfo **users);
727
728struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
729 struct tevent_context *ev,
730 struct winbindd_domain *domain);
731NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
732 int *num_users,
733 struct wbint_Principal **groups);
734
735
736struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
737 struct tevent_context *ev,
738 struct wbint_userinfo *info,
739 struct winbindd_pw *pw);
740NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
741
742struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
743 struct tevent_context *ev,
744 struct getpwent_state *gstate,
745 struct winbindd_pw *pw);
746NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
747
748struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
749 struct tevent_context *ev,
750 struct winbindd_cli_state *cli,
751 struct winbindd_request *request);
752NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
753 struct winbindd_response *presp);
754
755struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
756 struct tevent_context *ev,
757 struct winbindd_cli_state *cli,
758 struct winbindd_request *request);
759NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
760 struct winbindd_response *response);
761
762struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
763 struct tevent_context *ev,
764 struct winbindd_cli_state *cli,
765 struct winbindd_request *request);
766NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
767 struct winbindd_response *response);
768
769struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
770 struct tevent_context *ev,
771 struct winbindd_cli_state *cli,
772 struct winbindd_request *request);
773NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
774 struct winbindd_response *response);
775
776struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
777 struct tevent_context *ev,
778 const char *domain_name,
779 const struct GUID *domain_guid,
780 const char *site_name,
781 uint32_t flags);
782NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
783 struct netr_DsRGetDCNameInfo **pdcinfo);
784
785struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
786 struct tevent_context *ev,
787 struct winbindd_cli_state *cli,
788 struct winbindd_request *request);
789NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
790 struct winbindd_response *response);
791
792struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
793 struct tevent_context *ev,
794 int max_nesting,
795 struct getgrent_state *gstate,
796 struct winbindd_gr *gr);
797NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
798 struct talloc_dict **members);
799
800struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
801 struct tevent_context *ev,
802 struct winbindd_cli_state *cli,
803 struct winbindd_request *request);
804NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
805 struct winbindd_response *response);
806struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
807 struct tevent_context *ev,
808 struct winbindd_cli_state *cli,
809 struct winbindd_request *request);
810NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
811 struct winbindd_response *response);
812struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
813 struct tevent_context *ev,
814 struct winbindd_cli_state *cli,
815 struct winbindd_request *request);
816NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
817 struct winbindd_response *response);
818
819struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
820 struct tevent_context *ev,
821 struct winbindd_cli_state *cli,
822 struct winbindd_request *request);
823NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
824 struct winbindd_response *response);
825
826struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
827 struct tevent_context *ev,
828 struct winbindd_cli_state *cli,
829 struct winbindd_request *request);
830NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
831 struct winbindd_response *response);
832
833struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
834 struct tevent_context *ev,
835 struct winbindd_cli_state *cli,
836 struct winbindd_request *request);
837NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
838 struct winbindd_response *presp);
839
840struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
841 struct tevent_context *ev,
842 struct winbindd_cli_state *cli,
843 struct winbindd_request *request);
844NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
845 struct winbindd_response *presp);
846
847struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
848 struct tevent_context *ev,
849 struct winbindd_cli_state *cli,
850 struct winbindd_request *request);
851NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
852 struct winbindd_response *presp);
853
854struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
855 struct tevent_context *ev,
856 struct winbindd_cli_state *cli,
857 struct winbindd_request *request);
858NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
859 struct winbindd_response *response);
860
861struct tevent_req *winbindd_pam_auth_crap_send(
862 TALLOC_CTX *mem_ctx,
863 struct tevent_context *ev,
864 struct winbindd_cli_state *cli,
865 struct winbindd_request *request);
866NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
867 struct winbindd_response *response);
868
869struct tevent_req *winbindd_pam_chauthtok_send(
870 TALLOC_CTX *mem_ctx,
871 struct tevent_context *ev,
872 struct winbindd_cli_state *cli,
873 struct winbindd_request *request);
874NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
875 struct winbindd_response *response);
876
877struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
878 struct tevent_context *ev,
879 struct winbindd_cli_state *cli,
880 struct winbindd_request *request);
881NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
882 struct winbindd_response *response);
883
884struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
885 TALLOC_CTX *mem_ctx,
886 struct tevent_context *ev,
887 struct winbindd_cli_state *cli,
888 struct winbindd_request *request);
889NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
890 struct tevent_req *req,
891 struct winbindd_response *response);
892
893struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
894 struct tevent_context *ev,
895 struct dom_sid *sids,
896 uint32_t num_sids);
897NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
898 struct lsa_RefDomainList **domains,
899 struct lsa_TransNameArray **names);
900
901struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
902 struct tevent_context *ev,
903 const struct dom_sid *sids,
904 const uint32_t num_sids);
905NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
906 struct unixid xids[], uint32_t num_xids);
907struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
908 struct tevent_context *ev,
909 struct winbindd_cli_state *cli,
910 struct winbindd_request *request);
911NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
912 struct winbindd_response *response);
913struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
914 struct tevent_context *ev,
915 struct winbindd_cli_state *cli,
916 struct winbindd_request *request);
917NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
918 struct winbindd_response *presp);
919struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
920 struct tevent_context *ev,
921 struct winbindd_cli_state *cli,
922 struct winbindd_request *request);
923NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
924 struct winbindd_response *presp);
925
926
927/* The following definitions come from winbindd/winbindd_samr.c */
928
929NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
930 struct winbindd_domain *domain,
931 struct rpc_pipe_client **samr_pipe,
932 struct policy_handle *samr_domain_hnd);
933NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
934 struct rpc_pipe_client **lsa_pipe,
935 struct policy_handle *lsa_hnd);
936
937/* The following definitions come from winbindd/winbindd_ads.c */
938ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
939
940/* The following definitions come from winbindd/winbindd_irpc.c */
941NTSTATUS wb_irpc_register(void);
942
943/* The following definitions come from winbindd/winbindd_reconnect.c */
944bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
945
946#endif /* _WINBINDD_PROTO_H_ */
Note: See TracBrowser for help on using the repository browser.