1mpd_selinux(8) SELinux Policy mpd mpd_selinux(8)
2
3
4
6 mpd_selinux - Security Enhanced Linux Policy for the mpd processes
7
9 Security-Enhanced Linux secures the mpd processes via flexible manda‐
10 tory access control.
11
12 The mpd processes execute with the mpd_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 mpd_t
19
20
21
23 The mpd_t SELinux type can be entered via the mpd_exec_t file type.
24
25 The default entrypoint paths for the mpd_t domain are the following:
26
27 /usr/bin/mpd
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 mpd policy is very flexible allowing users to setup their mpd processes
37 in as secure a method as possible.
38
39 The following process types are defined for mpd:
40
41 mpd_t
42
43 Note: semanage permissive -a mpd_t can be used to make the process type
44 mpd_t permissive. SELinux does not deny access to permissive process
45 types, but the AVC (SELinux denials) messages are still generated.
46
47
49 SELinux policy is customizable based on least access required. mpd
50 policy is extremely flexible and has several booleans that allow you to
51 manipulate the policy and run mpd with the tightest access possible.
52
53
54
55 If you want to determine whether mpd can traverse user home directo‐
56 ries, you must turn on the mpd_enable_homedirs boolean. Disabled by
57 default.
58
59 setsebool -P mpd_enable_homedirs 1
60
61
62
63 If you want to determine whether mpd can use cifs file systems, you
64 must turn on the mpd_use_cifs boolean. Disabled by default.
65
66 setsebool -P mpd_use_cifs 1
67
68
69
70 If you want to determine whether mpd can use nfs file systems, you must
71 turn on the mpd_use_nfs boolean. Disabled by default.
72
73 setsebool -P mpd_use_nfs 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 daemons to write corefiles to /, you must turn
86 on the daemons_dump_core boolean. Disabled by default.
87
88 setsebool -P daemons_dump_core 1
89
90
91
92 If you want to enable cluster mode for daemons, you must turn on the
93 daemons_enable_cluster_mode boolean. Enabled by default.
94
95 setsebool -P daemons_enable_cluster_mode 1
96
97
98
99 If you want to allow all daemons to use tcp wrappers, you must turn on
100 the daemons_use_tcp_wrapper boolean. Disabled by default.
101
102 setsebool -P daemons_use_tcp_wrapper 1
103
104
105
106 If you want to allow all daemons the ability to read/write terminals,
107 you must turn on the daemons_use_tty boolean. Disabled by default.
108
109 setsebool -P daemons_use_tty 1
110
111
112
113 If you want to deny any process from ptracing or debugging any other
114 processes, you must turn on the deny_ptrace boolean. Enabled by
115 default.
116
117 setsebool -P deny_ptrace 1
118
119
120
121 If you want to allow any process to mmap any file on system with
122 attribute file_type, you must turn on the domain_can_mmap_files bool‐
123 ean. Enabled by default.
124
125 setsebool -P domain_can_mmap_files 1
126
127
128
129 If you want to allow all domains write to kmsg_device, while kernel is
130 executed with systemd.log_target=kmsg parameter, you must turn on the
131 domain_can_write_kmsg boolean. Disabled by default.
132
133 setsebool -P domain_can_write_kmsg 1
134
135
136
137 If you want to allow all domains to use other domains file descriptors,
138 you must turn on the domain_fd_use boolean. Enabled by default.
139
140 setsebool -P domain_fd_use 1
141
142
143
144 If you want to allow all domains to have the kernel load modules, you
145 must turn on the domain_kernel_load_modules boolean. Disabled by
146 default.
147
148 setsebool -P domain_kernel_load_modules 1
149
150
151
152 If you want to allow all domains to execute in fips_mode, you must turn
153 on the fips_mode boolean. Enabled by default.
154
155 setsebool -P fips_mode 1
156
157
158
159 If you want to enable reading of urandom for all domains, you must turn
160 on the global_ssp boolean. Disabled by default.
161
162 setsebool -P global_ssp 1
163
164
165
166 If you want to allow confined applications to run with kerberos, you
167 must turn on the kerberos_enabled boolean. Enabled by default.
168
169 setsebool -P kerberos_enabled 1
170
171
172
173 If you want to allow system to run with NIS, you must turn on the
174 nis_enabled boolean. Disabled by default.
175
176 setsebool -P nis_enabled 1
177
178
179
180 If you want to allow confined applications to use nscd shared memory,
181 you must turn on the nscd_use_shm boolean. Disabled by default.
182
183 setsebool -P nscd_use_shm 1
184
185
186
187 If you want to support ecryptfs home directories, you must turn on the
188 use_ecryptfs_home_dirs boolean. Disabled by default.
189
190 setsebool -P use_ecryptfs_home_dirs 1
191
192
193
194 If you want to support fusefs home directories, you must turn on the
195 use_fusefs_home_dirs boolean. Disabled by default.
196
197 setsebool -P use_fusefs_home_dirs 1
198
199
200
201 If you want to support NFS home directories, you must turn on the
202 use_nfs_home_dirs boolean. Disabled by default.
203
204 setsebool -P use_nfs_home_dirs 1
205
206
207
208 If you want to support SAMBA home directories, you must turn on the
209 use_samba_home_dirs boolean. Disabled by default.
210
211 setsebool -P use_samba_home_dirs 1
212
213
214
216 SELinux defines port types to represent TCP and UDP ports.
217
218 You can see the types associated with a port by using the following
219 command:
220
221 semanage port -l
222
223
224 Policy governs the access confined processes have to these ports.
225 SELinux mpd policy is very flexible allowing users to setup their mpd
226 processes in as secure a method as possible.
227
228 The following port types are defined for mpd:
229
230
231 mpd_port_t
232
233
234
235 Default Defined Ports:
236 tcp 6600
237
239 The SELinux process type mpd_t can manage files labeled with the fol‐
240 lowing file types. The paths listed are the default paths for these
241 file types. Note the processes UID still need to have DAC permissions.
242
243 anon_inodefs_t
244
245
246 cifs_t
247
248
249 cluster_conf_t
250
251 /etc/cluster(/.*)?
252
253 cluster_var_lib_t
254
255 /var/lib/pcsd(/.*)?
256 /var/lib/cluster(/.*)?
257 /var/lib/openais(/.*)?
258 /var/lib/pengine(/.*)?
259 /var/lib/corosync(/.*)?
260 /usr/lib/heartbeat(/.*)?
261 /var/lib/heartbeat(/.*)?
262 /var/lib/pacemaker(/.*)?
263
264 cluster_var_run_t
265
266 /var/run/crm(/.*)?
267 /var/run/cman_.*
268 /var/run/rsctmp(/.*)?
269 /var/run/aisexec.*
270 /var/run/heartbeat(/.*)?
271 /var/run/corosync-qnetd(/.*)?
272 /var/run/corosync-qdevice(/.*)?
273 /var/run/cpglockd.pid
274 /var/run/corosync.pid
275 /var/run/rgmanager.pid
276 /var/run/cluster/rgmanager.sk
277
278 mpd_data_t
279
280 /var/lib/mpd/music(/.*)?
281 /var/lib/mpd/playlists(/.*)?
282
283 mpd_home_t
284
285 /home/[^/]+/.mpd(/.*)?
286
287 mpd_tmp_t
288
289
290 mpd_tmpfs_t
291
292
293 mpd_var_lib_t
294
295 /var/lib/mpd(/.*)?
296
297 mpd_var_run_t
298
299 /var/run/mpd(/.*)?
300
301 nfs_t
302
303
304 root_t
305
306 /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
307 /
308 /initrd
309
310
312 SELinux requires files to have an extended attribute to define the file
313 type.
314
315 You can see the context of a file using the -Z option to ls
316
317 Policy governs the access confined processes have to these files.
318 SELinux mpd policy is very flexible allowing users to setup their mpd
319 processes in as secure a method as possible.
320
321 EQUIVALENCE DIRECTORIES
322
323
324 mpd policy stores data with multiple different file context types under
325 the /var/lib/mpd directory. If you would like to store the data in a
326 different directory you can use the semanage command to create an
327 equivalence mapping. If you wanted to store this data under the /srv
328 dirctory you would execute the following command:
329
330 semanage fcontext -a -e /var/lib/mpd /srv/mpd
331 restorecon -R -v /srv/mpd
332
333 STANDARD FILE CONTEXT
334
335 SELinux defines the file context types for the mpd, if you wanted to
336 store files with these types in a diffent paths, you need to execute
337 the semanage command to sepecify alternate labeling and then use
338 restorecon to put the labels on disk.
339
340 semanage fcontext -a -t mpd_var_run_t '/srv/mympd_content(/.*)?'
341 restorecon -R -v /srv/mympd_content
342
343 Note: SELinux often uses regular expressions to specify labels that
344 match multiple files.
345
346 The following file types are defined for mpd:
347
348
349
350 mpd_data_t
351
352 - Set files with the mpd_data_t type, if you want to treat the files as
353 mpd content.
354
355
356 Paths:
357 /var/lib/mpd/music(/.*)?, /var/lib/mpd/playlists(/.*)?
358
359
360 mpd_etc_t
361
362 - Set files with the mpd_etc_t type, if you want to store mpd files in
363 the /etc directories.
364
365
366
367 mpd_exec_t
368
369 - Set files with the mpd_exec_t type, if you want to transition an exe‐
370 cutable to the mpd_t domain.
371
372
373
374 mpd_home_t
375
376 - Set files with the mpd_home_t type, if you want to store mpd files in
377 the users home directory.
378
379
380
381 mpd_initrc_exec_t
382
383 - Set files with the mpd_initrc_exec_t type, if you want to transition
384 an executable to the mpd_initrc_t domain.
385
386
387
388 mpd_log_t
389
390 - Set files with the mpd_log_t type, if you want to treat the data as
391 mpd log data, usually stored under the /var/log directory.
392
393
394
395 mpd_tmp_t
396
397 - Set files with the mpd_tmp_t type, if you want to store mpd temporary
398 files in the /tmp directories.
399
400
401
402 mpd_tmpfs_t
403
404 - Set files with the mpd_tmpfs_t type, if you want to store mpd files
405 on a tmpfs file system.
406
407
408
409 mpd_user_data_t
410
411 - Set files with the mpd_user_data_t type, if you want to treat the
412 files as mpd user content.
413
414
415
416 mpd_var_lib_t
417
418 - Set files with the mpd_var_lib_t type, if you want to store the mpd
419 files under the /var/lib directory.
420
421
422
423 mpd_var_run_t
424
425 - Set files with the mpd_var_run_t type, if you want to store the mpd
426 files under the /run or /var/run directory.
427
428
429
430 Note: File context can be temporarily modified with the chcon command.
431 If you want to permanently change the file context you need to use the
432 semanage fcontext command. This will modify the SELinux labeling data‐
433 base. You will need to use restorecon to apply the labels.
434
435
437 semanage fcontext can also be used to manipulate default file context
438 mappings.
439
440 semanage permissive can also be used to manipulate whether or not a
441 process type is permissive.
442
443 semanage module can also be used to enable/disable/install/remove pol‐
444 icy modules.
445
446 semanage port can also be used to manipulate the port definitions
447
448 semanage boolean can also be used to manipulate the booleans
449
450
451 system-config-selinux is a GUI tool available to customize SELinux pol‐
452 icy settings.
453
454
456 This manual page was auto-generated using sepolicy manpage .
457
458
460 selinux(8), mpd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) ,
461 setsebool(8)
462
463
464
465mpd 19-04-25 mpd_selinux(8)