1 diff -urNp -x '*.orig' apache_1.3.42.org/src/support/suexec.c apache_1.3.42/src/support/suexec.c
2 --- apache_1.3.42.org/src/support/suexec.c 2006-07-12 10:16:05.000000000 +0200
3 +++ apache_1.3.42/src/support/suexec.c 2023-02-02 22:42:51.499834914 +0100
8 +/* for fcntl(fileno(log), F_SETFD, FD_CLOEXEC); */
15 @@ -148,6 +152,8 @@ static void err_output(const char *fmt,
19 + /* Set the close-on-exec flag -- Liyang HU <liyang@nerv.cx> */
20 + fcntl(fileno(log), F_SETFD, FD_CLOEXEC);
24 @@ -568,20 +574,6 @@ int main(int argc, char *argv[])
26 #endif /* SUEXEC_UMASK */
29 - * Be sure to close the log file so the CGI can't
30 - * mess with it. If the exec fails, it will be reopened
31 - * automatically when log_err is called. Note that the log
32 - * might not actually be open if LOG_EXEC isn't defined.
33 - * However, the "log" cell isn't ifdef'd so let's be defensive
34 - * and assume someone might have done something with it
35 - * outside an ifdef'd LOG_EXEC block.
43 * Execute the command, replacing our image with its own.