From f91d979caade0c13e6b7fbc51a4ba9e3c92660e5 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 30 Mar 2004 20:45:00 +0000 Subject: if selinux is disabled, then don't allow configuring it since we won't get file contexts --- security.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'security.py') diff --git a/security.py b/security.py index 7771dc70c..42222d58f 100644 --- a/security.py +++ b/security.py @@ -29,7 +29,10 @@ selinux_states = { SEL_DISABLED: "disabled", class Security: def __init__(self): - self.selinux = SEL_ENFORCING + if flags.selinux == 1: + self.selinux = SEL_ENFORCING + else: + self.selinux = SEL_DISABLED def setSELinux(self, val): if not selinux_states.has_key(val): -- cgit