diff --git a/desktop/kde/applications/dolphin/files/dolphin-17.04.0-allow-root.patch b/desktop/kde/applications/dolphin/files/dolphin-17.04.0-allow-root.patch index e9de5a41f7..49a0d58c44 100755 --- a/desktop/kde/applications/dolphin/files/dolphin-17.04.0-allow-root.patch +++ b/desktop/kde/applications/dolphin/files/dolphin-17.04.0-allow-root.patch @@ -1,10 +1,9 @@ - -diff -Naur dolphin-17.04.0.old/src/main.cpp dolphin-17.04.0/src/main.cpp ---- dolphin-17.04.0.old/src/main.cpp 2017-04-25 02:44:57.440557635 -0400 -+++ dolphin-17.04.0/src/main.cpp 2017-04-25 02:45:22.535328410 -0400 -@@ -35,21 +35,8 @@ - #include - #include +diff -Nuar a/src/main.cpp b/src/main.cpp +--- a/src/main.cpp 2018-10-07 20:41:54.000000000 +0300 ++++ b/src/main.cpp 2018-10-14 16:54:12.975544992 +0300 +@@ -35,26 +35,8 @@ + #include + #include -#ifndef Q_OS_WIN -#include @@ -14,10 +13,15 @@ diff -Naur dolphin-17.04.0.old/src/main.cpp dolphin-17.04.0/src/main.cpp extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) { -#ifndef Q_OS_WIN -- // Check whether we are running as root +- // Prohibit using sudo or kdesu (but allow using the root user directly) - if (getuid() == 0) { -- std::cout << "Executing Dolphin as root is not possible." << std::endl; -- return EXIT_FAILURE; +- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { +- std::cout << "Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities." << std::endl; +- return EXIT_FAILURE; +- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { +- std::cout << "Executing Dolphin with kdesu is not possible due to unfixable security vulnerabilities." << std::endl; +- return EXIT_FAILURE; +- } - } -#endif - diff --git a/desktop/kde/applications/dolphin/pspec.xml b/desktop/kde/applications/dolphin/pspec.xml index 7b633f6c80..7934e27346 100755 --- a/desktop/kde/applications/dolphin/pspec.xml +++ b/desktop/kde/applications/dolphin/pspec.xml @@ -35,7 +35,7 @@ extra-cmake-modules - + dolphin-17.04.0-allow-root.patch @@ -111,7 +111,7 @@ 2018-10-18 18.08.2 - Version bump. + Version bump Mustafa Cinasal muscnsl@gmail.com