summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-25 22:34:48 +0200
committerVolker Lendecke <vl@samba.org>2009-06-14 11:25:48 +0200
commit07fac35b3b1083e2fa596a62c8be18992c15d3ef (patch)
tree3ed076ee7125b6856da0b1f907a6711416eaffd7 /source3/winbindd/winbindd.c
parentc4a97b2b414477043ce373a07722da305a03a52a (diff)
downloadsamba-07fac35b3b1083e2fa596a62c8be18992c15d3ef.tar.gz
samba-07fac35b3b1083e2fa596a62c8be18992c15d3ef.tar.bz2
samba-07fac35b3b1083e2fa596a62c8be18992c15d3ef.zip
Make rescan_trusted_domains a timed event
Diffstat (limited to 'source3/winbindd/winbindd.c')
-rw-r--r--source3/winbindd/winbindd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 65c52e4292..fd467e2f13 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1014,6 +1014,7 @@ int main(int argc, char **argv, char **envp)
poptContext pc;
int opt;
TALLOC_CTX *frame = talloc_stackframe();
+ struct tevent_timer *te;
/* glibc (?) likes to print "User defined signal 1" and exit if a
SIGUSR[12] is received before a handler is installed */
@@ -1260,15 +1261,18 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+ te = tevent_add_timer(winbind_event_context(), NULL, timeval_zero(),
+ rescan_trusted_domains, NULL);
+ if (te == NULL) {
+ DEBUG(0, ("Could not trigger rescan_trusted_domains()\n"));
+ exit(1);
+ }
+
TALLOC_FREE(frame);
/* Loop waiting for requests */
while (1) {
frame = talloc_stackframe();
- /* refresh the trusted domain cache */
-
- rescan_trusted_domains();
-
process_loop();
TALLOC_FREE(frame);