]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- added selinuxfs patch (use /sys/fs/selinux as selinuxfs mount point if available)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 Jun 2016 18:53:36 +0000 (20:53 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 19 Jun 2016 18:53:36 +0000 (20:53 +0200)
rc-scripts-selinuxfs.patch [new file with mode: 0644]
rc-scripts.spec

diff --git a/rc-scripts-selinuxfs.patch b/rc-scripts-selinuxfs.patch
new file mode 100644 (file)
index 0000000..56396b7
--- /dev/null
@@ -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
index 5dbe87988bd6f7582647c76da4027604a0a4d59d..ad27ea0255a3302b32aa9ac67f19a556b4a2d6e7 100644 (file)
@@ -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"
This page took 0.040113 seconds and 4 git commands to generate.