From: david.p...@anz.com To: bug-bash@gnu.org Subject: Failed bash -r command returns 0 exit status
Configuration Information [Automatically generated, do not change]: Machine: sparc OS: solaris2.10 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='solaris2.10' -DCONF_MACHTYPE='sparc-sun-solaris2.10' -DCONF_VENDOR='sun' -DLOCALEDIR='/home/pittd1/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DSOLARIS -I. -I. -I./include -I./lib -I./lib/intl -I/tmp/bash-4.1/lib/intl -g -O2 uname output: SunOS dfeo001z 5.10 Generic_141414-02 sun4u sparc SUNW,SPARC-Enterprise Machine Type: sparc-sun-solaris2.10 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. Repeat-By: $ bash --restricted -c "/bin/ls"; echo $? bash: /bin/ls: restricted: cannot specify `/' in command names 1 $ bash --restricted -c "/bin/ls && /bin/ls"; echo $? bash: /bin/ls: restricted: cannot specify `/' in command names bash: /bin/ls: restricted: cannot specify `/' in command names 0 Regards, 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 > >