You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Robert S. Thau" <rs...@ai.mit.edu> on 1995/04/27 16:33:02 UTC

Closing file descriptors...

Paul Phillips has just noted that the file descriptors for the log files
are left open in NCSA 1.3, which might allow a malicious CGI script to
cover its tracks or wipe the log files entirely.  It might be best to
just close all descriptors except for stdin, stdout, and stderr before
the exec() in cgi_stub().  The again, stderr is generally set to the 
error log, and I generally consider that a feature, rather than a bug
(if a script screws up, you generally get useful info in the error_log).
Any thoughts?

rst

Re: Closing file descriptors...

Posted by Brian Behlendorf <br...@organic.com>.
On Thu, 27 Apr 1995, Robert S. Thau wrote:
> Paul Phillips has just noted that the file descriptors for the log files
> are left open in NCSA 1.3, which might allow a malicious CGI script to
> cover its tracks or wipe the log files entirely.  It might be best to
> just close all descriptors except for stdin, stdout, and stderr before
> the exec() in cgi_stub().  The again, stderr is generally set to the 
> error log, and I generally consider that a feature, rather than a bug
> (if a script screws up, you generally get useful info in the error_log).
> Any thoughts?

+1 - can't the error log be opened as append-only?

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  brian@hyperreal.com  http://www.[hyperreal,organic].com/