dolphin-17.04.0-allow-root.patch
This commit is contained in:
@@ -1,37 +1,25 @@
|
|||||||
diff -Nuar a/src/main.cpp b/src/main.cpp
|
diff -Nuar a/src/main.cpp b/src/main.cpp
|
||||||
--- a/src/main.cpp 2022-04-13 00:17:49.000000000 +0300
|
--- a/src/main.cpp 2023-04-14 06:19:08.000000000 +0300
|
||||||
+++ b/src/main.cpp 2022-05-08 10:17:21.036971482 +0300
|
+++ b/src/main.cpp 2023-04-20 21:26:52.104629720 +0300
|
||||||
@@ -42,21 +42,21 @@
|
@@ -52,15 +52,15 @@
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
// Prohibit using sudo or kdesu (but allow using the root user directly)
|
// Prohibit using sudo or kdesu (but allow using the root user directly)
|
||||||
- if (getuid() == 0) {
|
- if (getuid() == 0) {
|
||||||
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
|
- if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
|
||||||
- std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. "
|
- std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities." << std::endl;
|
||||||
- "Instead use Dolphin normally and you will be prompted for elevated privileges when "
|
|
||||||
- "performing file operations that require them."
|
|
||||||
- << std::endl;
|
|
||||||
- return EXIT_FAILURE;
|
- return EXIT_FAILURE;
|
||||||
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
|
- } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
|
||||||
- std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities. "
|
- std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities." << std::endl;
|
||||||
- "Instead use Dolphin normally and you will be prompted for elevated privileges when "
|
|
||||||
- "performing file operations that require them."
|
|
||||||
- << std::endl;
|
|
||||||
- return EXIT_FAILURE;
|
- return EXIT_FAILURE;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
+ //if (getuid() == 0) {
|
+ //if (getuid() == 0) {
|
||||||
+ // if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
|
+ // if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
|
||||||
+ // std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities. "
|
+ // std::cout << "Running Dolphin with sudo can cause bugs and expose you to security vulnerabilities." << std::endl;
|
||||||
+ // "Instead use Dolphin normally and you will be prompted for elevated privileges when "
|
+ // return EXIT_FAILURE;
|
||||||
+ // "performing file operations that require them."
|
|
||||||
+ // << std::endl;
|
|
||||||
+ //return EXIT_FAILURE;
|
|
||||||
+ //} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
|
+ //} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
|
||||||
+ // std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities. "
|
+ // std::cout << "Running Dolphin with kdesu can cause bugs and expose you to security vulnerabilities." << std::endl;
|
||||||
+ // "Instead use Dolphin normally and you will be prompted for elevated privileges when "
|
|
||||||
+ // "performing file operations that require them."
|
|
||||||
+ // << std::endl;
|
|
||||||
+ //return EXIT_FAILURE;
|
+ //return EXIT_FAILURE;
|
||||||
+ //}
|
+ //}
|
||||||
+ //}
|
+ //}
|
||||||
|
|||||||
Reference in New Issue
Block a user