projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Forbid user to change file flags on quota files
[powerpc.git]
/
fs
/
ext2
/
ioctl.c
diff --git
a/fs/ext2/ioctl.c
b/fs/ext2/ioctl.c
index
c2324d5
..
320b2cb
100644
(file)
--- a/
fs/ext2/ioctl.c
+++ b/
fs/ext2/ioctl.c
@@
-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;
/*