]> git.ipfire.org Git - thirdparty/xz.git/commit
xz, xzdec: Capsicum sandbox: Fix incorrect use of cap_rights_clear() v5.6
authorGuillaume Outters <guillaume-installs@outters.eu>
Fri, 25 Apr 2025 00:55:08 +0000 (02:55 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 28 Apr 2025 15:20:16 +0000 (18:20 +0300)
commit00034e250609e2f3becc3e88bf1a8d2f5d96673a
tree9a7e26a70272886b248f32a035fe06e7784901e4
parent2e918d09ad01cc83911eac7147c3d7d8c7f6bd9a
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".)

(cherry picked from commit 5cc2e479eb447a444f5ab005fc36b7f275c75eb5)
src/xz/sandbox.c
src/xzdec/xzdec.c