1mdadm_selinux(8)             SELinux Policy mdadm             mdadm_selinux(8)
2
3
4

NAME

6       mdadm_selinux - Security Enhanced Linux Policy for the mdadm processes
7

DESCRIPTION

9       Security-Enhanced Linux secures the mdadm processes via flexible manda‐
10       tory access control.
11
12       The mdadm processes execute with the  mdadm_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 mdadm_t
19
20
21

ENTRYPOINTS

23       The mdadm_t SELinux type can be entered via the mdadm_exec_t file type.
24
25       The default entrypoint paths for the mdadm_t domain are the following:
26
27       /sbin/mdadm, /sbin/mdmon,  /sbin/mdmpd,  /sbin/iprdump,  /sbin/iprinit,
28       /sbin/iprupdate,   /usr/sbin/mdadm,  /usr/sbin/mdmon,  /usr/sbin/mdmpd,
29       /sbin/raid-check,         /usr/sbin/iprdump,         /usr/sbin/iprinit,
30       /usr/sbin/iprupdate, /usr/sbin/raid-check
31

PROCESS TYPES

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

BOOLEANS

53       SELinux  policy  is customizable based on least access required.  mdadm
54       policy is extremely flexible and has several booleans that allow you to
55       manipulate the policy and run mdadm with the tightest access possible.
56
57
58
59       If you want to allow all domains to execute in fips_mode, you must turn
60       on the fips_mode boolean. Enabled by default.
61
62       setsebool -P fips_mode 1
63
64
65
66       If you want to allow system to run with  NIS,  you  must  turn  on  the
67       nis_enabled boolean. Disabled by default.
68
69       setsebool -P nis_enabled 1
70
71
72

MANAGED FILES

74       The SELinux process type mdadm_t can manage files labeled with the fol‐
75       lowing file types.  The paths listed are the default  paths  for  these
76       file types.  Note the processes UID still need to have DAC permissions.
77
78       cgroup_t
79
80            /sys/fs/cgroup
81
82       cluster_conf_t
83
84            /etc/cluster(/.*)?
85
86       cluster_var_lib_t
87
88            /var/lib/pcsd(/.*)?
89            /var/lib/cluster(/.*)?
90            /var/lib/openais(/.*)?
91            /var/lib/pengine(/.*)?
92            /var/lib/corosync(/.*)?
93            /usr/lib/heartbeat(/.*)?
94            /var/lib/heartbeat(/.*)?
95            /var/lib/pacemaker(/.*)?
96
97       cluster_var_run_t
98
99            /var/run/crm(/.*)?
100            /var/run/cman_.*
101            /var/run/rsctmp(/.*)?
102            /var/run/aisexec.*
103            /var/run/heartbeat(/.*)?
104            /var/run/corosync-qnetd(/.*)?
105            /var/run/corosync-qdevice(/.*)?
106            /var/run/corosync.pid
107            /var/run/cpglockd.pid
108            /var/run/rgmanager.pid
109            /var/run/cluster/rgmanager.sk
110
111       kdump_lock_t
112
113            /var/lock/kdump(/.*)?
114
115       mdadm_conf_t
116
117            /etc/mdadm.conf
118            /etc/mdadm.conf.anacbak
119
120       mdadm_log_t
121
122            /var/log/iprdump.*
123            /var/log/iprdbg
124
125       mdadm_tmpfs_t
126
127
128       mdadm_var_run_t
129
130            /dev/md/.*
131            /var/run/mdadm(/.*)?
132            /dev/.mdadm.map
133
134       root_t
135
136            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
137            /
138            /initrd
139
140       sysfs_t
141
142            /sys(/.*)?
143
144       systemd_passwd_var_run_t
145
146            /var/run/systemd/ask-password(/.*)?
147            /var/run/systemd/ask-password-block(/.*)?
148
149

FILE CONTEXTS

