opnsense-src/sys/compat
Dmitry Chagin e975d1b725 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

(cherry picked from commit 11e37048db35d7fcfc285b867965de1aeefec2c8)
2023-09-11 14:59:38 +03:00
..
freebsd32 freebsd32: Remove mac_syscall from the unimpl list 2023-08-24 18:45:31 -04:00
ia32 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
lindebugfs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linprocfs linprocfs(5): Follow style(9), sort includes 2023-08-18 13:12:02 +03:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux linux(4): Return ENOTSUP from listxattr instead of EPERM 2023-09-11 14:59:38 +03:00
linuxkpi mt76: update driver from upstream 2023-08-21 01:34:03 +00:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00