]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: change return values from -EACCES to -EPERM
authorZhao Hongjiang <zhaohongjiang@huawei.com>
Fri, 28 Sep 2012 00:19:01 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:03:08 +0000 (15:03 +1000)
commit7cd4724496930232d820f32ee486a43f38fcd7b6
tree19cb19dfdf90f32d67b05692d115b6ba9acef3cd
parent2abd15e6122c8eb8c14eb3bbe1d7792d43a5e8e3
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