┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNate Graham <[email protected]>2021-12-31 10:36:31 -0700
committerNate Graham <[email protected]>2021-12-31 10:38:19 -0700
commit28ecfd5a34eebefa9944840bbf83b4911f59c004 (patch)
tree96701aefc4bcb5f78742f396044d888d737bd73a /src
parentc40fe3b88602441e06e8b8fbbcdfa95c27261b01 (diff)
Improve sudo/kdesu error message
Now that you can get elevated privileges while using the app, we can display a more useful and descriptive error message when people try to run Dolphin using `sudo` or `kdesu`. Also bump the frameworks dependency to 5.90 since that's the KIO version that includes this change, so we can be sure that the message is always accurate.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 779690c1c..cda28c80c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -44,10 +44,16 @@ int main(int argc, char **argv)
// 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;
+ 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;
} else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- std::cout << "Executing Dolphin with kdesu is not possible due to unfixable security vulnerabilities." << std::endl;
+ 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;
return EXIT_FAILURE;
}
}