1tftpd_selinux(8)             SELinux Policy tftpd             tftpd_selinux(8)
2
3
4

NAME

6       tftpd_selinux - Security Enhanced Linux Policy for the tftpd processes
7

DESCRIPTION

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

ENTRYPOINTS

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

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       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

BOOLEANS

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 and write  files  in  the  user  home
57       directories,  you  must  turn on the tftp_home_dir boolean. Disabled by
58       default.
59
60       setsebool -P tftp_home_dir 1
61
62
63
64       If you want to allow users to resolve user passwd entries directly from
65       ldap  rather  then  using  a  sssd server, you must turn on the authlo‐
66       gin_nsswitch_use_ldap boolean. Disabled by default.
67
68       setsebool -P authlogin_nsswitch_use_ldap 1
69
70
71
72       If you want to allow all daemons to write corefiles to /, you must turn
73       on the daemons_dump_core boolean. Disabled by default.
74
75       setsebool -P daemons_dump_core 1
76
77
78
79       If  you  want  to enable cluster mode for daemons, you must turn on the
80       daemons_enable_cluster_mode boolean. Enabled by default.
81
82       setsebool -P daemons_enable_cluster_mode 1
83
84
85
86       If you want to allow all daemons to use tcp wrappers, you must turn  on
87       the daemons_use_tcp_wrapper boolean. Disabled by default.
88
89       setsebool -P daemons_use_tcp_wrapper 1
90
91
92
93       If  you  want to allow all daemons the ability to read/write terminals,
94       you must turn on the daemons_use_tty boolean. Disabled by default.
95
96       setsebool -P daemons_use_tty 1
97
98
99
100       If you want to deny any process from ptracing or  debugging  any  other
101       processes,  you  must  turn  on  the  deny_ptrace  boolean.  Enabled by
102       default.
103
104       setsebool -P deny_ptrace 1
105
106
107
108       If you want to allow any process  to  mmap  any  file  on  system  with
109       attribute  file_type,  you must turn on the domain_can_mmap_files bool‐
110       ean. Enabled by default.
111
112       setsebool -P domain_can_mmap_files 1
113
114
115
116       If you want to allow all domains write to kmsg_device, while kernel  is
117       executed  with  systemd.log_target=kmsg parameter, you must turn on the
118       domain_can_write_kmsg boolean. Disabled by default.
119
120       setsebool -P domain_can_write_kmsg 1
121
122
123
124       If you want to allow all domains to use other domains file descriptors,
125       you must turn on the domain_fd_use boolean. Enabled by default.
126
127       setsebool -P domain_fd_use 1
128
129
130
131       If  you  want to allow all domains to have the kernel load modules, you
132       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
133       default.
134
135       setsebool -P domain_kernel_load_modules 1
136
137
138
139       If you want to allow all domains to execute in fips_mode, you must turn
140       on the fips_mode boolean. Enabled by default.
141
142       setsebool -P fips_mode 1
143
144
145
146       If you want to enable reading of urandom for all domains, you must turn
147       on the global_ssp boolean. Disabled by default.
148
149       setsebool -P global_ssp 1
150
151
152
153       If  you  want  to allow confined applications to run with kerberos, you
154       must turn on the kerberos_enabled boolean. Enabled by default.
155
156       setsebool -P kerberos_enabled 1
157
158
159
160       If you want to allow system to run with  NIS,  you  must  turn  on  the
161       nis_enabled boolean. Disabled by default.
162
163       setsebool -P nis_enabled 1
164
165
166
167       If  you  want to allow confined applications to use nscd shared memory,
168       you must turn on the nscd_use_shm boolean. Disabled by default.
169
170       setsebool -P nscd_use_shm 1
171
172
173
174       If you want to support ecryptfs home directories, you must turn on  the
175       use_ecryptfs_home_dirs boolean. Disabled by default.
176
177       setsebool -P use_ecryptfs_home_dirs 1
178
179
180
181       If  you  want  to support fusefs home directories, you must turn on the
182       use_fusefs_home_dirs boolean. Disabled by default.
183
184       setsebool -P use_fusefs_home_dirs 1
185
186
187
188       If you want to support NFS home  directories,  you  must  turn  on  the
189       use_nfs_home_dirs boolean. Disabled by default.
190
191       setsebool -P use_nfs_home_dirs 1
192
193
194
195       If  you  want  to  support SAMBA home directories, you must turn on the
196       use_samba_home_dirs boolean. Disabled by default.
197
198       setsebool -P use_samba_home_dirs 1
199
200
201

PORT TYPES

203       SELinux defines port types to represent TCP and UDP ports.
204
205       You can see the types associated with a port  by  using  the  following
206       command:
207
208       semanage port -l
209
210
211       Policy  governs  the  access  confined  processes  have to these ports.
212       SELinux tftpd policy is very flexible allowing  users  to  setup  their
213       tftpd processes in as secure a method as possible.
214
215       The following port types are defined for tftpd:
216
217
218       tftp_port_t
219
220
221
222       Default Defined Ports:
223                 udp 69
224

MANAGED FILES

