git: a9b8a0ced46e - stable/14 - linux(4): Return ENODATA from getxattr syscalls instead of EPERM
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 12:00:15 UTC
The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a9b8a0ced46efe72ec118a749d191b29ce47712b commit a9b8a0ced46efe72ec118a749d191b29ce47712b Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-09-01 08:10:12 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-09-11 11:58:50 +0000 linux(4): Return ENODATA from getxattr syscalls instead of EPERM On Linux ENODATA mean the named attribute does not exist, or the process has no access to this attribute. Reported by: zirias PR: 273517 Tested by: zirias MFC after: 1 week (cherry picked from commit 4d59b790553ef75b9a4b6a673eab3354f3d012b3) --- sys/compat/linux/linux_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_xattr.c b/sys/compat/linux/linux_xattr.c index 901123684154..b9717c62133c 100644 --- a/sys/compat/linux/linux_xattr.c +++ b/sys/compat/linux/linux_xattr.c @@ -285,7 +285,7 @@ getxattr(struct thread *td, struct getxattr_args *args) else error = kern_extattr_get_fd(td, args->fd, attrnamespace, attrname, args->value, args->size); - return (error); + return (error == EPERM ? ENOATTR : error); } int