summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-03-06 21:37:45 +0800
committerJia Tan <jiat0218@gmail.com>2023-03-06 21:37:45 +0800
commit5fb936786601a1cd013a5d436adde65982b1e13c (patch)
tree2680f7295eb89a686e08de950f1647016717ea76
parent61ee82cb1232a402c82282bbae42821f2b952b0d (diff)
downloadxz-5fb936786601a1cd013a5d436adde65982b1e13c.tar.gz
xz: Add warning if Capsicum sandbox system calls are unsupported.
The warning is only used when errno == ENOSYS. Otherwise, xz still issues a fatal error.
-rw-r--r--src/xz/file_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index 71b5377..1a7dac1 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -238,6 +238,8 @@ capsicum_error:
// 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;
}