summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2014-01-17 23:39:18 +0100
committerTimothée Ravier2014-01-20 19:16:16 +0100
commit0da206ae79ed6d4aadba2186d79e4dc2a8b43a76 (patch)
tree61c23e74e75add09188468eb9d2fade91448fb82
parent387b2389ef539df19746d86bba5fc141692fb2e5 (diff)
downloadaur-0da206ae79ed6d4aadba2186d79e4dc2a8b43a76.tar.gz
coreutils-selinux to 8.22-1 update
Include SELinux fixes from http://git.savannah.gnu.org/gitweb/?p=coreutils.git
-rw-r--r--.SRCINFO18
-rw-r--r--0001-copy-fix-SELinux-context-preservation-for-existing-d.patch47
-rw-r--r--0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch31
-rw-r--r--PKGBUILD25
4 files changed, 107 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5cfa9e23ed62..9d039de35e2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = coreutils-selinux
pkgdesc = The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support
- pkgver = 8.21
- pkgrel = 2
+ pkgver = 8.22
+ pkgrel = 1
url = http://www.gnu.org/software/coreutils
install = coreutils.install
arch = i686
@@ -14,14 +14,18 @@ pkgbase = coreutils-selinux
depends = gmp
depends = libcap
depends = libselinux
- provides = coreutils=8.21-2
- provides = selinux-coreutils=8.21-2
+ provides = coreutils=8.22-1
+ provides = selinux-coreutils=8.22-1
conflicts = coreutils
conflicts = selinux-coreutils
- source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
- source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz.sig
- md5sums = 065ba41828644eca5dd8163446de5d64
+ source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.22.tar.xz
+ source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.22.tar.xz.sig
+ source = 0001-copy-fix-SELinux-context-preservation-for-existing-d.patch
+ source = 0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch
+ md5sums = 8fb0ae2267aa6e728958adc38f8163a2
md5sums = SKIP
+ md5sums = a320632626e1639643f3510ae1c62ed0
+ md5sums = 40575ec80e895b5db52dafa6556e6e26
pkgname = coreutils-selinux
diff --git a/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch b/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch
new file mode 100644
index 000000000000..d34a4ba70edb
--- /dev/null
+++ b/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch
@@ -0,0 +1,47 @@
+From 3e7a91463476d5f0a98a59b52d9b808629c7ab25 Mon Sep 17 00:00:00 2001
+From: Nicolas Iooss <nicolas.iooss_git@m4x.org>
+Date: Sat, 18 Jan 2014 13:57:31 +0100
+Subject: [PATCH 1/2] copy: fix SELinux context preservation for existing
+ directories
+
+Apply upstream fix on src/copy.c
+
+http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=243128dbf0293be7b170dd47c8dbf3ed1834c093
+---
+ src/copy.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/copy.c b/src/copy.c
+index 0f044d0..2572f3f 100644
+--- a/src/copy.c
++++ b/src/copy.c
+@@ -2408,6 +2408,17 @@ copy_internal (char const *src_name, char const *dst_name,
+ else
+ {
+ omitted_permissions = 0;
++
++ /* For directories, the process global context could be reset for
++ descendents, so use it to set the context for existing dirs here.
++ This will also give earlier indication of failure to set ctx. */
++ if (x->set_security_context || x->preserve_security_context)
++ if (! set_file_security_ctx (dst_name, x->preserve_security_context,
++ false, x))
++ {
++ if (x->require_preserve_context)
++ goto un_backup;
++ }
+ }
+
+ /* Decide whether to copy the contents of the directory. */
+@@ -2598,7 +2609,7 @@ copy_internal (char const *src_name, char const *dst_name,
+
+ /* With -Z or --preserve=context, set the context for existing files.
+ Note this is done already for copy_reg() for reasons described therein. */
+- if (!new_dst && !x->copy_as_regular
++ if (!new_dst && !x->copy_as_regular && !S_ISDIR (src_mode)
+ && (x->set_security_context || x->preserve_security_context))
+ {
+ if (! set_file_security_ctx (dst_name, x->preserve_security_context,
+--
+1.8.5.3
+
diff --git a/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch b/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch
new file mode 100644
index 000000000000..22c3ad71783d
--- /dev/null
+++ b/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch
@@ -0,0 +1,31 @@
+From 41916b5986de48851535be339a852efe315ac139 Mon Sep 17 00:00:00 2001
+From: Nicolas Iooss <nicolas.iooss_git@m4x.org>
+Date: Sat, 18 Jan 2014 14:02:26 +0100
+Subject: [PATCH 2/2] copy: fix a segfault in SELinux context copying code
+
+Apply upstream fix on src/selinux.c
+
+http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=d718331e59afb35e56445f3a1597ed74a7f3a3e2
+---
+ src/selinux.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/selinux.c b/src/selinux.c
+index 680bc49..784cd1b 100644
+--- a/src/selinux.c
++++ b/src/selinux.c
+@@ -192,6 +192,11 @@ restorecon_private (char const *path, bool local)
+ {
+ if (getfscreatecon (&tcon) < 0)
+ return rc;
++ if (!tcon)
++ {
++ errno = ENODATA;
++ return rc;
++ }
+ rc = lsetfilecon (path, tcon);
+ freecon (tcon);
+ return rc;
+--
+1.8.5.3
+
diff --git a/PKGBUILD b/PKGBUILD
index 60adf6e056ca..3d3ef416b19e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,8 +5,8 @@
# SELinux Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
pkgname=coreutils-selinux
-pkgver=8.21
-pkgrel=2
+pkgver=8.22
+pkgrel=1
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support"
arch=('i686' 'x86_64')
license=('GPL3')
@@ -16,14 +16,25 @@ depends=('glibc' 'pam-selinux' 'acl' 'gmp' 'libcap' 'libselinux')
install=${pkgname/-selinux}.install
conflicts=("${pkgname/-selinux}" "selinux-${pkgname/-selinux}")
provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}" "selinux-${pkgname/-selinux}=${pkgver}-${pkgrel}")
-source=(ftp://ftp.gnu.org/gnu/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz{,.sig})
-md5sums=('065ba41828644eca5dd8163446de5d64'
- 'SKIP')
+source=(ftp://ftp.gnu.org/gnu/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz{,.sig}
+ '0001-copy-fix-SELinux-context-preservation-for-existing-d.patch'
+ '0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch')
+md5sums=('8fb0ae2267aa6e728958adc38f8163a2'
+ 'SKIP'
+ 'a320632626e1639643f3510ae1c62ed0'
+ '40575ec80e895b5db52dafa6556e6e26')
+
+prepare() {
+ cd "${pkgname/-selinux}-$pkgver"
+ patch -Np1 < "$srcdir/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch"
+ patch -Np1 < "$srcdir/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch"
+}
build() {
cd ${srcdir}/${pkgname/-selinux}-${pkgver}
- ./configure --prefix=/usr --libexecdir=/usr/lib \
- --enable-no-install-program=groups,hostname,kill,uptime
+ ./configure --prefix=/usr --libexecdir=/usr/lib --with-openssl \
+ --enable-no-install-program=groups,hostname,kill,uptime \
+ --with-selinux
make
}