diff options
author | Tim Potter <tpot@samba.org> | 2003-02-14 00:23:31 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-02-14 00:23:31 +0000 |
commit | afb9105c3de7fc42ab12f7545268161c5849ba16 (patch) | |
tree | d3761fc286910724a39257ce66bcda336b8db024 | |
parent | ce306f8b08cc80d72e795e2795e1d71b5f43b93f (diff) | |
download | samba-afb9105c3de7fc42ab12f7545268161c5849ba16.tar.gz samba-afb9105c3de7fc42ab12f7545268161c5849ba16.tar.bz2 samba-afb9105c3de7fc42ab12f7545268161c5849ba16.zip |
Fix for trusted domains scan not working inspired by Ken Cross.
(Sorry - I should have checked this in yesterday but forgot)
(This used to be commit 7420ddcda8e7189cedacb2c60f5ea265b8c35bda)
-rw-r--r-- | source3/nsswitch/winbindd.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 13 |
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; } |