winbindd: winbindd_interface_version() -> bool_dispatch_table
[samba.git] / source3 / winbindd / winbindd_proto.h
index 83136996dd2049c4a0520d8b2f399135e6ff6cce..b5e4ecfe5c0896140a54382cc3e83c767f18f7a3 100644 (file)
@@ -134,7 +134,8 @@ void close_winbindd_cache(void);
 bool lookup_cached_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
                       char **domain_name, char **name,
                       enum lsa_SidType *type);
-bool lookup_cached_name(const char *domain_name,
+bool lookup_cached_name(const char *namespace,
+                       const char *domain_name,
                        const char *name,
                        struct dom_sid *sid,
                        enum lsa_SidType *type);
@@ -210,6 +211,9 @@ NTSTATUS cm_connect_lsat(struct winbindd_domain *domain,
                         struct policy_handle *lsa_policy);
 NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
                             struct rpc_pipe_client **cli);
+NTSTATUS cm_connect_netlogon_secure(struct winbindd_domain *domain,
+                                   struct rpc_pipe_client **cli,
+                                   struct netlogon_creds_cli_context **ppdc);
 bool fetch_current_dc_from_gencache(TALLOC_CTX *mem_ctx,
                                    const char *domain_name,
                                    char **p_dc_name, char **p_dc_ip);
@@ -269,7 +273,6 @@ void setup_domain_child(struct winbindd_domain *domain);
 /* The following definitions come from winbindd/winbindd_dual.c  */
 
 struct dcerpc_binding_handle *dom_child_handle(struct winbindd_domain *domain);
