From: Harald Hoyer Date: Wed, 27 Jan 2010 15:09:15 +0000 (+0100) Subject: base: fix selinux handling if .autorelabel is present X-Git-Tag: 005~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97c97ff6d5471f76d3c123cc0ecc02a6c467ae8f;p=thirdparty%2Fdracut.git base: fix selinux handling if .autorelabel is present rhbz#557744 --- diff --git a/modules.d/99base/selinux-loadpolicy.sh b/modules.d/99base/selinux-loadpolicy.sh index 9e95b8de9..5b91ee681 100755 --- a/modules.d/99base/selinux-loadpolicy.sh +++ b/modules.d/99base/selinux-loadpolicy.sh @@ -37,6 +37,8 @@ rd_load_policy() } 2>&1 | vinfo if [ $ret -eq 0 -o $ret -eq 2 ]; then + # If machine requires a relabel, force to permissive mode + [ -e "$NEWROOT"/.autorelabel ] && ( echo 0 > "$NEWROOT"/selinux/enforce ) return 0 fi