summaryrefslogtreecommitdiffstats
path: root/kde/patch/kate/kate_runasroot.patch
blob: 07139c4ccd2f59c629619115cc2843aea095cee9 (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
35
36
37
38
39
40
41
42
43
44
45
The user gets to decide whether she wants to run kate as root.
Please developers, do not presume that a Slackware user is dumb.

diff -uar kate-18.08.0.orig/kate/main.cpp kate-18.08.0/kate/main.cpp
--- kate-18.08.0.orig/kate/main.cpp	2018-08-06 22:41:28.000000000 +0200
+++ kate-18.08.0/kate/main.cpp	2018-08-11 00:23:36.968895970 +0200
@@ -61,14 +61,12 @@
 int main(int argc, char **argv)
 {
 #ifndef Q_OS_WIN
-    // Prohibit using sudo or kdesu (but allow using the root user directly)
+    // Warn using sudo or kdesu (but allow using the root user directly)
     if (getuid() == 0) {
         if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
-            std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
+            std::cout << "Executing Kate with sudo is UNSAFE due to unfixable security vulnerabilities." << std::endl;
         } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
-            std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
+            std::cout << "Executing Kate with kdesu is UNSAFE due to unfixable security vulnerabilities." << std::endl;
         }
     }
 #endif
diff -uar kate-18.08.0.orig/kwrite/main.cpp kate-18.08.0/kwrite/main.cpp
--- kate-18.08.0.orig/kwrite/main.cpp	2018-08-06 22:41:28.000000000 +0200
+++ kate-18.08.0/kwrite/main.cpp	2018-08-11 00:24:06.456910567 +0200
@@ -50,14 +50,12 @@
 extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
 {
 #ifndef Q_OS_WIN
-    // Prohibit using sudo or kdesu (but allow using the root user directly)
+    // Warn using sudo or kdesu (but allow using the root user directly)
     if (getuid() == 0) {
         if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
-            std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
+            std::cout << "Executing Kate with sudo is UNSAFE due to unfixable security vulnerabilities." << std::endl;
         } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
-            std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
-            return EXIT_FAILURE;
+            std::cout << "Executing Kate with kdesu is UNSAFE due to unfixable security vulnerabilities." << std::endl;
         }
     }
 #endif