kate-patch

This commit is contained in:
Rmys
2022-05-07 17:41:57 +03:00
committed by GitHub
parent 3d1900d80b
commit 8a3a2dc85a
2 changed files with 24 additions and 23 deletions
@@ -1,10 +1,10 @@
diff -Nuar a/kate/main.cpp b/kate/main.cpp diff -Nuar a/kate/main.cpp b/kate/main.cpp
--- a/kate/main.cpp 2021-08-27 23:54:04.000000000 +0300 --- a/kate/main.cpp 2022-04-13 00:16:30.000000000 +0300
+++ b/kate/main.cpp 2021-09-13 17:57:18.358487000 +0300 +++ b/kate/main.cpp 2022-05-07 17:36:15.287375842 +0300
@@ -38,31 +38,8 @@ @@ -39,31 +39,9 @@
#include "qtsingleapplication/qtsingleapplication.h" #include "qtsingleapplication/qtsingleapplication.h"
#endif #endif
-#ifndef Q_OS_WIN -#ifndef Q_OS_WIN
-#include <unistd.h> -#include <unistd.h>
-#endif -#endif
@@ -16,20 +16,21 @@ diff -Nuar a/kate/main.cpp b/kate/main.cpp
- // Prohibit using sudo or kdesu (but allow using the root user directly) - // Prohibit using sudo or kdesu (but allow using the root user directly)
- if (getuid() == 0) { - if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities. " - std::cout << "Running Kate with sudo can cause bugs and expose you to security vulnerabilities. "
- "It is also not necessary; simply use Kate normally, and you will be prompted for " - "Instead use Kate normally and you will be prompted for elevated privileges when "
- "elevated privileges when saving documents if needed." - "saving documents if needed."
- << std::endl; - << std::endl;
- return EXIT_FAILURE; - return EXIT_FAILURE;
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities. " - std::cout << "Running Kate with kdesu can cause bugs and expose you to security vulnerabilities. "
- "It is also not necessary; simply use Kate normally, and you will be prompted for " - "Instead use Kate normally and you will be prompted for elevated privileges when "
- "elevated privileges when saving documents if needed." - "saving documents if needed."
- << std::endl; - << std::endl;
- return EXIT_FAILURE; - return EXIT_FAILURE;
- } - }
- } - }
-#endif -#endif
+
/** /**
* init resources from our static lib * init resources from our static lib
*/ */
@@ -1,10 +1,10 @@
diff -Nuar a/kwirte/main.cpp b/kwirte/main.cpp diff -Nuar a/kwrite/main.cpp b/kwrite/main.cpp
--- a/kwrite/main.cpp 2021-08-27 23:54:04.000000000 +0300 --- a/kwrite/main.cpp 2022-04-13 00:16:30.000000000 +0300
+++ b/kwrite/main.cpp 2021-09-13 17:58:21.634483000 +0300 +++ b/kwrite/main.cpp 2022-05-07 17:37:03.255372381 +0300
@@ -30,31 +30,8 @@ @@ -31,31 +31,8 @@
#include <signal_watcher.h>
#include <urlinfo.h> #include <urlinfo.h>
-#ifndef Q_OS_WIN -#ifndef Q_OS_WIN
-#include <unistd.h> -#include <unistd.h>
-#endif -#endif
@@ -16,20 +16,20 @@ diff -Nuar a/kwirte/main.cpp b/kwirte/main.cpp
- // Prohibit using sudo or kdesu (but allow using the root user directly) - // Prohibit using sudo or kdesu (but allow using the root user directly)
- if (getuid() == 0) { - if (getuid() == 0) {
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities. " - std::cout << "Running KWrite with sudo can cause bugs and expose you to security vulnerabilities. "
- "It is also not necessary; simply use KWrite normally, and you will be prompted for " - "Instead use KWrite normally and you will be prompted for elevated privileges when "
- "elevated privileges when saving documents if needed." - "saving documents if needed."
- << std::endl; - << std::endl;
- return EXIT_FAILURE; - return EXIT_FAILURE;
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities. " - std::cout << "Running KWrite with kdesu can cause bugs and expose you to security vulnerabilities. "
- "It is also not necessary; simply use KWrite normally, and you will be prompted for " - "Instead use KWrite normally and you will be prompted for elevated privileges when "
- "elevated privileges when saving documents if needed." - "saving documents if needed."
- << std::endl; - << std::endl;
- return EXIT_FAILURE; - return EXIT_FAILURE;
- } - }
- } - }
-#endif -#endif
/** /**
* enable high dpi support * enable high dpi support