42 lines
1.6 KiB
Diff
42 lines
1.6 KiB
Diff
From 4ec79b42c94c9c8e0ea15817bc32eb899df17b52 Mon Sep 17 00:00:00 2001
|
|
From: Fabian Vogt <fabian@ritter-vogt.de>
|
|
Date: Sat, 22 Apr 2017 14:00:33 +0200
|
|
Subject: [PATCH] Revert "Disallow executing Dolphin as root on Linux"
|
|
|
|
This reverts commit 0bdd8e0b0516555c6233fdc7901e9b417cf89791.
|
|
We ship a desktop file to open dolphin as root and we allow YaST on the
|
|
desktop. So this patch is absolutely pointless for us.
|
|
---
|
|
src/main.cpp | 15 ---------------
|
|
1 file changed, 15 deletions(-)
|
|
|
|
diff --git a/src/main.cpp b/src/main.cpp
|
|
index 0d2f825..c128c53 100644
|
|
--- a/src/main.cpp
|
|
+++ b/src/main.cpp
|
|
@@ -51,21 +51,6 @@ constexpr auto dolphinTranslationDomain{"dolphin"};
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
-#ifndef Q_OS_WIN
|
|
- // Prohibit using sudo or kdesu (but allow using the root user directly)
|
|
- if (getuid() == 0 && (!qEnvironmentVariableIsEmpty("SUDO_USER") || !qEnvironmentVariableIsEmpty("KDESU_USER"))) {
|
|
- QCoreApplication app(argc, argv); // Needed for the xi18ndc() call below.
|
|
- std::cout << qPrintable(
|
|
- xi18ndc(dolphinTranslationDomain,
|
|
- "@info:shell %1 is a terminal command",
|
|
- "Running <application>Dolphin</application> with <command>sudo</command> is discouraged. Please run <icode>%1</icode> instead.",
|
|
- QStringLiteral("dolphin --sudo")))
|
|
- << std::endl;
|
|
- // We could perform a privilege de-escalation here and continue as normal. It is a bit safer though to simply let the user restart without sudo.
|
|
- return EXIT_FAILURE;
|
|
- }
|
|
-#endif
|
|
-
|
|
/**
|
|
* trigger initialisation of proper icon theme
|
|
*/
|
|
--
|
|
2.49.0
|
|
|