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