]> git.ipfire.org Git - thirdparty/xz.git/commit
xz, xzdec: Capsicum sandbox: Fix incorrect use of cap_rights_clear()
authorGuillaume Outters <guillaume-installs@outters.eu>
Fri, 25 Apr 2025 00:55:08 +0000 (02:55 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 25 Apr 2025 14:43:47 +0000 (17:43 +0300)
commit5cc2e479eb447a444f5ab005fc36b7f275c75eb5
tree6104e47b292b570a86827076678d45f21a084a2b
parent56aa9a07968a6a73fada6f9b96122c5165829f3b
xz, xzdec: Capsicum sandbox: Fix incorrect use of cap_rights_clear()

cap_rights_clear() with no additional arguments acts as a no-op, so
instead of removing all capability rights from STDIN_FILENO, the same
rights were allowed for STDIN_FILENO as were allowed for src_fd.

Fixes: a0eecc235d3b ("xz: Make Capsicum sandbox more strict with stdin and stdout.")
(The commit message says "stdout". It should have said "stderr".)
src/xz/sandbox.c
src/xzdec/xzdec.c