151       SELinux requires files to have an extended attribute to define the file
152       type.
153
154       You can see the context of a file using the -Z option to ls
155
156       Policy governs the access  confined  processes  have  to  these  files.
157       SELinux  mdadm  policy  is  very flexible allowing users to setup their
158       mdadm processes in as secure a method as possible.
159
160       STANDARD FILE CONTEXT
161
162       SELinux defines the file context types for the mdadm, if you wanted  to
163       store  files  with  these types in a diffent paths, you need to execute
164       the semanage command  to  sepecify  alternate  labeling  and  then  use
165       restorecon to put the labels on disk.
166
167       semanage fcontext -a -t mdadm_log_t '/srv/mymdadm_content(/.*)?'
168       restorecon -R -v /srv/mymdadm_content
169
170       Note:  SELinux  often  uses  regular expressions to specify labels that
171       match multiple files.
172
173       The following file types are defined for mdadm:
174
175
176
177       mdadm_conf_t
178
179       - Set files with the mdadm_conf_t type, if you want to treat the  files
180       as mdadm configuration data, usually stored under the /etc directory.
181
182
183       Paths:
184            /etc/mdadm.conf, /etc/mdadm.conf.anacbak
185
186
187       mdadm_exec_t
188
189       -  Set  files  with the mdadm_exec_t type, if you want to transition an
190       executable to the mdadm_t domain.
191
192
193       Paths:
194            /sbin/mdadm,     /sbin/mdmon,     /sbin/mdmpd,      /sbin/iprdump,
195            /sbin/iprinit,  /sbin/iprupdate, /usr/sbin/mdadm, /usr/sbin/mdmon,
196            /usr/sbin/mdmpd,       /sbin/raid-check,        /usr/sbin/iprdump,
197            /usr/sbin/iprinit, /usr/sbin/iprupdate, /usr/sbin/raid-check
198
199
200       mdadm_initrc_exec_t
201
202       -  Set  files with the mdadm_initrc_exec_t type, if you want to transi‐
203       tion an executable to the mdadm_initrc_t domain.
204
205
206
207       mdadm_log_t
208
209       - Set files with the mdadm_log_t type, if you want to treat the data as
210       mdadm log data, usually stored under the /var/log directory.
211
212
213       Paths:
214            /var/log/iprdump.*, /var/log/iprdbg
215
216
217       mdadm_tmp_t
218
219       -  Set files with the mdadm_tmp_t type, if you want to store mdadm tem‐
220       porary files in the /tmp directories.
221
222
223
224       mdadm_tmpfs_t
225
226       - Set files with the mdadm_tmpfs_t type, if you  want  to  store  mdadm
227       files on a tmpfs file system.
228
229
230
231       mdadm_unit_file_t
232
233       -  Set  files with the mdadm_unit_file_t type, if you want to treat the
234       files as mdadm unit content.
235
236
237       Paths:
238            /usr/lib/systemd/system/mdmon@.*,  /usr/lib/systemd/system/mdmoni‐
239            tor.*
240
241
242       mdadm_var_run_t
243
244       -  Set  files  with  the mdadm_var_run_t type, if you want to store the
245       mdadm files under the /run or /var/run directory.
246
247
248       Paths:
249            /dev/md/.*, /var/run/mdadm(/.*)?, /dev/.mdadm.map
250
251
252       Note: File context can be temporarily modified with the chcon  command.
253       If  you want to permanently change the file context you need to use the
254       semanage fcontext command.  This will modify the SELinux labeling data‐
255       base.  You will need to use restorecon to apply the labels.
256
257

COMMANDS

259       semanage  fcontext  can also be used to manipulate default file context
260       mappings.
261
262       semanage permissive can also be used to manipulate  whether  or  not  a
263       process type is permissive.
264
265       semanage  module can also be used to enable/disable/install/remove pol‐
266       icy modules.
267
268       semanage boolean can also be used to manipulate the booleans
269
270
271       system-config-selinux is a GUI tool available to customize SELinux pol‐
272       icy settings.
273
274

AUTHOR

276       This manual page was auto-generated using sepolicy manpage .
277
278

SEE ALSO

280       selinux(8),  mdadm(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
281       icy(8), setsebool(8)
282
283
284
285mdadm                              20-05-05                   mdadm_selinux(8)
Impressum