void winbindd_set_use_cache(bool use_cache);
char *get_winbind_priv_pipe_dir(void);
void winbindd_flush_caches(void);
+void winbind_debug_call_depth_setup(size_t *depth);
+void winbind_call_flow(void *private_data,
+ enum tevent_thread_call_depth_cmd cmd,
+ struct tevent_req *req,
+ size_t depth,
+ const char *fname);
bool winbindd_reload_services_file(const char *lfile);
/* The following definitions come from winbindd/winbindd_ads.c */
void set_domain_offline(struct winbindd_domain *domain);
void set_domain_online_request(struct winbindd_domain *domain);
+struct cli_credentials;
+NTSTATUS winbindd_get_trust_credentials(struct winbindd_domain *domain,
+ TALLOC_CTX *mem_ctx,
+ bool netlogon,
+ bool allow_ipc_fallback,
+ struct cli_credentials **_creds);
+
struct ndr_interface_table;
NTSTATUS wb_open_internal_pipe(TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *table,
NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
const char *logfilename);
struct winbindd_domain *wb_child_domain(void);
+bool add_trusted_domains_dc(void);
/* The following definitions come from winbindd/winbindd_group.c */
bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
NTSTATUS wb_parent_idmap_setup_recv(struct tevent_req *req,
const struct wb_parent_idmap_config **_cfg);
-void init_idmap_child(void);
+NTSTATUS init_idmap_child(TALLOC_CTX *mem_ctx);
struct winbindd_child *idmap_child(void);
bool is_idmap_child(const struct winbindd_child *child);
pid_t idmap_child_pid(void);
/* The following definitions come from winbindd/winbindd_locator.c */
-void init_locator_child(void);
+NTSTATUS init_locator_child(TALLOC_CTX *mem_ctx);
struct winbindd_child *locator_child(void);
struct dcerpc_binding_handle *locator_child_handle(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 namespace,
- fstring domain,
- fstring user);
-bool canonicalize_username(fstring username_inout,
- fstring namespace,
- fstring domain,
- fstring user);
+/**
+ * Parse a DOMAIN\user or UPN string into a domain, namespace and a user
+ *
+ * @param[in] ctx talloc context
+ * @param[in] domuser a DOMAIN\user or UPN string
+ * @param[out] namespace
+ * @param[out] domain
+ * @param[out] user
+ * @return bool indicating success or failure
+ */
+bool parse_domain_user(TALLOC_CTX *ctx,
+ const char *domuser,
+ char **namespace,
+ char **domain,
+ char **user);
+/**
+ * Ensure an incoming username from NSS is fully qualified. Replace the
+ * incoming username with DOMAIN <separator> user. Additionally returns
+ * the same values as parse_domain_user() as out params.
+ * Used to ensure all names are fully qualified within winbindd.
+ * Used by the NSS protocols of auth, chauthtok, logoff and ccache_ntlm_auth.
+ * The protocol definitions of auth_crap, chng_pswd_auth_crap
+ * really should be changed to use this instead of doing things
+ * by hand. JRA.
+ *
+ * @param[in] mem_ctx talloc context
+ * @param[in,out] username_inout populated with fully qualified name
+ with format 'DOMAIN <separator> user' where DOMAIN and
+ user are determined by the output of parse_domain_user()
+ * @param[out] namespace populated with namespace returned from
+ parse_domain_user()
+ * @param[out] domain populated with domain returned from
+ parse_domain_user()
+ * @param[out] populated with user returned from
+ parse_domain_user()
+ * @return bool indicating success or failure
+ */
+bool canonicalize_username(TALLOC_CTX *mem_ctx,
+ char **username_inout,
+ char **namespace,
+ char **domain,
+ char **user);
char *fill_domain_username_talloc(TALLOC_CTX *ctx,
const char *domain,
const char *user,
struct tevent_context *ev);
NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
int *num_domains, struct winbindd_domain ***domains,
- NTSTATUS **stati, uint32_t **seqnums);
+ NTSTATUS **statuses, uint32_t **seqnums);
struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
const struct dom_sid *sid,
- enum lsa_SidType type,
+ uint32_t num_sids,
+ enum lsa_SidType *type,
int max_depth);
NTSTATUS wb_group_members_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
struct db_context **members);