source: branches/samba-3.5.x/source3/winbindd/winbindd_proto.h

Last change on this file was 738, checked in by Silvan Scherrer, 13 years ago

Samba Server 3.5: update branche to 3.5.18

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