opnsense-src/sys/compat/linux
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
..
check_error.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
check_internal_locks.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux.h linux(4): Update my copyrights, add SPDX tag 2023-08-17 23:54:36 +03:00
linux_common.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_common.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_dtrace.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_dummy.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_elf.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_elf.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
linux_elf32.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_elf64.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_emul.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_emul.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_errno.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_errno.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_errno.inc sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_event.c timerfd: Move implementation from linux compat to sys/kern 2023-08-24 14:28:56 -06:00
linux_event.h timerfd: Move implementation from linux compat to sys/kern 2023-08-24 14:28:56 -06:00
linux_file.c linux(4): Replace linux32_copyinuio by freebsd32_copyinuio 2023-08-20 10:36:32 +03:00
linux_file.h linux(4): Add a write syscall wrapper 2023-08-20 10:36:29 +03:00
linux_fork.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_fork.h linux(4): Update my copyrights, add SPDX tag 2023-08-17 23:54:36 +03:00
linux_futex.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_futex.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_getcwd.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_ioctl.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_ioctl.h linux(4): Add 2 Linux socket ioctl commands 2023-08-17 22:57:16 +03:00
linux_ipc.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_ipc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_ipc64.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_mib.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_mib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_misc.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_misc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_mmap.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_mmap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_netlink.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_persona.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_ptrace.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_rseq.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_siginfo.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_signal.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_signal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_socket.c linux(4): Replace linux32_copyiniov by freebsd32_copyiniov 2023-08-20 10:36:32 +03:00
linux_socket.h linux(4): Drop bogus __arm__ condition due to lack of 32-bit arm support 2023-08-17 22:57:17 +03:00
linux_stats.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_sysctl.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_sysproto.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_time.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linux_time.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_timer.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_uid16.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_util.c linux(4): Follow style(9), don't include both sys/param.h and sys/types.h 2023-08-18 15:58:32 +03:00
linux_util.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
linux_vdso.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_vdso.h linux(4): Remove include of sys/types.h from linux_vdso.h 2023-08-18 15:58:32 +03:00
linux_vdso_gtod.inc linux(4): Fix linker warning about undefined vdso symbols 2023-08-20 00:48:36 +03:00
linux_videodev2_compat.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_videodev_compat.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_xattr.c linux(4): Return ENOTSUP from listxattr instead of EPERM 2023-09-11 14:59:38 +03:00
stats_timing.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
trace_futexes.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00