summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/kate/kate_runasroot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/kde/kde/patch/kate/kate_runasroot.patch')
-rw-r--r--source/kde/kde/patch/kate/kate_runasroot.patch53
1 files changed, 28 insertions, 25 deletions
diff --git a/source/kde/kde/patch/kate/kate_runasroot.patch b/source/kde/kde/patch/kate/kate_runasroot.patch
index f549fc342..aa067ce61 100644
--- a/source/kde/kde/patch/kate/kate_runasroot.patch
+++ b/source/kde/kde/patch/kate/kate_runasroot.patch
@@ -1,45 +1,48 @@
-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-19.04.1.orig/kate/main.cpp kate-19.04.1/kate/main.cpp
---- kate-19.04.1.orig/kate/main.cpp 2019-05-02 12:44:53.000000000 +0200
-+++ kate-19.04.1/kate/main.cpp 2019-05-08 21:26:07.196338144 +0200
-@@ -59,14 +59,12 @@
- int main(int argc, char **argv)
+--- ./kwrite/main.cpp.orig 2021-04-22 13:26:42.398123759 -0500
++++ ./kwrite/main.cpp 2021-04-22 13:29:08.356127024 -0500
+@@ -38,20 +38,18 @@
+ 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;
+- std::cout << "Executing KWrite with sudo is not possible due to unfixable security vulnerabilities. "
++ std::cout << "Executing KWrite with sudo is UNSAFE 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;
-+ 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;
+- std::cout << "Executing KWrite with kdesu is not possible due to unfixable security vulnerabilities. "
++ std::cout << "Executing KWrite with kdesu is UNSAFE 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;
-+ std::cout << "Executing Kate with kdesu is UNSAFE due to unfixable security vulnerabilities." << std::endl;
}
}
#endif
-diff -uar kate-19.04.1.orig/kwrite/main.cpp kate-19.04.1/kwrite/main.cpp
---- kate-19.04.1.orig/kwrite/main.cpp 2019-05-02 12:44:53.000000000 +0200
-+++ kate-19.04.1/kwrite/main.cpp 2019-05-08 21:27:52.034134472 +0200
-@@ -51,14 +51,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)
+--- ./kate/main.cpp.orig 2021-04-22 13:26:42.397123759 -0500
++++ ./kate/main.cpp 2021-04-22 13:30:18.674128597 -0500
+@@ -49,17 +49,15 @@
+ // 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 Kate with sudo is not possible due to unfixable security vulnerabilities. "
++ std::cout << "Executing Kate with sudo is UNSAFE 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;
-+ std::cout << "Executing KWrite with sudo is UNSAFE due to unfixable security vulnerabilities." << std::endl;
} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
-- std::cout << "Executing KWrite 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. "
++ std::cout << "Executing Kate with kdesu is UNSAFE 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;
-+ std::cout << "Executing KWrite with kdesu is UNSAFE due to unfixable security vulnerabilities." << std::endl;
}
}
#endif