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