summaryrefslogtreecommitdiffstats
path: root/flags.py
diff options
context:
space:
mode:
Diffstat (limited to 'flags.py')
-rw-r--r--flags.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/flags.py b/flags.py
index fda4f5216..1b63454f3 100644
--- a/flags.py
+++ b/flags.py
@@ -11,6 +11,8 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
+import os
+
# A lot of effort, but it only allows a limited set of flags to be referenced
class Flags:
@@ -35,6 +37,16 @@ class Flags:
self.__dict__['flags']['autostep'] = 0
self.__dict__['flags']['autoscreenshot'] = 0
self.__dict__['flags']['usevnc'] = 0
+ self.__dict__['flags']['selinux'] = 0
+
+
+ # determine if selinux is enabled or not
+ f = open("/proc/cmdline", "r")
+ line = f.readline()
+ f.close()
+ if os.path.exists("/selinux/load") and line.find(" selinux=0") == -1:
+ self.__dict__['flags']['selinux'] = 1
+
global flags
flags = Flags()