]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/rsh.tests
bash-5.0 distribution sources and documentation
[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
d233b485
CR
7${THIS_SH} ./rsh1.sub
8${THIS_SH} ./rsh2.sub
9
d166f048
JA
10set -r
11
12cd /
13PATH=$PATH:/usr/local/bin
14SHELL=/bin/sh
15/bin/sh -c 'echo /bin/sh executed'
16
17. ./source.sub3
18
19rm -f /tmp/restricted
20echo abc > /tmp/restricted
21if [ -f /tmp/restricted ]; then
22 echo oops 1 -- output
23fi
24echo abc >> /tmp/restricted
25if [ -f /tmp/restricted ]; then
26 echo oops 2 -- append
27fi
28
29command -p date
30
31set +r
cce855bc 32set +o restricted
d166f048
JA
33
34exec /bin/date
35
36echo $0: after exec