summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets/pkihelper.py
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-12-18 14:25:13 -0500
committerAde Lee <alee@redhat.com>2012-12-19 00:05:38 -0500
commitc3fdb8ffc11938514d96760c9a62d619f90cbcca (patch)
tree7266ac55f7a8d0dbe1eec283693fb2a4f033b86e /base/deploy/src/scriptlets/pkihelper.py
parent33edf556a456ef329cb1eae1b539b8fdd3a50b22 (diff)
downloadpki-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.py10
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: