]> git.ipfire.org Git - thirdparty/xz.git/commit
xz: Capsicum sandbox: Fix incorrect use of cap_rights_clear() v5.4
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 28 Apr 2025 15:22:32 +0000 (18:22 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 28 Apr 2025 15:25:46 +0000 (18:25 +0300)
commitb593c1f95b63d5fad516685c2a22cb209b716269
tree65eb5c35acaf3ab0f17a4a304d26caccc96cc44a
parent20ec36eafddd7b3a0e014e1f4ed1b87a9105a725
xz: 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.

Co-authored-by: Guillaume Outters <guillaume-installs@outters.eu>
Fixes: fd56d5353360 ("xz: Make Capsicum sandbox more strict with stdin and stdout.")
(The commit message says "stdout". It should have said "stderr".)

(based on commit 5cc2e479eb447a444f5ab005fc36b7f275c75eb5)
src/xz/file_io.c