winbindd: Do not run SAM auth stack in winbind SamLogon
[metze/samba-autobuild/.git] / source3 / winbindd / winbindd_proto.h
index b07f30331ebe2e3c05ecdd1ae84d9783160dcf47..6d6fafcb72f254dbae65036e6811263a38bae46d 100644 (file)
 #ifndef _WINBINDD_PROTO_H_
 #define _WINBINDD_PROTO_H_
 
-#include "ads.h"
-
 /* The following definitions come from winbindd/winbindd.c  */
 struct messaging_context *winbind_messaging_context(void);
+struct imessaging_context *winbind_imessaging_context(void);
 void request_error(struct winbindd_cli_state *state);
 void request_ok(struct winbindd_cli_state *state);
 bool winbindd_setup_sig_term_handler(bool parent);
@@ -34,10 +33,8 @@ bool winbindd_setup_stdin_handler(bool parent, bool foreground);
 bool winbindd_setup_sig_hup_handler(const char *lfile);
 bool winbindd_use_idmap_cache(void);
 bool winbindd_use_cache(void);
-const char *get_winbind_pipe_dir(void);
 char *get_winbind_priv_pipe_dir(void);
 struct tevent_context *winbind_event_context(void);
-int main(int argc, char **argv, char **envp);
 
 /* The following definitions come from winbindd/winbindd_ads.c  */
 
@@ -58,16 +55,78 @@ NTSTATUS rpc_lookup_sids(TALLOC_CTX *mem_ctx,
 
 /* The following definitions come from winbindd/winbindd_cache.c  */
 
-struct cache_entry *centry_start(struct winbindd_domain *domain, NTSTATUS status);
+NTSTATUS wb_cache_query_user_list(struct winbindd_domain *domain,
+                                 TALLOC_CTX *mem_ctx,
+                                 uint32_t **prids);
+NTSTATUS wb_cache_enum_dom_groups(struct winbindd_domain *domain,
+                                 TALLOC_CTX *mem_ctx,
+                                 uint32_t *num_entries,
+                                 struct wb_acct_info **info);
+NTSTATUS wb_cache_enum_local_groups(struct winbindd_domain *domain,
+                                   TALLOC_CTX *mem_ctx,
+                                   uint32_t *num_entries,
+                                   struct wb_acct_info **info);
+NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
+                             TALLOC_CTX *mem_ctx,
+                             const char *domain_name,
+                             const char *name,
+                             uint32_t flags,
+                             struct dom_sid *sid,
+                             enum lsa_SidType *type);
+NTSTATUS wb_cache_sid_to_name(struct winbindd_domain *domain,
+                             TALLOC_CTX *mem_ctx,
+                             const struct dom_sid *sid,
+                             char **domain_name,
+                             char **name,
+                             enum lsa_SidType *type);
+NTSTATUS wb_cache_rids_to_names(struct winbindd_domain *domain,
+                               TALLOC_CTX *mem_ctx,
+                               const struct dom_sid *domain_sid,
+                               uint32_t *rids,
+                               size_t num_rids,
+                               char **domain_name,
+                               char ***names,
+                               enum lsa_SidType **types);
+NTSTATUS wb_cache_lookup_usergroups(struct winbindd_domain *domain,
+                                   TALLOC_CTX *mem_ctx,
+                                   const struct dom_sid *user_sid,
+                                   uint32_t *pnum_sids,
+                                   struct dom_sid **psids);
+NTSTATUS wb_cache_lookup_useraliases(struct winbindd_domain *domain,
+                                    TALLOC_CTX *mem_ctx,
+                                    uint32_t num_sids,
+                                    const struct dom_sid *sids,
+                                    uint32_t *num_aliases,
+                                    uint32_t **alias_rids);
+NTSTATUS wb_cache_lookup_groupmem(struct winbindd_domain *domain,
+                                 TALLOC_CTX *mem_ctx,
+                                 const struct dom_sid *group_sid,
+                                 enum lsa_SidType type,
+                                 uint32_t *num_names,
+                                 struct dom_sid **sid_mem,
+                                 char ***names,
+                                 uint32_t **name_types);
+NTSTATUS wb_cache_sequence_number(struct winbindd_domain *domain,
+                                 uint32_t *seq);
+NTSTATUS wb_cache_lockout_policy(struct winbindd_domain *domain,
+                                TALLOC_CTX *mem_ctx,
+                                struct samr_DomInfo12 *policy);
+NTSTATUS wb_cache_password_policy(struct winbindd_domain *domain,
+                                 TALLOC_CTX *mem_ctx,
+                                 struct samr_DomInfo1 *policy);
+NTSTATUS wb_cache_trusted_domains(struct winbindd_domain *domain,
+                                 TALLOC_CTX *mem_ctx,
+                                 struct netr_DomainTrustList *trusts);
+
 NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct dom_sid *sid);
 NTSTATUS wcache_get_creds(struct winbindd_domain *domain, 
                          TALLOC_CTX *mem_ctx, 
                          const struct dom_sid *sid,
-                         const uint8 **cached_nt_pass,
-                         const uint8 **cached_salt);
+                         const uint8_t **cached_nt_pass,
+                         const uint8_t **cached_salt);
 NTSTATUS wcache_save_creds(struct winbindd_domain *domain, 
                           const struct dom_sid *sid,
-                          const uint8 nt_pass[NT_HASH_LEN]);
+                          const uint8_t nt_pass[NT_HASH_LEN]);
 void wcache_invalidate_samlogon(struct winbindd_domain *domain, 
                                const struct dom_sid *user_sid);
 bool wcache_invalidate_cache(void);
