]> git.karo-electronics.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>
Fri, 19 Oct 2012 02:09:24 +0000 (13:09 +1100)
commitf95f602f4c74bafaac57318374c26b8677148392
treed5118d63f6ef46ea2fa60a2cadfef369e29800f1
parent3d065394861cf82102d69d18bf8e5a56412d7bae
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