fix(x11/kf6-kcrash): add remove-setgroups-and-setuid.patch

Co-authored-by: Robert Kirkman <rkirkman@termux.dev>
This commit is contained in:
termux-pacman-bot
2026-02-09 12:51:03 +00:00
parent 545ad8c1a3
commit bcc55e7706
2 changed files with 14 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION='Support for application crash analysis and bug report fr
TERMUX_PKG_LICENSE="LGPL-2.0, LGPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="6.22.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://download.kde.org/stable/frameworks/${TERMUX_PKG_VERSION%.*}/kcrash-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=322d7ca0588c008746e997b398111328767b4bc87318e24a0ededa0c191e700e
TERMUX_PKG_DEPENDS="kf6-kcoreaddons (>= ${TERMUX_PKG_VERSION%.*}), libc++, libx11, qt6-qtbase"

View File

@@ -0,0 +1,13 @@
--- a/src/kcrash.cpp
+++ b/src/kcrash.cpp
@@ -762,10 +762,6 @@ static pid_t startDirectly(const char *argv[])
fprintf(stderr, "KCrash failed to fork(), errno = %d\n", errno);
return 0;
case 0:
- setgroups(0, nullptr); // Remove any extraneous groups
- if (setgid(getgid()) < 0 || setuid(getuid()) < 0) {
- _exit(253); // This cannot happen. Theoretically.
- }
#ifndef Q_OS_OSX
closeAllFDs(); // We are in the child now. Close FDs unconditionally.
#endif