Blame SOURCES/coreutils-8.26-selinuxenable.patch

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