From 4f8536c6bf2f6df702083fc5ffec2cf99091dd77 Mon Sep 17 00:00:00 2001 From: Jay Greguske Date: Fri, 13 Nov 2009 11:23:13 -0500 Subject: [PATCH] removed unnecessary selinux abort condition --- imgcreate/creator.py | 4 ---- imgcreate/kickstart.py | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/imgcreate/creator.py b/imgcreate/creator.py index b7436e6..a7393bd 100644 --- a/imgcreate/creator.py +++ b/imgcreate/creator.py @@ -467,10 +467,6 @@ class ImageCreator(object): # label the fs like it is a root before the bind mounting arglist = ["/sbin/setfiles", "-F", "-r", self._instroot, selinux.selinux_file_context_path(), self._instroot] subprocess.call(arglist, close_fds = True) - # these dumb things don't get magically fixed, so make the user generic - for f in ("/proc", "/sys", "/selinux"): - arglist = ["/usr/bin/chcon", "-u", "system_u", self._instroot + f] - subprocess.call(arglist, close_fds = True) def __destroy_selinuxfs(self): # if the system was running selinux clean up our lies diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py index 9a2145a..f424eb5 100644 --- a/imgcreate/kickstart.py +++ b/imgcreate/kickstart.py @@ -22,6 +22,7 @@ import shutil import subprocess import time import logging +import selinux import urlgrabber try: @@ -420,7 +421,7 @@ class SelinuxConfig(KickstartConfig): if not os.path.exists(self.path("/sbin/setfiles")): return - self.call(["/sbin/setfiles", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/etc/selinux/targeted/contexts/files/file_contexts", "/"]) + self.call(["/sbin/setfiles", selinux.selinux_file_context_path(), "/"]) def apply(self, ksselinux): if os.path.exists(self.path("/usr/sbin/lokkit")): -- 2.11.4.GIT