@@ -75,12 +134,6 @@ bool wcache_invalidate_cache_noinit(void);
 bool init_wcache(void);
 bool initialize_winbindd_cache(void);
 void close_winbindd_cache(void);
-NTSTATUS wcache_sid_to_name(struct winbindd_domain *domain,
-                           const struct dom_sid *sid,
-                           TALLOC_CTX *mem_ctx,
-                           char **domain_name,
-                           char **name,
-                           enum lsa_SidType *type);
 NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
                                TALLOC_CTX *mem_ctx,
                                const struct dom_sid *group_sid,
@@ -94,6 +147,11 @@ bool lookup_cached_name(const char *domain_name,
                        const char *name,
                        struct dom_sid *sid,
                        enum lsa_SidType *type);
+void cache_name2sid_trusted(struct winbindd_domain *domain,
+                       const char *domain_name,
+                       const char *name,
+                       enum lsa_SidType type,
+                       const struct dom_sid *sid);
 void cache_name2sid(struct winbindd_domain *domain, 
                    const char *domain_name, const char *name,
                    enum lsa_SidType type, const struct dom_sid *sid);
@@ -106,10 +164,14 @@ NTSTATUS wcache_query_user(struct winbindd_domain *domain,
                           TALLOC_CTX *mem_ctx,
                           const struct dom_sid *user_sid,
                           struct wbint_userinfo *info);
+NTSTATUS wcache_query_user_fullname(struct winbindd_domain *domain,
+                                   TALLOC_CTX *mem_ctx,
+                                   const struct dom_sid *user_sid,
+                                   const char **full_name);
 NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
                                   TALLOC_CTX *mem_ctx,
-                                  uint32 num_sids, const struct dom_sid *sids,
-                                  uint32 *pnum_aliases, uint32 **paliases);
+                                  uint32_t num_sids, const struct dom_sid *sids,
+                                  uint32_t *pnum_aliases, uint32_t **paliases);
 NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
                                  TALLOC_CTX *mem_ctx,
                                  const struct dom_sid *user_sid,
@@ -128,16 +190,7 @@ bool winbindd_cache_validate_and_initialize(void);
 bool wcache_tdc_fetch_list( struct winbindd_tdc_domain **domains, size_t *num_domains );
 bool wcache_tdc_add_domain( struct winbindd_domain *domain );
 struct winbindd_tdc_domain * wcache_tdc_fetch_domain( TALLOC_CTX *ctx, const char *name );
-struct winbindd_tdc_domain* wcache_tdc_fetch_domainbysid(TALLOC_CTX *ctx, const struct dom_sid *sid);
 void wcache_tdc_clear( void );
-#ifdef HAVE_ADS
-struct ads_struct;
-NTSTATUS nss_get_info_cached( struct winbindd_domain *domain, 
-                             const struct dom_sid *user_sid,
-                             TALLOC_CTX *ctx,
-                             const char **homedir, const char **shell,
-                             const char **gecos, gid_t *p_gid);
-#endif
 bool wcache_store_seqnum(const char *domain_name, uint32_t seqnum,
                         time_t last_seq_check);
 bool wcache_fetch_ndr(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain,
@@ -153,19 +206,32 @@ enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *doma
 void winbindd_ccache_save(struct winbindd_cli_state *state);
 
 /* The following definitions come from winbindd/winbindd_cm.c  */
+void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
+                               void *private_data,
+                               uint32_t msg_type,
+                               struct server_id server_id,
+                               DATA_BLOB *data);
+void winbind_msg_domain_online(struct messaging_context *msg_ctx,
+                               void *private_data,
+                               uint32_t msg_type,
+                               struct server_id server_id,
+                               DATA_BLOB *data);
 
 void set_domain_offline(struct winbindd_domain *domain);
 void set_domain_online_request(struct winbindd_domain *domain);
-void invalidate_cm_connection(struct winbindd_cm_conn *conn);
+
+struct ndr_interface_table;
+NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
+                              const struct ndr_interface_table *table,
+                              struct rpc_pipe_client **ret_pipe);
+void invalidate_cm_connection(struct winbindd_domain *domain);
 void close_conns_after_fork(void);
-NTSTATUS init_dc_connection(struct winbindd_domain *domain);
+NTSTATUS init_dc_connection(struct winbindd_domain *domain, bool need_rw_dc);
 NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
+                       bool need_rw_dc,
                        struct rpc_pipe_client **cli, struct policy_handle *sam_handle);
 NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                        struct rpc_pipe_client **cli, struct policy_handle *lsa_policy);
-NTSTATUS cm_connect_lsa_tcp(struct winbindd_domain *domain,
-                           TALLOC_CTX *mem_ctx,
-                           struct rpc_pipe_client **cli);
 NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
                         TALLOC_CTX *mem_ctx,
                         struct rpc_pipe_client **cli,
@@ -210,8 +276,8 @@ NTSTATUS winbindd_get_creds(struct winbindd_domain *domain,
                            TALLOC_CTX *mem_ctx,
                            const struct dom_sid *sid,
                            struct netr_SamInfo3 **info3,
-                           const uint8 *cached_nt_pass[NT_HASH_LEN],
-                           const uint8 *cred_salt[NT_HASH_LEN]);
+                           const uint8_t *cached_nt_pass[NT_HASH_LEN],
+                           const uint8_t *cred_salt[NT_HASH_LEN]);
 NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
                              const char *user, 
                              const char *pass, 
@@ -297,17 +363,6 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
 struct winbindd_domain *wb_child_domain(void);
 
 /* The following definitions come from winbindd/winbindd_group.c  */
-
-void winbindd_getgrnam(struct winbindd_cli_state *state);
-void winbindd_getgrgid(struct winbindd_cli_state *state);
-void winbindd_setgrent(struct winbindd_cli_state *state);
-void winbindd_endgrent(struct winbindd_cli_state *state);
-void winbindd_getgrent(struct winbindd_cli_state *state);
-void winbindd_list_groups(struct winbindd_cli_state *state);
-void winbindd_getgroups(struct winbindd_cli_state *state);
-void winbindd_getusersids(struct winbindd_cli_state *state);
-void winbindd_getuserdomgroups(struct winbindd_cli_state *state);
-void winbindd_getsidaliases(struct winbindd_cli_state *state);
 bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
                const char *dom_name, const char *gr_name, gid_t unix_gid);
 NTSTATUS winbindd_print_groupmembers(struct talloc_dict *members,
@@ -321,6 +376,14 @@ void init_idmap_child(void);
 struct winbindd_child *idmap_child(void);
 struct idmap_domain *idmap_find_domain_with_sid(const char *domname,
                                                const struct dom_sid *sid);
+const char *idmap_config_const_string(const char *domname, const char *option,
+                                     const char *def);
+bool idmap_config_bool(const char *domname, const char *option, bool def);
+int idmap_config_int(const char *domname, const char *option, int def);
+bool domain_has_idmap_config(const char *domname);
+bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
+                                     void *private_data),
+                          void *private_data);
 
 /* The following definitions come from winbindd/winbindd_locator.c  */
 
@@ -381,9 +444,24 @@ enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domai
 NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
                                    struct netr_SamInfo3 **info3);
 
+NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
+                              TALLOC_CTX *mem_ctx,
+                              uint32_t logon_parameters,
+                              const char *name_user,
+                              const char *name_domain,
+                              const char *workstation,
+                              const uint8_t chal[8],
+                              DATA_BLOB lm_response,
+                              DATA_BLOB nt_response,
+                              uint8_t *authoritative,
+                              bool skip_sam,
+                              uint32_t *flags,
+                              struct netr_SamInfo3 **info3);
+
 /* The following definitions come from winbindd/winbindd_util.c  */
 
 struct winbindd_domain *domain_list(void);
+struct winbindd_domain *wb_next_domain(struct winbindd_domain *domain);
 bool domain_is_forest_root(const struct winbindd_domain *domain);
 void rescan_trusted_domains(struct tevent_context *ev, struct tevent_timer *te,
                            struct timeval now, void *private_data);
@@ -395,8 +473,6 @@ struct winbindd_domain *find_domain_from_name(const char *domain_name);
 struct winbindd_domain *find_domain_from_sid_noinit(const struct dom_sid *sid);
 struct winbindd_domain *find_domain_from_sid(const struct dom_sid *sid);
 struct winbindd_domain *find_our_domain(void);
-struct winbindd_domain *find_root_domain(void);
-struct winbindd_domain *find_builtin_domain(void);
 struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid);
 struct winbindd_domain *find_lookup_domain_from_name(const char *domain_name);
 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
@@ -409,13 +485,16 @@ char *fill_domain_username_talloc(TALLOC_CTX *ctx,
                                  const char *user,
                                  bool can_assume);
 struct winbindd_cli_state *winbindd_client_list(void);
+struct winbindd_cli_state *winbindd_client_list_tail(void);
+struct winbindd_cli_state *
+winbindd_client_list_prev(struct winbindd_cli_state *cli);
 void winbindd_add_client(struct winbindd_cli_state *cli);
 void winbindd_remove_client(struct winbindd_cli_state *cli);
+void winbindd_promote_client(struct winbindd_cli_state *cli);
 int winbindd_num_clients(void);
-NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
-                                 TALLOC_CTX *mem_ctx,
+NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
                                  const struct dom_sid *user_sid,
-                                 uint32 *p_num_groups, struct dom_sid **user_sids);
+                                 uint32_t *p_num_groups, struct dom_sid **user_sids);
 
 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
                             struct winbindd_domain *domain,
@@ -443,6 +522,8 @@ bool is_domain_offline(const struct winbindd_domain *domain);
 bool is_domain_online(const struct winbindd_domain *domain);
 bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
                   struct dom_sid **sids, uint32_t *num_sids);
+bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
+                  struct unixid **pxids, uint32_t *pnum_xids);
 
 /* The following definitions come from winbindd/winbindd_wins.c  */
 
@@ -498,44 +579,6 @@ struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx,
 NTSTATUS winbindd_lookupname_recv(struct tevent_req *req,
                                  struct winbindd_response *response);
 
-struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct winbindd_cli_state *cli,
-                                           struct winbindd_request *request);
-NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req,
-                                 struct winbindd_response *response);
-
-struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct winbindd_cli_state *cli,
-                                           struct winbindd_request *request);
-NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req,
-                                 struct winbindd_response *response);
-
-struct tevent_req *wb_uid2sid_send(TALLOC_CTX *mem_ctx,
-                                  struct tevent_context *ev,
-                                  uid_t uid);
-NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
-
-struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct winbindd_cli_state *cli,
-                                           struct winbindd_request *request);
-NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req,
-                                 struct winbindd_response *response);
-
-struct tevent_req *wb_gid2sid_send(TALLOC_CTX *mem_ctx,
-                                  struct tevent_context *ev,
-                                  gid_t gid);
-NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid);
-
-struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct winbindd_cli_state *cli,
-                                           struct winbindd_request *request);
-NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req,
-                                 struct winbindd_response *response);
-
 struct tevent_req *winbindd_allocate_uid_send(TALLOC_CTX *mem_ctx,
                                              struct tevent_context *ev,
                                              struct winbindd_cli_state *cli,
@@ -597,7 +640,6 @@ NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req,
                                     struct winbindd_response *response);
 struct tevent_req *wb_lookupusergroups_send(TALLOC_CTX *mem_ctx,
                                            struct tevent_context *ev,
-                                           struct winbindd_domain *domain,
                                            const struct dom_sid *sid);
 NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                                  int *num_sids, struct dom_sid **sids);
@@ -610,7 +652,8 @@ NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req,
                                        struct winbindd_response *response);
 struct tevent_req *wb_gettoken_send(TALLOC_CTX *mem_ctx,
                                    struct tevent_context *ev,
-                                   const struct dom_sid *sid);
+                                   const struct dom_sid *sid,
+                                   bool expand_local_aliases);
 NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                          int *num_sids, struct dom_sid **sids);
 struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx,
@@ -691,14 +734,14 @@ struct tevent_req *wb_query_user_list_send(TALLOC_CTX *mem_ctx,
                                           struct tevent_context *ev,
                                           struct winbindd_domain *domain);
 NTSTATUS wb_query_user_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
-                                int *num_users,
-                                struct wbint_userinfo **users);
+                                char **users);
 
-struct tevent_req *wb_fill_pwent_send(TALLOC_CTX *mem_ctx,
-                                     struct tevent_context *ev,
-                                     struct wbint_userinfo *info,
-                                     struct winbindd_pw *pw);
-NTSTATUS wb_fill_pwent_recv(struct tevent_req *req);
+struct tevent_req *wb_query_group_list_send(TALLOC_CTX *mem_ctx,
+                                           struct tevent_context *ev,
+                                           struct winbindd_domain *domain);
+NTSTATUS wb_query_group_list_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                                 int *num_users,
+                                 struct wbint_Principal **groups);
 
 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
                                      struct tevent_context *ev,
@@ -742,6 +785,11 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
                                       uint32_t flags);
 NTSTATUS wb_dsgetdcname_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                             struct netr_DsRGetDCNameInfo **pdcinfo);
+NTSTATUS wb_dsgetdcname_gencache_set(const char *domname,
+                                    struct netr_DsRGetDCNameInfo *dcinfo);
+NTSTATUS wb_dsgetdcname_gencache_get(TALLOC_CTX *mem_ctx,
+                                    const char *domname,
+                                    struct netr_DsRGetDCNameInfo **dcinfo);
 
 struct tevent_req *winbindd_getdcname_send(TALLOC_CTX *mem_ctx,
                                           struct tevent_context *ev,
@@ -864,13 +912,25 @@ struct tevent_req *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
                                     const struct dom_sid *sids,
                                     const uint32_t num_sids);
 NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
-                          struct unixid *xids);
+                          struct unixid xids[], uint32_t num_xids);
 struct tevent_req *winbindd_sids_to_xids_send(TALLOC_CTX *mem_ctx,
                                              struct tevent_context *ev,
                                              struct winbindd_cli_state *cli,
                                              struct winbindd_request *request);
 NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req,
                                    struct winbindd_response *response);
+struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx,
+                                    struct tevent_context *ev,
+                                    struct unixid *xids,
+                                    uint32_t num_xids);
+NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                          struct dom_sid **sids);
+struct tevent_req *winbindd_xids_to_sids_send(TALLOC_CTX *mem_ctx,
+                                             struct tevent_context *ev,
+                                             struct winbindd_cli_state *cli,
+                                             struct winbindd_request *request);
+NTSTATUS winbindd_xids_to_sids_recv(struct tevent_req *req,
+                                   struct winbindd_response *response);
 struct tevent_req *winbindd_wins_byip_send(TALLOC_CTX *mem_ctx,
                                           struct tevent_context *ev,
                                           struct winbindd_cli_state *cli,
@@ -891,8 +951,14 @@ NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
                                 struct winbindd_domain *domain,
                                 struct rpc_pipe_client **samr_pipe,
                                 struct policy_handle *samr_domain_hnd);
+NTSTATUS open_internal_lsa_conn(TALLOC_CTX *mem_ctx,
+                               struct rpc_pipe_client **lsa_pipe,
+                               struct policy_handle *lsa_hnd);
 
-/* The following definitions come from winbindd/winbindd_ads.c  */
-ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
+/* The following definitions come from winbindd/winbindd_irpc.c  */
+NTSTATUS wb_irpc_register(void);
+
+/* The following definitions come from winbindd/winbindd_reconnect.c  */
+bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
 
 #endif /*  _WINBINDD_PROTO_H_  */