From 40c91150e36e5818d4a4f25429ed600762cfd49b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Nov 2017 16:02:28 +0100 Subject: [PATCH] winbindd: avoid automatic enumerating trusts on DCs We have a static list of trust based on our configuration. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/winbindd/winbindd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index bd38bf7df63..d9700701741 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1280,6 +1280,7 @@ bool winbindd_use_cache(void) static void winbindd_register_handlers(struct messaging_context *msg_ctx, bool foreground) { + bool scan_trusts = true; NTSTATUS status; /* Setup signal handlers */ @@ -1362,7 +1363,15 @@ static void winbindd_register_handlers(struct messaging_context *msg_ctx, smb_nscd_flush_user_cache(); smb_nscd_flush_group_cache(); - if (lp_allow_trusted_domains()) { + if (!lp_allow_trusted_domains()) { + scan_trusts = false; + } + + if (IS_DC) { + scan_trusts = false; + } + + if (scan_trusts) { if (tevent_add_timer(server_event_context(), NULL, timeval_zero(), rescan_trusted_domains, NULL) == NULL) { DEBUG(0, ("Could not trigger rescan_trusted_domains()\n")); -- 2.34.1