Blame 0009-selinux-turn-off-selinux-by-default.patch

Harald Hoyer 0260fa
From 0ce274f02b7391dfa5ab34f26ec3fbc6deff3269 Mon Sep 17 00:00:00 2001
Harald Hoyer 0260fa
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 0260fa
Date: Fri, 18 Feb 2011 09:44:47 +0100
Harald Hoyer 0260fa
Subject: [PATCH] selinux: turn off selinux by default
Harald Hoyer 0260fa
Harald Hoyer 0260fa
In Fedora selinux is now handled by systemd. If you want to enable
Harald Hoyer 0260fa
selinux by default, just add it to your /etc/dracut.conf.d/01-dist.conf
Harald Hoyer 0260fa
with:
Harald Hoyer 0260fa
add_dracutmodules+=" selinux "
Harald Hoyer 0260fa
---
Harald Hoyer 0260fa
 dracut.conf.d/suse.conf.example     |    3 ---
Harald Hoyer 0260fa
 modules.d/98selinux/module-setup.sh |    6 +-----
Harald Hoyer 0260fa
 2 files changed, 1 insertions(+), 8 deletions(-)
Harald Hoyer 0260fa
Harald Hoyer 0260fa
diff --git a/dracut.conf.d/suse.conf.example b/dracut.conf.d/suse.conf.example
Harald Hoyer 0260fa
index 9afda04..f25ab01 100644
Harald Hoyer 0260fa
--- a/dracut.conf.d/suse.conf.example
Harald Hoyer 0260fa
+++ b/dracut.conf.d/suse.conf.example
Harald Hoyer 0260fa
@@ -1,5 +1,2 @@
Harald Hoyer 0260fa
 i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
Harald Hoyer 0260fa
 
Harald Hoyer 0260fa
-omit_dracutmodules+=" selinux "
Harald Hoyer 0260fa
-
Harald Hoyer 0260fa
-
Harald Hoyer 0260fa
diff --git a/modules.d/98selinux/module-setup.sh b/modules.d/98selinux/module-setup.sh
Harald Hoyer 0260fa
index 483e42f..316b552 100755
Harald Hoyer 0260fa
--- a/modules.d/98selinux/module-setup.sh
Harald Hoyer 0260fa
+++ b/modules.d/98selinux/module-setup.sh
Harald Hoyer 0260fa
@@ -3,11 +3,7 @@
Harald Hoyer 0260fa
 # ex: ts=8 sw=4 sts=4 et filetype=sh
Harald Hoyer 0260fa
 
Harald Hoyer 0260fa
 check() {
Harald Hoyer 0260fa
-    [[ $hostonly ]] && {
Harald Hoyer 0260fa
-        [ -x "/usr/sbin/load_policy" -o -x "/sbin/load_policy" ] || return 1
Harald Hoyer 0260fa
-        return 0
Harald Hoyer 0260fa
-    }
Harald Hoyer 0260fa
-    return 0
Harald Hoyer 0260fa
+    return 255
Harald Hoyer 0260fa
 }
Harald Hoyer 0260fa
 
Harald Hoyer 0260fa
 depends() {