From: Stefan Metzmacher Date: Thu, 22 Feb 2018 10:24:38 +0000 (+0100) Subject: winbind: set_dc_type_and_flags() is not needed on a DC X-Git-Tag: ldb-1.3.2~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55c3af89f1b0baecf5e2d6c2646902edd0684aa8;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 27f6f3614e2..8d8396d1ab2 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2190,6 +2190,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. @@ -2584,6 +2593,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) {