Re: simple function causes BASH to exit when -e in effect

2017-12-22 Thread Greg Wooledge
On Fri, Dec 22, 2017 at 10:56:18AM -0800, Kevin Layer wrote: > The man page says: > > The shell does not exit if the command that fails is part of the > command list immediately following a while or until keyword, > part of the test following the if or elif reserved words,

Re: simple function causes BASH to exit when -e in effect

2017-12-22 Thread Chet Ramey
On 12/22/17 1:56 PM, Kevin Layer wrote: > The man page says: > > The shell does not exit if the command that fails is part of the > command list immediately following a while or until keyword, > part of the test following the if or elif reserved words, > part of any co

Re: simple function causes BASH to exit when -e in effect

2017-12-22 Thread Kevin Layer
The man page says: The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except the com

Re: simple function causes BASH to exit when -e in effect

2017-12-22 Thread DJ Mills
On Fri, Dec 22, 2017 at 1:39 PM, Kevin Layer wrote: > The bug happens to me on > GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu) > and > GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.4.0) > > The script is attached, but the function in question is this: > > function debu

simple function causes BASH to exit when -e in effect

2017-12-22 Thread Kevin Layer
The bug happens to me on GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu) and GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.4.0) The script is attached, but the function in question is this: function debug1 { [ "$debug" ] && echo "$(date "+%Y-%m-%d %H:%M:%S"): $@" }

Re: rbash escape vulnerability

2017-12-22 Thread Chet Ramey
On 12/21/17 2:03 PM, Drew Parker wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > In rbash v4.4.12 it is possible to escape the restricted shell by > running a program in the current directory > by setting the BASH_CMDS variable. This had currently