Re: Xinetd /tmp race?

From: Kevin Vajk (kvajkat_private)
Date: Sat Nov 14 1998 - 14:30:21 PST

  • Next message: Eric Wanner: "Re: crashing wingates"

    On Sat, 14 Nov 1998, stanislav shalunov wrote:
    > Marc Heuse <marcat_private> writes:
    >
    > > It's hard to secure a create-or-append open call, anyone with an
    > > idea for a standard solution?
    >
    > You have missed a word in this sentence: ``It's _not_ hard...''
    
    No, I think your sentence has one word too many. :)
    
    >                 open the file O_WRONLY|O_APPEND
    >                 fstat the fd
    
    This solution prevents users from writing to files they shouldn't
    but doesn't prevent them from opening files they shouldn't.
    
    Get it out of /tmp or use O_EXCL.
    
    - Kevin Vajk
      <kvajkat_private>
    



    This archive was generated by hypermail 2b30 : Fri Apr 13 2001 - 14:23:26 PDT