]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: change return values from -EACCES to -EPERM
authorZhao Hongjiang <zhaohongjiang@huawei.com>
Thu, 25 Oct 2012 01:14:45 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 30 Oct 2012 04:15:10 +0000 (15:15 +1100)
commitf57258f77672fcf3c902dc7cc51509feeab0aee2
tree4684734ed8e246e8c098e1b96997a25b23463693
parentcbc07ba5b695f7831e35a09561c9f92ba31d0867
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

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>
fs/autofs4/root.c
fs/dlm/config.c
fs/gfs2/sys.c
fs/ncpfs/ioctl.c
fs/proc/base.c
fs/udf/file.c