dolphin-17.04.0-allow-root.patch
This commit is contained in:
@@ -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 <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
-#ifndef Q_OS_WIN
|
||||
-#include <unistd.h>
|
||||
-#endif
|
||||
-#include <iostream>
|
||||
-
|
||||
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()));
|
||||
|
||||
Reference in New Issue
Block a user