From ff033d1c1326d70cd225a3661fbcfe7dfc64544c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 7 Jun 2016 07:53:25 +0200 Subject: [PATCH] dash: update to 0.5.9. --- ...-x-as-root-on-platforms-with-old-fash.diff | 60 ------------------- srcpkgs/dash/template | 6 +- 2 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 srcpkgs/dash/patches/0004-BUILTIN-Fix-test-x-as-root-on-platforms-with-old-fash.diff diff --git a/srcpkgs/dash/patches/0004-BUILTIN-Fix-test-x-as-root-on-platforms-with-old-fash.diff b/srcpkgs/dash/patches/0004-BUILTIN-Fix-test-x-as-root-on-platforms-with-old-fash.diff deleted file mode 100644 index d5d43d27483..00000000000 --- a/srcpkgs/dash/patches/0004-BUILTIN-Fix-test-x-as-root-on-platforms-with-old-fash.diff +++ /dev/null @@ -1,60 +0,0 @@ -From 7df60e06e6a176e2ee177df015d5e7ecc80ed229 Mon Sep 17 00:00:00 2001 -From: Jonathan Nieder -Date: Mon, 26 Sep 2011 16:16:37 -0500 -Subject: [BUILTIN] Fix "test -x" as root on platforms with old-fashioned - faccessat() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When dash switched from its own emulation to the true faccessat in -v0.5.7~54 (2010-04-02), on some platforms (e.g., old versions of -glibc-bsd), "test -x " started returning true on all files when -run as root. This violates POSIX.1-2008 ยง4.4 "File Access -Permission", which says: - - If execute permission is requested, access shall be granted - if execute permission is granted to at least one user by the - file permission bits or by an alternate access control - mechanism; otherwise, access shall be denied. - -Unfortunately, for historical reasons, access() and faccessat() are -allowed by POSIX to return success for X_OK when the current process -is privileged even when the above condition is not fulfilled and -actual execution would fail. Work around this by checking the -permissions bits when mode == X_OK and geteuid() == 0. - -Reported-by: Christoph Egger -Analysis-by: Petr Salinger -Signed-off-by: Jonathan Nieder ---- - src/bltin/test.c | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/src/bltin/test.c b/src/bltin/test.c -index 90135e14..1093b59f 100644 ---- src/bltin/test.c -+++ src/bltin/test.c -@@ -485,8 +485,19 @@ equalf (const char *f1, const char *f2) - } - - #ifdef HAVE_FACCESSAT -+static int has_exec_bit_set(const char *path) -+{ -+ struct stat64 st; -+ -+ if (stat64(path, &st)) -+ return 0; -+ return st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH); -+} -+ - static int test_file_access(const char *path, int mode) - { -+ if (mode == X_OK && geteuid() == 0 && !has_exec_bit_set(path)) -+ return 0; - return !faccessat(AT_FDCWD, path, mode, AT_EACCESS); - } - #else /* HAVE_FACCESSAT */ --- -1.7.7.rc1 - diff --git a/srcpkgs/dash/template b/srcpkgs/dash/template index 0f15f1ddd04..c78b5a17e69 100644 --- a/srcpkgs/dash/template +++ b/srcpkgs/dash/template @@ -1,7 +1,7 @@ # Template file for 'dash' pkgname=dash -version=0.5.8 -revision=6 +version=0.5.9 +revision=1 build_style=gnu-configure hostmakedepends="bison" register_shell="/bin/sh" @@ -10,7 +10,7 @@ maintainer="Juan RP " homepage="http://gondor.apana.org.au/~herbert/dash/" license="BSD" distfiles="http://gondor.apana.org.au/~herbert/dash/files/$pkgname-$version.tar.gz" -checksum=c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f +checksum=92793b14c017d79297001556389442aeb9e3c1cc559fd178c979169b1a47629c alternatives=" sh:sh:/usr/bin/dash