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