summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-12-08 18:07:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:23 -0500
commit5be92d0d1866b483ee7e9599b691044f4059ea3f (patch)
treefd51f5b0428ba39e4bd42430b8016cf1cd1b85e2 /source3
parentff61853fb35953f7e4f210ce3e5a82e6da15534e (diff)
downloadsamba-5be92d0d1866b483ee7e9599b691044f4059ea3f.tar.gz
samba-5be92d0d1866b483ee7e9599b691044f4059ea3f.tar.bz2
samba-5be92d0d1866b483ee7e9599b691044f4059ea3f.zip
r20082: When fork_domain_child is forked when we're offline
the child inherits *all* active check_online timout handlers. This is bad when it's not our domain (ie. BUILTIN). Jeremy. (This used to be commit 8d815ec4c103a83ef7cea0ae5fc64681f6bcb48a)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_dual.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index d8215ac90d..7a699edb25 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -755,6 +755,7 @@ static BOOL fork_domain_child(struct winbindd_child *child)
{
int fdpair[2];
struct winbindd_cli_state state;
+ struct winbindd_domain *domain;
extern BOOL override_logfile;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) != 0) {
@@ -844,6 +845,16 @@ static BOOL fork_domain_child(struct winbindd_child *child)
child->domain->startup_time = time(NULL);
}
+ for (domain = domain_list(); domain; domain = domain->next) {
+ if (domain != child->domain) {
+ /* Ensure we have no "check_online" events pending
+ that are not on this domain. */
+ if (domain->check_online_event) {
+ TALLOC_FREE(domain->check_online_event);
+ }
+ }
+ }
+
while (1) {
int ret;