BUG: no quota charge for special files

Pavel Kankovsky (peak@kerberos.troja.mff.cuni.cz)
Wed, 8 Jul 1998 22:53:15 +0200 (MET DST)


Michal Zalewski discovered a problem with quotas: special files (esp.
fifos and unix sockets) are not included in inode quota usage (even if
inodes are allocated). Anyone can allocate any number of inodes with
mknod() (or bind()) regardless of quota settings.

The problem seems to be caused by 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))

Question for kernel gurus: what would happen if this check was removed?

--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."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu