From 64d6cfb563ae608784afaeaddfb3eb256bd19bd0 Mon Sep 17 00:00:00 2001 From: Dmitry Butskoy Date: Mon, 18 Apr 2011 14:14:09 -0700 Subject: [PATCH] Fix bug 6966 - "allow trusted domains = no" not respected in winbind. --- source3/winbindd/winbindd.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 9c676f0..70749c5 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1013,7 +1013,6 @@ int main(int argc, char **argv, char **envp) poptContext pc; int opt; TALLOC_CTX *frame = talloc_stackframe(); - struct tevent_timer *te; /* glibc (?) likes to print "User defined signal 1" and exit if a SIGUSR[12] is received before a handler is installed */ @@ -1260,11 +1259,12 @@ int main(int argc, char **argv, char **envp) exit(1); } - te = tevent_add_timer(winbind_event_context(), NULL, timeval_zero(), - rescan_trusted_domains, NULL); - if (te == NULL) { - DEBUG(0, ("Could not trigger rescan_trusted_domains()\n")); - exit(1); + if (lp_allow_trusted_domains()) { + if (tevent_add_timer(winbind_event_context(), NULL, timeval_zero(), + rescan_trusted_domains, NULL) == NULL) { + DEBUG(0, ("Could not trigger rescan_trusted_domains()\n")); + exit(1); + } } TALLOC_FREE(frame); -- 1.7.3.1