]> 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>
Sun, 5 Mar 2023 09:40:13 +0000 (01:40 -0800)
commitc237c10a2346dec422233db05b2012afd45363fa
treec442b2c297f847cbb33e8147dd42480a143a15b4
parent6d2feb39ad13768f3ea06381fcd95937a09f0d62
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
MFC after: 2 days
contrib/xz/src/xz/file_io.c