Skip to content
Commit 41735818 authored by Zhao Hongjiang's avatar Zhao Hongjiang Committed by Al Viro
Browse files

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: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
Acked-by: default avatarJan Kara <jack@suse.cz>
Acked-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
Acked-by: default avatarIan Kent <raven@themaw.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 9cc64cea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment