1lvm_selinux(8)                SELinux Policy lvm                lvm_selinux(8)
2
3
4

NAME

6       lvm_selinux - Security Enhanced Linux Policy for the lvm processes
7

DESCRIPTION

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

ENTRYPOINTS

23       The lvm_t SELinux type can be entered via the lvm_exec_t file type.
24
25       The default entrypoint paths for the lvm_t domain are the following:
26
27       /lib/lvm-10/.*,          /lib/lvm-200/.*,           /usr/lib/lvm-10/.*,
28       /usr/lib/lvm-200/.*,         /usr/lib/systemd/system-generators/lvm2.*,
29       /sbin/lvm, /sbin/lvs, /sbin/pvs, /sbin/vgs,  /sbin/vgck,  /sbin/dmraid,
30       /sbin/kpartx,  /sbin/lvmsar,  /sbin/lvscan, /sbin/pvdata, /sbin/pvmove,
31       /sbin/pvscan,     /sbin/vgscan,      /sbin/dmsetup,      /sbin/e2fsadm,
32       /sbin/lvmetad,     /sbin/lvmsadc,     /sbin/vgmerge,     /sbin/vgsplit,
33       /usr/sbin/lvm,     /usr/sbin/lvs,     /usr/sbin/pvs,     /usr/sbin/vgs,
34       /sbin/lvchange,    /sbin/lvcreate,    /sbin/lvextend,   /sbin/lvmpolld,
35       /sbin/lvreduce,   /sbin/lvremove,    /sbin/lvrename,    /sbin/lvresize,
36       /sbin/pvchange,    /sbin/pvcreate,    /sbin/pvremove,   /sbin/vgchange,
37       /sbin/vgcreate,   /sbin/vgexport,    /sbin/vgextend,    /sbin/vgimport,
38       /sbin/vgreduce,    /sbin/vgremove,    /sbin/vgrename,   /usr/sbin/vgck,
39       /sbin/lvdisplay,  /sbin/lvmchange,  /sbin/pvdisplay,   /sbin/vgdisplay,
40       /sbin/vgmknodes,  /sbin/vgwrapper,  /sbin/cryptsetup, /sbin/lvm.static,
41       /sbin/multipathd, /usr/sbin/dmraid, /usr/sbin/kpartx, /usr/sbin/lvmsar,
42       /usr/sbin/lvscan, /usr/sbin/pvdata, /usr/sbin/pvmove, /usr/sbin/pvscan,
43       /usr/sbin/vgscan,  /sbin/lvmdiskscan,  /sbin/mount.crypt,  /sbin/vgcfg‐
44       backup,    /usr/sbin/dmsetup,   /usr/sbin/e2fsadm,   /usr/sbin/lvmetad,
45       /usr/sbin/lvmsadc,        /usr/sbin/vgmerge,         /usr/sbin/vgsplit,
46       /sbin/umount.crypt,       /sbin/vgcfgrestore,       /usr/sbin/dmeventd,
47       /usr/sbin/lvchange,       /usr/sbin/lvcreate,       /usr/sbin/lvextend,
48       /usr/sbin/lvmdbusd,       /usr/sbin/lvmlockd,       /usr/sbin/lvmpolld,
49       /usr/sbin/lvreduce,       /usr/sbin/lvremove,       /usr/sbin/lvrename,
50       /usr/sbin/lvresize,       /usr/sbin/pvchange,       /usr/sbin/pvcreate,
51       /usr/sbin/pvremove,       /usr/sbin/vgchange,       /usr/sbin/vgcreate,
52       /usr/sbin/vgexport,       /usr/sbin/vgextend,       /usr/sbin/vgimport,
53       /usr/sbin/vgreduce,       /usr/sbin/vgremove,       /usr/sbin/vgrename,
54       /sbin/lvmiopversion,      /sbin/vgscan.static,     /usr/sbin/lvdisplay,
55       /usr/sbin/lvmchange,     /usr/sbin/pvdisplay,      /usr/sbin/vgdisplay,
56       /usr/sbin/vgmknodes,     /usr/sbin/vgwrapper,     /sbin/dmsetup.static,
57       /usr/sbin/cryptsetup,    /usr/sbin/lvm.static,    /usr/sbin/multipathd,
58       /sbin/vgchange.static,   /usr/sbin/lvmdiskscan,  /usr/sbin/mount.crypt,
59       /usr/sbin/vgcfgbackup, /sbin/multipath.static,  /usr/sbin/vgcfgrestore,
60       /usr/sbin/lvmiopversion,                       /usr/sbin/vgscan.static,
61       /usr/sbin/dmsetup.static,   /usr/sbin/vgchange.static,   /usr/lib/stor‐
62       aged/storaged,   /usr/sbin/multipath.static,   /lib/udev/udisks-lvm-pv-
63       export,  /usr/libexec/storaged/storaged,   /usr/lib/udev/udisks-lvm-pv-
64       export,   /usr/lib/systemd/systemd-cryptsetup,  /usr/lib/storaged/stor‐
65       aged-lvm-helper
66

