mirror of
https://abf.rosa.ru/djam/livecd-tools.git
synced 2025-02-23 15:42:58 +00:00
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From 2ccd4160ebcbfa0bd8262901dfc3b90b815c8376 Mon Sep 17 00:00:00 2001
|
|
From: notok <noto.kazufumi@gmail.com>
|
|
Date: Sat, 8 Dec 2018 14:21:54 +0900
|
|
Subject: [PATCH] Run setfiles after chroot
|
|
|
|
SELinux context is not properly set because setfiles command is not run after chroot.
|
|
Fixes #106
|
|
|
|
Backport of upstream commit c6dd265af7ccb3c51c37dcd89839f178832518ea to v21.1
|
|
Fixes https://bugs.centos.org/view.php?id=15589 and https://github.com/livecd-tools/livecd-tools/issues/106
|
|
|
|
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
|
---
|
|
imgcreate/kickstart.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
|
|
index 2273cd5..bf2211f 100644
|
|
--- a/imgcreate/kickstart.py
|
|
+++ b/imgcreate/kickstart.py
|
|
@@ -445,7 +445,7 @@ class SelinuxConfig(KickstartConfig):
|
|
if not os.path.exists(self.path("/sbin/setfiles")):
|
|
return
|
|
|
|
- self.call(["/sbin/setfiles", "-p", "-e", "/proc", "-e", "/sys", "-e", "/dev", selinux.selinux_file_context_path(), "/"])
|
|
+ subprocess.call(["/sbin/setfiles", "-p", "-e", "/proc", "-e", "/sys", "-e", "/dev", selinux.selinux_file_context_path(), "/"], preexec_fn=self.chroot)
|
|
|
|
def apply(self, ksselinux):
|
|
selinux_config = "/etc/selinux/config"
|
|
--
|
|
2.17.1
|
|
|