Lines Matching defs:err_exit

20 function err_exit
26 alias err_exit='err_exit $LINENO'
31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
49 cd $tmp || err_exit "cd $tmp failed"
52 rksh -c '[[ -o restricted ]]' || err_exit 'restricted option not set'
53 [[ $(rksh -c 'print hello') == hello ]] || err_exit 'unable to run print'
54 check_restricted /bin/echo || err_exit '/bin/echo not resticted'
55 check_restricted ./echo || err_exit './echo not resticted'
56 check_restricted 'SHELL=ksh' || err_exit 'SHELL asignment not resticted'
57 check_restricted 'PATH=/bin' || err_exit 'PATH asignment not resticted'
58 check_restricted 'FPATH=/bin' || err_exit 'FPATH asignment not resticted'
59 check_restricted 'ENV=/bin' || err_exit 'ENV asignment not resticted'
60 check_restricted 'print > file' || err_exit '> file not restricted'
62 check_restricted 'print <> empty' || err_exit '<> file not restricted'
65 ! check_restricted script || err_exit 'script without builtins should run in restricted mode'
66 check_restricted ./script || err_exit 'script with / in name should not run in restricted mode'
68 ! check_restricted script || err_exit 'script with pathnames should run in restricted mode'
70 ! check_restricted script || err_exit 'script with output redirection should run in restricted mode'
72 ! check_restricted script || err_exit 'script with PATH assignment should run in restricted mode'
77 ! check_restricted 'script;:' || err_exit 'script with #! pathname should run in restricted mode'
78 ! check_restricted 'script' || err_exit 'script with #! pathname should run in restricted mode even if last command in script'
80 do check_restricted "function foo { typeset $i=foobar;};foo" || err_exit "$i can be changed in function by using typeset"