Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.24 /fs/ext4/ioctl.c

Filename:/fs/ext4/ioctl.c
Lines Added:5
Lines Deleted:0
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.24-git6  2.6.24-git7  2.6.24-git8  2.6.24-git9  2.6.24-git10  2.6.24-git11 

Location
[  2.6.24
  [  fs
    [  ext4
       o  ioctl.c

Patch

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index c04c7cc..e7f894b 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -51,6 +51,11 @@ int ext4_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
          flags &= ~EXT4_DIRSYNC_FL;
 
       mutex_lock(&inode->i_mutex);
+      /* Is it quota file? Do not allow user to mess with it */
+      if (IS_NOQUOTA(inode)) {
+         mutex_unlock(&inode->i_mutex);
+         return -EPERM;
+      }
       oldflags = ei->i_flags;
 
       /* The JOURNAL_DATA flag is modifiable only by root */


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.