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/lvmlockctl,
58       /usr/sbin/multipathd,   /sbin/vgchange.static,   /usr/sbin/lvmdiskscan,
59       /usr/sbin/mount.crypt,  /usr/sbin/vgcfgbackup,  /sbin/multipath.static,
60       /usr/sbin/vgcfgrestore,                        /usr/sbin/lvmiopversion,
61       /usr/sbin/vgscan.static,                      /usr/sbin/dmsetup.static,
62       /usr/sbin/vgchange.static, /usr/lib/storaged/storaged, /usr/sbin/multi‐
63       path.static,     /lib/udev/udisks-lvm-pv-export,     /usr/libexec/stor‐
64       aged/storaged,     /usr/lib/udev/udisks-lvm-pv-export,    /usr/lib/sys‐
65       temd/systemd-cryptsetup, /usr/lib/storaged/storaged-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 deny user domains applications to map a memory region as
94       both executable and writable, this  is  dangerous  and  the  executable
95       should be reported in bugzilla, you must turn on the deny_execmem bool‐
96       ean. Enabled by default.
97
98       setsebool -P deny_execmem 1
99
100
101
102       If you want to control the ability to mmap a low area  of  the  address
103       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
104       the mmap_low_allowed boolean. Disabled by default.
105
106       setsebool -P mmap_low_allowed 1
107
108
109
110       If you want to disable kernel module loading, you must turn on the  se‐
111       cure_mode_insmod boolean. Enabled by default.
112
113       setsebool -P secure_mode_insmod 1
114
115
116
117       If  you  want to allow unconfined executables to make their heap memory
118       executable.  Doing this is a really  bad  idea.  Probably  indicates  a
119       badly  coded  executable, but could indicate an attack. This executable
120       should be reported in bugzilla, you must turn  on  the  selinuxuser_ex‐
121       echeap boolean. Disabled by default.
122
123       setsebool -P selinuxuser_execheap 1
124
125
126
127       If  you  want  to allow unconfined executables to make their stack exe‐
128       cutable.  This should never, ever be necessary.  Probably  indicates  a
129       badly  coded  executable, but could indicate an attack. This executable
130       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
131       stack boolean. Enabled by default.
132
133       setsebool -P selinuxuser_execstack 1
134
135
136

MANAGED FILES

138       The  SELinux  process type lvm_t can manage files labeled with the fol‐
139       lowing file types.  The paths listed are the default  paths  for  these
140       file types.  Note the processes UID still need to have DAC permissions.
141
142       file_type
143
144            all files on the system
145
146

FILE CONTEXTS

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

COMMANDS

308       semanage  fcontext  can also be used to manipulate default file context
309       mappings.
310
311       semanage permissive can also be used to manipulate  whether  or  not  a
312       process type is permissive.
313
314       semanage  module can also be used to enable/disable/install/remove pol‐
315       icy modules.
316
317       semanage boolean can also be used to manipulate the booleans
318
319
320       system-config-selinux is a GUI tool available to customize SELinux pol‐
321       icy settings.
322
323

AUTHOR

325       This manual page was auto-generated using sepolicy manpage .
326
327

SEE ALSO

329       selinux(8),  lvm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
330       setsebool(8)
331
332
333
334lvm                                23-02-03                     lvm_selinux(8)
Impressum