[arch-commits] Commit in bash/trunk (3 files)

2014-06-11 Thread Bartłomiej Piotrowski
Date: Wednesday, June 11, 2014 @ 11:27:17
  Author: bpiotrowski
Revision: 214976

upgpkg: bash 4.3.018-3

use upstream patch for setuid() bug (FS#40663)

Added:
  bash/trunk/privmode-setuid-fail.patch
Modified:
  bash/trunk/PKGBUILD
Deleted:
  bash/trunk/bash-4.3-fix-setuid.patch

+
 PKGBUILD   |8 
 bash-4.3-fix-setuid.patch  |   31 ---
 privmode-setuid-fail.patch |   29 +
 3 files changed, 33 insertions(+), 35 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2014-06-11 09:25:15 UTC (rev 214975)
+++ PKGBUILD2014-06-11 09:27:17 UTC (rev 214976)
@@ -7,7 +7,7 @@
 _basever=4.3
 _patchlevel=018
 pkgver=$_basever.$_patchlevel
-pkgrel=2
+pkgrel=3
 pkgdesc='The GNU Bourne Again shell'
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -23,7 +23,7 @@
 dot.bash_logout
 system.bashrc
 system.bash_logout
-bash-4.3-fix-setuid.patch)
+privmode-setuid-fail.patch)
 
 if [[ $((10#${_patchlevel})) -gt 0 ]]; then
 for (( _p=1; _p=$((10#${_patchlevel})); _p++ )); do
@@ -40,7 +40,7 @@
   done
 
   # http://hmarco.org/bugs/bash_4.3-setuid-bug.html (FS#40663)
-  patch -p0 -i ../bash-4.3-fix-setuid.patch
+  patch -p0 -i ../privmode-setuid-fail.patch
 }
 
 build() {
@@ -83,7 +83,7 @@
  '42f4400ed2314bd7519c020d0187edc5'
  '561949793177116b7be29a07c385ba8b'
  '472f536d7c9e8250dc4568ec4cfaf294'
- 'c87b8d9e12d628eac829dc08f4607a20'
+ 'a577d42e38249d298d6a8d4bf2823883'
  '1ab682b4e36afa4cf1b426aa7ac81c0d'
  'SKIP'
  '8fc22cf50ec85da00f6af3d66f7ddc1b'

Deleted: bash-4.3-fix-setuid.patch
===
--- bash-4.3-fix-setuid.patch   2014-06-11 09:25:15 UTC (rev 214975)
+++ bash-4.3-fix-setuid.patch   2014-06-11 09:27:17 UTC (rev 214976)
@@ -1,31 +0,0 @@
-diff --git shell.c shell.c
-index bbc8a66..5bfd466 100644
 shell.c
-+++ shell.c
-@@ -1226,8 +1226,12 @@ uidget ()
- void
- disable_priv_mode ()
- {
--  setuid (current_user.uid);
--  setgid (current_user.gid);
-+   
-+  if( (setuid (current_user.uid) !=0) ||  (setgid (current_user.gid) != 0) ){
-+ report_error(Drop privileges failed!!\n);
-+ exit(EX_DROPFAIL);
-+  }
-+  
-   current_user.euid = current_user.uid;
-   current_user.egid = current_user.gid;
- }
-diff --git shell.h shell.h
-index 243e467..c3625be 100644
 shell.h
-+++ shell.h
-@@ -72,6 +72,7 @@ extern int EOF_Reached;
- #define EX_REDIRFAIL  259 /* redirection failed */
- #define EX_BADASSIGN  260 /* variable assignment error */
- #define EX_EXPFAIL261 /* word expansion failed */
-+#define EX_DROPFAIL  262   /* Drop privileges failed */
- 
- /* Flag values that control parameter pattern substitution. */
- #define MATCH_ANY 0x000

Added: privmode-setuid-fail.patch
===
--- privmode-setuid-fail.patch  (rev 0)
+++ privmode-setuid-fail.patch  2014-06-11 09:27:17 UTC (rev 214976)
@@ -0,0 +1,29 @@
+*** ../bash-4.3-patched/shell.c2014-01-14 08:04:32.0 -0500
+--- shell.c2014-06-06 16:29:01.0 -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;



[arch-commits] Commit in bash/trunk (3 files)

2014-02-28 Thread Allan McRae
Date: Saturday, March 1, 2014 @ 04:10:24
  Author: allan
Revision: 206515

upgpkg: bash 4.3-2

grab a few patchs from upstream mailing list

Added:
  bash/trunk/bash-4.3-debug-trap.patch
  bash/trunk/bash-4.3-test-nameref.patch
Modified:
  bash/trunk/PKGBUILD

-+
 PKGBUILD|   16 +---
 bash-4.3-debug-trap.patch   |   30 ++
 bash-4.3-test-nameref.patch |   25 +
 3 files changed, 68 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2014-03-01 01:03:48 UTC (rev 206514)
+++ PKGBUILD2014-03-01 03:10:24 UTC (rev 206515)
@@ -6,7 +6,7 @@
 _basever=4.3
 _patchlevel=000 #prepare for some patches
 pkgver=$_basever #.$_patchlevel
-pkgrel=1
+pkgrel=2
 pkgdesc=The GNU Bourne Again shell
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -21,7 +21,9 @@
 dot.bash_profile
 dot.bash_logout
 system.bashrc
-system.bash_logout)
+system.bash_logout
+bash-4.3-debug-trap.patch
+bash-4.3-test-nameref.patch)
 if [ $_patchlevel -gt 000 ]; then
 for (( p=1; p=$((10#${_patchlevel})); p++ )); do
 source=(${source[@]} 
http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//./}-$(printf 
%03d $p){,.sig})
@@ -35,6 +37,10 @@
 msg applying patch bash${_basever//./}-$(printf %03d $p)
 patch -p0 -i $srcdir/bash${_basever//./}-$(printf %03d $p)
   done
+  
+  # upstream patches I assume will be made official later...
+  patch -p0 -i $srcdir/bash-4.3-debug-trap.patch
+  patch -p0 -i $srcdir/bash-4.3-test-nameref.patch
 }
 
 build() {
@@ -80,4 +86,8 @@
  '2902e0fee7a9168f3a4fd2ccd60ff047'
  '42f4400ed2314bd7519c020d0187edc5'
  '3546099a1b2f667adc9794f52e78e35b'
- '472f536d7c9e8250dc4568ec4cfaf294')
+ '472f536d7c9e8250dc4568ec4cfaf294'
+ '3d5b91bc498c43d7bf902b679c8168ef'
+ '0615db31244215fd102ecbcd38b8b2e8')
+
+

Added: bash-4.3-debug-trap.patch
===
--- bash-4.3-debug-trap.patch   (rev 0)
+++ bash-4.3-debug-trap.patch   2014-03-01 03:10:24 UTC (rev 206515)
@@ -0,0 +1,30 @@
+*** ../bash-4.3/trap.c 2014-02-05 10:03:21.0 -0500
+--- trap.c 2014-02-28 09:51:43.0 -0500
+***
+*** 921,925 
+  
+  #if defined (JOB_CONTROL)
+!   save_pipeline (1); /* XXX only provides one save level */
+  #endif
+  
+--- 921,926 
+  
+  #if defined (JOB_CONTROL)
+!   if (sig != DEBUG_TRAP) /* run_debug_trap does this */
+!  save_pipeline (1);  /* XXX only provides one save level */
+  #endif
+  
+***
+*** 941,945 
+  
+  #if defined (JOB_CONTROL)
+!   restore_pipeline (1);
+  #endif
+  
+--- 942,947 
+  
+  #if defined (JOB_CONTROL)
+!   if (sig != DEBUG_TRAP) /* run_debug_trap does this */
+!  restore_pipeline (1);
+  #endif
+  

Added: bash-4.3-test-nameref.patch
===
--- bash-4.3-test-nameref.patch (rev 0)
+++ bash-4.3-test-nameref.patch 2014-03-01 03:10:24 UTC (rev 206515)
@@ -0,0 +1,25 @@
+*** ../bash-4.3/test.c 2014-02-04 16:52:58.0 -0500
+--- test.c 2014-02-28 21:22:44.0 -0500
+***
+*** 647,652 
+  
+  case 'R':
+!   v = find_variable (arg);
+!   return (v  invisible_p (v) == 0  var_isset (v)  nameref_p (v) ? 
TRUE : FALSE);
+  }
+  
+--- 647,652 
+  
+  case 'R':
+!   v = find_variable_noref (arg);
+!   return ((v  invisible_p (v) == 0  var_isset (v)  nameref_p (v)) 
? TRUE : FALSE);
+  }
+  
+***
+*** 724,727 
+--- 724,728 
+  case 'u': case 'v': case 'w': case 'x': case 'z':
+  case 'G': case 'L': case 'O': case 'S': case 'N':
++ case 'R':
+return (1);
+  }



[arch-commits] Commit in bash/trunk (3 files)

2010-11-28 Thread Pierre Schmitz
Date: Sunday, November 28, 2010 @ 12:27:10
  Author: pierre
Revision: 101280

* Remove profile.bash which is no longer sourced by the filesystem package
* Remove enable-system-config-files.patch which does not work at all

Modified:
  bash/trunk/PKGBUILD
Deleted:
  bash/trunk/enable-system-config-files.patch
  bash/trunk/profile.bash

--+
 PKGBUILD |   13 +++--
 enable-system-config-files.patch |   15 ---
 profile.bash |   11 ---
 3 files changed, 3 insertions(+), 36 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2010-11-28 17:20:26 UTC (rev 101279)
+++ PKGBUILD2010-11-28 17:27:10 UTC (rev 101280)
@@ -5,20 +5,18 @@
 pkgname=bash
 _patchlevel=009 #prepare for some patches
 pkgver=4.1.$_patchlevel
-pkgrel=1
+pkgrel=2
 pkgdesc=The GNU Bourne Again shell
 arch=('i686' 'x86_64')
 license=('GPL')
 url=http://www.gnu.org/software/bash/bash.html;
 groups=('base')
-backup=(etc/profile.bash etc/skel/.bashrc etc/skel/.bash_profile)
+backup=(etc/skel/.bashrc etc/skel/.bash_profile)
 depends=('readline=6.1' 'glibc')
 provides=('sh')
 install=bash.install
 source=(http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz
-profile.bash
 bashrc
-enable-system-config-files.patch
 system.bashrc)
 if [ $_patchlevel -gt 000 ]; then
 for (( p=1; p=$((10#${_patchlevel})); p++ )); do
@@ -34,8 +32,6 @@
 patch -Np0 -i ${p}
   done
 
-  patch -Np0 -i $srcdir/enable-system-config-files.patch
-
   ./configure --prefix=/usr --with-curses --enable-readline \
 --without-bash-malloc --with-installed-readline \
 --bindir=/bin --mandir=/usr/share/man --infodir=/usr/share/info
@@ -47,7 +43,6 @@
   cd ${srcdir}/${pkgname}-4.1
   make DESTDIR=${pkgdir} install
 
-  install -Dm644 ${srcdir}/profile.bash ${pkgdir}/etc/profile.bash
   install -Dm644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc
 
   # for now, bash is our default /bin/sh
@@ -58,11 +53,9 @@
   install -D -m644 ${srcdir}/bashrc ${pkgdir}/etc/skel/.bashrc
   echo . \$HOME/.bashrc ${pkgdir}/etc/skel/.bash_profile
 }
-
+
 md5sums=('9800d8724815fd84994d9be65ab5e7b8'
- '17f20ec69535a2f50f2112a8c700630d'
  '3d2837e84645eac9bde399b58014bafa'
- '51725defa4c2dec49c1bc15883e0bee2'
  '196697769f1667a8a1aed608811129c6'
  '582dea5671b557f783e18629c2f77b68'
  '118d465095d4a4706eb1d34696a2666a'

Deleted: enable-system-config-files.patch
===
--- enable-system-config-files.patch2010-11-28 17:20:26 UTC (rev 101279)
+++ enable-system-config-files.patch2010-11-28 17:27:10 UTC (rev 101280)
@@ -1,15 +0,0 @@
 src/bash-4.0/config-top.h  2009-01-04 11:32:23.0 -0800
-+++ config-top.h   2009-08-25 08:41:08.0 -0700
-@@ -75,10 +75,10 @@
- #define KSH_COMPATIBLE_SELECT
- 
- /* System-wide .bashrc file for interactive shells. */
--/* #define SYS_BASHRC /etc/bash.bashrc */
-+#define SYS_BASHRC /etc/bash.bashrc
- 
- /* System-wide .bash_logout for login shells. */
--/* #define SYS_BASH_LOGOUT /etc/bash.bash_logout */
-+#define SYS_BASH_LOGOUT /etc/bash.bash_logout
- 
- /* Define this to make non-interactive shells begun with argv[0][0] == '-'
-run the startup files when not in posix mode. */

Deleted: profile.bash
===
--- profile.bash2010-11-28 17:20:26 UTC (rev 101279)
+++ profile.bash2010-11-28 17:27:10 UTC (rev 101280)
@@ -1,11 +0,0 @@
-#
-# /etc/profile.bash
-# Global settings for bash shells
-#
-
-#In the future we may want to add more ulimit entries here,
-# in the offchance that /etc/security/limits.conf is skipped
-ulimit -Sc 0 #Don't create core files
-
-# Source our global bashrc file, to remove duplication of effort
-[ -r /etc/bash.bashrc ]  . /etc/bash.bashrc