1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

winbindd: avoid automatic enumerating trusts on DCs

We have a static list of trust based on our configuration.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Stefan Metzmacher 2017-11-29 16:02:28 +01:00 committed by Karolin Seeger
parent 29e6d55909
commit 40c91150e3

View File

@ -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"));