1tor_selinux(8)                SELinux Policy tor                tor_selinux(8)
2
3
4

NAME

6       tor_selinux - Security Enhanced Linux Policy for the tor processes
7

DESCRIPTION

9       Security-Enhanced  Linux  secures the tor processes via flexible manda‐
10       tory access control.
11
12       The tor processes execute with the tor_t SELinux type. You can check if
13       you  have  these processes running by executing the ps command with the
14       -Z qualifier.
15
16       For example:
17
18       ps -eZ | grep tor_t
19
20
21

ENTRYPOINTS

23       The tor_t SELinux type can be entered via the tor_exec_t file type.
24
25       The default entrypoint paths for the tor_t domain are the following:
26
27       /usr/bin/tor, /usr/sbin/tor
28

PROCESS TYPES

30       SELinux defines process types (domains) for each process running on the
31       system
32
33       You can see the context of a process using the -Z option to ps
34
35       Policy  governs  the  access confined processes have to files.  SELinux
36       tor policy is very flexible allowing users to setup their tor processes
37       in as secure a method as possible.
38
39       The following process types are defined for tor:
40
41       tor_t
42
43       Note: semanage permissive -a tor_t can be used to make the process type
44       tor_t permissive. SELinux does not deny access  to  permissive  process
45       types, but the AVC (SELinux denials) messages are still generated.
46
47

BOOLEANS

49       SELinux  policy  is  customizable  based on least access required.  tor
50       policy is extremely flexible and has several booleans that allow you to
51       manipulate the policy and run tor with the tightest access possible.
52
53
54
55       If  you want to determine whether tor can bind tcp sockets to all unre‐
56       served ports, you must turn on the tor_bind_all_unreserved_ports  bool‐
57       ean. Disabled by default.
58
59       setsebool -P tor_bind_all_unreserved_ports 1
60
61
62
63       If  you  want  to  allow  tor  to  act as a relay, you must turn on the
64       tor_can_network_relay boolean. Disabled by default.
65
66       setsebool -P tor_can_network_relay 1
67
68
69
70       If you want to allow tor to run onion services, you must  turn  on  the
71       tor_can_onion_services boolean. Disabled by default.
72
73       setsebool -P tor_can_onion_services 1
74
75
76
77       If you want to allow users to resolve user passwd entries directly from
78       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
79       gin_nsswitch_use_ldap boolean. Disabled by default.
80
81       setsebool -P authlogin_nsswitch_use_ldap 1
82
83
84
85       If you want to allow all domains to execute in fips_mode, you must turn
86       on the fips_mode boolean. Enabled by default.
87
88       setsebool -P fips_mode 1
89
90
91
92       If you want to allow confined applications to run  with  kerberos,  you
93       must turn on the kerberos_enabled boolean. Enabled by default.
94
95       setsebool -P kerberos_enabled 1
96
97
98
99       If  you  want  to  allow  system  to run with NIS, you must turn on the
100       nis_enabled boolean. Disabled by default.
101
102       setsebool -P nis_enabled 1
103
104
105
106       If you want to allow confined applications to use nscd  shared  memory,
107       you must turn on the nscd_use_shm boolean. Enabled by default.
108
109       setsebool -P nscd_use_shm 1
110
111
112

PORT TYPES

114       SELinux defines port types to represent TCP and UDP ports.
115
116       You  can  see  the  types associated with a port by using the following
117       command:
118
119       semanage port -l
120
121
122       Policy governs the access  confined  processes  have  to  these  ports.
123       SELinux  tor  policy is very flexible allowing users to setup their tor
124       processes in as secure a method as possible.
125
126       The following port types are defined for tor:
127
128
129       tor_port_t
130
131
132
133       Default Defined Ports:
134                 tcp 6969,9001,9030,9050,9051,9150
135

MANAGED FILES

