Re: Linux kernel filesystem oddities

From: Pavel Kankovsky (peakat_private)
Date: Wed Jul 08 1998 - 13:42:21 PDT

  • Next message: Albert Nubdy: "WWW Authorization Gateway"

    On Mon, 6 Jul 1998, Michal Zalewski wrote:
    
    > > FIFO itself occupies a single inode, no block, therefore charging inode
    > > quota but not block quota is correct.
    >
    > It's not charged at all. Set inode quota to something reasonable, then
    > create any amount FIFOs in /tmp.
    
    Argh. You're right. There is this STUPID statement at the beginning of
    dquot_initialize() (fs/dquot.c):
    
       if (S_ISREG(inode->i_mode) ||
              S_ISDIR(inode->i_mode) ||
              S_ISLNK(inode->i_mode))
    
    This is a bug!
    
    
    > >> But there will be problem with hard-links - creator of this object is...
    > > Hardlink is not a fs object, it is a directory entry.
    >
    > Yep. I mean, we need more information about these entries - who really
    > CREATED entry... But it's a major change in filesystem architecture and I
    > don't think it's possible...
    
    It would be rather confusing if directory entries themselves had their own
    attributes.
    
    > > The world writable directory is a real problem. It is similar to world
    > > writable files: anyone can use them to store data on its owner.
    >
    > They are not similar, because directory stores data about owner of entries
    > in it. Kernel provides mechanism to limit it, but unfortunately, this
    > mechanism is waek.
    
    Owners are stored in i-nodes. Directory entries are nothing but
    (filename, i-node number) pairs.
    
    link("publicly-visible-file", "world-writable-directory/blah")
                    is as anonymous as
    write(open("/world-writable-file", O_WRONLY), "blah", 4)
    
    --Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
    "You can't be truly paranoid unless you're sure they have already got you."
    



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