/* 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 */
/*
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;
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"));
cache_methods.alternate_name(domain);
/* do an initial scan for trusted domains */
- rescan_trusted_domains();
+ rescan_trusted_domains(True);
return True;
}