aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-09-08 05:13:45 +0000
committerBill Nottingham <notting@redhat.com>2004-09-08 05:13:45 +0000
commitaff11aab504b444c0f27e62ed95a1bcdaf4ff264 (patch)
treea99c77fe038f9f0a0e0bcaf2fb11732d78bec0e0
parent7836a56a01de22975f05718e467641cdc22ed064 (diff)
downloadinitscripts-aff11aab504b444c0f27e62ed95a1bcdaf4ff264.tar
initscripts-aff11aab504b444c0f27e62ed95a1bcdaf4ff264.tar.gz
initscripts-aff11aab504b444c0f27e62ed95a1bcdaf4ff264.tar.bz2
initscripts-aff11aab504b444c0f27e62ed95a1bcdaf4ff264.tar.xz
initscripts-aff11aab504b444c0f27e62ed95a1bcdaf4ff264.zip
restore contexts of udev-created /dev files
-rwxr-xr-xrc.d/rc.sysinit5
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 48da3463..b40c31d0 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -41,6 +41,11 @@ if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then
fi
fi
+if [ "$SELINUX" = "1" -a -x /sbin/restorecon ] && fgrep -q " /dev " /proc/mounts ; then
+ restorecon /dev /dev/null
+ restorecon /dev/* 2> /dev/null
+fi
+
disable_selinux() {
echo "*** Warning -- SELinux is active"
echo "*** Disabling security enforcement for system recovery."