~ubuntu-branches/ubuntu/trusty/bash/trusty-security

« back to all changes in this revision

Viewing changes to RBASH

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-03-03 22:52:05 UTC
  • mfrom: (1.3.5) (2.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20140303225205-87ltrt5kspeq0g1b
Tags: 4.3-1ubuntu1
* Merge with Debian; remaining changes:
  - skel.bashrc:
    - Run lesspipe.
    - Enable ls aliases.
    - Set options in ll alias to -alF.
    - Define an alert alias.
    - Enabled colored grep aliases.
  - etc.bash.bashrc:
    - Add sudo hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
6.10 The Restricted Shell
 
2
=========================
 
3
 
 
4
If Bash is started with the name `rbash', or the `--restricted' or `-r'
 
5
option is supplied at invocation, the shell becomes restricted.  A
 
6
restricted shell is used to set up an environment more controlled than
 
7
the standard shell.  A restricted shell behaves identically to `bash'
 
8
with the exception that the following are disallowed or not performed:
 
9
 
 
10
   * Changing directories with the `cd' builtin.
 
11
 
 
12
   * Setting or unsetting the values of the `SHELL', `PATH', `ENV', or
 
13
     `BASH_ENV' variables.
 
14
 
 
15
   * Specifying command names containing slashes.
 
16
 
 
17
   * Specifying a filename containing a slash as an argument to the `.'
 
18
     builtin command.
 
19
 
 
20
   * Specifying a filename containing a slash as an argument to the `-p'
 
21
     option to the `hash' builtin command.
 
22
 
 
23
   * Importing function definitions from the shell environment at
 
24
     startup.
 
25
 
 
26
   * Parsing the value of `SHELLOPTS' from the shell environment at
 
27
     startup.
 
28
 
 
29
   * Redirecting output using the `>', `>|', `<>', `>&', `&>', and `>>'
 
30
     redirection operators.
 
31
 
 
32
   * Using the `exec' builtin to replace the shell with another command.
 
33
 
 
34
   * Adding or deleting builtin commands with the `-f' and `-d' options
 
35
     to the `enable' builtin.
 
36
 
 
37
   * Using the `enable' builtin command to enable disabled shell
 
38
     builtins.
 
39
 
 
40
   * Specifying the `-p' option to the `command' builtin.
 
41
 
 
42
   * Turning off restricted mode with `set +r' or `set +o restricted'.
 
43
 
 
44
These restrictions are enforced after any startup files are read.
 
45
 
 
46
When a command that is found to be a shell script is executed (*note
 
47
Shell Scripts::), `rbash' turns off any restrictions in the shell
 
48
spawned to execute the script.
 
49