summaryrefslogtreecommitdiff
path: root/backend/localplatform.py
diff options
context:
space:
mode:
authorMarco Rodolfi <marco.rodolfi@tuta.io>2023-08-26 19:00:02 +0200
committerGitHub <noreply@github.com>2023-08-26 19:00:02 +0200
commitcaf4d75a06289cdfee6fed34d6db03ac1ad0126d (patch)
tree4314f3e0615ee752b9c665823b1f6d17cb0f78eb /backend/localplatform.py
parenta43e4328df8e2d4e2c1be0ab7f0cd7ea59c48ce2 (diff)
downloaddecky-loader-2.10.5-pre1.tar.gz
decky-loader-2.10.5-pre1.zip
Fix for SELinux handling logic (#529)v2.10.5-pre1
* Fix for SELinux handling logic The old procedure was crashing with signal 9 SIGKILL, this should fix that problem
Diffstat (limited to 'backend/localplatform.py')
-rw-r--r--backend/localplatform.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/backend/localplatform.py b/backend/localplatform.py
index 9b05510b..43043ad0 100644
--- a/backend/localplatform.py
+++ b/backend/localplatform.py
@@ -43,4 +43,10 @@ def get_log_level() -> int:
]
def get_selinux() -> bool:
- return os.getenv("DECKY_SELINUX", "0") == "1"
+ if ON_LINUX:
+ from subprocess import check_output
+ try:
+ if (check_output("getenforce").decode("ascii").strip("\n") == "Enforcing"): return True
+ except FileNotFoundError:
+ pass
+ return False