summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/winbindd.c2
-rw-r--r--source3/nsswitch/winbindd_util.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index c99bb39f7d..ddda2d5f8b 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -529,7 +529,7 @@ static void process_loop(void)
/* rescan the trusted domains list. This must be done
regularly to cope with transitive trusts */
- rescan_trusted_domains();
+ rescan_trusted_domains(False);
/* Free up temporary memory */
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 6d39df9c0a..3fa08029b6 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -146,7 +146,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
/*
rescan our domains looking for new trusted domains
*/
-void rescan_trusted_domains(void)
+void rescan_trusted_domains(BOOL force)
{
struct winbindd_domain *domain;
TALLOC_CTX *mem_ctx;
@@ -157,11 +157,12 @@ void rescan_trusted_domains(void)
if (!lp_allow_trusted_domains()) {
return;
}
-
- /* ony rescan every few minutes */
- if ((unsigned)(t - last_scan) < WINBINDD_RESCAN_FREQ) {
+
+ /* Only rescan every few minutes but force if necessary */
+
+ if (((unsigned)(t - last_scan) < WINBINDD_RESCAN_FREQ) && !force)
return;
- }
+
last_scan = t;
DEBUG(1, ("scanning trusted domain list\n"));
@@ -220,7 +221,7 @@ BOOL init_domain_list(void)
cache_methods.alternate_name(domain);
/* do an initial scan for trusted domains */
- rescan_trusted_domains();
+ rescan_trusted_domains(True);
return True;
}