From 64c810d3d55b8e55c0ce73abf5839841a7846034 Mon Sep 17 00:00:00 2001 From: Rmys Date: Sun, 9 May 2021 23:18:52 +0300 Subject: [PATCH] kate-patch --- .../kate/files/kate-17.04.0-allow-root.patch | 18 +++++++++----- .../files/kwrite-17.04.0-allow-root.patch | 24 ++++++++++++------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch b/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch index b2bf82fa54..bce5908fd4 100755 --- a/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch +++ b/desktop/kde/applications/kate/files/kate-17.04.0-allow-root.patch @@ -1,10 +1,10 @@ diff -Nuar a/kate/main.cpp b/kate/main.cpp ---- a/kate/main.cpp 2020-01-06 21:00:06.000000000 +0300 -+++ b/kate/main.cpp 2020-02-03 19:10:43.509887401 +0300 -@@ -50,25 +50,8 @@ +--- a/kate/main.cpp 2021-04-14 18:06:06.000000000 +0300 ++++ b/kate/main.cpp 2021-05-09 23:14:47.943847179 +0300 +@@ -38,31 +38,8 @@ #include "qtsingleapplication/qtsingleapplication.h" #endif - + -#ifndef Q_OS_WIN -#include -#endif @@ -16,10 +16,16 @@ diff -Nuar a/kate/main.cpp b/kate/main.cpp - // Prohibit 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; +- std::cout << "Executing Kate with sudo is not possible due to unfixable security vulnerabilities. " +- "It is also not necessary; simply use Kate normally, and you will be prompted for " +- "elevated privileges when saving documents if needed." +- << std::endl; - return EXIT_FAILURE; - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { -- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities." << std::endl; +- std::cout << "Executing Kate with kdesu is not possible due to unfixable security vulnerabilities. " +- "It is also not necessary; simply use Kate normally, and you will be prompted for " +- "elevated privileges when saving documents if needed." +- << std::endl; - return EXIT_FAILURE; - } - } diff --git a/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch b/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch index 15c2698ccb..6f0253793b 100755 --- a/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch +++ b/desktop/kde/applications/kate/files/kwrite-17.04.0-allow-root.patch @@ -1,10 +1,10 @@ diff -Nuar a/kwrite/main.cpp b/kwrite/main.cpp ---- a/kwrite/main.cpp 2020-01-06 21:00:06.000000000 +0300 -+++ b/kwrite/main.cpp 2020-02-03 19:11:37.589883499 +0300 -@@ -44,25 +44,8 @@ - - #include "../urlinfo.h" - +--- a/kwrite/main.cpp 2021-04-14 18:06:06.000000000 +0300 ++++ b/kwrite/main.cpp 2021-05-09 23:16:04.812841633 +0300 +@@ -30,31 +30,8 @@ + + #include + -#ifndef Q_OS_WIN -#include -#endif @@ -16,14 +16,20 @@ diff -Nuar a/kwrite/main.cpp b/kwrite/main.cpp - // Prohibit using sudo or kdesu (but allow using the root user directly) - if (getuid() == 0) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { -- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities." << std::endl; +- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities. " +- "It is also not necessary; simply use KWrite normally, and you will be prompted for " +- "elevated privileges when saving documents if needed." +- << std::endl; - return EXIT_FAILURE; - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { -- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities." << std::endl; +- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities. " +- "It is also not necessary; simply use KWrite normally, and you will be prompted for " +- "elevated privileges when saving documents if needed." +- << std::endl; - return EXIT_FAILURE; - } - } -#endif - + /** * enable high dpi support