From 10dc87dd3fc6065d0da4d1f9b6a3431dd47ea81a Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Wed, 10 Oct 2018 12:48:28 +0900 Subject: [PATCH] mcreboot: check on SELinux Change-Id: I2c3706c04c7977ec22407358232d7c3a21abdc14 --- arch/x86_64/tools/mcreboot-smp-x86.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86_64/tools/mcreboot-smp-x86.sh.in b/arch/x86_64/tools/mcreboot-smp-x86.sh.in index 6d66e3d8..064bc25b 100644 --- a/arch/x86_64/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86_64/tools/mcreboot-smp-x86.sh.in @@ -31,6 +31,12 @@ if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then exit 1 fi +# Check SELinux +if which getenforce 1>/dev/null 2>/dev/null && [ "`getenforce | tr '[:upper:]' '[:lower:]'`" == "enforcing" ]; then + echo "error: SELinux must not be enabled when running McKernel (update /etc/selinux/config or see setenforce)" + exit 1 +fi + redirect_kmsg=0 mon_interval="-1" DUMP_LEVEL=24