Date: Fri, 1 Sep 2023 08:14:40 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 4d59b790553e - main - linux(4): Return ENODATA from getxattr syscalls instead of EPERM Message-ID: <202309010814.3818Ee5F008328@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d59b790553ef75b9a4b6a673eab3354f3d012b3 commit 4d59b790553ef75b9a4b6a673eab3354f3d012b3 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-09-01 08:10:12 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-09-01 08:10:12 +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 Tested by: zirias MFC after: 1 week --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309010814.3818Ee5F008328>