winbind: Make wb_query_user_list just return names
[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 #include "ads.h"
27
28 /* The following definitions come from winbindd/winbindd.c  */
29 struct messaging_context *winbind_messaging_context(void);
30 struct imessaging_context *winbind_imessaging_context(void);
31 void request_error(struct winbindd_cli_state *state);
32 void request_ok(struct winbindd_cli_state *state);
33 bool winbindd_setup_sig_term_handler(bool parent);
34 bool winbindd_setup_stdin_handler(bool parent, bool foreground);
35 bool winbindd_setup_sig_hup_handler(const char *lfile);
36 bool winbindd_use_idmap_cache(void);
37 bool winbindd_use_cache(void);
38 char *get_winbind_priv_pipe_dir(void);
39 struct tevent_context *winbind_event_context(void);
40
41 /* The following definitions come from winbindd/winbindd_ads.c  */
42
43 /* The following definitions come from winbindd/winbindd_rpc.c  */
44
45 NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
46                               struct winbindd_domain *domain,
47                               uint32_t num_sids,
48                               const struct dom_sid *sids,
49                               char ***domains,
50                               char ***names,
51                               enum lsa_SidType **types);
52 NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
53                          struct winbindd_domain *domain,
54                          struct lsa_SidArray *sids,
55                          struct lsa_RefDomainList **pdomains,
56                          struct lsa_TransNameArray **pnames);
57
58 /* The following definitions come from winbindd/winbindd_cache.c  */
59
60 NTSTATUS wb_cache_query_user_list(struct winbindd_domain *domain,
61                                   TALLOC_CTX *mem_ctx,
62                                   uint32_t *num_entries,
63                                   struct wbint_userinfo **info);
64 NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
65                                   TALLOC_CTX *mem_ctx,
66                                   uint32_t *num_entries,
67                                   struct wb_acct_info **info);
68 NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
69                                     TALLOC_CTX *mem_ctx,
70                                     uint32_t *num_entries,
71                                     struct wb_acct_info **info);
72 NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
73                               TALLOC_CTX *mem_ctx,
74                               const char *domain_name,
75                               const char *name,
76                               uint32_t flags,
77                               struct dom_sid *sid,
78                               enum lsa_SidType *type);
79 NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
80                               TALLOC_CTX *mem_ctx,
81                               const struct dom_sid *sid,
82                               char **domain_name,
83                               char **name,
84                               enum lsa_SidType *type);
85 NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
86                                 TALLOC_CTX *mem_ctx,
87                                 const struct dom_sid *domain_sid,
88                                 uint32_t *rids,
89                                 size_t num_rids,
90                                 char **domain_name,
91                                 char ***names,
92                                 enum lsa_SidType **types);
93 NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
94                                      TALLOC_CTX *mem_ctx,
95                                      uint32_t num_sids,
96                                      const struct dom_sid *sids,
97                                      uint32_t *num_aliases,
98                                      uint32_t **alias_rids);
99 NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
100                                   TALLOC_CTX *mem_ctx,
101                                   const struct dom_sid *group_sid,
102                                   enum lsa_SidType type,
103                                   uint32_t *num_names,
104                                   struct dom_sid **sid_mem,
105                                   char ***names,
106                                   uint32_t **name_types);
107 NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
108                                   uint32_t *seq);
109 NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
110                                  TALLOC_CTX *mem_ctx,
111                                  struct samr_DomInfo12 *policy);
112 NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
113                                   TALLOC_CTX *mem_ctx,
114                                   struct samr_DomInfo1 *policy);
115 NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
116                                   TALLOC_CTX *mem_ctx,
117                                   struct netr_DomainTrustList *trusts);
118
119 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
120 NTSTATUS wcache_get_creds(struct winbindd_domain *domain, 
121                           TALLOC_CTX *mem_ctx, 
122                           const struct dom_sid *sid,
123                           const uint8_t **cached_nt_pass,
124                           const uint8_t **cached_salt);
125 NTSTATUS wcache_save_creds(struct winbindd_domain *domain, 
126                            const struct dom_sid *sid,
127                            const uint8_t nt_pass[NT_HASH_LEN]);
128 void wcache_invalidate_samlogon(struct winbindd_domain *domain, 
129                                 const struct dom_sid *user_sid);
130 bool wcache_invalidate_cache(void);
131 bool wcache_invalidate_cache_noinit(void);
132 bool init_wcache(void);
133 bool initialize_winbindd_cache(void);
134 void close_winbindd_cache(void);
135 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
136                                 TALLOC_CTX *mem_ctx,
137                                 const struct dom_sid *group_sid,
138                                 uint32_t *num_names,
139                                 struct dom_sid **sid_mem, char ***names,
140                                 uint32_t **name_types);
141 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
142                        char **domain_name, char **name,
143                        enum lsa_SidType *type);
144 bool lookup_cached_name(const char *domain_name,
145                         const char *name,
146                         struct dom_sid *sid,
147                         enum lsa_SidType *type);
148 void cache_name2sid_trusted(struct winbindd_domain *domain,
149                         const char *domain_name,
150                         const char *name,
151                         enum lsa_SidType type,
152                         const struct dom_sid *sid);
153 void cache_name2sid(struct winbindd_domain *domain, 
154                     const char *domain_name, const char *name,
155                     enum lsa_SidType type, const struct dom_sid *sid);
156 NTSTATUS wcache_name_to_sid(struct winbindd_domain *domain,
157                             const char *domain_name,
158                             const char *name,
159                             struct dom_sid *sid,
160                             enum lsa_SidType *type);
161 NTSTATUS wcache_query_user(struct winbindd_domain *domain,
162                            TALLOC_CTX *mem_ctx,
163                            const struct dom_sid *user_sid,
164                            struct wbint_userinfo *info);
165 NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
166                                     TALLOC_CTX *mem_ctx,
167                                     const struct dom_sid *user_sid,
168                                     const char **full_name);
169 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
170                                    TALLOC_CTX *mem_ctx,
171                                    uint32_t num_sids, const struct dom_sid *sids,
172                                    uint32_t *pnum_aliases, uint32_t **paliases);
173
174 void wcache_flush_cache(void);
175 NTSTATUS wcache_count_cached_creds(struct winbindd_domain *domain, int *count);
176 NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct dom_sid *sid) ;
177 bool set_global_winbindd_state_offline(void);
178 void set_global_winbindd_state_online(void);
179 bool get_global_winbindd_state_offline(void);
180 int winbindd_validate_cache(void);
181 int winbindd_validate_cache_nobackup(void);
182 bool winbindd_cache_validate_and_initialize(void);
183 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
184 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
185 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
186 struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
187 void wcache_tdc_clear( void );
188 #ifdef HAVE_ADS
189 struct ads_struct;
190 NTSTATUS nss_get_info_cached( struct winbindd_domain *domain, 
191                               const struct dom_sid *user_sid,
192                               TALLOC_CTX *ctx,
193                               const char **homedir, const char **shell,
194                               const char **gecos, gid_t *p_gid);
195 #endif
196 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
197                          time_t last_seq_check);
198 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
199                       uint32_t opnum, const DATA_BLOB *req, DATA_BLOB *resp);
200 void wcache_store_ndr(struct winbindd_domain *domain, uint32_t opnum,
201                       const DATA_BLOB *req, const DATA_BLOB *resp);
202
203 /* The following definitions come from winbindd/winbindd_ccache_access.c  */
204
205 void winbindd_ccache_ntlm_auth(struct winbindd_cli_state *state);
206 enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *domain,
207                                                 struct winbindd_cli_state *state);
208 void winbindd_ccache_save(struct winbindd_cli_state *state);
209
210 /* The following definitions come from winbindd/winbindd_cm.c  */
211 void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
212                                 void *private_data,
213                                 uint32_t msg_type,
214                                 struct server_id server_id,
215                                 DATA_BLOB *data);
216 void winbind_msg_domain_online(struct messaging_context *msg_ctx,
217                                 void *private_data,
218                                 uint32_t msg_type,
219                                 struct server_id server_id,
220                                 DATA_BLOB *data);
221
222 void set_domain_offline(struct winbindd_domain *domain);
223 void set_domain_online_request(struct winbindd_domain *domain);
224
225 struct ndr_interface_table;
226 NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
227                                const struct ndr_interface_table *table,
228                                struct rpc_pipe_client **ret_pipe);
229 void invalidate_cm_connection(struct winbindd_domain *domain);
230 void close_conns_after_fork(void);
231 NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
232 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
233                         bool need_rw_dc,
234                         struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
235 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
236                         struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
237 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
238                          TALLOC_CTX *mem_ctx,
239                          struct rpc_pipe_client **cli,
240                          struct policy_handle *lsa_policy);
241 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
242                              struct rpc_pipe_client **cli);
243 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
244                                     const char *domain_name,
245                                     char **p_dc_name, char **p_dc_ip);
246
247 /* The following definitions come from winbindd/winbindd_cred_cache.c  */
248
249 bool ccache_entry_exists(const char *username);
250 bool ccache_entry_identical(const char *username,
251                             uid_t uid,
252                             const char *ccname);
253 void ccache_remove_all_after_fork(void);
254 void ccache_regain_all_now(void);
255 NTSTATUS add_ccache_to_list(const char *princ_name,
256                             const char *ccname,
257                             const char *service,
258                             const char *username,
259                             const char *password,
260                             const char *realm,
261                             uid_t uid,
262                             time_t create_time,
263                             time_t ticket_end,
264                             time_t renew_until,
265                             bool postponed_request);
266 NTSTATUS remove_ccache(const char *username);
267 struct WINBINDD_MEMORY_CREDS *find_memory_creds_by_name(const char *username);
268 NTSTATUS winbindd_add_memory_creds(const char *username,
269                                    uid_t uid,
270                                    const char *pass);
271 NTSTATUS winbindd_delete_memory_creds(const char *username);
272 NTSTATUS winbindd_replace_memory_creds(const char *username,
273                                        const char *pass);
274
275 /* The following definitions come from winbindd/winbindd_creds.c  */
276
277 NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
278                             TALLOC_CTX *mem_ctx,
279                             const struct dom_sid *sid,
280                             struct netr_SamInfo3 **info3,
281                             const uint8_t *cached_nt_pass[NT_HASH_LEN],
282                             const uint8_t *cred_salt[NT_HASH_LEN]);
283 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
284                               const char *user, 
285                               const char *pass, 
286                               struct netr_SamInfo3 *info3);
287 NTSTATUS winbindd_update_creds_by_info3(struct winbindd_domain *domain,
288                                         const char *user,
289                                         const char *pass,
290                                         struct netr_SamInfo3 *info3);
291 NTSTATUS winbindd_update_creds_by_name(struct winbindd_domain *domain,
292                                        const char *user,
293                                        const char *pass);
294
295 /* The following definitions come from winbindd/winbindd_domain.c  */
296
297 void setup_domain_child(struct winbindd_domain *domain);
298
299 /* The following definitions come from winbindd/winbindd_dual.c  */
300
301 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
302 struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
303
304 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
305                                          struct tevent_context *ev,
306                                          struct winbindd_child *child,
307                                          struct winbindd_request *request);
308 int wb_child_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
309                           struct winbindd_response **presponse, int *err);
310 struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx,
311                                           struct tevent_context *ev,
312                                           struct winbindd_domain *domain,
313                                           struct winbindd_request *request);
314 int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
315                            struct winbindd_response **presponse, int *err);
316
317 void setup_child(struct winbindd_domain *domain, struct winbindd_child *child,
318                  const struct winbindd_child_dispatch_table *table,
319                  const char *logprefix,
320                  const char *logname);
321 void winbind_child_died(pid_t pid);
322 void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain);
323 void winbind_msg_debug(struct messaging_context *msg_ctx,
324                          void *private_data,
325                          uint32_t msg_type,
326                          struct server_id server_id,
327                          DATA_BLOB *data);
328 void winbind_msg_offline(struct messaging_context *msg_ctx,
329                          void *private_data,
330                          uint32_t msg_type,
331                          struct server_id server_id,
332                          DATA_BLOB *data);
333 void winbind_msg_online(struct messaging_context *msg_ctx,
334                         void *private_data,
335                         uint32_t msg_type,
336                         struct server_id server_id,
337                         DATA_BLOB *data);
338 void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
339                               void *private_data,
340                               uint32_t msg_type,
341                               struct server_id server_id,
342                               DATA_BLOB *data);
343 void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
344                                  void *private_data,
345                                  uint32_t msg_type,
346                                  struct server_id server_id,
347                                  DATA_BLOB *data);
348 void winbind_msg_dump_domain_list(struct messaging_context *msg_ctx,
349                                   void *private_data,
350                                   uint32_t msg_type,
351                                   struct server_id server_id,
352                                   DATA_BLOB *data);
353 void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
354                             void *private_data,
355                             uint32_t msg_type,
356                             struct server_id server_id,
357                             DATA_BLOB *data);
358 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
359                                    void *private_data,
360                                    uint32_t msg_type,
361                                    struct server_id server_id,
362                                    DATA_BLOB *data);
363 NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
364                                     const char *logfilename);
365 struct winbindd_domain *wb_child_domain(void);
366
367 /* The following definitions come from winbindd/winbindd_group.c  */
368 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
369                 const char *dom_name, const char *gr_name, gid_t unix_gid);
370 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
371                                      TALLOC_CTX *mem_ctx,
372                                      int *num_members, char **result);
373
374
375 /* The following definitions come from winbindd/winbindd_idmap.c  */
376
377 void init_idmap_child(void);
378 struct winbindd_child *idmap_child(void);
379 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
380                                                 const struct dom_sid *sid);
381 bool domain_has_idmap_config(const char *domname);
382 bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
383                                       void *private_data),
384                            void *private_data);
385
386 /* The following definitions come from winbindd/winbindd_locator.c  */
387
388 void init_locator_child(void);
389 struct winbindd_child *locator_child(void);
390
391 /* The following definitions come from winbindd/winbindd_misc.c  */
392
393 void winbindd_list_trusted_domains(struct winbindd_cli_state *state);
394 enum winbindd_result winbindd_dual_list_trusted_domains(struct winbindd_domain *domain,
395                                                         struct winbindd_cli_state *state);
396 void winbindd_show_sequence(struct winbindd_cli_state *state);
397 void winbindd_domain_info(struct winbindd_cli_state *state);
398 void winbindd_dc_info(struct winbindd_cli_state *state);
399 void winbindd_ping(struct winbindd_cli_state *state);
400 void winbindd_info(struct winbindd_cli_state *state);
401 void winbindd_interface_version(struct winbindd_cli_state *state);
402 void winbindd_domain_name(struct winbindd_cli_state *state);
403 void winbindd_netbios_name(struct winbindd_cli_state *state);
404 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
405
406 /* The following definitions come from winbindd/winbindd_ndr.c  */
407 struct ndr_print;
408 void ndr_print_winbindd_child(struct ndr_print *ndr,
409                               const char *name,
410                               const struct winbindd_child *r);
411 void ndr_print_winbindd_cm_conn(struct ndr_print *ndr,
412                                 const char *name,
413                                 const struct winbindd_cm_conn *r);
414 void ndr_print_winbindd_methods(struct ndr_print *ndr,
415                                 const char *name,
416                                 const struct winbindd_methods *r);
417 void ndr_print_winbindd_domain(struct ndr_print *ndr,
418                                const char *name,
419                                const struct winbindd_domain *r);
420
421 /* The following definitions come from winbindd/winbindd_pam.c  */
422
423 bool check_request_flags(uint32_t flags);
424 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
425                           struct winbindd_response *resp,
426                           uint32_t request_flags,
427                           struct netr_SamInfo3 *info3,
428                           const char *name_domain,
429                           const char *name_user);
430 uid_t get_uid_from_request(struct winbindd_request *request);
431 struct winbindd_domain *find_auth_domain(uint8_t flags,
432                                          const char *domain_name);
433 enum winbindd_result winbindd_dual_pam_auth(struct winbindd_domain *domain,
434                                             struct winbindd_cli_state *state) ;
435 enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
436                                                  struct winbindd_cli_state *state) ;
437 enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact_domain,
438                                                  struct winbindd_cli_state *state);
439 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
440                                               struct winbindd_cli_state *state) ;
441 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
442 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
443                                     struct netr_SamInfo3 **info3);
444
445 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
446                                TALLOC_CTX *mem_ctx,
447                                uint32_t logon_parameters,
448                                const char *name_user,
449                                const char *name_domain,
450                                const char *workstation,
451                                const uint8_t chal[8],
452                                DATA_BLOB lm_response,
453                                DATA_BLOB nt_response,
454                                struct netr_SamInfo3 **info3);
455
456 /* The following definitions come from winbindd/winbindd_util.c  */
457
458 struct winbindd_domain *domain_list(void);
459 struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
460 bool domain_is_forest_root(const struct winbindd_domain *domain);
461 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
462                             struct timeval now, void *private_data);
463 enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domain,
464                                                    struct winbindd_cli_state *state);
465 bool init_domain_list(void);
466 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
467 struct winbindd_domain *find_domain_from_name(const char *domain_name);
468 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
469 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
470 struct winbindd_domain *find_our_domain(void);
471 struct winbindd_domain *find_root_domain(void);
472 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
473 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
474 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
475 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
476                               char **domain, char **user);
477 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
478 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
479 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
480                                   const char *domain,
481                                   const char *user,
482                                   bool can_assume);
483 struct winbindd_cli_state *winbindd_client_list(void);
484 struct winbindd_cli_state *winbindd_client_list_tail(void);
485 struct winbindd_cli_state *
486 winbindd_client_list_prev(struct winbindd_cli_state *cli);
487 void winbindd_add_client(struct winbindd_cli_state *cli);
488 void winbindd_remove_client(struct winbindd_cli_state *cli);
489 void winbindd_promote_client(struct winbindd_cli_state *cli);
490 int winbindd_num_clients(void);
491 NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
492                                   const struct dom_sid *user_sid,
493                                   uint32_t *p_num_groups, struct dom_sid **user_sids);
494
495 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
496                              struct winbindd_domain *domain,
497                              const char *name,
498                              char **normalized);
499 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
500                               char *name,
501                               char **normalized);
502
503 NTSTATUS resolve_username_to_alias(TALLOC_CTX *mem_ctx,
504                                    struct winbindd_domain *domain,
505                                    const char *name, char **alias);
506 NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
507                                    struct winbindd_domain *domain,
508                                    const char *alias, char **name);
509
510 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
511 bool winbindd_internal_child(struct winbindd_child *child);
512 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
513 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
514 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
515 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
516 void set_auth_errors(struct winbindd_response *resp, NTSTATUS result);
517 bool is_domain_offline(const struct winbindd_domain *domain);
518 bool is_domain_online(const struct winbindd_domain *domain);
519 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
520                    struct dom_sid **sids, uint32_t *num_sids);
521 bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
522                    struct unixid **pxids, uint32_t *pnum_xids);
523
524 /* The following definitions come from winbindd/winbindd_wins.c  */
525
526 void winbindd_wins_byname(struct winbindd_cli_state *state);
527
528 struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
529                                 struct winbindd_cli_state *cli,
530                                 struct winbindd_request *request);
531 NTSTATUS wb_ping_recv(struct tevent_req *req,
532                       struct winbindd_response *resp);
533
534 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
535                                         struct winbindd_cli_state *state);
536
537 struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
538                                                 struct winbindd_domain *domain,
539                                                 struct winbindd_child *child);
540 enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
541                                           struct winbindd_cli_state *state);
542
543 struct tevent_req *wb_lookupsid_send(TALLOC_CTX *mem_ctx,
544                                      struct tevent_context *ev,
545                                      const struct dom_sid *sid);
546 NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
547                            enum lsa_SidType *type, const char **domain,
548                            const char **name);
549
550 struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx,
551                                            struct tevent_context *ev,
552                                            struct winbindd_cli_state *cli,
553                                            struct winbindd_request *request);
554 NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req,
555                                  struct winbindd_response *response);
556
557 struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
558                                             struct tevent_context *ev,
559                                             struct winbindd_cli_state *cli,
560                                             struct winbindd_request *request);
561 NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
562                                   struct winbindd_response *response);
563
564 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
565                                       struct tevent_context *ev,
566                                       const char *dom_name, const char *name,
567                                       uint32_t flags);
568 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
569                             enum lsa_SidType *type);
570
571 struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
572                                             struct tevent_context *ev,
573                                             struct winbindd_cli_state *cli,
574                                             struct winbindd_request *request);
575 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
576                                   struct winbindd_response *response);
577
578 struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
579                                             struct tevent_context *ev,
580                                             struct winbindd_cli_state *cli,
581                                             struct winbindd_request *request);
582 NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
583                                   struct winbindd_response *response);
584
585 struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
586                                             struct tevent_context *ev,
587                                             struct winbindd_cli_state *cli,
588                                             struct winbindd_request *request);
589 NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
590                                   struct winbindd_response *response);
591
592 struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
593                                             struct tevent_context *ev,
594                                             struct winbindd_cli_state *cli,
595                                             struct winbindd_request *request);
596 NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
597                                   struct winbindd_response *response);
598
599 struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
600                                             struct tevent_context *ev,
601                                             struct winbindd_cli_state *cli,
602                                             struct winbindd_request *request);
603 NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
604                                   struct winbindd_response *response);
605
606 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
607                                               struct tevent_context *ev,
608                                               struct winbindd_cli_state *cli,
609                                               struct winbindd_request *request);
610 NTSTATUS winbindd_allocate_uid_recv(struct tevent_req *req,
611                                     struct winbindd_response *response);
612
613 struct tevent_req *winbindd_allocate_gid_send(TALLOC_CTX *mem_ctx,
614                                               struct tevent_context *ev,
615                                               struct winbindd_cli_state *cli,
616                                               struct winbindd_request *request);
617 NTSTATUS winbindd_allocate_gid_recv(struct tevent_req *req,
618                                     struct winbindd_response *response);
619
620 struct tevent_req *wb_queryuser_send(TALLOC_CTX *mem_ctx,
621                                      struct tevent_context *ev,
622                                      const struct dom_sid *user_sid);
623 NTSTATUS wb_queryuser_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
624                            struct wbint_userinfo **pinfo);
625
626 struct tevent_req *wb_getpwsid_send(TALLOC_CTX *mem_ctx,
627                                     struct tevent_context *ev,
628                                     const struct dom_sid *user_sid,
629                                     struct winbindd_pw *pw);
630 NTSTATUS wb_getpwsid_recv(struct tevent_req *req);
631
632 struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx,
633                                           struct tevent_context *ev,
634                                           struct winbindd_cli_state *cli,
635                                           struct winbindd_request *request);
636 NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req,
637                                 struct winbindd_response *response);
638
639 struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx,
640                                           struct tevent_context *ev,
641                                           struct winbindd_cli_state *cli,
642                                           struct winbindd_request *request);
643 NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req,
644                                 struct winbindd_response *response);
645
646 struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx,
647                                           struct tevent_context *ev,
648                                           struct winbindd_cli_state *cli,
649                                           struct winbindd_request *request);
650 NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req,
651                                 struct winbindd_response *response);
652 struct tevent_req *wb_lookupuseraliases_send(TALLOC_CTX *mem_ctx,
653                                              struct tevent_context *ev,
654                                              struct winbindd_domain *domain,
655                                              int num_sids,
656                                              const struct dom_sid *sids);
657 NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
658                                    uint32_t *num_aliases, uint32_t **aliases);
659 struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
660                                                struct tevent_context *ev,
661                                                struct winbindd_cli_state *cli,
662                                                struct winbindd_request *request);
663 NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
664                                      struct winbindd_response *response);
665
666 struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx,
667                                                   struct tevent_context *ev,
668                                                   struct winbindd_cli_state *cli,
669                                                   struct winbindd_request *request);
670 NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
671                                         struct winbindd_response *response);
672 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
673                                     struct tevent_context *ev,
674                                     const struct dom_sid *sid,
675                                     bool expand_local_aliases);
676 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
677                           int *num_sids, struct dom_sid **sids);
678 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
679                                            struct tevent_context *ev,
680                                            struct winbindd_cli_state *cli,
681                                            struct winbindd_request *request);
682 NTSTATUS winbindd_getgroups_recv(struct tevent_req *req,
683                                  struct winbindd_response *response);
684
685 struct tevent_req *wb_seqnum_send(TALLOC_CTX *mem_ctx,
686                                   struct tevent_context *ev,
687                                   struct winbindd_domain *domain);
688 NTSTATUS wb_seqnum_recv(struct tevent_req *req, uint32_t *seqnum);
689
690 struct tevent_req *wb_seqnums_send(TALLOC_CTX *mem_ctx,
691                                    struct tevent_context *ev);
692 NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
693                          int *num_domains, struct winbindd_domain ***domains,
694                          NTSTATUS **stati, uint32_t **seqnums);
695
696 struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
697                                                struct tevent_context *ev,
698                                                struct winbindd_cli_state *cli,
699                                                struct winbindd_request *request);
700 NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req,
701                                      struct winbindd_response *response);
702
703 struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
704                                          struct tevent_context *ev,
705                                          const struct dom_sid *sid,
706                                          enum lsa_SidType type,
707                                          int max_depth);
708 NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
709                                struct talloc_dict **members);
710 NTSTATUS add_wbint_Principal_to_dict(TALLOC_CTX *mem_ctx,
711                                      struct dom_sid *sid,
712                                      const char **name,
713                                      enum lsa_SidType type,
714                                      struct talloc_dict *dict);
715
716 struct tevent_req *wb_getgrsid_send(TALLOC_CTX *mem_ctx,
717                                     struct tevent_context *ev,
718                                     const struct dom_sid *group_sid,
719                                     int max_nesting);
720 NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
721                           const char **domname, const char **name, gid_t *gid,
722                           struct talloc_dict **members);
723
724 struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx,
725                                           struct tevent_context *ev,
726                                           struct winbindd_cli_state *cli,
727                                           struct winbindd_request *request);
728 NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
729                                 struct winbindd_response *response);
730
731 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
732                                           struct tevent_context *ev,
733                                           struct winbindd_cli_state *cli,
734                                           struct winbindd_request *request);
735 NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req,
736                                 struct winbindd_response *response);
737
738 struct tevent_req *winbindd_getusersids_send(TALLOC_CTX *mem_ctx,
739                                              struct tevent_context *ev,
740                                              struct winbindd_cli_state *cli,
741                                              struct winbindd_request *request);
742 NTSTATUS winbindd_getusersids_recv(struct tevent_req *req,
743                                    struct winbindd_response *response);
744
745 struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
746                                             struct tevent_context *ev,
747                                             struct winbindd_cli_state *cli,
748                                             struct winbindd_request *request);
749 NTSTATUS winbindd_lookuprids_recv(struct tevent_req *req,
750                                   struct winbindd_response *response);
751
752 struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
753                                            struct tevent_context *ev,
754                                            struct winbindd_domain *domain);
755 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
756                                  char **users);
757
758 struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
759                                             struct tevent_context *ev,
760                                             struct winbindd_domain *domain);
761 NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
762                                   int *num_users,
763                                   struct wbint_Principal **groups);
764
765 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
766                                       struct tevent_context *ev,
767                                       struct getpwent_state *gstate,
768                                       struct winbindd_pw *pw);
769 NTSTATUS wb_next_pwent_recv(struct tevent_req *req);
770
771 struct tevent_req *winbindd_setpwent_send(TALLOC_CTX *mem_ctx,
772                                           struct tevent_context *ev,
773                                           struct winbindd_cli_state *cli,
774                                           struct winbindd_request *request);
775 NTSTATUS winbindd_setpwent_recv(struct tevent_req *req,
776                                 struct winbindd_response *presp);
777
778 struct tevent_req *winbindd_getpwent_send(TALLOC_CTX *mem_ctx,
779                                           struct tevent_context *ev,
780                                           struct winbindd_cli_state *cli,
781                                           struct winbindd_request *request);
782 NTSTATUS winbindd_getpwent_recv(struct tevent_req *req,
783                                 struct winbindd_response *response);
784
785 struct tevent_req *winbindd_endpwent_send(TALLOC_CTX *mem_ctx,
786                                           struct tevent_context *ev,
787                                           struct winbindd_cli_state *cli,
788                                           struct winbindd_request *request);
789 NTSTATUS winbindd_endpwent_recv(struct tevent_req *req,
790                                 struct winbindd_response *response);
791
792 struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
793                                              struct tevent_context *ev,
794                                              struct winbindd_cli_state *cli,
795                                              struct winbindd_request *request);
796 NTSTATUS winbindd_dsgetdcname_recv(struct tevent_req *req,
797                                    struct winbindd_response *response);
798
799 struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
800                                        struct tevent_context *ev,
801                                        const char *domain_name,
802                                        const struct GUID *domain_guid,
803                                        const char *site_name,
804                                        uint32_t flags);
805 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
806                              struct netr_DsRGetDCNameInfo **pdcinfo);
807 NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
808                                      struct netr_DsRGetDCNameInfo *dcinfo);
809 NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
810                                      const char *domname,
811                                      struct netr_DsRGetDCNameInfo **dcinfo);
812
813 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
814                                            struct tevent_context *ev,
815                                            struct winbindd_cli_state *cli,
816                                            struct winbindd_request *request);
817 NTSTATUS winbindd_getdcname_recv(struct tevent_req *req,
818                                  struct winbindd_response *response);
819
820 struct tevent_req *wb_next_grent_send(TALLOC_CTX *mem_ctx,
821                                       struct tevent_context *ev,
822                                       int max_nesting,
823                                       struct getgrent_state *gstate,
824                                       struct winbindd_gr *gr);
825 NTSTATUS wb_next_grent_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
826                             struct talloc_dict **members);
827
828 struct tevent_req *winbindd_setgrent_send(TALLOC_CTX *mem_ctx,
829                                           struct tevent_context *ev,
830                                           struct winbindd_cli_state *cli,
831                                           struct winbindd_request *request);
832 NTSTATUS winbindd_setgrent_recv(struct tevent_req *req,
833                                 struct winbindd_response *response);
834 struct tevent_req *winbindd_getgrent_send(TALLOC_CTX *mem_ctx,
835                                           struct tevent_context *ev,
836                                           struct winbindd_cli_state *cli,
837                                           struct winbindd_request *request);
838 NTSTATUS winbindd_getgrent_recv(struct tevent_req *req,
839                                 struct winbindd_response *response);
840 struct tevent_req *winbindd_endgrent_send(TALLOC_CTX *mem_ctx,
841                                           struct tevent_context *ev,
842                                           struct winbindd_cli_state *cli,
843                                           struct winbindd_request *request);
844 NTSTATUS winbindd_endgrent_recv(struct tevent_req *req,
845                                 struct winbindd_response *response);
846
847 struct tevent_req *winbindd_list_users_send(TALLOC_CTX *mem_ctx,
848                                             struct tevent_context *ev,
849                                             struct winbindd_cli_state *cli,
850                                             struct winbindd_request *request);
851 NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
852                                   struct winbindd_response *response);
853
854 struct tevent_req *winbindd_list_groups_send(TALLOC_CTX *mem_ctx,
855                                              struct tevent_context *ev,
856                                              struct winbindd_cli_state *cli,
857                                              struct winbindd_request *request);
858 NTSTATUS winbindd_list_groups_recv(struct tevent_req *req,
859                                    struct winbindd_response *response);
860
861 struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
862                                                     struct tevent_context *ev,
863                                                     struct winbindd_cli_state *cli,
864                                                     struct winbindd_request *request);
865 NTSTATUS winbindd_check_machine_acct_recv(struct tevent_req *req,
866                                           struct winbindd_response *presp);
867
868 struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx,
869                                          struct tevent_context *ev,
870                                          struct winbindd_cli_state *cli,
871                                          struct winbindd_request *request);
872 NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req,
873                                struct winbindd_response *presp);
874
875 struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
876                                                      struct tevent_context *ev,
877                                                      struct winbindd_cli_state *cli,
878                                                      struct winbindd_request *request);
879 NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
880                                            struct winbindd_response *presp);
881
882 struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
883                                           struct tevent_context *ev,
884                                           struct winbindd_cli_state *cli,
885                                           struct winbindd_request *request);
886 NTSTATUS winbindd_pam_auth_recv(struct tevent_req *req,
887                                 struct winbindd_response *response);
888
889 struct tevent_req *winbindd_pam_auth_crap_send(
890         TALLOC_CTX *mem_ctx,
891         struct tevent_context *ev,
892         struct winbindd_cli_state *cli,
893         struct winbindd_request *request);
894 NTSTATUS winbindd_pam_auth_crap_recv(struct tevent_req *req,
895                                      struct winbindd_response *response);
896
897 struct tevent_req *winbindd_pam_chauthtok_send(
898         TALLOC_CTX *mem_ctx,
899         struct tevent_context *ev,
900         struct winbindd_cli_state *cli,
901         struct winbindd_request *request);
902 NTSTATUS winbindd_pam_chauthtok_recv(struct tevent_req *req,
903                                      struct winbindd_response *response);
904
905 struct tevent_req *winbindd_pam_logoff_send(TALLOC_CTX *mem_ctx,
906                                             struct tevent_context *ev,
907                                             struct winbindd_cli_state *cli,
908                                             struct winbindd_request *request);
909 NTSTATUS winbindd_pam_logoff_recv(struct tevent_req *req,
910                                   struct winbindd_response *response);
911
912 struct tevent_req *winbindd_pam_chng_pswd_auth_crap_send(
913         TALLOC_CTX *mem_ctx,
914         struct tevent_context *ev,
915         struct winbindd_cli_state *cli,
916         struct winbindd_request *request);
917 NTSTATUS winbindd_pam_chng_pswd_auth_crap_recv(
918         struct tevent_req *req,
919         struct winbindd_response *response);
920
921 struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
922                                       struct tevent_context *ev,
923                                       struct dom_sid *sids,
924                                       uint32_t num_sids);
925 NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
926                             struct lsa_RefDomainList **domains,
927                             struct lsa_TransNameArray **names);
928
929 struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
930                                      struct tevent_context *ev,
931                                      const struct dom_sid *sids,
932                                      const uint32_t num_sids);
933 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
934                            struct unixid xids[], uint32_t num_xids);
935 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
936                                               struct tevent_context *ev,
937                                               struct winbindd_cli_state *cli,
938                                               struct winbindd_request *request);
939 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
940                                     struct winbindd_response *response);
941 struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
942                                      struct tevent_context *ev,
943                                      struct unixid *xids,
944                                      uint32_t num_xids);
945 NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
946                            struct dom_sid **sids);
947 struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
948                                               struct tevent_context *ev,
949                                               struct winbindd_cli_state *cli,
950                                               struct winbindd_request *request);
951 NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
952                                     struct winbindd_response *response);
953 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
954                                            struct tevent_context *ev,
955                                            struct winbindd_cli_state *cli,
956                                            struct winbindd_request *request);
957 NTSTATUS winbindd_wins_byip_recv(struct tevent_req *req,
958                                  struct winbindd_response *presp);
959 struct tevent_req *winbindd_wins_byname_send(TALLOC_CTX *mem_ctx,
960                                              struct tevent_context *ev,
961                                              struct winbindd_cli_state *cli,
962                                              struct winbindd_request *request);
963 NTSTATUS winbindd_wins_byname_recv(struct tevent_req *req,
964                                    struct winbindd_response *presp);
965
966
967 /* The following definitions come from winbindd/winbindd_samr.c  */
968
969 NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
970                                  struct winbindd_domain *domain,
971                                  struct rpc_pipe_client **samr_pipe,
972                                  struct policy_handle *samr_domain_hnd);
973 NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
974                                 struct rpc_pipe_client **lsa_pipe,
975                                 struct policy_handle *lsa_hnd);
976
977 /* The following definitions come from winbindd/winbindd_ads.c  */
978 ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
979
980 /* The following definitions come from winbindd/winbindd_irpc.c  */
981 NTSTATUS wb_irpc_register(void);
982
983 /* The following definitions come from winbindd/winbindd_reconnect.c  */
984 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
985
986 #endif /*  _WINBINDD_PROTO_H_  */