Re: Apache 2.x leaked descriptors

From: Bjoern A. Zeeb (bzeeb-lists@lists.zabbadoz.net)
Date: 02/26/03

  • Next message: Rory Savage: "Re: Non registering shell"
    Date: Wed, 26 Feb 2003 19:56:29 +0000 (UTC)
    From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
    To: Brian Hatch <vuln-dev@ifokr.org>
    
    

    On Tue, 25 Feb 2003, Christian Kratzer wrote:

    Hi,

    > > If the error log (the only one that is appropriate for the
    > > exec'd program in question) is opened in append only mode, this
    > > seems to be appropriate.
    >
    > the cgi has access to the error log via its stderr file descriptor 2.
    > It does not need access to the file descriptor of the log itself.

    further more via writing to stderr apache has the chance to properly
    format it so that log file analysers can work with.
    Simply writing any data to the open fd might confuse (or even more)
    them as already noted by Steve Grubb I think.

    012 is a good API for such things. Just as a side note: 0 and 1 are
    coverted by CGI Drafts (see http://cgi-spec.golux.com/). Standard
    error is not from what I had seen.

    -- 
    Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
    56 69 73 69 74				http://www.zabbadoz.net/
    


    Relevant Pages

    • Re: [PATCH] pipe: dont block after data has been written
      ... a file descriptor which is "ready for writing" must not block. ... if you pass a very large buffer to write, ... please correct documentation? ... Every Unix I know behaves the same when writing to a pipe. ...
      (Linux-Kernel)
    • Re: How to tell when execv has succeeded
      ... writing from experience, and it does, but the POSIX spec. ... says "Close the file descriptor upon execution of an exec family function, ... if this error is returned, the state of fildes is unspecified. ...
      (comp.unix.programmer)
    • Re: How to tell when execv has succeeded
      ... writing from experience, and it does, but the POSIX spec. ... says "Close the file descriptor upon execution of an exec family function, ... if this error is returned, the state of fildes is unspecified. ...
      (comp.unix.programmer)
    • Re: Another conformance question... This time fputs().
      ... The file descriptor underlying stream is not a valid file descriptor ... If we open the file for writing, ... A request was made of a non-existent device, ...
      (freebsd-arch)
    • Need another pair of eyes to figure this one out
      ... some class libraries and in doing so am using some driver programs to ... I'm opening a file descriptor and also opening a file that ... // lot's more headers because the fd I'm writing to a socket ...
      (alt.comp.lang.learn.c-cpp)