PROCESS TYPES

68       SELinux defines process types (domains) for each process running on the
69       system
70
71       You can see the context of a process using the -Z option to ps
72
73       Policy  governs  the  access confined processes have to files.  SELinux
74       lvm policy is very flexible allowing users to setup their lvm processes
75       in as secure a method as possible.
76
77       The following process types are defined for lvm:
78
79       lvm_t
80
81       Note: semanage permissive -a lvm_t can be used to make the process type
82       lvm_t permissive. SELinux does not deny access  to  permissive  process
83       types, but the AVC (SELinux denials) messages are still generated.
84
85

BOOLEANS

87       SELinux  policy  is  customizable  based on least access required.  lvm
88       policy is extremely flexible and has several booleans that allow you to
89       manipulate the policy and run lvm with the tightest access possible.
90
91
92
93       If you want to allow users to resolve user passwd entries directly from
94       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
95       gin_nsswitch_use_ldap boolean. Disabled by default.
96
97       setsebool -P authlogin_nsswitch_use_ldap 1
98
99
100
101       If you want to deny user domains applications to map a memory region as
102       both executable and writable, this  is  dangerous  and  the  executable
103       should be reported in bugzilla, you must turn on the deny_execmem bool‐
104       ean. Enabled by default.
105
106       setsebool -P deny_execmem 1
107
108
109
110       If you want to allow all domains to execute in fips_mode, you must turn
111       on the fips_mode boolean. Enabled by default.
112
113       setsebool -P fips_mode 1
114
115
116
117       If  you  want  to allow confined applications to run with kerberos, you
118       must turn on the kerberos_enabled boolean. Disabled by default.
119
120       setsebool -P kerberos_enabled 1
121
122
123
124       If you want to control the ability to mmap a low area  of  the  address
125       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
126       the mmap_low_allowed boolean. Disabled by default.
127
128       setsebool -P mmap_low_allowed 1
129
130
131
132       If you want to allow system to run with  NIS,  you  must  turn  on  the
133       nis_enabled boolean. Disabled by default.
134
135       setsebool -P nis_enabled 1
136
137
138
139       If  you  want to allow confined applications to use nscd shared memory,
140       you must turn on the nscd_use_shm boolean. Disabled by default.
141
142       setsebool -P nscd_use_shm 1
143
144
145
146       If you want to disable kernel module loading,  you  must  turn  on  the
147       secure_mode_insmod boolean. Enabled by default.
148
149       setsebool -P secure_mode_insmod 1
150
151
152
153       If  you  want to allow unconfined executables to make their heap memory
154       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
155       badly  coded  executable, but could indicate an attack. This executable
156       should  be  reported  in  bugzilla,  you  must  turn  on   the   selin‐
157       uxuser_execheap boolean. Disabled by default.
158
159       setsebool -P selinuxuser_execheap 1
160
161
162
163       If  you  want  to allow unconfined executables to make their stack exe‐
164       cutable.  This should never, ever be necessary.  Probably  indicates  a
165       badly  coded  executable, but could indicate an attack. This executable
166       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
167       stack boolean. Disabled by default.
168
169       setsebool -P selinuxuser_execstack 1
170
171
172

MANAGED FILES

174       The  SELinux  process type lvm_t can manage files labeled with the fol‐
175       lowing file types.  The paths listed are the default  paths  for  these
176       file types.  Note the processes UID still need to have DAC permissions.
177
178       file_type
179
180            all files on the system
181
182

FILE CONTEXTS

