|
|
ff19ae |
BASH PATCH REPORT
|
|
|
ff19ae |
=================
|
|
|
ff19ae |
|
|
|
ff19ae |
Bash-Release: 4.2
|
|
|
ff19ae |
Patch-ID: bash42-023
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Reported-by: Ewan Mellor <Ewan.Mellor@eu.citrix.com>
|
|
|
ff19ae |
Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net>
|
|
|
ff19ae |
Bug-Reference-URL:
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Description:
|
|
|
ff19ae |
|
|
|
ff19ae |
Under some circumstances, an exit trap triggered by a bad substitution
|
|
|
ff19ae |
error when errexit is enabled will cause the shell to exit with an
|
|
|
ff19ae |
incorrect exit status (0).
|
|
|
ff19ae |
|
|
|
ff19ae |
Patch (apply with `patch -p0'):
|
|
|
ff19ae |
|
|
|
ff19ae |
*** ../bash-4.2-patched/subst.c 2011-11-21 12:04:38.000000000 -0500
|
|
|
ff19ae |
--- subst.c 2012-02-08 13:36:28.000000000 -0500
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 7275,7278 ****
|
|
|
ff19ae |
--- 7281,7285 ----
|
|
|
ff19ae |
case '\0':
|
|
|
ff19ae |
bad_substitution:
|
|
|
ff19ae |
+ last_command_exit_value = EXECUTION_FAILURE;
|
|
|
ff19ae |
report_error (_("%s: bad substitution"), string ? string : "??");
|
|
|
ff19ae |
FREE (value);
|
|
|
ff19ae |
*** ../bash-4.2-patched/error.c 2009-08-21 22:31:31.000000000 -0400
|
|
|
ff19ae |
--- error.c 2012-02-25 15:54:40.000000000 -0500
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 201,205 ****
|
|
|
ff19ae |
va_end (args);
|
|
|
ff19ae |
if (exit_immediately_on_error)
|
|
|
ff19ae |
! exit_shell (1);
|
|
|
ff19ae |
}
|
|
|
ff19ae |
|
|
|
ff19ae |
--- 201,209 ----
|
|
|
ff19ae |
va_end (args);
|
|
|
ff19ae |
if (exit_immediately_on_error)
|
|
|
ff19ae |
! {
|
|
|
ff19ae |
! if (last_command_exit_value == 0)
|
|
|
ff19ae |
! last_command_exit_value = 1;
|
|
|
ff19ae |
! exit_shell (last_command_exit_value);
|
|
|
ff19ae |
! }
|
|
|
ff19ae |
}
|
|
|
ff19ae |
|
|
|
ff19ae |
*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
|
|
|
ff19ae |
--- patchlevel.h Thu Feb 24 21:41:34 2011
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 26,30 ****
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 22
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|
|
|
ff19ae |
--- 26,30 ----
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 23
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|