imgcreate/creator.py | 4 ---- imgcreate/kickstart.py | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-)
New commits: commit 158f7c6a327e2e8de1f3dd55c9125858c10582f7 Author: Daniel Walsh <[email protected]> Date: Sun Aug 15 11:19:27 2010 -0700 Allow creation of SELinux enabled LiveCD from an SELinux disabled host (bz 519709) diff --git a/imgcreate/creator.py b/imgcreate/creator.py index 0ba5af5..20be148 100644 --- a/imgcreate/creator.py +++ b/imgcreate/creator.py @@ -400,10 +400,6 @@ class ImageCreator(object): if not kickstart.get_repos(self.ks): raise CreatorError("No repositories specified") - if (kickstart.selinux_enabled(self.ks) and - not os.path.exists("/selinux/enforce")): - raise CreatorError("SELinux requested but not enabled on host") - def __write_fstab(self): fstab = open(self._instroot + "/etc/fstab", "w") fstab.write(self._get_fstab()) diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py index 6600fd7..aa2cff0 100644 --- a/imgcreate/kickstart.py +++ b/imgcreate/kickstart.py @@ -416,10 +416,11 @@ class SelinuxConfig(KickstartConfig): if ksselinux.selinux == ksconstants.SELINUX_DISABLED: return - if not os.path.exists(self.path("/sbin/restorecon")): + + if not os.path.exists(self.path("/sbin/setfiles")): return - self.call(["/sbin/restorecon", "-l", "-r", "-F", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/"]) + self.call(["/sbin/setfiles", "/etc/selinux/targeted/contexts/files/file_contexts", "-e", "/proc", "-e", "/sys", "-e", "/dev", "-e", "/selinux", "/"]) def apply(self, ksselinux): if os.path.exists(self.path("/usr/sbin/lokkit")): -- livecd mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/livecd
