HomeFreeBSD

linux(4): Return ENOTSUP from listxattr instead of EPERM

Description

linux(4): Return ENOTSUP from listxattr instead of EPERM

FreeBSD does not permits manipulating extended attributes in the system
namespace by unprivileged accounts, even if account has appropriate
privileges to access filesystem object.
In Linux the system namespace is used to preserve posix acls. Some Gnu
coreutils binaries uses posix acls, eg, install, ls, cp. And fails if
we unexpectedly return EPERM error from xattr system calls.

In the other hands, in Linux read and write access to the system
namespace depend on the policy implemented for each filesystem, so we'll
mimics we're a filesystem that prohibits this for unpriveleged accounts.

Reported by: zirias
Tested by: zirias
MFC after: 1 week

Details

Provenance
dchaginAuthored on Sep 5 2023, 8:52 AM
Parents
rG18d1c86788f6: linux(4): Fix listxattr for the case when the size is 0
Branches
Unknown
Tags
Unknown