diff options
author | Ade Lee <alee@redhat.com> | 2012-12-18 14:25:13 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2012-12-19 00:05:38 -0500 |
commit | c3fdb8ffc11938514d96760c9a62d619f90cbcca (patch) | |
tree | 7266ac55f7a8d0dbe1eec283693fb2a4f033b86e /base/deploy/src/scriptlets/pkihelper.py | |
parent | 33edf556a456ef329cb1eae1b539b8fdd3a50b22 (diff) | |
download | pki-c3fdb8ffc11938514d96760c9a62d619f90cbcca.tar.gz pki-c3fdb8ffc11938514d96760c9a62d619f90cbcca.tar.xz pki-c3fdb8ffc11938514d96760c9a62d619f90cbcca.zip |
pkispawn modified to not relabel when selinux is disabled
Ticket 393
Diffstat (limited to 'base/deploy/src/scriptlets/pkihelper.py')
-rw-r--r-- | base/deploy/src/scriptlets/pkihelper.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/base/deploy/src/scriptlets/pkihelper.py b/base/deploy/src/scriptlets/pkihelper.py index ea84f7d0b..48c5f84f0 100644 --- a/base/deploy/src/scriptlets/pkihelper.py +++ b/base/deploy/src/scriptlets/pkihelper.py @@ -36,7 +36,9 @@ from grp import getgrnam from pwd import getpwnam from pwd import getpwuid import zipfile -import seobject +import selinux +if selinux.is_selinux_enabled(): + import seobject # PKI Deployment Imports @@ -760,6 +762,12 @@ class configuration_file: if len(ports) == 0: return + if not bool(selinux.is_selinux_enabled()): + config.pki_log.error( + log.PKIHELPER_SELINUX_DISABLED, + extra=config.PKI_INDENTATION_LEVEL_2) + return + portrecs = seobject.portRecords().get_all() portlist = ports[:] for port in portlist: |