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