]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/rsh.tests
Bash-4.2 patch 14
[thirdparty/bash.git] / tests / rsh.tests
CommitLineData
d166f048
JA
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
cce855bc 29set +o restricted
d166f048
JA
30
31exec /bin/date
32
33echo $0: after exec