Revert: "Add warning if Capsicum sandbox system calls are unsupported."

The warning causes the exit status to be 2, so this will cause problems
for many scripted use cases for xz. The sandbox usage is already very
limited already, so silently disabling this allows it to be more usable.
This commit is contained in:
Jia Tan 2023-03-08 23:08:46 +08:00
parent 01587dda2a
commit 916448d624
1 changed files with 4 additions and 6 deletions

View File

@ -233,13 +233,11 @@ io_sandbox_enter(int src_fd)
#ifdef HAVE_CAPSICUM
capsicum_error:
// Even though it is undocumented, if a kernel is configured without
// capability mode support or used in an emulator that does not
// implement the capability system calls, then the capsicum system
// calls will fail and set errno to ENOSYS.
// If a kernel is configured without capability mode support or
// used in an emulator that does not implement the capability
// system calls, then the capsicum system calls will fail and set
// errno to ENOSYS.
if (errno == ENOSYS) {
message_warning(_("%s: Cannot enable the sandbox"),
strerror(errno));
sandbox_allowed = false;
return;
}