diff options
| author | Nate Graham <[email protected]> | 2021-12-31 10:36:31 -0700 |
|---|---|---|
| committer | Nate Graham <[email protected]> | 2021-12-31 10:38:19 -0700 |
| commit | 28ecfd5a34eebefa9944840bbf83b4911f59c004 (patch) | |
| tree | 96701aefc4bcb5f78742f396044d888d737bd73a | |
| parent | c40fe3b88602441e06e8b8fbbcdfa95c27261b01 (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.
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/main.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 92b311bfc..6ab68cc93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE project(Dolphin VERSION ${RELEASE_SERVICE_VERSION}) set(QT_MIN_VERSION "5.15.0") -set(KF5_MIN_VERSION "5.89.0") +set(KF5_MIN_VERSION "5.90.0") # ECM setup find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED) 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; } } |
