[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Failed bash -r command returns 0 exit status
From: |
Chet Ramey |
Subject: |
Re: Failed bash -r command returns 0 exit status |
Date: |
Mon, 24 May 2010 09:23:19 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
On 5/24/10 2:48 AM, Pitt, David wrote:
> Bash Version: 4.1
> Patch Level: 0
> Release Status: release
>
> Description:
> Prohibited restricted shell command doesn't always return
> non-zero exit
> status.
>
> Executing "/bin/ls" under a restricted shell returns a non-zero
> exit
> status, as expected.
>
> However executing "/bin/ls && /bin/ls" under a restricted shell
> returns a zero exit
> status. This is not expected (at least not by me!). Zero exit
> status is returned with
> any list of commands, e.g. "/bin/ls && :".
>
> I need to know whether a command list executed under a
> restricted shell
> succeeded or failed.
I will tighten up the return status when restricted commands fail for the
next version of bash.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/