From 81b36a1832bdf7776d965480c452037a7b500c2c Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 28 Jul 2017 14:05:22 +0200 Subject: [PATCH] libselinux-2.6-8 - Always unmount selinuxfs for SELINUX=disabled --- libselinux-fedora.patch | 17 +++++++++++++++++ libselinux.spec | 7 +++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/libselinux-fedora.patch b/libselinux-fedora.patch index 72a9450..876516a 100644 --- a/libselinux-fedora.patch +++ b/libselinux-fedora.patch @@ -897,6 +897,23 @@ index 52707d0..0cbe12d 100644 if (rc < 0 && errno == ENOTSUP) { char * ccontext = NULL; int err = errno; +diff --git libselinux-2.6/src/load_policy.c libselinux-2.6/src/load_policy.c +index b7e1a6f..6d74a9a 100644 +--- libselinux-2.6/src/load_policy.c ++++ libselinux-2.6/src/load_policy.c +@@ -450,8 +450,11 @@ int selinux_init_load_policy(int *enforce) + } + } + +- if (seconfig == -1) ++ if (seconfig == -1) { ++ umount(selinux_mnt); ++ fini_selinuxmnt(); + goto noload; ++ } + + /* Load the policy. */ + return selinux_mkload_policy(0); diff --git libselinux-2.6/src/lsetfilecon.c libselinux-2.6/src/lsetfilecon.c index 1d3b28a..ea6d70b 100644 --- libselinux-2.6/src/lsetfilecon.c diff --git a/libselinux.spec b/libselinux.spec index 902f43b..8c048aa 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -9,7 +9,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.6 -Release: 7%{?dist} +Release: 8%{?dist} License: Public Domain Group: System Environment/Libraries # https://github.com/SELinuxProject/selinux/wiki/Releases @@ -20,7 +20,7 @@ Url: https://github.com/SELinuxProject/selinux/wiki # download https://raw.githubusercontent.com/fedora-selinux/scripts/master/selinux/make-fedora-selinux-patch.sh # run: # $ VERSION=2.6 ./make-fedora-selinux-patch.sh libselinux -# HEAD https://github.com/fedora-selinux/selinux/commit/55c710487a365122fc1c961c7b05620defbfe65a +# HEAD https://github.com/fedora-selinux/selinux/commit/601a1d1363fe4137ff3a2991c546f7a0ccfec4cb Patch1: libselinux-fedora.patch %if 0%{?fedora} > 25 BuildRequires: pkgconf-pkg-config @@ -262,6 +262,9 @@ rm -rf %{buildroot} %{ruby_vendorarchdir}/selinux.so %changelog +* Fri Jul 28 2017 Petr Lautrbach - 2.6-8 +- Always unmount selinuxfs for SELINUX=disabled + * Wed Jul 26 2017 Fedora Release Engineering - 2.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild