Blame SOURCES/coreutils-8.26-selinuxenable.patch

04161d
From 6880c3dc9098b3337612850d1500b474aeb944ca Mon Sep 17 00:00:00 2001
04161d
From: Kamil Dudka <kdudka@redhat.com>
04161d
Date: Tue, 29 Aug 2017 17:33:51 +0200
04161d
Subject: [PATCH] require_selinux_(): use selinuxenabled(8) if available
04161d
04161d
---
04161d
 init.cfg | 3 +++
04161d
 1 file changed, 3 insertions(+)
04161d
04161d
diff --git a/init.cfg b/init.cfg
04161d
index af6b581..f887b3a 100644
04161d
--- a/init.cfg
04161d
+++ b/init.cfg
04161d
@@ -114,6 +114,9 @@ require_selinux_()
04161d
   grep 'selinuxfs$' /proc/filesystems > /dev/null \
04161d
     || skip_ "this system lacks SELinux support"
04161d
 
04161d
+  # use the 'selinuxenabled' utility if available
04161d
+  selinuxenabled; [ $? = 1 ] && skip_ "SELinux is disabled"
04161d
+
04161d
   # Independent of whether SELinux is enabled system-wide,
04161d
   # the current file system may lack SELinux support.
04161d
   # Also the current build may have SELinux support disabled.
04161d
-- 
04161d
2.9.5
04161d