From 1d366cc1bd80509f604db7e383b813334e9ca020 Mon Sep 17 00:00:00 2001 From: Rmys Date: Wed, 24 Oct 2018 14:27:02 +0300 Subject: [PATCH] dolphin-17.04.0-allow-root.patch --- .../files/dolphin-17.04.0-allow-root.patch | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) 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 49a0d58c44..939b746e0f 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,19 +1,9 @@ -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 --#endif --#include -- - extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) +--- a/src/main.cpp 2018-08-08 11:18:07.577681862 +0200 ++++ b/src/main.cpp 2018-08-08 11:18:07.404689578 +0200 +@@ -44,15 +44,15 @@ { --#ifndef Q_OS_WIN -- // Prohibit using sudo or kdesu (but allow using the root user directly) + #ifndef Q_OS_WIN + // Prohibit using sudo or kdesu (but allow using the root user directly) - if (getuid() == 0) { - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { - std::cout << "Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities." << std::endl; @@ -23,8 +13,15 @@ diff -Nuar a/src/main.cpp b/src/main.cpp - return EXIT_FAILURE; - } - } --#endif -- ++ //if (getuid() == 0) { ++ // 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 + QApplication app(argc, argv); - app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); - app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));