summarylogtreecommitdiffstats
path: root/0001-Defuse-root-block.patch
blob: 3ce41357a81299225c4512093fba9e88abfc28f6 (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
29
30
31
32
33
34
--- a/src/main.cpp	2021-08-29 13:35:35.000000000 -0400
+++ b/src/main.cpp	2021-09-26 15:41:33.358228002 -0400
@@ -33,31 +33,8 @@
 #include <QDBusConnectionInterface>
 #include <QSessionManager>
 
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
 int main(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 << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. "
-                         "Instead use Dolphin normally and you will be prompted for elevated privileges when "
-                         "performing file operations that require them."
-                      << std::endl;
-            return EXIT_FAILURE;
-        } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
-            std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities. "
-                         "Instead use Dolphin normally and you will be prompted for elevated privileges when "
-                         "performing file operations that require them."
-                      << std::endl;
-            return EXIT_FAILURE;
-        }
-    }
-#endif
 
     /**
      * enable high dpi support