diff options
author | Jeremy Allison <jra@samba.org> | 2009-01-13 15:42:56 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-01-13 15:42:56 -0800 |
commit | 58b680446f5fe03434dc914db89fbba5b6152201 (patch) | |
tree | d1460a85c01ac362699fdfb372fe01cea01aa25d /source3 | |
parent | da2dd1406f57461af20df2df3586e48be60b3af2 (diff) | |
download | samba-58b680446f5fe03434dc914db89fbba5b6152201.tar.gz samba-58b680446f5fe03434dc914db89fbba5b6152201.tar.bz2 samba-58b680446f5fe03434dc914db89fbba5b6152201.zip |
From boyang - ensure we never "return" from a forked child, always _exit().
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 6 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 4e5659d903..962b6e6d1b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -216,7 +216,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain) if (!override_logfile) { if (asprintf(&lfile, "%s/log.winbindd-dc-connect", get_dyn_LOGFILEBASE()) == -1) { DEBUG(0, ("fork_child_dc_connect: out of memory.\n")); - return false; + _exit(1); } } @@ -226,7 +226,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain) MSG_WINBIND_FAILED_TO_GO_ONLINE, (uint8 *)domain->name, strlen(domain->name)+1); - _exit(0); + _exit(1); } SAFE_FREE(lfile); @@ -238,7 +238,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain) MSG_WINBIND_FAILED_TO_GO_ONLINE, (uint8 *)domain->name, strlen(domain->name)+1); - _exit(0); + _exit(1); } if ((!get_dcs(mem_ctx, domain, &dcs, &num_dcs)) || (num_dcs == 0)) { diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index 9f91153c4a..9be8bafdd7 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -1393,7 +1393,7 @@ static bool fork_domain_child(struct winbindd_child *child) DEBUG(0,("select error occured\n")); TALLOC_FREE(frame); perror("select"); - return False; + _exit(1); } /* fetch a request from the main daemon */ @@ -1401,7 +1401,7 @@ static bool fork_domain_child(struct winbindd_child *child) if (state.finished) { /* we lost contact with our parent */ - exit(0); + _exit(0); } DEBUG(4,("child daemon request %d\n", (int)state.request.cmd)); |