184       SELinux requires files to have an extended attribute to define the file
185       type.
186
187       You can see the context of a file using the -Z option to ls
188
189       Policy governs the access  confined  processes  have  to  these  files.
190       SELinux  lvm  policy is very flexible allowing users to setup their lvm
191       processes in as secure a method as possible.
192
193       EQUIVALENCE DIRECTORIES
194
195
196       lvm policy stores data with multiple different file context types under
197       the /var/run/multipathd directory.  If you would like to store the data
198       in a different directory you can use the semanage command to create  an
199       equivalence  mapping.   If you wanted to store this data under the /srv
200       dirctory you would execute the following command:
201
202       semanage fcontext -a -e /var/run/multipathd /srv/multipathd
203       restorecon -R -v /srv/multipathd
204
205       STANDARD FILE CONTEXT
206
207       SELinux defines the file context types for the lvm, if  you  wanted  to
208       store  files  with  these types in a diffent paths, you need to execute
209       the semanage command  to  sepecify  alternate  labeling  and  then  use
210       restorecon to put the labels on disk.
211
212       semanage fcontext -a -t lvm_unit_file_t '/srv/mylvm_content(/.*)?'
213       restorecon -R -v /srv/mylvm_content
214
215       Note:  SELinux  often  uses  regular expressions to specify labels that
216       match multiple files.
217
218       The following file types are defined for lvm:
219
220
221
222       lvm_etc_t
223
224       - Set files with the lvm_etc_t type, if you want to store lvm files  in
225       the /etc directories.
226
227
228
229       lvm_exec_t
230
231       - Set files with the lvm_exec_t type, if you want to transition an exe‐
232       cutable to the lvm_t domain.
233
234
235       Paths:
236            /lib/lvm-10/.*,        /lib/lvm-200/.*,        /usr/lib/lvm-10/.*,
237            /usr/lib/lvm-200/.*,    /usr/lib/systemd/system-generators/lvm2.*,
238            /sbin/lvm,   /sbin/lvs,    /sbin/pvs,    /sbin/vgs,    /sbin/vgck,
239            /sbin/dmraid,     /sbin/kpartx,     /sbin/lvmsar,    /sbin/lvscan,
240            /sbin/pvdata,    /sbin/pvmove,     /sbin/pvscan,     /sbin/vgscan,
241            /sbin/dmsetup,    /sbin/e2fsadm,   /sbin/lvmetad,   /sbin/lvmsadc,
242            /sbin/vgmerge,   /sbin/vgsplit,   /usr/sbin/lvm,    /usr/sbin/lvs,
243            /usr/sbin/pvs,   /usr/sbin/vgs,   /sbin/lvchange,  /sbin/lvcreate,
244            /sbin/lvextend,  /sbin/lvmpolld,  /sbin/lvreduce,  /sbin/lvremove,
245            /sbin/lvrename,  /sbin/lvresize,  /sbin/pvchange,  /sbin/pvcreate,
246            /sbin/pvremove,  /sbin/vgchange,  /sbin/vgcreate,  /sbin/vgexport,
247            /sbin/vgextend,  /sbin/vgimport,  /sbin/vgreduce,  /sbin/vgremove,
248            /sbin/vgrename, /usr/sbin/vgck, /sbin/lvdisplay,  /sbin/lvmchange,
249            /sbin/pvdisplay,  /sbin/vgdisplay,  /sbin/vgmknodes, /sbin/vgwrap‐
250            per,   /sbin/cryptsetup,    /sbin/lvm.static,    /sbin/multipathd,
251            /usr/sbin/dmraid,        /usr/sbin/kpartx,       /usr/sbin/lvmsar,
252            /usr/sbin/lvscan,       /usr/sbin/pvdata,        /usr/sbin/pvmove,
253            /usr/sbin/pvscan,       /usr/sbin/vgscan,       /sbin/lvmdiskscan,
254            /sbin/mount.crypt,      /sbin/vgcfgbackup,      /usr/sbin/dmsetup,
255            /usr/sbin/e2fsadm,      /usr/sbin/lvmetad,      /usr/sbin/lvmsadc,
256            /usr/sbin/vgmerge,     /usr/sbin/vgsplit,      /sbin/umount.crypt,
257            /sbin/vgcfgrestore,     /usr/sbin/dmeventd,    /usr/sbin/lvchange,
258            /usr/sbin/lvcreate,    /usr/sbin/lvextend,     /usr/sbin/lvmdbusd,
259            /usr/sbin/lvmlockd,     /usr/sbin/lvmpolld,    /usr/sbin/lvreduce,
260            /usr/sbin/lvremove,    /usr/sbin/lvrename,     /usr/sbin/lvresize,
261            /usr/sbin/pvchange,     /usr/sbin/pvcreate,    /usr/sbin/pvremove,
262            /usr/sbin/vgchange,    /usr/sbin/vgcreate,     /usr/sbin/vgexport,
263            /usr/sbin/vgextend,     /usr/sbin/vgimport,    /usr/sbin/vgreduce,
264            /usr/sbin/vgremove,    /usr/sbin/vgrename,    /sbin/lvmiopversion,
265            /sbin/vgscan.static,   /usr/sbin/lvdisplay,   /usr/sbin/lvmchange,
266            /usr/sbin/pvdisplay,   /usr/sbin/vgdisplay,   /usr/sbin/vgmknodes,
267            /usr/sbin/vgwrapper,  /sbin/dmsetup.static,  /usr/sbin/cryptsetup,
268            /usr/sbin/lvm.static, /usr/sbin/multipathd, /sbin/vgchange.static,
269            /usr/sbin/lvmdiskscan,   /usr/sbin/mount.crypt,   /usr/sbin/vgcfg‐
270            backup,      /sbin/multipath.static,       /usr/sbin/vgcfgrestore,
271            /usr/sbin/lvmiopversion,                  /usr/sbin/vgscan.static,
272            /usr/sbin/dmsetup.static,               /usr/sbin/vgchange.static,
273            /usr/lib/storaged/storaged,            /usr/sbin/multipath.static,
274            /lib/udev/udisks-lvm-pv-export,    /usr/libexec/storaged/storaged,
275            /usr/lib/udev/udisks-lvm-pv-export,      /usr/lib/systemd/systemd-
276            cryptsetup, /usr/lib/storaged/storaged-lvm-helper
277
278
279       lvm_lock_t
280
281       - Set files with the lvm_lock_t type, if you want to treat the files as
282       lvm lock data, stored under the /var/lock directory
283
284
285       Paths:
286            /etc/lvm/lock(/.*)?, /var/lock/lvm(/.*)?, /var/lock/dmraid(/.*)?
287
288
289       lvm_metadata_t
290
291       -  Set  files  with  the  lvm_metadata_t type, if you want to treat the
292       files as lvm metadata data.
293
294
295       Paths:
296            /etc/lvmtab(/.*)?,   /etc/lvmtab.d(/.*)?,    /etc/lvm/cache(/.*)?,
297            /etc/multipath(/.*)?,      /etc/lvm/backup(/.*)?,     /etc/lvm/ar‐
298            chive(/.*)?, /var/cache/multipathd(/.*)?, /etc/lvm/.cache
299
300
301       lvm_tmp_t
302
303       - Set files with the lvm_tmp_t type, if you want to store lvm temporary
304       files in the /tmp directories.
305
306
307
308       lvm_unit_file_t
309
310       -  Set  files  with  the lvm_unit_file_t type, if you want to treat the
311       files as lvm unit content.
312
313
314       Paths:
315            /usr/lib/systemd/system/lvm2.*.service,   /usr/lib/systemd/genera‐
316            tor/lvm.*
317
318
319       lvm_var_lib_t
320
321       -  Set  files with the lvm_var_lib_t type, if you want to store the lvm
322       files under the /var/lib directory.
323
324
325
326       lvm_var_run_t
327
328       - Set files with the lvm_var_run_t type, if you want to store  the  lvm
329       files under the /run or /var/run directory.
330
331
332       Paths:
333            /var/run/lvm(/.*)?,  /var/run/dmevent.*,  /var/run/storaged(/.*)?,
334            /var/run/multipathd(/.*)?, /var/run/multipathd.sock
335
336
337       Note: File context can be temporarily modified with the chcon  command.
338       If  you want to permanently change the file context you need to use the
339       semanage fcontext command.  This will modify the SELinux labeling data‐
340       base.  You will need to use restorecon to apply the labels.
341
342

COMMANDS

344       semanage  fcontext  can also be used to manipulate default file context
345       mappings.
346
347       semanage permissive can also be used to manipulate  whether  or  not  a
348       process type is permissive.
349
350       semanage  module can also be used to enable/disable/install/remove pol‐
351       icy modules.
352
353       semanage boolean can also be used to manipulate the booleans
354
355
356       system-config-selinux is a GUI tool available to customize SELinux pol‐
357       icy settings.
358
359

AUTHOR

361       This manual page was auto-generated using sepolicy manpage .
362
363

SEE ALSO

365       selinux(8),  lvm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
366       setsebool(8)
367
368
369
370lvm                                19-12-02                     lvm_selinux(8)
Impressum