[libselinux/f16] Handle situation where selinux=0 passed to the kernel and both /selinux and

Daniel J Walsh dwalsh at fedoraproject.org
Thu Sep 22 13:40:54 UTC 2011


commit a702adc23c5af0ee17ac1037eef28276ac005002
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Thu Sep 22 09:40:40 2011 -0400

    Handle situation where selinux=0 passed to the kernel and both /selinux and

 libselinux-rhat.patch |   13 +++++++++++++
 libselinux.spec       |    5 ++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch
index bd18a47..77f745a 100644
--- a/libselinux-rhat.patch
+++ b/libselinux-rhat.patch
@@ -235,3 +235,16 @@ index 2fa21bc..5f0a4c2 100644
  	int header = 1, opt;
  	int verify = 0;
  	int notrans = 0;
+diff --git a/libselinux/src/load_policy.c b/libselinux/src/load_policy.c
+index 868660f..7fa6383 100644
+--- a/libselinux/src/load_policy.c
++++ b/libselinux/src/load_policy.c
+@@ -380,7 +380,7 @@ int selinux_init_load_policy(int *enforce)
+ 	}
+ 
+ 	if (! mntpoint ) {
+-		if (errno == ENODEV) {
++		if (errno == ENODEV || errno == ENOENT) {
+ 			/*
+ 			 * SELinux was disabled in the kernel, either
+ 			 * omitted entirely or disabled at boot via selinux=0.
diff --git a/libselinux.spec b/libselinux.spec
index b8adc7f..e95f820 100644
--- a/libselinux.spec
+++ b/libselinux.spec
@@ -7,7 +7,7 @@
 Summary: SELinux library and simple utilities
 Name: libselinux
 Version: 2.1.5
-Release: 5%{?dist}
+Release: 5.1%{?dist}
 License: Public Domain
 Group: System Environment/Libraries
 Source: %{name}-%{version}.tgz
@@ -231,6 +231,9 @@ rm -rf %{buildroot}
 %{ruby_sitearch}/selinux.so
 
 %changelog
+* Thu Sep 22 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.5-5.1
+- Handle situation where selinux=0 passed to the kernel and both /selinux and 
+
 * Wed Sep 14 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.5-5
 - Switch to use ":" as prefix separator rather then ";"
 


More information about the scm-commits mailing list