137       The SELinux process type tor_t can manage files labeled with  the  fol‐
138       lowing  file  types.   The paths listed are the default paths for these
139       file types.  Note the processes UID still need to have DAC permissions.
140
141       cluster_conf_t
142
143            /etc/cluster(/.*)?
144
145       cluster_var_lib_t
146
147            /var/lib/pcsd(/.*)?
148            /var/lib/cluster(/.*)?
149            /var/lib/openais(/.*)?
150            /var/lib/pengine(/.*)?
151            /var/lib/corosync(/.*)?
152            /usr/lib/heartbeat(/.*)?
153            /var/lib/heartbeat(/.*)?
154            /var/lib/pacemaker(/.*)?
155
156       cluster_var_run_t
157
158            /var/run/crm(/.*)?
159            /var/run/cman_.*
160            /var/run/rsctmp(/.*)?
161            /var/run/aisexec.*
162            /var/run/heartbeat(/.*)?
163            /var/run/corosync-qnetd(/.*)?
164            /var/run/corosync-qdevice(/.*)?
165            /var/run/corosync.pid
166            /var/run/cpglockd.pid
167            /var/run/rgmanager.pid
168            /var/run/cluster/rgmanager.sk
169
170       root_t
171
172            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
173            /
174            /initrd
175
176       tor_var_lib_t
177
178            /var/lib/tor(/.*)?
179            /var/lib/tor-data(/.*)?
180
181       tor_var_run_t
182
183            /var/run/tor(/.*)?
184
185

FILE CONTEXTS

187       SELinux requires files to have an extended attribute to define the file
188       type.
189
190       You can see the context of a file using the -Z option to ls
191
192       Policy  governs  the  access  confined  processes  have to these files.
193       SELinux tor policy is very flexible allowing users to setup  their  tor
194       processes in as secure a method as possible.
195
196       EQUIVALENCE DIRECTORIES
197
198
199       tor policy stores data with multiple different file context types under
200       the /var/lib/tor directory.  If you would like to store the data  in  a
201       different  directory  you  can  use  the  semanage command to create an
202       equivalence mapping.  If you wanted to store this data under  the  /srv
203       dirctory you would execute the following command:
204
205       semanage fcontext -a -e /var/lib/tor /srv/tor
206       restorecon -R -v /srv/tor
207
208       STANDARD FILE CONTEXT
209
210       SELinux  defines  the  file context types for the tor, if you wanted to
211       store files with these types in a diffent paths, you  need  to  execute
212       the  semanage  command  to  sepecify  alternate  labeling  and then use
213       restorecon to put the labels on disk.
214
215       semanage fcontext -a -t tor_unit_file_t '/srv/mytor_content(/.*)?'
216       restorecon -R -v /srv/mytor_content
217
218       Note: SELinux often uses regular expressions  to  specify  labels  that
219       match multiple files.
220
221       The following file types are defined for tor:
222
223
224
225       tor_etc_t
226
227       -  Set files with the tor_etc_t type, if you want to store tor files in
228       the /etc directories.
229
230
231
232       tor_exec_t
233
234       - Set files with the tor_exec_t type, if you want to transition an exe‐
235       cutable to the tor_t domain.
236
237
238       Paths:
239            /usr/bin/tor, /usr/sbin/tor
240
241
242       tor_initrc_exec_t
243
244       -  Set files with the tor_initrc_exec_t type, if you want to transition
245       an executable to the tor_initrc_t domain.
246
247
248
249       tor_unit_file_t
250
251       - Set files with the tor_unit_file_t type, if you  want  to  treat  the
252       files as tor unit content.
253
254
255
256       tor_var_lib_t
257
258       -  Set  files with the tor_var_lib_t type, if you want to store the tor
259       files under the /var/lib directory.
260
261
262       Paths:
263            /var/lib/tor(/.*)?, /var/lib/tor-data(/.*)?
264
265
266       tor_var_log_t
267
268       - Set files with the tor_var_log_t type, if you want to treat the  data
269       as tor var log data, usually stored under the /var/log directory.
270
271
272
273       tor_var_run_t
274
275       -  Set  files with the tor_var_run_t type, if you want to store the tor
276       files under the /run or /var/run directory.
277
278
279
280       Note: File context can be temporarily modified with the chcon  command.
281       If  you want to permanently change the file context you need to use the
282       semanage fcontext command.  This will modify the SELinux labeling data‐
283       base.  You will need to use restorecon to apply the labels.
284
285

COMMANDS

287       semanage  fcontext  can also be used to manipulate default file context
288       mappings.
289
290       semanage permissive can also be used to manipulate  whether  or  not  a
291       process type is permissive.
292
293       semanage  module can also be used to enable/disable/install/remove pol‐
294       icy modules.
295
296       semanage port can also be used to manipulate the port definitions
297
298       semanage boolean can also be used to manipulate the booleans
299
300
301       system-config-selinux is a GUI tool available to customize SELinux pol‐
302       icy settings.
303
304

AUTHOR

306       This manual page was auto-generated using sepolicy manpage .
307
308

SEE ALSO

310       selinux(8),  tor(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
311       setsebool(8)
312
313
314
315tor                                19-10-08                     tor_selinux(8)
Impressum