summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-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 b70a4dd3b4..b0b3acff8f 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 7a5fa3be20..99b94eac47 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"));
@@ -217,7 +218,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;
}