source: branches/samba-3.0/source/nsswitch/winbindd_proto.h

Last change on this file was 165, checked in by Paul Smedley, 17 years ago

Add 'missing' 3.0.34 diffs

File size: 20.7 KB
Line 
1#ifndef _WINBINDD_PROTO_H_
2#define _WINBINDD_PROTO_H_
3
4/* This file is automatically generated with "make proto". DO NOT EDIT */
5
6
7/* The following definitions come from nsswitch/winbindd.c */
8
9struct event_context *winbind_event_context(void);
10void add_fd_event(struct fd_event *ev);
11void remove_fd_event(struct fd_event *ev);
12void setup_async_read(struct fd_event *event, void *data, size_t length,
13 void (*finished)(void *private_data, BOOL success),
14 void *private_data);
15void setup_async_write(struct fd_event *event, void *data, size_t length,
16 void (*finished)(void *private_data, BOOL success),
17 void *private_data);
18void request_error(struct winbindd_cli_state *state);
19void request_ok(struct winbindd_cli_state *state);
20void request_finished_cont(void *private_data, BOOL success);
21void winbind_check_sighup(const char *logfile);
22void winbind_check_sigterm(bool in_parent);
23int main(int argc, char **argv, char **envp);
24
25/* The following definitions come from nsswitch/winbindd_ads.c */
26
27
28/* The following definitions come from nsswitch/winbindd_async.c */
29
30void do_async_domain(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
31 const struct winbindd_request *request,
32 void (*cont)(TALLOC_CTX *mem_ctx, BOOL success,
33 struct winbindd_response *response,
34 void *c, void *private_data),
35 void *c, void *private_data);
36void winbindd_set_mapping_async(TALLOC_CTX *mem_ctx, const struct id_map *map,
37 void (*cont)(void *private_data, BOOL success),
38 void *private_data);
39enum winbindd_result winbindd_dual_set_mapping(struct winbindd_domain *domain,
40 struct winbindd_cli_state *state);
41void winbindd_set_hwm_async(TALLOC_CTX *mem_ctx, const struct unixid *xid,
42 void (*cont)(void *private_data, BOOL success),
43 void *private_data);
44enum winbindd_result winbindd_dual_set_hwm(struct winbindd_domain *domain,
45 struct winbindd_cli_state *state);
46void winbindd_sids2xids_async(TALLOC_CTX *mem_ctx, void *sids, int size,
47 void (*cont)(void *private_data, BOOL success, void *data, int len),
48 void *private_data);
49enum winbindd_result winbindd_dual_sids2xids(struct winbindd_domain *domain,
50 struct winbindd_cli_state *state);
51void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
52 void (*cont)(void *private_data, BOOL success, uid_t uid),
53 void *private_data);
54enum winbindd_result winbindd_dual_sid2uid(struct winbindd_domain *domain,
55 struct winbindd_cli_state *state);
56void winbindd_uid2name_async(TALLOC_CTX *mem_ctx, uid_t uid,
57 void (*cont)(void *private_data, BOOL success,
58 const char *name),
59 void *private_data);
60enum winbindd_result winbindd_dual_uid2name(struct winbindd_domain *domain,
61 struct winbindd_cli_state *state);
62enum winbindd_result winbindd_dual_name2uid(struct winbindd_domain *domain,
63 struct winbindd_cli_state *state);
64void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
65 void (*cont)(void *private_data, BOOL success, gid_t gid),
66 void *private_data);
67enum winbindd_result winbindd_dual_sid2gid(struct winbindd_domain *domain,
68 struct winbindd_cli_state *state);
69void winbindd_gid2name_async(TALLOC_CTX *mem_ctx, gid_t gid,
70 void (*cont)(void *private_data, BOOL success,
71 const char *name),
72 void *private_data);
73enum winbindd_result winbindd_dual_gid2name(struct winbindd_domain *domain,
74 struct winbindd_cli_state *state);
75enum winbindd_result winbindd_dual_name2gid(struct winbindd_domain *domain,
76 struct winbindd_cli_state *state);
77void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
78 void (*cont)(void *private_data, BOOL success,
79 const char *dom_name,
80 const char *name,
81 enum lsa_SidType type),
82 void *private_data);
83enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
84 struct winbindd_cli_state *state);
85void winbindd_lookupname_async(TALLOC_CTX *mem_ctx,
86 const char *dom_name, const char *name,
87 void (*cont)(void *private_data, BOOL success,
88 const DOM_SID *sid,
89 enum lsa_SidType type),
90 void *private_data);
91enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
92 struct winbindd_cli_state *state);
93BOOL print_sidlist(TALLOC_CTX *mem_ctx, const DOM_SID *sids,
94 size_t num_sids, char **result, ssize_t *len);
95enum winbindd_result winbindd_dual_lookuprids(struct winbindd_domain *domain,
96 struct winbindd_cli_state *state);
97void winbindd_getsidaliases_async(struct winbindd_domain *domain,
98 TALLOC_CTX *mem_ctx,
99 const DOM_SID *sids, size_t num_sids,
100 void (*cont)(void *private_data,
101 BOOL success,
102 const DOM_SID *aliases,
103 size_t num_aliases),
104 void *private_data);
105enum winbindd_result winbindd_dual_getsidaliases(struct winbindd_domain *domain,
106 struct winbindd_cli_state *state);
107void winbindd_gettoken_async(TALLOC_CTX *mem_ctx, const DOM_SID *user_sid,
108 void (*cont)(void *private_data, BOOL success,
109 DOM_SID *sids, size_t num_sids),
110 void *private_data);
111void query_user_async(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
112 const DOM_SID *sid,
113 void (*cont)(void *private_data, BOOL success,
114 const char *acct_name,
115 const char *full_name,
116 const char *homedir,
117 const char *shell,
118 gid_t gid,
119 uint32 group_rid),
120 void *private_data);
121void winbindd_uid2sid_async(TALLOC_CTX *mem_ctx, uid_t uid,
122 void (*cont)(void *private_data, BOOL success, const char *sid),
123 void *private_data);
124enum winbindd_result winbindd_dual_uid2sid(struct winbindd_domain *domain,
125 struct winbindd_cli_state *state);
126void winbindd_gid2sid_async(TALLOC_CTX *mem_ctx, gid_t gid,
127 void (*cont)(void *private_data, BOOL success, const char *sid),
128 void *private_data);
129enum winbindd_result winbindd_dual_gid2sid(struct winbindd_domain *domain,
130 struct winbindd_cli_state *state);
131void winbindd_dump_maps_async(TALLOC_CTX *mem_ctx, void *data, int size,
132 void (*cont)(void *private_data, BOOL success),
133 void *private_data);
134enum winbindd_result winbindd_dual_dump_maps(struct winbindd_domain *domain,
135 struct winbindd_cli_state *state);
136
137/* The following definitions come from nsswitch/winbindd_cache.c */
138
139void winbindd_check_cache_size(time_t t);
140struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
141NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const DOM_SID *sid);
142NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
143 TALLOC_CTX *mem_ctx,
144 const DOM_SID *sid,
145 const uint8 **cached_nt_pass,
146 const uint8 **cached_salt);
147NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
148 TALLOC_CTX *mem_ctx,
149 const DOM_SID *sid,
150 const uint8 nt_pass[NT_HASH_LEN]);
151void wcache_invalidate_samlogon(struct winbindd_domain *domain,
152 NET_USER_INFO_3 *info3);
153void wcache_invalidate_cache(void);
154BOOL initialize_winbindd_cache(void);
155void cache_store_response(pid_t pid, struct winbindd_response *response);
156BOOL cache_retrieve_response(pid_t pid, struct winbindd_response * response);
157void cache_cleanup_response(pid_t pid);
158BOOL lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
159 const char **domain_name, const char **name,
160 enum lsa_SidType *type);
161BOOL lookup_cached_name(TALLOC_CTX *mem_ctx,
162 const char *domain_name,
163 const char *name,
164 DOM_SID *sid,
165 enum lsa_SidType *type);
166void cache_name2sid(struct winbindd_domain *domain,
167 const char *domain_name, const char *name,
168 enum lsa_SidType type, const DOM_SID *sid);
169void wcache_flush_cache(void);
170NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
171NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const DOM_SID *sid) ;
172BOOL set_global_winbindd_state_offline(void);
173void set_global_winbindd_state_online(void);
174BOOL get_global_winbindd_state_offline(void);
175
176/* The following definitions come from nsswitch/winbindd_ccache_access.c */
177
178void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
179enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
180 struct winbindd_cli_state *state);
181
182/* The following definitions come from nsswitch/winbindd_cm.c */
183
184void set_domain_offline(struct winbindd_domain *domain);
185void set_domain_online_request(struct winbindd_domain *domain);
186void winbind_add_failed_connection_entry(const struct winbindd_domain *domain,
187 const char *server,
188 NTSTATUS result);
189void invalidate_cm_connection(struct winbindd_cm_conn *conn);
190void close_conns_after_fork(void);
191NTSTATUS init_dc_connection(struct winbindd_domain *domain);
192NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
193 struct rpc_pipe_client **cli, POLICY_HND *sam_handle);
194NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
195 struct rpc_pipe_client **cli, POLICY_HND *lsa_policy);
196NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
197 struct rpc_pipe_client **cli);
198
199/* The following definitions come from nsswitch/winbindd_cred_cache.c */
200
201void ccache_remove_all_after_fork(void);
202void ccache_regain_all_now(void);
203BOOL ccache_entry_exists(const char *username);
204BOOL ccache_entry_identical(const char *username, uid_t uid, const char *ccname);
205NTSTATUS add_ccache_to_list(const char *princ_name,
206 const char *ccname,
207 const char *service,
208 const char *username,
209 const char *realm,
210 uid_t uid,
211 time_t create_time,
212 time_t ticket_end,
213 time_t renew_until,
214 BOOL postponed_request);
215NTSTATUS remove_ccache(const char *username);
216struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
217NTSTATUS winbindd_add_memory_creds(const char *username, uid_t uid, const char *pass);
218NTSTATUS winbindd_delete_memory_creds(const char *username);
219NTSTATUS winbindd_replace_memory_creds(const char *username, const char *pass);
220
221/* The following definitions come from nsswitch/winbindd_creds.c */
222
223NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
224 TALLOC_CTX *mem_ctx,
225 const DOM_SID *sid,
226 NET_USER_INFO_3 **info3,
227 const uint8 *cached_nt_pass[NT_HASH_LEN],
228 const uint8 *cred_salt[NT_HASH_LEN]);
229NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
230 TALLOC_CTX *mem_ctx,
231 const char *user,
232 const char *pass,
233 NET_USER_INFO_3 *info3,
234 const DOM_SID *user_sid);
235NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
236 TALLOC_CTX *mem_ctx,
237 const char *user,
238 const char *pass,
239 NET_USER_INFO_3 *info3);
240NTSTATUS winbindd_update_creds_by_sid(struct winbindd_domain *domain,
241 TALLOC_CTX *mem_ctx,
242 const DOM_SID *sid,
243 const char *pass);
244NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
245 TALLOC_CTX *mem_ctx,
246 const char *user,
247 const char *pass);
248
249/* The following definitions come from nsswitch/winbindd_dual.c */
250
251void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
252 struct winbindd_request *request,
253 struct winbindd_response *response,
254 void (*continuation)(void *private_data, BOOL success),
255 void *private_data);
256void async_domain_request(TALLOC_CTX *mem_ctx,
257 struct winbindd_domain *domain,
258 struct winbindd_request *request,
259 struct winbindd_response *response,
260 void (*continuation)(void *private_data_data, BOOL success),
261 void *private_data_data);
262void sendto_child(struct winbindd_cli_state *state,
263 struct winbindd_child *child);
264void sendto_domain(struct winbindd_cli_state *state,
265 struct winbindd_domain *domain);
266void setup_domain_child(struct winbindd_domain *domain,
267 struct winbindd_child *child,
268 const char *explicit_logfile);
269void winbind_child_died(pid_t pid);
270void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
271void winbind_msg_offline(int msg_type, struct process_id src,
272 void *buf, size_t len, void *private_data);
273void winbind_msg_online(int msg_type, struct process_id src,
274 void *buf, size_t len, void *private_data);
275void winbind_msg_onlinestatus(int msg_type, struct process_id src,
276 void *buf, size_t len, void *private_data);
277
278/* The following definitions come from nsswitch/winbindd_group.c */
279
280void winbindd_getgrnam(struct winbindd_cli_state *state);
281void winbindd_getgrgid(struct winbindd_cli_state *state);
282void winbindd_setgrent(struct winbindd_cli_state *state);
283void winbindd_endgrent(struct winbindd_cli_state *state);
284void winbindd_getgrent(struct winbindd_cli_state *state);
285void winbindd_list_groups(struct winbindd_cli_state *state);
286void winbindd_getgroups(struct winbindd_cli_state *state);
287void winbindd_getusersids(struct winbindd_cli_state *state);
288void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
289enum winbindd_result winbindd_dual_getuserdomgroups(struct winbindd_domain *domain,
290 struct winbindd_cli_state *state);
291
292/* The following definitions come from nsswitch/winbindd_misc.c */
293
294void winbindd_check_machine_acct(struct winbindd_cli_state *state);
295enum winbindd_result winbindd_dual_check_machine_acct(struct winbindd_domain *domain,
296 struct winbindd_cli_state *state);
297void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
298enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
299 struct winbindd_cli_state *state);
300void winbindd_getdcname(struct winbindd_cli_state *state);
301enum winbindd_result winbindd_dual_getdcname(struct winbindd_domain *domain,
302 struct winbindd_cli_state *state);
303void winbindd_show_sequence(struct winbindd_cli_state *state);
304enum winbindd_result winbindd_dual_show_sequence(struct winbindd_domain *domain,
305 struct winbindd_cli_state *state);
306void winbindd_domain_info(struct winbindd_cli_state *state);
307void winbindd_ping(struct winbindd_cli_state *state);
308void winbindd_info(struct winbindd_cli_state *state);
309void winbindd_interface_version(struct winbindd_cli_state *state);
310void winbindd_domain_name(struct winbindd_cli_state *state);
311void winbindd_netbios_name(struct winbindd_cli_state *state);
312void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
313
314/* The following definitions come from nsswitch/winbindd_pam.c */
315
316struct winbindd_domain *find_auth_domain(struct winbindd_cli_state *state,
317 const char *domain_name);
318void winbindd_pam_auth(struct winbindd_cli_state *state);
319NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
320 struct winbindd_cli_state *state,
321 NET_USER_INFO_3 **info3);
322NTSTATUS winbindd_dual_pam_auth_kerberos(struct winbindd_domain *domain,
323 struct winbindd_cli_state *state,
324 NET_USER_INFO_3 **info3);
325NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain,
326 struct winbindd_cli_state *state,
327 NET_USER_INFO_3 **info3);
328enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
329 struct winbindd_cli_state *state) ;
330void winbindd_pam_auth_crap(struct winbindd_cli_state *state);
331enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
332 struct winbindd_cli_state *state) ;
333void winbindd_pam_chauthtok(struct winbindd_cli_state *state);
334enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
335 struct winbindd_cli_state *state);
336void winbindd_pam_logoff(struct winbindd_cli_state *state);
337enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
338 struct winbindd_cli_state *state) ;
339void winbindd_pam_chng_pswd_auth_crap(struct winbindd_cli_state *state);
340enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
341
342/* The following definitions come from nsswitch/winbindd_passdb.c */
343
344
345/* The following definitions come from nsswitch/winbindd_reconnect.c */
346
347
348/* The following definitions come from nsswitch/winbindd_rpc.c */
349
350
351/* The following definitions come from nsswitch/winbindd_sid.c */
352
353void winbindd_lookupsid(struct winbindd_cli_state *state);
354void winbindd_lookupname(struct winbindd_cli_state *state);
355void winbindd_lookuprids(struct winbindd_cli_state *state);
356void init_idmap_child(void);
357struct winbindd_child *idmap_child(void);
358void winbindd_sid_to_uid(struct winbindd_cli_state *state);
359void winbindd_sid_to_gid(struct winbindd_cli_state *state);
360void winbindd_sids_to_unixids(struct winbindd_cli_state *state);
361void winbindd_set_mapping(struct winbindd_cli_state *state);
362void winbindd_set_hwm(struct winbindd_cli_state *state);
363void winbindd_uid_to_sid(struct winbindd_cli_state *state);
364void winbindd_gid_to_sid(struct winbindd_cli_state *state);
365void winbindd_allocate_uid(struct winbindd_cli_state *state);
366enum winbindd_result winbindd_dual_allocate_uid(struct winbindd_domain *domain,
367 struct winbindd_cli_state *state);
368void winbindd_allocate_gid(struct winbindd_cli_state *state);
369enum winbindd_result winbindd_dual_allocate_gid(struct winbindd_domain *domain,
370 struct winbindd_cli_state *state);
371void winbindd_dump_maps(struct winbindd_cli_state *state);
372
373/* The following definitions come from nsswitch/winbindd_user.c */
374
375enum winbindd_result winbindd_dual_userinfo(struct winbindd_domain *domain,
376 struct winbindd_cli_state *state);
377void winbindd_getpwnam(struct winbindd_cli_state *state);
378void winbindd_getpwuid(struct winbindd_cli_state *state);
379void winbindd_setpwent(struct winbindd_cli_state *state);
380void winbindd_endpwent(struct winbindd_cli_state *state);
381void winbindd_getpwent(struct winbindd_cli_state *state);
382void winbindd_list_users(struct winbindd_cli_state *state);
383
384/* The following definitions come from nsswitch/winbindd_util.c */
385
386struct winbindd_domain *domain_list(void);
387void free_domain_list(void);
388void rescan_trusted_domains( void );
389enum winbindd_result init_child_connection(struct winbindd_domain *domain,
390 void (*continuation)(void *private_data,
391 BOOL success),
392 void *private_data);
393enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
394 struct winbindd_cli_state *state);
395BOOL init_domain_list(void);
396struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
397struct winbindd_domain *find_domain_from_name(const char *domain_name);
398struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid);
399struct winbindd_domain *find_domain_from_sid(const DOM_SID *sid);
400struct winbindd_domain *find_our_domain(void);
401struct winbindd_domain *find_root_domain(void);
402struct winbindd_domain *find_builtin_domain(void);
403struct winbindd_domain *find_lookup_domain_from_sid(const DOM_SID *sid);
404struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
405BOOL winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx,
406 struct winbindd_domain *domain,
407 const char *domain_name,
408 const char *name, DOM_SID *sid,
409 enum lsa_SidType *type);
410BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx,
411 DOM_SID *sid,
412 char **dom_name,
413 char **name,
414 enum lsa_SidType *type);
415void free_getent_state(struct getent_state *state);
416BOOL parse_domain_user(const char *domuser, fstring domain, fstring user);
417BOOL parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
418 char **domain, char **user);
419BOOL canonicalize_username(fstring username_inout, fstring domain, fstring user);
420void fill_domain_username(fstring name, const char *domain, const char *user, BOOL can_assume);
421char *get_winbind_priv_pipe_dir(void) ;
422int open_winbindd_socket(void);
423int open_winbindd_priv_socket(void);
424void close_winbindd_socket(void);
425struct winbindd_cli_state *winbindd_client_list(void);
426void winbindd_add_client(struct winbindd_cli_state *cli);
427void winbindd_remove_client(struct winbindd_cli_state *cli);
428void winbindd_kill_all_clients(void);
429int winbindd_num_clients(void);
430NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
431 TALLOC_CTX *mem_ctx,
432 const DOM_SID *user_sid,
433 uint32 *p_num_groups, DOM_SID **user_sids);
434void ws_name_replace( char *name, char replace );
435void ws_name_return( char *name, char replace );
436
437/* The following definitions come from nsswitch/winbindd_wins.c */
438
439void winbindd_wins_byip(struct winbindd_cli_state *state);
440void winbindd_wins_byname(struct winbindd_cli_state *state);
441
442#endif /* _WINBINDD_PROTO_H_ */
Note: See TracBrowser for help on using the repository browser.