diff options
author | Marc VanHeyningen <marc.vanheyningen@isilon.com> | 2009-05-05 21:18:50 +0000 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-05-27 13:16:17 -0700 |
commit | a4887e250b84c321c75d54b9d3adf6fcf7c27fed (patch) | |
tree | 318c1079a6199d283bed94ee3733c9e32855922c /source3/winbindd | |
parent | 75de7c0e87cc5ecea1a7d7e9b0103a8cc2827895 (diff) | |
download | samba-a4887e250b84c321c75d54b9d3adf6fcf7c27fed.tar.gz samba-a4887e250b84c321c75d54b9d3adf6fcf7c27fed.tar.bz2 samba-a4887e250b84c321c75d54b9d3adf6fcf7c27fed.zip |
s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new
connection forks a child that immediately panics causing smbd to
coredump. This seems unnecessarily harsh; with this code change we
now catch that error and merely log a message about it and exit
without the core dump.
Signed-off-by: Tim Prouty <tprouty@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd.c | 5 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index e1ce223475..2b25616cf7 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1304,8 +1304,9 @@ int main(int argc, char **argv, char **envp) * winbindd-specific resources we must free yet. JRA. */ - if (!reinit_after_fork(winbind_messaging_context(), - winbind_event_context(), false)) { + if (!NT_STATUS_IS_OK(reinit_after_fork(winbind_messaging_context(), + winbind_event_context(), + false))) { DEBUG(0,("reinit_after_fork() failed\n")); exit(1); } diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index a69d34f30c..6fb0b5857c 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -1121,8 +1121,9 @@ bool winbindd_reinit_after_fork(const char *logfilename) struct winbindd_domain *domain; struct winbindd_child *cl; - if (!reinit_after_fork(winbind_messaging_context(), - winbind_event_context(), true)) { + if (!NT_STATUS_IS_OK(reinit_after_fork(winbind_messaging_context(), + winbind_event_context(), + true))) { DEBUG(0,("reinit_after_fork() failed\n")); return false; } |