Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73676
b: refs/heads/master
c: e47776a
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Nov 15, 2007
1 parent f6e594b commit b4bc9c8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28822f22e18fc3c422f64b5bf0bb1e6c306af634
refs/heads/master: e47776a0a41a14a5634633c96e590827f552c4b5
5 changes: 5 additions & 0 deletions trunk/fs/ext2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
flags &= ~EXT2_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;

/*
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/ext3/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
flags &= ~EXT3_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 */
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/ext4/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/jfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ int jfs_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
if (!S_ISDIR(inode->i_mode))
flags &= ~JFS_DIRSYNC_FL;

/* Is it quota file? Do not allow user to mess with it */
if (IS_NOQUOTA(inode))
return -EPERM;
jfs_get_inode_flags(jfs_inode);
oldflags = jfs_inode->mode2;

Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/reiserfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
if (get_user(flags, (int __user *)arg))
return -EFAULT;

/* Is it quota file? Do not allow user to mess with it. */
if (IS_NOQUOTA(inode))
return -EPERM;
if (((flags ^ REISERFS_I(inode)->
i_attrs) & (REISERFS_IMMUTABLE_FL |
REISERFS_APPEND_FL))
Expand Down

0 comments on commit b4bc9c8

Please sign in to comment.