]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fs: change return values from -EACCES to -EPERM
authorZhao Hongjiang <zhaohongjiang@huawei.com>
Fri, 12 Oct 2012 04:22:55 +0000 (15:22 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 22 Oct 2012 04:01:07 +0000 (15:01 +1100)
commit865c1fd69c00c799339003d84aa43b4187622f4a
tree0d971713d891eb6cd15bc2035fd8b1dc35ce84c3
parente66466ab9fe6aea1f88a6e5f9cb82bd3eab2e463
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