summaryrefslogtreecommitdiff
path: root/core/bash
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-06-20 03:59:46 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-06-20 03:59:46 +0000
commit2fd06aa8fa3c105c4c9161a060192d85dc3d4559 (patch)
treea70a2272e3bf810140349c2d457398b2d0c78b6f /core/bash
parenta3afce45dc7988a35810dee7e41050c3a459e731 (diff)
Fri Jun 20 03:54:27 UTC 2014
Diffstat (limited to 'core/bash')
-rw-r--r--core/bash/PKGBUILD11
-rw-r--r--core/bash/privmode-setuid-fail.patch29
2 files changed, 37 insertions, 3 deletions
diff --git a/core/bash/PKGBUILD b/core/bash/PKGBUILD
index 79ee624cb..966598e09 100644
--- a/core/bash/PKGBUILD
+++ b/core/bash/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 213861 2014-05-30 16:36:55Z bpiotrowski $
+# $Id: PKGBUILD 215305 2014-06-19 12:33:38Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
@@ -7,7 +7,7 @@ pkgname=bash
_basever=4.3
_patchlevel=018
pkgver=$_basever.$_patchlevel
-pkgrel=1
+pkgrel=3
pkgdesc='The GNU Bourne Again shell'
arch=('i686' 'x86_64')
license=('GPL')
@@ -22,7 +22,8 @@ source=(http://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
dot.bash_profile
dot.bash_logout
system.bashrc
- system.bash_logout)
+ system.bash_logout
+ privmode-setuid-fail.patch)
if [[ $((10#${_patchlevel})) -gt 0 ]]; then
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
@@ -37,6 +38,9 @@ prepare() {
msg "applying patch bash${_basever//.}-$(printf "%03d" $_p)"
patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p)
done
+
+ # http://hmarco.org/bugs/bash_4.3-setuid-bug.html (FS#40663)
+ patch -p0 -i ../privmode-setuid-fail.patch
}
build() {
@@ -79,6 +83,7 @@ md5sums=('81348932d5da294953e15d4814c74dd1'
'42f4400ed2314bd7519c020d0187edc5'
'561949793177116b7be29a07c385ba8b'
'472f536d7c9e8250dc4568ec4cfaf294'
+ 'a577d42e38249d298d6a8d4bf2823883'
'1ab682b4e36afa4cf1b426aa7ac81c0d'
'SKIP'
'8fc22cf50ec85da00f6af3d66f7ddc1b'
diff --git a/core/bash/privmode-setuid-fail.patch b/core/bash/privmode-setuid-fail.patch
new file mode 100644
index 000000000..059857d0b
--- /dev/null
+++ b/core/bash/privmode-setuid-fail.patch
@@ -0,0 +1,29 @@
+*** ../bash-4.3-patched/shell.c 2014-01-14 08:04:32.000000000 -0500
+--- shell.c 2014-06-06 16:29:01.000000000 -0400
+***************
+*** 1227,1232 ****
+ disable_priv_mode ()
+ {
+! setuid (current_user.uid);
+! setgid (current_user.gid);
+ current_user.euid = current_user.uid;
+ current_user.egid = current_user.gid;
+--- 1229,1246 ----
+ disable_priv_mode ()
+ {
+! int e;
+!
+! if (setuid (current_user.uid) < 0)
+! {
+! e = errno;
+! sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid);
+! #if defined (EXIT_ON_SETUID_FAILURE)
+! if (e == EAGAIN)
+! exit (e);
+! #endif
+! }
+! if (setgid (current_user.gid) < 0)
+! sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid);
+!
+ current_user.euid = current_user.uid;
+ current_user.egid = current_user.gid;