diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/proxsmtpd.c | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -1,5 +1,6 @@ 1.10 ??? - Fix race issue with waitpid on linux. + - Close all (other than standard) file descriptors when forking filter. 1.9 [2011-01-23] - Fix build warnings. diff --git a/src/proxsmtpd.c b/src/proxsmtpd.c index 8f50d96..963894d 100644 --- a/src/proxsmtpd.c +++ b/src/proxsmtpd.c @@ -425,6 +425,9 @@ static pid_t fork_filter(spctx_t* sp, int* infd, int* outfd, int* errfd) kill_myself(); } + for (r = 3; r < FD_SETSIZE; ++r) + close(r); + /* All the necessary environment vars */ sp_setup_forked(sp, 1); |