Re: shebang-less script execution not resetting some options

2019-10-02 Thread L A Walsh
On 2019/10/02 03:49, Ilkka Virta wrote: > > If the execl() function fails due to an error equivalent to the > [ENOEXEC] [...] the shell shall execute a command equivalent to > having a shell invoked with the pathname resulting from the > search as its first op

Re: shebang-less script execution not resetting some options

2019-10-02 Thread Greg Wooledge
On Wed, Oct 02, 2019 at 03:11:18AM -0700, L A Walsh wrote: > > Bash allows a child of itself (a subshell) to read the commands. > > GNU find -exec uses /bin/sh to run it. > > zsh and csh both use /bin/sh to run it, I think. > So if a user has 'rbash' in /etc/passwd, they might get a real shell

Re: shebang-less script execution not resetting some options

2019-10-02 Thread Ilkka Virta
On 2.10. 13:11, L A Walsh wrote: On 2019/10/01 05:41, Greg Wooledge wrote: On Tue, Oct 01, 2019 at 04:14:00AM -0700, L A Walsh wrote: On 2019/09/30 14:39, Grisha Levit wrote: A few of the recently-added shopt options aren't getting reset when running a shebang-less script, this shoul

Re: shebang-less script execution not resetting some options

2019-10-02 Thread L A Walsh
On 2019/10/01 05:41, Greg Wooledge wrote: > On Tue, Oct 01, 2019 at 04:14:00AM -0700, L A Walsh wrote: > >> On 2019/09/30 14:39, Grisha Levit wrote: >> >>> A few of the recently-added shopt options aren't getting reset when >>> running a shebang-less script, this should fix it up: >>> >>

Re: shebang-less script execution not resetting some options

2019-10-01 Thread Chet Ramey
On 10/1/19 7:14 AM, L A Walsh wrote: > On 2019/09/30 14:39, Grisha Levit wrote: >> A few of the recently-added shopt options aren't getting reset when >> running a shebang-less script, this should fix it up: >> > Suppose the shebang-less script is being run by an earlier version > of bash. Won'

Re: shebang-less script execution not resetting some options

2019-10-01 Thread Chet Ramey
On 9/30/19 5:39 PM, Grisha Levit wrote: > A few of the recently-added shopt options aren't getting reset when > running a shebang-less script, this should fix it up: Thanks for the report. > Maybe verifying this is something that can be added to the test suite? > Something like: Yes, something l

Re: shebang-less script execution not resetting some options

2019-10-01 Thread Greg Wooledge
On Tue, Oct 01, 2019 at 04:14:00AM -0700, L A Walsh wrote: > On 2019/09/30 14:39, Grisha Levit wrote: > > A few of the recently-added shopt options aren't getting reset when > > running a shebang-less script, this should fix it up: > > > Suppose the shebang-less script is being run by an earlier

Re: shebang-less script execution not resetting some options

2019-10-01 Thread L A Walsh
On 2019/09/30 14:39, Grisha Levit wrote: > A few of the recently-added shopt options aren't getting reset when > running a shebang-less script, this should fix it up: > Suppose the shebang-less script is being run by an earlier version of bash. Won't the new patch radically change the behavior