dolphin-17.04.0-allow-root.patch 1.3 KB

1234567891011121314151617181920212223242526272829
  1. diff -Nuar a/src/main.cpp b/src/main.cpp
  2. --- a/src/main.cpp 2023-04-14 06:19:08.000000000 +0300
  3. +++ b/src/main.cpp 2023-04-20 21:26:52.104629720 +0300
  4. @@ -52,15 +52,15 @@
  5. {
  6. #ifndef Q_OS_WIN
  7. // Prohibit using sudo or kdesu-kf6 (but allow using the root user directly)
  8. - if (getuid() == 0) {
  9. - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
  10. - std::cout << "Running dolphin-kf6 with sudo can cause bugs and expose you to security vulnerabilities." << std::endl;
  11. - return EXIT_FAILURE;
  12. - } else if (!qEnvironmentVariableIsEmpty("kdesu-kf6_USER")) {
  13. - std::cout << "Running dolphin-kf6 with kdesu-kf6 can cause bugs and expose you to security vulnerabilities." << std::endl;
  14. - return EXIT_FAILURE;
  15. - }
  16. - }
  17. + //if (getuid() == 0) {
  18. + // if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
  19. + // std::cout << "Running dolphin-kf6 with sudo can cause bugs and expose you to security vulnerabilities." << std::endl;
  20. + // return EXIT_FAILURE;
  21. + //} else if (!qEnvironmentVariableIsEmpty("kdesu-kf6_USER")) {
  22. + // std::cout << "Running dolphin-kf6 with kdesu-kf6 can cause bugs and expose you to security vulnerabilities." << std::endl;
  23. + //return EXIT_FAILURE;
  24. + //}
  25. + //}
  26. #endif
  27. /**