source: vendor/bash/3.1-p17/tests/rsh.tests

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 561 bytes
Line 
1# test restricted shell mode -- these should all be errors
2#
3# things not tested for:
4# adding builtins dynamically with enable -f
5# importing function definitions from environment
6
7set -r
8
9cd /
10PATH=$PATH:/usr/local/bin
11SHELL=/bin/sh
12/bin/sh -c 'echo /bin/sh executed'
13
14. ./source.sub3
15
16rm -f /tmp/restricted
17echo abc > /tmp/restricted
18if [ -f /tmp/restricted ]; then
19 echo oops 1 -- output
20fi
21echo abc >> /tmp/restricted
22if [ -f /tmp/restricted ]; then
23 echo oops 2 -- append
24fi
25
26command -p date
27
28set +r
29set +o restricted
30
31exec /bin/date
32
33echo $0: after exec
Note: See TracBrowser for help on using the repository browser.