[packages/rc-scripts] - added selinuxfs patch (use /sys/fs/selinux as selinuxfs mount point if available)

qboosh qboosh at pld-linux.org
Sun Jun 19 20:53:40 CEST 2016


commit 4a95169c617562c02bfa2df033fad3540e4bc507
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jun 19 20:53:36 2016 +0200

    - added selinuxfs patch (use /sys/fs/selinux as selinuxfs mount point if available)

 rc-scripts-selinuxfs.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 rc-scripts.spec            |  2 ++
 2 files changed, 42 insertions(+)
---
diff --git a/rc-scripts.spec b/rc-scripts.spec
index 5dbe879..ad27ea0 100644
--- a/rc-scripts.spec
+++ b/rc-scripts.spec
@@ -20,6 +20,7 @@ Source2:	sys-chroots.service
 Source3:	%{name}.tmpfiles
 Patch0:		%{name}-git.patch
 Patch1:		%{name}-modprobe-cache.patch
+Patch2:		%{name}-selinuxfs.patch
 URL:		http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -134,6 +135,7 @@ directories are silently ignored.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch:
 #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
diff --git a/rc-scripts-selinuxfs.patch b/rc-scripts-selinuxfs.patch
new file mode 100644
index 0000000..56396b7
--- /dev/null
+++ b/rc-scripts-selinuxfs.patch
@@ -0,0 +1,40 @@
+--- rc-scripts-0.4.15/rc.d/rc.sysinit.orig	2016-06-19 20:33:41.190705364 +0200
++++ rc-scripts-0.4.15/rc.d/rc.sysinit	2016-06-19 20:51:05.967360163 +0200
+@@ -124,10 +124,11 @@
+ 	if ! grep -Fq selinuxfs /proc/filesystems; then
+ 		# no support in kernel, no chance
+ 		SELINUX=no
++		return
+ 	fi
+ 
+-	if ! is_fsmounted selinuxfs /selinux; then
+-		mount -n -o gid=17 -t selinuxfs selinuxfs /selinux
++	if ! is_fsmounted selinuxfs $selinuxfsdir; then
++		mount -n -o gid=17 -t selinuxfs selinuxfs $selinuxfsdir
+ 	fi
+ 
+ 	# Check SELinux status
+@@ -424,6 +425,12 @@
+ 		mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security
+ 	fi
+ 
++	if [ -d /sys/fs/selinux ]; then
++		# Linux 3.0+
++		selinuxfsdir=/sys/fs/selinux
++	else
++		selinuxfsdir=/selinux
++	fi
+ 	init_selinux
+ 
+ 	# PLD Linux LiveCD support
+@@ -695,8 +702,8 @@
+ 		fi
+ 	fi
+ 
+-	if is_fsmounted selinuxfs /selinux; then
+-		mount -f -t selinuxfs selinuxfs /selinux 2> /dev/null
++	if is_fsmounted selinuxfs $selinuxfsdir; then
++		mount -f -t selinuxfs selinuxfs $selinuxfsdir 2> /dev/null
+ 	fi
+ 
+ 	if [ ! -f /proc/modules ]; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rc-scripts.git/commitdiff/4a95169c617562c02bfa2df033fad3540e4bc507



More information about the pld-cvs-commit mailing list