dgaudet 97/04/07 10:48:40
Modified: support suexec.c Log: suexec doesn't close the log file so CGIs could write to it Reviewed by: Roy, Randy, Chuck Submitted by: Marc Revision Changes Path 1.20 +8 -0 apache/support/suexec.c Index: suexec.c =================================================================== RCS file: /export/home/cvs/apache/support/suexec.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C3 -r1.19 -r1.20 *** suexec.c 1997/03/03 19:33:53 1.19 --- suexec.c 1997/04/07 17:48:39 1.20 *************** *** 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.