diff options
author | Chris Lumens <clumens@redhat.com> | 2005-11-03 16:02:15 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-11-03 16:02:15 +0000 |
commit | 8eac7415690abd457ffc7f203cc92fa734d303db (patch) | |
tree | b5ddd2f69a4c42533ee221cb7c311d91df1d7710 /security.py | |
parent | f3770976d9febe68119d7f8dae295dfef3157893 (diff) | |
download | anaconda-8eac7415690abd457ffc7f203cc92fa734d303db.tar.gz anaconda-8eac7415690abd457ffc7f203cc92fa734d303db.tar.xz anaconda-8eac7415690abd457ffc7f203cc92fa734d303db.zip |
Use pykickstart SELinux constants for consistency (#172356).
Diffstat (limited to 'security.py')
-rw-r--r-- | security.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/security.py b/security.py index 9322be4ea..64a419c6b 100644 --- a/security.py +++ b/security.py @@ -16,29 +16,26 @@ import os, string import iutil from flags import flags +from pykickstart.constants import * import logging log = logging.getLogger("anaconda") -SEL_DISABLED = 0 -SEL_PERMISSIVE = 1 -SEL_ENFORCING = 2 - -selinux_states = { SEL_DISABLED: "disabled", - SEL_ENFORCING: "enforcing", - SEL_PERMISSIVE: "permissive" } +selinux_states = { SELINUX_DISABLED: "disabled", + SELINUX_ENFORCING: "enforcing", + SELINUX_PERMISSIVE: "permissive" } class Security: def __init__(self): if flags.selinux == 1: - self.selinux = SEL_ENFORCING + self.selinux = SELINUX_ENFORCING else: - self.selinux = SEL_DISABLED + self.selinux = SELINUX_DISABLED def setSELinux(self, val): if not selinux_states.has_key(val): log.error("Tried to set to invalid SELinux state: %s" %(val,)) - val = SEL_DISABLED + val = SELINUX_DISABLED self.selinux = val |