226       The SELinux process type tftpd_t can manage files labeled with the fol‐
227       lowing file types.  The paths listed are the default  paths  for  these
228       file types.  Note the processes UID still need to have DAC permissions.
229
230       cifs_t
231
232
233       cluster_conf_t
234
235            /etc/cluster(/.*)?
236
237       cluster_var_lib_t
238
239            /var/lib/pcsd(/.*)?
240            /var/lib/cluster(/.*)?
241            /var/lib/openais(/.*)?
242            /var/lib/pengine(/.*)?
243            /var/lib/corosync(/.*)?
244            /usr/lib/heartbeat(/.*)?
245            /var/lib/heartbeat(/.*)?
246            /var/lib/pacemaker(/.*)?
247
248       cluster_var_run_t
249
250            /var/run/crm(/.*)?
251            /var/run/cman_.*
252            /var/run/rsctmp(/.*)?
253            /var/run/aisexec.*
254            /var/run/heartbeat(/.*)?
255            /var/run/corosync-qnetd(/.*)?
256            /var/run/corosync-qdevice(/.*)?
257            /var/run/cpglockd.pid
258            /var/run/corosync.pid
259            /var/run/rgmanager.pid
260            /var/run/cluster/rgmanager.sk
261
262       ecryptfs_t
263
264            /home/[^/]+/.Private(/.*)?
265            /home/[^/]+/.ecryptfs(/.*)?
266
267       fusefs_t
268
269            /var/run/user/[^/]*/gvfs
270
271       nfs_t
272
273
274       public_content_rw_t
275
276            /var/spool/abrt-upload(/.*)?
277
278       root_t
279
280            /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
281            /
282            /initrd
283
284       tftpd_var_run_t
285
286
287       tftpdir_rw_t
288
289            /var/lib/tftpboot(/.*)?
290
291       user_home_type
292
293            all user home files
294
295

FILE CONTEXTS

297       SELinux requires files to have an extended attribute to define the file
298       type.
299
300       You can see the context of a file using the -Z option to ls
301
302       Policy governs the access  confined  processes  have  to  these  files.
303       SELinux  tftpd  policy  is  very flexible allowing users to setup their
304       tftpd processes in as secure a method as possible.
305
306       STANDARD FILE CONTEXT
307
308       SELinux defines the file context types for the tftpd, if you wanted  to
309       store  files  with  these types in a diffent paths, you need to execute
310       the semanage command  to  sepecify  alternate  labeling  and  then  use
311       restorecon to put the labels on disk.
312
313       semanage fcontext -a -t tftpdir_t '/srv/mytftpd_content(/.*)?'
314       restorecon -R -v /srv/mytftpd_content
315
316       Note:  SELinux  often  uses  regular expressions to specify labels that
317       match multiple files.
318
319       The following file types are defined for tftpd:
320
321
322
323       tftpd_etc_t
324
325       - Set files with the tftpd_etc_t type, if you want to store tftpd files
326       in the /etc directories.
327
328
329
330       tftpd_exec_t
331
332       -  Set  files  with the tftpd_exec_t type, if you want to transition an
333       executable to the tftpd_t domain.
334
335
336       Paths:
337            /usr/sbin/atftpd, /usr/sbin/in.tftpd
338
339
340       tftpd_var_run_t
341
342       - Set files with the tftpd_var_run_t type, if you  want  to  store  the
343       tftpd files under the /run or /var/run directory.
344
345
346
347       tftpdir_rw_t
348
349       -  Set files with the tftpdir_rw_t type, if you want to treat the files
350       as tftpdir read/write content.
351
352
353
354       tftpdir_t
355
356       - Set files with the tftpdir_t type, if you want to treat the files  as
357       tftpdir data.
358
359
360       Paths:
361            /tftpboot/.*, /tftpboot
362
363
364       Note:  File context can be temporarily modified with the chcon command.
365       If you want to permanently change the file context you need to use  the
366       semanage fcontext command.  This will modify the SELinux labeling data‐
367       base.  You will need to use restorecon to apply the labels.
368
369

SHARING FILES

371       If you want to share files with multiple domains (Apache,  FTP,  rsync,
372       Samba),  you can set a file context of public_content_t and public_con‐
373       tent_rw_t.  These context allow any of the above domains  to  read  the
374       content.   If  you want a particular domain to write to the public_con‐
375       tent_rw_t domain, you must set the appropriate boolean.
376
377       Allow tftpd servers to read the /var/tftpd directory by adding the pub‐
378       lic_content_t  file  type  to  the  directory and by restoring the file
379       type.
380
381       semanage fcontext -a -t public_content_t "/var/tftpd(/.*)?"
382       restorecon -F -R -v /var/tftpd
383
384       Allow tftpd servers to read and write /var/tftpd/incoming by adding the
385       public_content_rw_t  type  to  the  directory and by restoring the file
386       type.  You also need to turn on the tftpd_anon_write boolean.
387
388       semanage fcontext -a -t public_content_rw_t "/var/tftpd/incoming(/.*)?"
389       restorecon -F -R -v /var/tftpd/incoming
390       setsebool -P tftpd_anon_write 1
391
392
393       If you want to allow tftp to modify public files used for  public  file
394       transfer services., you must turn on the tftp_anon_write boolean.
395
396       setsebool -P tftp_anon_write 1
397
398

COMMANDS

400       semanage  fcontext  can also be used to manipulate default file context
401       mappings.
402
403       semanage permissive can also be used to manipulate  whether  or  not  a
404       process type is permissive.
405
406       semanage  module can also be used to enable/disable/install/remove pol‐
407       icy modules.
408
409       semanage port can also be used to manipulate the port definitions
410
411       semanage boolean can also be used to manipulate the booleans
412
413
414       system-config-selinux is a GUI tool available to customize SELinux pol‐
415       icy settings.
416
417

AUTHOR

419       This manual page was auto-generated using sepolicy manpage .
420
421

SEE ALSO

423       selinux(8), tftpd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
424       , setsebool(8)
425
426
427
428tftpd                              19-04-25                   tftpd_selinux(8)
Impressum