Skip to content

Instantly share code, notes, and snippets.

@Yash089610
Created March 26, 2019 09:04
Show Gist options
  • Select an option

  • Save Yash089610/6c2bb462def6f213d7067d7c345a5f7b to your computer and use it in GitHub Desktop.

Select an option

Save Yash089610/6c2bb462def6f213d7067d7c345a5f7b to your computer and use it in GitHub Desktop.
Dolphin Run as Sudo patch
From 6e53db77d56c2a7e90d3121a06873e02be513147 Mon Sep 17 00:00:00 2001
From: Yash Agarwal <agarwal2003yash4@gmail.com>
Date: Tue, 26 Mar 2019 13:37:10 +0530
Subject: [PATCH] Run as sudo
---
src/main.cpp | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index 08405d007..b481dcb9f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -42,19 +42,6 @@
extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
-#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;
- 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()));
--
2.21.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment