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