]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
xz: Improve compatibility with systems without capability mode support
authorXin LI <delphij@FreeBSD.org>
Sun, 5 Mar 2023 09:40:13 +0000 (01:40 -0800)
committerXin LI <delphij@FreeBSD.org>
Tue, 7 Mar 2023 06:55:41 +0000 (22:55 -0800)
commit0cc2deb476bec103ad7c8dbeb650aa2937d6a0da
tree2742ef99d02d8de2001e13647c3d91f6aea08f2a
parent4a141adf16e28a787f14ac14115fbecbf3a9ed1b
xz: Improve compatibility with systems without capability mode support

When the kernel is built without capability mode support, or when
using an emulator like qemu-user-static that does not translate
system calls, these calls will return a negative number and set
the errno to ENOSYS. However, this error does not indicate a
real programming or runtime error and is generally ignored by
base system applications built with capability mode sandboxing.

Match this behavior by making xz(1) to ignore ENOSYS errors
when calling capability mode system calls too.

PR: 269185
Reported by: Dan Kotowski

(cherry picked from commit c237c10a2346dec422233db05b2012afd45363fa)
contrib/xz/src/xz/file_io.c