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