You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/04/06 22:03:21 UTC
[PATCH] suexec doesn't close log file
...which means the CGI can mess with the suexec log file.
Index: suexec.c
===================================================================
RCS file: /export/home/cvs/apache/support/suexec.c,v
retrieving revision 1.19
diff -c -r1.19 suexec.c
*** suexec.c 1997/03/03 19:33:53 1.19
--- suexec.c 1997/04/06 20:01:59
***************
*** 451,456 ****
--- 451,464 ----
}
clean_env();
+
+ /*
+ * Be sure to close the log file so the CGI can't
+ * mess with it. If the exec fails, it will be reopened
+ * automatically when log_err is called.
+ */
+ fclose(log);
+ log = NULL;
/*
* Execute the command, replacing our image with its own.