Re: Names vs. Inodes

From: Chris Wright (chrisat_private)
Date: Thu Jul 19 2001 - 13:53:23 PDT

  • Next message: Chris Wright: "Re: Names vs. Inodes"

    * Valdis.Kletnieksat_private (Valdis.Kletnieksat_private) wrote:
    > On Wed, 18 Jul 2001 15:32:48 PDT, Crispin Cowan <crispinat_private>  said:
    > 
    > > If someone has a practical, detailed way to construct the name, please
    > > speak up.  Note that it is not sufficient to be able to construct *some*
    > > name that *could* have been used to open the file: we need the actual name
    > > that was used to make the request.
    > 
    > I'm curious how you can reconstruct the name for this sequence:
    > 
    >         mkdir("/tmp/foo");
    >         cd("/tmp/foo");
    > 	rmdir("/tmp/foo");
    > 	/* run for a while */
    > 	int whatname_for_fd = open("bar");
    
    hmm.  i tried this and open fails...ENOENT.
    
    if you race the process, and make a new /tmp/foo after the rmdir AND
    change the open to create /tmp/foo/bar instead of relative path bar,
    then you created a file in a directory other than ".".
    
    -chris
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Thu Jul 19 2001 - 13:56:24 PDT