dracut/0056-98selinux-selinux-loadpolicy.sh-use-mount-rbind-for-.patch
Harald Hoyer 1ee1e39180 dracut-017-59.git20120321
new upstream version, which fixes various anaconda loader issues
2012-03-21 17:03:57 +01:00

24 lines
1.0 KiB
Diff

From 5055abb615a0b4f7519d24a6a37d8af5b5bea6d5 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Tue, 20 Mar 2012 13:31:36 +0100
Subject: [PATCH] 98selinux/selinux-loadpolicy.sh: use mount --rbind for /dev
This preserves /dev/shm and /dev/pts for the selinux relabel.
---
modules.d/98selinux/selinux-loadpolicy.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/98selinux/selinux-loadpolicy.sh b/modules.d/98selinux/selinux-loadpolicy.sh
index 6eb1dbb..d6e24d6 100755
--- a/modules.d/98selinux/selinux-loadpolicy.sh
+++ b/modules.d/98selinux/selinux-loadpolicy.sh
@@ -43,7 +43,7 @@ rd_load_policy()
if [ $ret -eq 0 -o $ret -eq 2 ]; then
# If machine requires a relabel, force to permissive mode
[ -e "$NEWROOT"/.autorelabel ] && LANG=C /usr/sbin/setenforce 0
- mount --bind /dev "$NEWROOT/dev"
+ mount --rbind /dev "$NEWROOT/dev"
LANG=C chroot "$NEWROOT" /sbin/restorecon -R /dev
return 0
fi