Debian Codegraph @

sandbox/sandbox.8

raw
1 .TH SANDBOX "8" "May 2010" "sandbox" "User Commands"
2 .SH NAME
3 sandbox \- Run cmd under an SELinux sandbox
4 .SH SYNOPSIS
5 .B sandbox
6 [\-C] [\-s] [ \-d DPI ] [\-l level ] [[\-M | \-X] \-H homedir \-T tempdir ] [\-I includefile ] [ \-W windowmanager ] [ \-w windowsize ] [[\-i file ]...] [ \-t type ] cmd
7
8 .br
9 .B sandbox
10 [\-C] [\-s] [ \-d DPI ] [\-l level ] [[\-M | \-X] \-H homedir \-T tempdir ] [\-I includefile ] [ \-W windowmanager ] [ \-w windowsize ] [[\-i file ]...] [ \-t type ] \-S
11 .br
12 .SH DESCRIPTION
13 .PP
14 Run the
15 .I cmd
16 application within a tightly confined SELinux domain. The default sandbox domain only allows applications the ability to read and write stdin, stdout and any other file descriptors handed to it. It is not allowed to open any other files. The \-M option will mount an alternate homedir and tmpdir to be used by the sandbox.
17
18 If you have the
19 .I policycoreutils-sandbox
20 package installed, you can use the \-X option and the \-M option.
21 .B sandbox \-X
22 allows you to run X applications within a sandbox. These applications will start up their own X Server and create a temporary home directory and /tmp. The default SELinux policy does not allow any capabilities or network access. It also prevents all access to the users other processes and files. Files specified on the command that are in the home directory or /tmp will be copied into the sandbox directories.
23
24 If directories are specified with \-H or \-T the directory will have its context modified with chcon(1) unless a level is specified with \-l. If the MLS/MCS security level is specified, the user is responsible to set the correct labels.
25 .PP
26 .TP
27 \fB\-h\ \fB\-\-help\fR
28 display usage message
29 .TP
30 \fB\-H\ \fB\-\-homedir\fR
31 Use alternate homedir to mount over your home directory. Defaults to temporary. Requires \-X or \-M.
32 .TP
33 \fB\-i\fR \fB\-\-include\fR
34 Copy this file into the appropriate temporary sandbox directory. Command can be repeated.
35 .TP
36 \fB\-I\fR \fB\-\-includefile\fR
37 Copy all files listed in inputfile into the
38 appropriate temporary sandbox directories.
39 .TP
40 \fB\-l\fR \fB\-\-level\fR
41 Specify the MLS/MCS Security Level to run the sandbox with. Defaults to random.
42 .TP
43 \fB\-M\fR \fB\-\-mount\fR
44 Create a Sandbox with temporary files for $HOME and /tmp.
45 .TP
46 \fB\-s\fR \fB\-\-shred\fR
47 Shred temporary files created in $HOME and /tmp, before deleting.
48 .TP
49 \fB\-t\fR \fB\-\-type\fR
50 Use alternate sandbox type, defaults to sandbox_t or sandbox_x_t for \-X.
51
52 \fBExamples:\fR
53 .br
54 sandbox_t \- No X, No Network Access, No Open, read/write on passed in file descriptors.
55 .br
56 sandbox_min_t \- No Network Access
57 .br
58 sandbox_x_t \- Ports for X applications to run locally
59 .br
60 sandbox_web_t \- Ports required for web browsing
61 .br
62 sandbox_net_t \- Network ports (for server software)
63 .br
64 sandbox_net_client_t \- All network ports
65
66 .TP
67 \fB\-T\fR \fB\-\-tmpdir\fR
68 Use alternate temporary directory to mount on /tmp. Defaults to tmpfs. Requires \-X or \-M.
69 .TP
70 \fB\-S\fR \fB\-\-session\fR
71 Run a full desktop session, Requires level, and home and tmpdir.
72 .TP
73 \fB\-w\fR \fB\-\-windowsize\fR
74
75 Specifies the windowsize when creating an X based Sandbox. The default windowsize is 1000x700.
76 .TP
77 \fB\-W\fR \fB\-\-windowmanager\fR
78 Select alternative window manager to run within
79 .B sandbox \-X.
80 Default to /usr/bin/openbox.
81 .TP
82 \fB\-X\fR
83 Create an X based Sandbox for gui apps, temporary files for
84 $HOME and /tmp, secondary Xserver, defaults to sandbox_x_t
85 .TP
86 \fB\-d\fR \fB\-\-dpi\fR
87 Set the DPI value for the sandbox X Server. Defaults to the current X Sever DPI.
88 .TP
89 \fB\-C\fR \fB\-\-capabilities\fR Use capabilities within the
90 sandbox. By default applications executed within the sandbox will not
91 be allowed to use capabilities (setuid apps), with the \-C flag, you
92 can use programs requiring capabilities.
93 .PP
94 .SH "SEE ALSO"
95 .TP
96 runcon(1), seunshare(8), selinux(8)
97 .PP
98
99 .SH AUTHOR
100 This manual page was written by
101 .I Dan Walsh <[email protected]>
102 and
103 .I Thomas Liu <[email protected]>