]> git.ipfire.org Git - thirdparty/bash.git/blame - RBASH
Bash-5.0 patch 4: the wait builtin without arguments only waits for known children...
[thirdparty/bash.git] / RBASH
CommitLineData
95732b49
JA
16.10 The Restricted Shell
2=========================
7117c2d2 3
a0c0a00f 4If Bash is started with the name 'rbash', or the '--restricted' or '-r'
7117c2d2
JA
5option is supplied at invocation, the shell becomes restricted. A
6restricted shell is used to set up an environment more controlled than
a0c0a00f 7the standard shell. A restricted shell behaves identically to 'bash'
7117c2d2
JA
8with the exception that the following are disallowed or not performed:
9
a0c0a00f
CR
10 * Changing directories with the 'cd' builtin.
11 * Setting or unsetting the values of the 'SHELL', 'PATH', 'ENV', or
12 'BASH_ENV' variables.
7117c2d2 13 * Specifying command names containing slashes.
a0c0a00f 14 * Specifying a filename containing a slash as an argument to the '.'
7117c2d2 15 builtin command.
a0c0a00f
CR
16 * Specifying a filename containing a slash as an argument to the '-p'
17 option to the 'hash' builtin command.
7117c2d2
JA
18 * Importing function definitions from the shell environment at
19 startup.
a0c0a00f 20 * Parsing the value of 'SHELLOPTS' from the shell environment at
7117c2d2 21 startup.
a0c0a00f 22 * Redirecting output using the '>', '>|', '<>', '>&', '&>', and '>>'
7117c2d2 23 redirection operators.
a0c0a00f
CR
24 * Using the 'exec' builtin to replace the shell with another command.
25 * Adding or deleting builtin commands with the '-f' and '-d' options
26 to the 'enable' builtin.
27 * Using the 'enable' builtin command to enable disabled shell
7117c2d2 28 builtins.
a0c0a00f
CR
29 * Specifying the '-p' option to the 'command' builtin.
30 * Turning off restricted mode with 'set +r' or 'set +o restricted'.
7117c2d2
JA
31
32These restrictions are enforced after any startup files are read.
33
34When a command that is found to be a shell script is executed (*note
a0c0a00f 35Shell Scripts::), 'rbash' turns off any restrictions in the shell
7117c2d2
JA
36spawned to execute the script.
37