httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: NCSA httpd again: CGI scripts and log file descriptors (fwd)
Date Fri, 05 May 1995 15:36:38 GMT
   Date: Fri, 05 May 1995 10:22:41 -0500
   From: Randy Terbush <>

   > Certainly. I'm not sure its needed, though.
   > IF the error_log were opened  O_APPEND, then I don't think a script could do
   > much damage.

   What's to keep me from opening it with the CGI program and nuking it
   to cover my tracks?

You don't have permission --- that's why the server opens the logs as
root, and runs CGI processes as 'nobody'.  (So why can child processes
write the logs?  Because the server doesn't lose privilege to use the
descriptors which it has already opened when it switches uids).

One thing about O_APPEND --- can it be taken away with something like
fcntl(.., F_SETFL, 0)?  If so, it would be wise not to count on it for


View raw message