diff options
author | Jeremy Allison <jra@samba.org> | 2009-01-13 15:57:53 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-01-28 09:40:03 +0100 |
commit | 5d05e17cdba5cfd16fb4b85feb120acbbc78e2d1 (patch) | |
tree | 8d35d6131c0bb8e285cb7c438243409d9b80bffa /source | |
parent | 01124fe56cc406489c0bb6939249b10fdf6395b6 (diff) | |
download | samba-5d05e17cdba5cfd16fb4b85feb120acbbc78e2d1.tar.gz |
From boyang - ensure we never "return" from a forked child, always _exit().
Jeremy.
(cherry picked from commit e1af2b4bc824450615454adec460e6698a83cefc)
Diffstat (limited to 'source')
-rw-r--r-- | source/winbindd/winbindd_cm.c | 6 | ||||
-rw-r--r-- | source/winbindd/winbindd_dual.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c index 3996e481b46..4474b5fd7a9 100644 --- a/source/winbindd/winbindd_cm.c +++ b/source/winbindd/winbindd_cm.c @@ -203,7 +203,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); } } @@ -214,7 +214,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); @@ -222,7 +222,7 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain) mem_ctx = talloc_init("fork_child_dc_connect"); if (!mem_ctx) { DEBUG(0,("talloc_init failed.\n")); - _exit(0); + _exit(1); } if ((!get_dcs(mem_ctx, domain, &dcs, &num_dcs)) || (num_dcs == 0)) { diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index c0a62eb2f32..9e2e18f4d45 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/winbindd/winbindd_dual.c @@ -1277,7 +1277,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 */ @@ -1285,7 +1285,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)); |