From 54e282317df2f976d2adf5383fe7de62235ca389 Mon Sep 17 00:00:00 2001 From: Rmys Date: Thu, 20 Apr 2023 21:28:32 +0300 Subject: [PATCH] dolphin-17.04.0-allow-root.patch --- .../files/dolphin-17.04.0-allow-root.patch | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 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 376813b9a7..2d0c9112dd 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,37 +1,25 @@ diff -Nuar a/src/main.cpp b/src/main.cpp ---- a/src/main.cpp 2022-04-13 00:17:49.000000000 +0300 -+++ b/src/main.cpp 2022-05-08 10:17:21.036971482 +0300 -@@ -42,21 +42,21 @@ +--- a/src/main.cpp 2023-04-14 06:19:08.000000000 +0300 ++++ b/src/main.cpp 2023-04-20 21:26:52.104629720 +0300 +@@ -52,15 +52,15 @@ { #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 << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. " -- "Instead use Dolphin normally and you will be prompted for elevated privileges when " -- "performing file operations that require them." -- << std::endl; +- std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities." << std::endl; - return EXIT_FAILURE; - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { -- std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities. " -- "Instead use Dolphin normally and you will be prompted for elevated privileges when " -- "performing file operations that require them." -- << std::endl; +- std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities." << std::endl; - return EXIT_FAILURE; - } - } + //if (getuid() == 0) { -+ // if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { -+ // std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. " -+ // "Instead use Dolphin normally and you will be prompted for elevated privileges when " -+ // "performing file operations that require them." -+ // << std::endl; -+ //return EXIT_FAILURE; ++ // if (!qEnvironmentVariableIsEmpty("SUDO_USER")) { ++ // std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities." << std::endl; ++ // return EXIT_FAILURE; + //} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) { -+ // std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities. " -+ // "Instead use Dolphin normally and you will be prompted for elevated privileges when " -+ // "performing file operations that require them." -+ // << std::endl; ++ // std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities." << std::endl; + //return EXIT_FAILURE; + //} + //}