Commit 2f07197e authored by Andreas Dilger's avatar Andreas Dilger Committed by Linus Torvalds

[PATCH] TRIVIAL EPERM -> EACCESS

the following micro-patch changes ext[23]_ioctl to return EACCES
(permission denied) instead of EPERM (operation not permitted) if
the caller is not authorized to change the flags on a file.
parent 4fda8607
......@@ -31,7 +31,7 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
return -EROFS;
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
return -EPERM;
return -EACCES;
if (get_user(flags, (int *) arg))
return -EFAULT;
......
......@@ -38,7 +38,7 @@ int ext3_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
return -EROFS;
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
return -EPERM;
return -EACCES;
if (get_user(flags, (int *) arg))
return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment