37 lines
1.4 KiB
Diff
Executable File
37 lines
1.4 KiB
Diff
Executable File
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
|
|
*/
|