1tftpd_selinux(8) SELinux Policy tftpd tftpd_selinux(8)
2
3
4
6 tftpd_selinux - Security Enhanced Linux Policy for the tftpd processes
7
9 Security-Enhanced Linux secures the tftpd processes via flexible manda‐
10 tory access control.
11
12 The tftpd processes execute with the tftpd_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep tftpd_t
19
20
21
23 The tftpd_t SELinux type can be entered via the tftpd_exec_t file type.
24
25 The default entrypoint paths for the tftpd_t domain are the following:
26
27 /usr/sbin/atftpd, /usr/sbin/in.tftpd
28
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 tftpd policy is very flexible allowing users to setup their tftpd pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for tftpd:
40
41 tftpd_t
42
43 Note: semanage permissive -a tftpd_t can be used to make the process
44 type tftpd_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. tftpd
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run tftpd with the tightest access possible.
53
54
55
56 If you want to allow tftp to read from a CIFS store for public file
57 transfer services, you must turn on the tftp_use_cifs boolean. Disabled
58 by default.
59
60 setsebool -P tftp_use_cifs 1
61
62
63
64 If you want to allow tftp to read from a NFS store for public file
65 transfer services, you must turn on the tftp_use_nfs boolean. Disabled
66 by default.
67
68 setsebool -P tftp_use_nfs 1
69
70
71
72 If you want to allow all daemons to write corefiles to /, you must turn
73 on the allow_daemons_dump_core boolean. Disabled by default.
74
75 setsebool -P allow_daemons_dump_core 1
76
77
78
79 If you want to allow all daemons to use tcp wrappers, you must turn on
80 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
81
82 setsebool -P allow_daemons_use_tcp_wrapper 1
83
84
85
86 If you want to allow all daemons the ability to read/write terminals,
87 you must turn on the allow_daemons_use_tty boolean. Disabled by
88 default.
89
90 setsebool -P allow_daemons_use_tty 1
91
92
93
94 If you want to allow all domains to use other domains file descriptors,
95 you must turn on the allow_domain_fd_use boolean. Enabled by default.
96
97 setsebool -P allow_domain_fd_use 1
98
99
100
101 If you want to allow confined applications to run with kerberos, you
102 must turn on the allow_kerberos boolean. Enabled by default.
103
104 setsebool -P allow_kerberos 1
105
106
107
108 If you want to allow sysadm to debug or ptrace all processes, you must
109 turn on the allow_ptrace boolean. Disabled by default.
110
111 setsebool -P allow_ptrace 1
112
113
114
115 If you want to allow system to run with NIS, you must turn on the
116 allow_ypbind boolean. Disabled by default.
117
118 setsebool -P allow_ypbind 1
119
120
121
122 If you want to enable cluster mode for daemons, you must turn on the
123 daemons_enable_cluster_mode boolean. Disabled by default.
124
125 setsebool -P daemons_enable_cluster_mode 1
126
127
128
129 If you want to allow all domains to have the kernel load modules, you
130 must turn on the domain_kernel_load_modules boolean. Disabled by
131 default.
132
133 setsebool -P domain_kernel_load_modules 1
134
135
136
137 If you want to allow all domains to execute in fips_mode, you must turn
138 on the fips_mode boolean. Enabled by default.
139
140 setsebool -P fips_mode 1
141
142
143
144 If you want to enable reading of urandom for all domains, you must turn
145 on the global_ssp boolean. Disabled by default.
146
147 setsebool -P global_ssp 1
148
149
150
151 If you want to enable support for upstart as the init program, you must
152 turn on the init_upstart boolean. Enabled by default.
153
154 setsebool -P init_upstart 1
155
156
157
158 If you want to allow confined applications to use nscd shared memory,
159 you must turn on the nscd_use_shm boolean. Enabled by default.
160
161 setsebool -P nscd_use_shm 1
162
163
164
166 SELinux defines port types to represent TCP and UDP ports.
167
168 You can see the types associated with a port by using the following
169 command:
170
171 semanage port -l
172
173
174 Policy governs the access confined processes have to these ports.
175 SELinux tftpd policy is very flexible allowing users to setup their
176 tftpd processes in as secure a method as possible.
177
178 The following port types are defined for tftpd:
179
180
181 tftp_port_t
182
183
184
185 Default Defined Ports:
186 udp 69
187
189 The SELinux process type tftpd_t can manage files labeled with the fol‐
190 lowing file types. The paths listed are the default paths for these
191 file types. Note the processes UID still need to have DAC permissions.
192
193 cifs_t
194
195
196 cluster_conf_t
197
198 /etc/cluster(/.*)?
199
200 cluster_var_lib_t
201
202 /var/lib(64)?/openais(/.*)?
203 /var/lib(64)?/pengine(/.*)?
204 /var/lib(64)?/corosync(/.*)?
205 /usr/lib(64)?/heartbeat(/.*)?
206 /var/lib(64)?/heartbeat(/.*)?
207 /var/lib(64)?/pacemaker(/.*)?
208 /var/lib/cluster(/.*)?
209
210 cluster_var_run_t
211
212 /var/run/crm(/.*)?
213 /var/run/cman_.*
214 /var/run/rsctmp(/.*)?
215 /var/run/aisexec.*
216 /var/run/heartbeat(/.*)?
217 /var/run/cpglockd.pid
218 /var/run/corosync.pid
219 /var/run/rgmanager.pid
220 /var/run/cluster/rgmanager.sk
221
222 initrc_tmp_t
223
224
225 mnt_t
226
227 /mnt(/[^/]*)
228 /mnt(/[^/]*)?
229 /rhev(/[^/]*)?
230 /media(/[^/]*)
231 /media(/[^/]*)?
232 /etc/rhgb(/.*)?
233 /media/.hal-.*
234 /net
235 /afs
236 /rhev
237 /misc
238
239 nfs_t
240
241
242 public_content_rw_t
243
244 /var/spool/abrt-upload(/.*)?
245
246 root_t
247
248 /
249 /initrd
250
251 tftpd_var_run_t
252
253
254 tftpdir_rw_t
255
256 /var/lib/tftpboot(/.*)?
257
258 tmp_t
259
260 /tmp
261 /usr/tmp
262 /var/tmp
263 /tmp-inst
264 /var/tmp-inst
265 /var/tmp/vi.recover
266
267
269 SELinux requires files to have an extended attribute to define the file
270 type.
271
272 You can see the context of a file using the -Z option to ls
273
274 Policy governs the access confined processes have to these files.
275 SELinux tftpd policy is very flexible allowing users to setup their
276 tftpd processes in as secure a method as possible.
277
278 STANDARD FILE CONTEXT
279
280 SELinux defines the file context types for the tftpd, if you wanted to
281 store files with these types in a diffent paths, you need to execute
282 the semanage command to sepecify alternate labeling and then use
283 restorecon to put the labels on disk.
284
285 semanage fcontext -a -t tftpdir_t '/srv/mytftpd_content(/.*)?'
286 restorecon -R -v /srv/mytftpd_content
287
288 Note: SELinux often uses regular expressions to specify labels that
289 match multiple files.
290
291 The following file types are defined for tftpd:
292
293
294
295 tftpd_exec_t
296
297 - Set files with the tftpd_exec_t type, if you want to transition an
298 executable to the tftpd_t domain.
299
300
301 Paths:
302 /usr/sbin/atftpd, /usr/sbin/in.tftpd
303
304
305 tftpd_var_run_t
306
307 - Set files with the tftpd_var_run_t type, if you want to store the
308 tftpd files under the /run or /var/run directory.
309
310
311
312 tftpdir_rw_t
313
314 - Set files with the tftpdir_rw_t type, if you want to treat the files
315 as tftpdir read/write content.
316
317
318
319 tftpdir_t
320
321 - Set files with the tftpdir_t type, if you want to treat the files as
322 tftpdir data.
323
324
325 Paths:
326 /tftpboot/.*, /tftpboot
327
328
329 Note: File context can be temporarily modified with the chcon command.
330 If you want to permanently change the file context you need to use the
331 semanage fcontext command. This will modify the SELinux labeling data‐
332 base. You will need to use restorecon to apply the labels.
333
334
336 If you want to share files with multiple domains (Apache, FTP, rsync,
337 Samba), you can set a file context of public_content_t and public_con‐
338 tent_rw_t. These context allow any of the above domains to read the
339 content. If you want a particular domain to write to the public_con‐
340 tent_rw_t domain, you must set the appropriate boolean.
341
342 Allow tftpd servers to read the /var/tftpd directory by adding the pub‐
343 lic_content_t file type to the directory and by restoring the file
344 type.
345
346 semanage fcontext -a -t public_content_t "/var/tftpd(/.*)?"
347 restorecon -F -R -v /var/tftpd
348
349 Allow tftpd servers to read and write /var/tftpd/incoming by adding the
350 public_content_rw_t type to the directory and by restoring the file
351 type. You also need to turn on the tftpd_anon_write boolean.
352
353 semanage fcontext -a -t public_content_rw_t "/var/tftpd/incoming(/.*)?"
354 restorecon -F -R -v /var/tftpd/incoming
355 setsebool -P tftpd_anon_write 1
356
357
358 If you want to allow tftp to modify public files used for public file
359 transfer services., you must turn on the tftp_anon_write boolean.
360
361 setsebool -P tftp_anon_write 1
362
363
365 semanage fcontext can also be used to manipulate default file context
366 mappings.
367
368 semanage permissive can also be used to manipulate whether or not a
369 process type is permissive.
370
371 semanage module can also be used to enable/disable/install/remove pol‐
372 icy modules.
373
374 semanage port can also be used to manipulate the port definitions
375
376 semanage boolean can also be used to manipulate the booleans
377
378
379 system-config-selinux is a GUI tool available to customize SELinux pol‐
380 icy settings.
381
382
384 This manual page was auto-generated using sepolicy manpage .
385
386
388 selinux(8), tftpd(8), semanage(8), restorecon(8), chcon(1) , setse‐
389 bool(8)
390
391
392
393tftpd 15-06-03 tftpd_selinux(8)