]> 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>
Wed, 8 Mar 2023 03:51:36 +0000 (19:51 -0800)
commit139825753995ca25a1d40df9f067a1fa4e847d44
treeda9dcf608430a6c7e949315de0271a487648ac17
parent96064e0924d8e456f50252205bf3b221cb2e835c
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
Approved by: re (cperciva)

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