0
|
1 |
'\" t
|
|
2 |
.\"
|
|
3 |
.\" Modified for Solaris to to add the Solaris stability classification,
|
|
4 |
.\" and to add a note about source availability.
|
|
5 |
.\"
|
|
6 |
.\"
|
|
7 |
.\" MAN PAGE COMMENTS to
|
|
8 |
.\"
|
|
9 |
.\" Chet Ramey
|
|
10 |
.\" Case Western Reserve University
|
|
11 |
.\" [email protected]
|
|
12 |
.\"
|
|
13 |
.\" Last Change: Sat Feb 7 20:50:40 EST 2009
|
|
14 |
.\"
|
|
15 |
.\" bash_builtins, strip all but Built-Ins section
|
|
16 |
.if \n(zZ=1 .ig zZ
|
|
17 |
.if \n(zY=1 .ig zY
|
|
18 |
.TH RBASH 1 "2009 February 7" "GNU Bash-4.0"
|
|
19 |
.\"
|
|
20 |
.\" There's some problem with having a `@'
|
|
21 |
.\" in a tagged paragraph with the BSD man macros.
|
|
22 |
.\" It has to do with `@' appearing in the }1 macro.
|
|
23 |
.\" This is a problem on 4.3 BSD and Ultrix, but Sun
|
|
24 |
.\" appears to have fixed it.
|
|
25 |
.\" If you're seeing the characters
|
|
26 |
.\" `@u-3p' appearing before the lines reading
|
|
27 |
.\" `possible-hostname-completions
|
|
28 |
.\" and `complete-hostname' down in READLINE,
|
|
29 |
.\" then uncomment this redefinition.
|
|
30 |
.\"
|
|
31 |
.de }1
|
|
32 |
.ds ]X \&\\*(]B\\
|
|
33 |
.nr )E 0
|
|
34 |
.if !"\\$1"" .nr )I \\$1n
|
|
35 |
.}f
|
|
36 |
.ll \\n(LLu
|
|
37 |
.in \\n()Ru+\\n(INu+\\n()Iu
|
|
38 |
.ti \\n(INu
|
|
39 |
.ie !\\n()Iu+\\n()Ru-\w\\*(]Xu-3p \{\\*(]X
|
|
40 |
.br\}
|
|
41 |
.el \\*(]X\h|\\n()Iu+\\n()Ru\c
|
|
42 |
.}f
|
|
43 |
..
|
|
44 |
.\"
|
|
45 |
.\" File Name macro. This used to be `.PN', for Path Name,
|
|
46 |
.\" but Sun doesn't seem to like that very much.
|
|
47 |
.\"
|
|
48 |
.de FN
|
|
49 |
\fI\|\\$1\|\fP
|
|
50 |
..
|
|
51 |
.SH NAME
|
|
52 |
rbash \- restricted bash, see \fBbash\fR(1)
|
|
53 |
.SH SYNOPSIS
|
|
54 |
.B rbash
|
|
55 |
.\" bash_builtins
|
|
56 |
.if \n(zZ=1 .ig zZ
|
|
57 |
.SH "RESTRICTED SHELL"
|
|
58 |
.\" rbash.1
|
|
59 |
.zY
|
|
60 |
.PP
|
|
61 |
If
|
|
62 |
.B bash
|
|
63 |
is started with the name
|
|
64 |
.BR rbash ,
|
|
65 |
or the
|
|
66 |
.B \-r
|
|
67 |
option is supplied at invocation,
|
|
68 |
the shell becomes restricted.
|
|
69 |
A restricted shell is used to
|
|
70 |
set up an environment more controlled than the standard shell.
|
|
71 |
It behaves identically to
|
|
72 |
.B bash
|
|
73 |
with the exception that the following are disallowed or not performed:
|
|
74 |
.IP \(bu
|
|
75 |
changing directories with \fBcd\fP
|
|
76 |
.IP \(bu
|
|
77 |
setting or unsetting the values of
|
|
78 |
.BR SHELL ,
|
|
79 |
.BR PATH ,
|
|
80 |
.BR ENV ,
|
|
81 |
or
|
|
82 |
.B BASH_ENV
|
|
83 |
.IP \(bu
|
|
84 |
specifying command names containing
|
|
85 |
.B /
|
|
86 |
.IP \(bu
|
|
87 |
specifying a file name containing a
|
|
88 |
.B /
|
|
89 |
as an argument to the
|
|
90 |
.B .
|
|
91 |
builtin command
|
|
92 |
.IP \(bu
|
|
93 |
Specifying a filename containing a slash as an argument to the
|
|
94 |
.B \-p
|
|
95 |
option to the
|
|
96 |
.B hash
|
|
97 |
builtin command
|
|
98 |
.IP \(bu
|
|
99 |
importing function definitions from the shell environment at startup
|
|
100 |
.IP \(bu
|
|
101 |
parsing the value of \fBSHELLOPTS\fP from the shell environment at startup
|
|
102 |
.IP \(bu
|
|
103 |
redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
|
|
104 |
.IP \(bu
|
|
105 |
using the
|
|
106 |
.B exec
|
|
107 |
builtin command to replace the shell with another command
|
|
108 |
.IP \(bu
|
|
109 |
adding or deleting builtin commands with the
|
|
110 |
.B \-f
|
|
111 |
and
|
|
112 |
.B \-d
|
|
113 |
options to the
|
|
114 |
.B enable
|
|
115 |
builtin command
|
|
116 |
.IP \(bu
|
|
117 |
Using the \fBenable\fP builtin command to enable disabled shell builtins
|
|
118 |
.IP \(bu
|
|
119 |
specifying the
|
|
120 |
.B \-p
|
|
121 |
option to the
|
|
122 |
.B command
|
|
123 |
builtin command
|
|
124 |
.IP \(bu
|
|
125 |
turning off restricted mode with
|
|
126 |
\fBset +r\fP or \fBset +o restricted\fP.
|
|
127 |
.PP
|
|
128 |
These restrictions are enforced after any startup files are read.
|
|
129 |
.PP
|
|
130 |
.ie \n(zY=1 When a command that is found to be a shell script is executed,
|
|
131 |
.el \{ When a command that is found to be a shell script is executed
|
|
132 |
(see
|
|
133 |
.SM
|
|
134 |
.B "COMMAND EXECUTION"
|
|
135 |
under bash(1)),
|
|
136 |
\}
|
|
137 |
.B rbash
|
|
138 |
turns off any restrictions in the shell spawned to execute the
|
|
139 |
script.
|
|
140 |
.\" end of rbash.1
|
|
141 |
.if \n(zY=1 .ig zY
|
|
142 |
.SH "SEE ALSO"
|
|
143 |
.PD 0
|
|
144 |
.TP
|
|
145 |
\fIBash Reference Manual\fP, Brian Fox and Chet Ramey
|
|
146 |
.TP
|
|
147 |
\fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey
|
|
148 |
.TP
|
|
149 |
\fIThe Gnu History Library\fP, Brian Fox and Chet Ramey
|
|
150 |
.TP
|
|
151 |
\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE
|
|
152 |
.TP
|
|
153 |
\fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1)
|
|
154 |
.TP
|
|
155 |
\fIemacs\fP(1), \fIvi\fP(1)
|
|
156 |
.TP
|
|
157 |
\fIreadline\fP(3)
|
|
158 |
.PD
|
|
159 |
.SH FILES
|
|
160 |
.PD 0
|
|
161 |
.TP
|
|
162 |
.FN /bin/bash
|
|
163 |
The \fBbash\fP executable
|
|
164 |
.TP
|
|
165 |
.FN /bin/rbash
|
|
166 |
The \fBrbash\fP executable
|
|
167 |
.TP
|
|
168 |
.FN /etc/profile
|
|
169 |
The systemwide initialization file, executed for login shells
|
|
170 |
.TP
|
|
171 |
.FN ~/.bash_profile
|
|
172 |
The personal initialization file, executed for login shells
|
|
173 |
.TP
|
|
174 |
.FN ~/.bashrc
|
|
175 |
The individual per-interactive-shell startup file
|
|
176 |
.TP
|
|
177 |
.FN ~/.bash_logout
|
|
178 |
The individual login shell cleanup file, executed when a login shell exits
|
|
179 |
.TP
|
|
180 |
.FN ~/.inputrc
|
|
181 |
Individual \fIreadline\fP initialization file
|
|
182 |
.PD
|
|
183 |
.SH AUTHORS
|
|
184 |
Brian Fox, Free Software Foundation
|
|
185 |
.br
|
|
186 |
[email protected]
|
|
187 |
.PP
|
|
188 |
Chet Ramey, Case Western Reserve University
|
|
189 |
.br
|
|
190 |
[email protected]
|
|
191 |
.SH BUG REPORTS
|
|
192 |
If you find a bug in
|
|
193 |
.B bash,
|
|
194 |
you should report it. But first, you should
|
|
195 |
make sure that it really is a bug, and that it appears in the latest
|
|
196 |
version of
|
|
197 |
.BR bash .
|
|
198 |
The latest version is always available from
|
|
199 |
\fIftp://ftp.gnu.org/pub/bash/\fP.
|
|
200 |
.PP
|
|
201 |
Once you have determined that a bug actually exists, use the
|
|
202 |
.I bashbug
|
|
203 |
command to submit a bug report.
|
|
204 |
If you have a fix, you are encouraged to mail that as well!
|
|
205 |
Suggestions and `philosophical' bug reports may be mailed
|
|
206 |
to \[email protected]\fP or posted to the Usenet
|
|
207 |
newsgroup
|
|
208 |
.BR gnu.bash.bug .
|
|
209 |
.PP
|
|
210 |
ALL bug reports should include:
|
|
211 |
.PP
|
|
212 |
.PD 0
|
|
213 |
.TP 20
|
|
214 |
The version number of \fBbash\fR
|
|
215 |
.TP
|
|
216 |
The hardware and operating system
|
|
217 |
.TP
|
|
218 |
The compiler used to compile
|
|
219 |
.TP
|
|
220 |
A description of the bug behaviour
|
|
221 |
.TP
|
|
222 |
A short script or `recipe' which exercises the bug
|
|
223 |
.PD
|
|
224 |
.PP
|
|
225 |
Comments and bug reports concerning
|
|
226 |
this manual page should be directed to
|
|
227 |
.IR [email protected] .
|
|
228 |
.\" Begin Sun update
|
|
229 |
.SH ATTRIBUTES
|
|
230 |
See
|
|
231 |
.BR attributes (5)
|
|
232 |
for descriptions of the following attributes:
|
|
233 |
.sp
|
|
234 |
.TS
|
|
235 |
box;
|
|
236 |
cbp-1 | cbp-1
|
|
237 |
l | l .
|
|
238 |
ATTRIBUTE TYPE ATTRIBUTE VALUE
|
|
239 |
=
|
11
|
240 |
Availability shell/bash
|
0
|
241 |
=
|
|
242 |
Interface Stability External
|
|
243 |
.TE
|
|
244 |
.PP
|
|
245 |
.SH NOTES
|
|
246 |
Source for bash is available on http://opensolaris.org.
|
|
247 |
.\" End Sun update
|