mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
23 lines
637 B
Plaintext
23 lines
637 B
Plaintext
From 62c9e1bc35523be31a3f089fae605fdee3283fa1 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Sun, 24 Mar 2019 20:35:16 +1000
|
|
Subject: Allow running as root on Haiku
|
|
|
|
|
|
diff --git a/kwrite/main.cpp b/kwrite/main.cpp
|
|
index e972a9b..84a197b 100644
|
|
--- a/kwrite/main.cpp
|
|
+++ b/kwrite/main.cpp
|
|
@@ -50,7 +50,7 @@
|
|
|
|
extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
|
|
{
|
|
-#ifndef Q_OS_WIN
|
|
+#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")) {
|
|
--
|
|
2.19.1
|
|
|