From 61af154fc7b6ba185ce8b90efa220ee7ccb55094 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Feb 2018 11:24:38 +0100 Subject: [PATCH] winbind: set_dc_type_and_flags() is not needed on a DC On a DC we load the trusts in the parent in add_trusted_domains_dc() from our local configuration. There's no need to find out the trust details via network calls. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13278 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme (cherry picked from commit 55c3af89f1b0baecf5e2d6c2646902edd0684aa8) --- source3/winbindd/winbindd_cm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 02a6959f2bd..acccf104d3c 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2187,6 +2187,15 @@ static bool set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain ) TALLOC_CTX *mem_ctx = NULL; struct dcerpc_binding_handle *b; + if (IS_DC) { + /* + * On a DC we loaded all trusts + * from configuration and never learn + * new domains. + */ + return true; + } + DEBUG(5, ("set_dc_type_and_flags_trustinfo: domain %s\n", domain->name )); /* Our primary domain doesn't need to worry about trust flags. @@ -2581,6 +2590,15 @@ done: static void set_dc_type_and_flags( struct winbindd_domain *domain ) { + if (IS_DC) { + /* + * On a DC we loaded all trusts + * from configuration and never learn + * new domains. + */ + return; + } + /* we always have to contact our primary domain */ if ( domain->primary || domain->internal) { -- 2.11.4.GIT