12345678910111213141516171819202122232425262728293031323334353637 |
- diff -Nuar a/apps/kate/main.cpp b/apps/kate/main.cpp
- --- a/apps/kate/main.cpp 2022-09-04 17:28:00.000000000 +0300
- +++ b/apps/kate/main.cpp 2022-09-24 14:34:46.081798927 +0300
- @@ -37,31 +37,9 @@
-
- #include "SingleApplication/SingleApplication"
-
- -#ifndef Q_OS_WIN
- -#include <unistd.h>
- -#endif
- -#include <iostream>
- -
- int main(int argc, char **argv)
- {
- -#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
- - // Prohibit using sudo or kdesu (but allow using the root user directly)
- - if (getuid() == 0) {
- - if (!qEnvironmentVariableIsEmpty("SUDO_USER")) {
- - std::cout << "Running Kate with sudo can cause bugs and expose you to security vulnerabilities. "
- - "Instead use Kate normally and you will be prompted for elevated privileges when "
- - "saving documents if needed."
- - << std::endl;
- - return EXIT_FAILURE;
- - } else if (!qEnvironmentVariableIsEmpty("KDESU_USER")) {
- - std::cout << "Running Kate with kdesu can cause bugs and expose you to security vulnerabilities. "
- - "Instead use Kate normally and you will be prompted for elevated privileges when "
- - "saving documents if needed."
- - << std::endl;
- - return EXIT_FAILURE;
- - }
- - }
- -#endif
- +
- /**
- * init resources from our static lib
- */
|