Thanks Chet!
David Pitt | Developer/Designer TI SD Risk Systems | Technology Solution Delivery | OTSS >Level 3 Core A 833 Bourke Street Docklands VIC 3008 >Australia and New Zealand Banking Group Ltd | www.anz.com > -----Original Message----- From: Chet Ramey [mailto:chet.ra...@case.edu] Sent: Monday, 24 May 2010 11:23 PM To: Pitt, David Cc: bug-bash@gnu.org; chet.ra...@case.edu Subject: Re: Failed bash -r command returns 0 exit status 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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/ "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication."