summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-06-06 18:27:28 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-06-10 17:29:21 +0200
commitcf7e326e52e79555a9bab8bb2f58b15cdc35464b (patch)
treebf9cf4b4d7a0f3e9cae95b055b2a706593662752 /kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch
parentkde-frameworks/kemoticons: drop 5.80.0* (diff)
downloadgentoo-cf7e326e52e79555a9bab8bb2f58b15cdc35464b.tar.gz
gentoo-cf7e326e52e79555a9bab8bb2f58b15cdc35464b.tar.bz2
gentoo-cf7e326e52e79555a9bab8bb2f58b15cdc35464b.zip
kde-frameworks/kglobalaccel: drop 5.80.0*
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch')
-rw-r--r--kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch43
1 files changed, 0 insertions, 43 deletions
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch
deleted file mode 100644
index ab606eebed9..00000000000
--- a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.80.0-dont-run-w-root-privs.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From bbec74337b3186bc258bd5adf849b89191789535 Mon Sep 17 00:00:00 2001
-From: Fabian Vogt <fabian@ritter-vogt.de>
-Date: Fri, 29 Jan 2021 11:31:54 +0100
-Subject: [PATCH] Don't let kglobalaccel run if KDE_SESSION_UID mismatches
-
-Otherwise shortcuts execute actions as the wrong user.
----
- src/runtime/main.cpp | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/src/runtime/main.cpp b/src/runtime/main.cpp
-index d2917ad..46506b3 100644
---- a/src/runtime/main.cpp
-+++ b/src/runtime/main.cpp
-@@ -10,6 +10,8 @@
- #include "kglobalacceld.h"
- #include "logging_p.h"
-
-+#include <unistd.h>
-+
- #include <KAboutData>
- #include <KCrash>
- #include <KDBusService>
-@@ -57,6 +59,16 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
- return 0;
- }
-
-+ // It's possible that kglobalaccel gets started as the wrong user by
-+ // accident, e.g. kdesu dolphin leads to dbus activation. It then installs
-+ // its grabs and the actions are run as the wrong user.
-+ bool isUidset = false;
-+ const int sessionuid = qEnvironmentVariableIntValue("KDE_SESSION_UID", &isUidset);
-+ if(isUidset && static_cast<uid_t>(sessionuid) != getuid()) {
-+ qCWarning(KGLOBALACCELD) << "kglobalaccel running as wrong user, exiting.";
-+ return 0;
-+ }
-+
- KDBusService service(KDBusService::Unique);
-
- app.setQuitOnLastWindowClosed(false);
---
-GitLab
-