-struct winbindd_child *choose_domain_child(struct winbindd_domain *domain);
 
 struct tevent_req *wb_child_request_send(TALLOC_CTX *mem_ctx,
                                         struct tevent_context *ev,
@@ -295,6 +298,11 @@ void winbind_msg_debug(struct messaging_context *msg_ctx,
                         uint32_t msg_type,
                         struct server_id server_id,
                         DATA_BLOB *data);
+void winbind_disconnect_dc_parent(struct messaging_context *msg_ctx,
+                                 void *private_data,
+                                 uint32_t msg_type,
+                                 struct server_id server_id,
+                                 DATA_BLOB *data);
 void winbind_msg_offline(struct messaging_context *msg_ctx,
                         void *private_data,
                         uint32_t msg_type,
@@ -325,6 +333,11 @@ void winbind_msg_ip_dropped(struct messaging_context *msg_ctx,
                            uint32_t msg_type,
                            struct server_id server_id,
                            DATA_BLOB *data);
+void winbind_msg_disconnect_dc(struct messaging_context *msg_ctx,
+                              void *private_data,
+                              uint32_t msg_type,
+                              struct server_id server_id,
+                              DATA_BLOB *data);
 void winbind_msg_ip_dropped_parent(struct messaging_context *msg_ctx,
                                   void *private_data,
                                   uint32_t msg_type,
@@ -348,6 +361,7 @@ NTSTATUS winbindd_print_groupmembers(struct db_context *members,
 
 void init_idmap_child(void);
 struct winbindd_child *idmap_child(void);
+struct dcerpc_binding_handle *idmap_child_handle(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,
@@ -363,6 +377,7 @@ bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
 
 void init_locator_child(void);
 struct winbindd_child *locator_child(void);
+struct dcerpc_binding_handle *locator_child_handle(void);
 
 /* The following definitions come from winbindd/winbindd_misc.c  */
 
@@ -374,7 +389,7 @@ void winbindd_domain_info(struct winbindd_cli_state *state);
 void winbindd_dc_info(struct winbindd_cli_state *state);
 void winbindd_ping(struct winbindd_cli_state *state);
 void winbindd_info(struct winbindd_cli_state *state);
-void winbindd_interface_version(struct winbindd_cli_state *state);
+bool winbindd_interface_version(struct winbindd_cli_state *state);
 void winbindd_domain_name(struct winbindd_cli_state *state);
 void winbindd_netbios_name(struct winbindd_cli_state *state);
 void winbindd_priv_pipe_dir(struct winbindd_cli_state *state);
@@ -400,7 +415,8 @@ bool check_request_flags(uint32_t flags);
 NTSTATUS append_auth_data(TALLOC_CTX *mem_ctx,
                          struct winbindd_response *resp,
                          uint32_t request_flags,
-                         struct netr_SamInfo3 *info3,
+                         uint16_t validation_level,
+                         union netr_Validation *validation,
                          const char *name_domain,
                          const char *name_user);
 uid_t get_uid_from_request(struct winbindd_request *request);
@@ -415,11 +431,14 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact
 enum winbindd_result winbindd_dual_pam_logoff(struct winbindd_domain *domain,
                                              struct winbindd_cli_state *state) ;
 enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domain *domainSt, struct winbindd_cli_state *state);
-NTSTATUS winbindd_pam_auth_pac_send(struct winbindd_cli_state *state,
-                                   struct netr_SamInfo3 **info3);
+NTSTATUS winbindd_pam_auth_pac_verify(struct winbindd_cli_state *state,
+                                     bool *p_is_trusted,
+                                     uint16_t *p_validation_level,
+                                     union netr_Validation **p_validation);
 
 NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                               TALLOC_CTX *mem_ctx,
+                              bool interactive,
                               uint32_t logon_parameters,
                               const char *name_user,
                               const char *name_domain,
@@ -430,12 +449,18 @@ NTSTATUS winbind_dual_SamLogon(struct winbindd_domain *domain,
                               uint8_t *authoritative,
                               bool skip_sam,
                               uint32_t *flags,
-                              struct netr_SamInfo3 **info3);
+                              uint16_t *_validation_level,
+                              union netr_Validation **_validation);
 
 /* 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 set_routing_domain(struct winbindd_domain *domain,
+                       struct winbindd_domain *routing_domain);
+bool add_trusted_domain_from_auth(uint16_t validation_level,
+                                 struct info3_text *info3,
+                                 struct info6_text *info6);
 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);
@@ -443,16 +468,23 @@ enum winbindd_result winbindd_dual_init_connection(struct winbindd_domain *domai
                                                   struct winbindd_cli_state *state);
 bool init_domain_list(void);
 struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name);
+struct winbindd_domain *find_trust_from_name_noinit(const char *domain_name);
 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_trust_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_default_route_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);
-bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
-                             char **domain, char **user);
-bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
+bool parse_domain_user(const char *domuser,
+                      fstring namespace,
+                      fstring domain,
+                      fstring user);
+bool canonicalize_username(fstring username_inout,
+                          fstring namespace,
+                          fstring domain,
+                          fstring user);
 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
 char *fill_domain_username_talloc(TALLOC_CTX *ctx,
                                  const char *domain,
@@ -471,7 +503,7 @@ NTSTATUS lookup_usergroups_cached(TALLOC_CTX *mem_ctx,
                                  uint32_t *p_num_groups, struct dom_sid **user_sids);
 
 NTSTATUS normalize_name_map(TALLOC_CTX *mem_ctx,
-                            struct winbindd_domain *domain,
+                            const char *domain_name,
                             const char *name,
                             char **normalized);
 NTSTATUS normalize_name_unmap(TALLOC_CTX *mem_ctx,
@@ -486,7 +518,6 @@ NTSTATUS resolve_alias_to_username(TALLOC_CTX *mem_ctx,
                                   const char *alias, char **name);
 
 bool winbindd_can_contact_domain(struct winbindd_domain *domain);
-bool winbindd_internal_child(struct winbindd_child *child);
 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
 void winbindd_unset_locator_kdc_env(const struct winbindd_domain *domain);
 void winbindd_set_locator_kdc_envs(const struct winbindd_domain *domain);
@@ -503,12 +534,6 @@ bool parse_xidlist(TALLOC_CTX *mem_ctx, const char *xidstr,
 
 void winbindd_wins_byname(struct winbindd_cli_state *state);
 
-struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                               struct winbindd_cli_state *cli,
-                               struct winbindd_request *request);
-NTSTATUS wb_ping_recv(struct tevent_req *req,
-                     struct winbindd_response *resp);
-
 enum winbindd_result winbindd_dual_ping(struct winbindd_domain *domain,
                                        struct winbindd_cli_state *state);
 
@@ -541,7 +566,9 @@ NTSTATUS winbindd_lookupsids_recv(struct tevent_req *req,
 
 struct tevent_req *wb_lookupname_send(TALLOC_CTX *mem_ctx,
                                      struct tevent_context *ev,
-                                     const char *dom_name, const char *name,
+                                     const char *namespace,
+                                     const char *dom_name,
+                                     const char *name,
                                      uint32_t flags);
 NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid,
                            enum lsa_SidType *type);
@@ -932,4 +959,12 @@ NTSTATUS wb_irpc_register(void);
 /* The following definitions come from winbindd/winbindd_reconnect.c  */
 bool reconnect_need_retry(NTSTATUS status, struct winbindd_domain *domain);
 
+/* The following definitions come from winbindd/winbindd_gpupdate.c  */
+void gpupdate_init(void);
+
+/* The following comes from winbindd/winbindd_dual_srv.c */
+bool reset_cm_connection_on_error(struct winbindd_domain *domain,
+                                 struct dcerpc_binding_handle *b,
+                                 NTSTATUS status);
+
 #endif /*  _WINBINDD_PROTO_H_  */