Blame SOURCES/coreutils-8.26-selinuxenable.patch

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