diff options
author | Zhao Hongjiang <zhaohongjiang@huawei.com> | 2013-02-19 21:13:55 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-26 02:46:14 -0500 |
commit | 41735818766c0ec215b9a69591e7eae642061954 (patch) | |
tree | 564ccbbc05d987f833050573e7fad23ce34dfc89 /fs/udf | |
parent | 9cc64ceaa8b8e8c874519caee79e18cb35d3ce3e (diff) |
fs: change return values from -EACCES to -EPERM
According to SUSv3:
[EACCES] Permission denied. An attempt was made to access a file in a way
forbidden by its file access permissions.
[EPERM] Operation not permitted. An attempt was made to perform an operation
limited to processes with appropriate privileges or to the owner of a file
or other resource.
So -EPERM should be returned if capability checks fails.
Strictly speaking this is an API change since the error code user sees is
altered.
Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 4257a1f5302a..29569dd08168 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c | |||
@@ -204,7 +204,7 @@ long udf_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
204 | goto out; | 204 | goto out; |
205 | case UDF_RELOCATE_BLOCKS: | 205 | case UDF_RELOCATE_BLOCKS: |
206 | if (!capable(CAP_SYS_ADMIN)) { | 206 | if (!capable(CAP_SYS_ADMIN)) { |
207 | result = -EACCES; | 207 | result = -EPERM; |
208 | goto out; | 208 | goto out; |
209 | } | 209 | } |
210 | if (get_user(old_block, (long __user *)arg)) { | 210 | if (get_user(old_block, (long __user *)arg)) { |