From f4adfe80c1bad891df04ceb7b4804d04838ba8e4 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Mon, 4 Aug 2025 15:02:56 -0400 Subject: [PATCH] sys-process/htop: avoid suid with USE="-filecaps" Closes: https://bugs.gentoo.org/961054 Signed-off-by: Mike Gilbert --- .../htop/{htop-3.4.1-r1.ebuild => htop-3.4.1-r2.ebuild} | 3 ++- sys-process/htop/htop-9999.ebuild | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) rename sys-process/htop/{htop-3.4.1-r1.ebuild => htop-3.4.1-r2.ebuild} (95%) diff --git a/sys-process/htop/htop-3.4.1-r1.ebuild b/sys-process/htop/htop-3.4.1-r2.ebuild similarity index 95% rename from sys-process/htop/htop-3.4.1-r1.ebuild rename to sys-process/htop/htop-3.4.1-r2.ebuild index 9a8cc7e85c255..acf81c3e6f56b 100644 --- a/sys-process/htop/htop-3.4.1-r1.ebuild +++ b/sys-process/htop/htop-3.4.1-r2.ebuild @@ -96,7 +96,8 @@ pkg_postinst() { xdg_desktop_database_update xdg_icon_cache_update - fcaps cap_sys_ptrace usr/bin/${PN} + # Non-caps mode is blank to avoid suid with USE="-filecaps" (bug 961054) + fcaps -m '' cap_sys_ptrace usr/bin/htop optfeature "Viewing processes accessing certain files" sys-process/lsof } diff --git a/sys-process/htop/htop-9999.ebuild b/sys-process/htop/htop-9999.ebuild index 9a8cc7e85c255..acf81c3e6f56b 100644 --- a/sys-process/htop/htop-9999.ebuild +++ b/sys-process/htop/htop-9999.ebuild @@ -96,7 +96,8 @@ pkg_postinst() { xdg_desktop_database_update xdg_icon_cache_update - fcaps cap_sys_ptrace usr/bin/${PN} + # Non-caps mode is blank to avoid suid with USE="-filecaps" (bug 961054) + fcaps -m '' cap_sys_ptrace usr/bin/htop optfeature "Viewing processes accessing certain files" sys-process/lsof }