From 2e644af16428ff6421459020a54cf20c296bc4df Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 13 Dec 2017 17:08:10 +0100 Subject: [PATCH] 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 --- source3/winbindd/winbindd_proto.h | 1 + source3/winbindd/winbindd_util.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index dd6767a02ab..5ab1e8fd590 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 2f145cdd48a..dd3206c01f4 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)