summarylogtreecommitdiffstats
path: root/root.patch
blob: 3fe9c647e58e317ab74793a6c7db056a6da68184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- src/dolphin-21.04.0/src/main.cpp	2021-04-25 04:23:51.125703915 -0400
+++ main.cpp	2021-04-25 04:24:39.208885391 -0400
@@ -32,21 +32,13 @@
 #include <QDBusConnectionInterface>
 #include <QSessionManager>
 
-extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
-{
 #ifndef Q_OS_WIN
-    // Prohibit using sudo or kdesu (but allow using the root user directly)
-    if (getuid() == 0) {
-        if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
-            std::cout << "Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
-        } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
-            std::cout << "Executing Dolphin with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
-        }
-    }
+#include <unistd.h>
 #endif
+#include <iostream>
 
+extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
+{
     /**
      * enable high dpi support
      */