summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-06 00:10:04 +0000
committerJeremy Allison <jra@samba.org>2002-11-06 00:10:04 +0000
commitd21a06bbb44a0044657de38c1eb544be8c335918 (patch)
tree6b8a07355efd65d310fe4c4f509d006456f1a375
parent66b62281e285ae53c63e43ff074f57053b3e91ae (diff)
downloadsamba-d21a06bbb44a0044657de38c1eb544be8c335918.tar.gz
samba-d21a06bbb44a0044657de38c1eb544be8c335918.tar.bz2
samba-d21a06bbb44a0044657de38c1eb544be8c335918.zip
Merge things that bloody tpot should be doing :-).
Jeremy. (This used to be commit 77d534f7fd9ad74ca6d5e74860b29bb8ad54268f)
-rw-r--r--source3/nsswitch/winbindd_util.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index cb8870d6f3..e3f00149f7 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -153,12 +153,17 @@ void rescan_trusted_domains(void)
static time_t last_scan;
time_t t = time(NULL);
+ /* trusted domains might be disabled */
+ if (!lp_allow_trusted_domains()) {
+ return;
+ }
+
/* ony rescan every few minutes */
if ((unsigned)(t - last_scan) < WINBINDD_RESCAN_FREQ) {
return;
}
- last_scan = time(NULL);
-
+ last_scan = t;
+
DEBUG(1, ("scanning trusted domain list\n"));
if (!(mem_ctx = talloc_init_named("init_domain_list")))
@@ -209,10 +214,17 @@ BOOL init_domain_list(void)
result = cache_methods.domain_sid(domain, &domain->sid);
while (!NT_STATUS_IS_OK(result)) {
+
sleep(10);
DEBUG(1,("Retrying startup domain sid fetch for %s\n",
domain->name));
result = cache_methods.domain_sid(domain, &domain->sid);
+
+ /* If we don't call lp_talloc_free() here we end up
+ accumulating memory in the "global" lp_talloc in
+ param/loadparm.c */
+
+ lp_talloc_free();
}
/* get any alternate name for the primary domain */