From: Ralph Boehme Date: Wed, 13 Dec 2017 16:08:10 +0000 (+0100) Subject: winbindd: add find_default_route_domain() X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=2e644af16428ff6421459020a54cf20c296bc4df winbindd: add find_default_route_domain() On a member server this is just our primary domain. The logic for DCs is not yet implemented, on a DC of a child-domain in a forrest this would be the parent domain. Signed-off-by: Ralph Boehme --- diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index dd6767a02ab5..5ab1e8fd590e 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -451,6 +451,7 @@ 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); diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 2f145cdd48af..dd3206c01f48 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -1366,6 +1366,15 @@ struct winbindd_domain *find_our_domain(void) return NULL; } +struct winbindd_domain *find_default_route_domain(void) +{ + if (!IS_DC) { + return find_our_domain(); + } + DBG_ERR("Routing logic not yet implemented on a DC"); + return NULL; +} + /* Find the appropriate domain to lookup a name or SID */ struct winbindd_domain *find_lookup_domain_from_sid(const struct dom_sid *sid)