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

This commit is contained in:
Dan Walsh 2011-09-22 09:38:06 -04:00
parent 942b6cd466
commit 3f542ebbed
2 changed files with 18 additions and 2 deletions

View File

@ -164,6 +164,19 @@ index 3b8346d..02f3f98 100644
pass, ++lineno) != 0)
goto finish;
}
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/src/matchpathcon.c b/libselinux/src/matchpathcon.c
index 5914afa..df83b30 100644
--- a/libselinux/src/matchpathcon.c

View File

@ -1,13 +1,13 @@
%global with_python3 1
%define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
%define libsepolver 2.1.2-3
%define libsepolver 2.1.3-1
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.1.6
Release: 1%{?dist}
Release: 2%{?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@redhat.com> - 2.1.6-2
- Handle situation where selinux=0 passed to the kernel and both /selinux and
* Mon Sep 19 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.6-1
-Update to upstream
* utils: matchpathcon: remove duplicate declaration