winbindd: add find_default_route_domain()
authorRalph Boehme <slow@samba.org>
Wed, 13 Dec 2017 16:08:10 +0000 (17:08 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 13 Jan 2018 11:55:08 +0000 (12:55 +0100)
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 <slow@samba.org>
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_util.c

index dd6767a02ab52b8f47293e23cf38770165bff98f..5ab1e8fd590e09a1d9026a50927e8c8c3738671c 100644 (file)
@@ -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);
index 2f145cdd48afb7567586405996ece47ca022acb3..dd3206c01f48de467af776f9cfb8d7f3197d3a4d 100644 (file)
@@ -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)