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/mount.crypt,  /sbin/lvmdiskscan,  /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/lvmpolld,       /usr/sbin/lvmlockd,       /usr/sbin/lvreduce,
49       /usr/sbin/lvremove,       /usr/sbin/lvrename,       /usr/sbin/lvresize,
50       /usr/sbin/pvchange,       /usr/sbin/pvcreate,       /usr/sbin/pvremove,
51       /usr/sbin/vgchange,       /usr/sbin/vgcreate,       /usr/sbin/vgexport,
52       /usr/sbin/vgextend,       /usr/sbin/vgimport,       /usr/sbin/vgreduce,
53       /usr/sbin/vgremove,      /usr/sbin/vgrename,       /sbin/lvmiopversion,
54       /sbin/vgscan.static,      /usr/sbin/lvdisplay,     /usr/sbin/lvmchange,
55       /usr/sbin/pvdisplay,     /usr/sbin/vgdisplay,      /usr/sbin/vgmknodes,
56       /usr/sbin/vgwrapper,     /sbin/dmsetup.static,    /usr/sbin/cryptsetup,
57       /usr/sbin/lvm.static,   /usr/sbin/multipathd,    /sbin/vgchange.static,
58       /usr/sbin/lvmdiskscan,   /usr/sbin/mount.crypt,  /usr/sbin/vgcfgbackup,
59       /sbin/multipath.static,  /usr/sbin/vgcfgrestore,   /usr/sbin/lvmiopver‐
60       sion,         /usr/sbin/vgscan.static,        /usr/sbin/dmsetup.static,
61       /usr/sbin/vgchange.static,  /usr/sbin/multipath.static,  /usr/lib/stor‐
62       aged/storaged,    /lib/udev/udisks-lvm-pv-export,    /usr/libexec/stor‐
63       aged/storaged,    /usr/lib/udev/udisks-lvm-pv-export,     /usr/lib/sys‐
64       temd/systemd-cryptsetup, /usr/lib/storaged/storaged-lvm-helper
65

PROCESS TYPES

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

BOOLEANS

86       SELinux policy is customizable based on  least  access  required.   lvm
87       policy is extremely flexible and has several booleans that allow you to
88       manipulate the policy and run lvm with the tightest access possible.
89
90
91
92       If you want to allow users to resolve user passwd entries directly from
93       ldap  rather  then  using  a  sssd server, you must turn on the authlo‐
94       gin_nsswitch_use_ldap boolean. Disabled by default.
95
96       setsebool -P authlogin_nsswitch_use_ldap 1
97
98
99
100       If you want to allow all daemons the ability to  read/write  terminals,
101       you must turn on the daemons_use_tty boolean. Disabled by default.
102
103       setsebool -P daemons_use_tty 1
104
105
106
107       If you want to deny user domains applications to map a memory region as
108       both executable and writable, this  is  dangerous  and  the  executable
109       should be reported in bugzilla, you must turn on the deny_execmem bool‐
110       ean. Enabled by default.
111
112       setsebool -P deny_execmem 1
113
114
115
116       If you want to deny any process from ptracing or  debugging  any  other
117       processes,  you  must  turn  on  the  deny_ptrace  boolean.  Enabled by
118       default.
119
120       setsebool -P deny_ptrace 1
121
122
123
124       If you want to allow any process  to  mmap  any  file  on  system  with
125       attribute  file_type,  you must turn on the domain_can_mmap_files bool‐
126       ean. Enabled by default.
127
128       setsebool -P domain_can_mmap_files 1
129
130
131
132       If you want to allow all domains write to kmsg_device, while kernel  is
133       executed  with  systemd.log_target=kmsg parameter, you must turn on the
134       domain_can_write_kmsg boolean. Disabled by default.
135
136       setsebool -P domain_can_write_kmsg 1
137
138
139
140       If you want to allow all domains to use other domains file descriptors,
141       you must turn on the domain_fd_use boolean. Enabled by default.
142
143       setsebool -P domain_fd_use 1
144
145
146
147       If  you  want to allow all domains to have the kernel load modules, you
148       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
149       default.
150
151       setsebool -P domain_kernel_load_modules 1
152
153
154
155       If you want to allow all domains to execute in fips_mode, you must turn
156       on the fips_mode boolean. Enabled by default.
157
158       setsebool -P fips_mode 1
159
160
161
162       If you want to enable reading of urandom for all domains, you must turn
163       on the global_ssp boolean. Disabled by default.
164
165       setsebool -P global_ssp 1
166
167
168
169       If  you  want  to allow confined applications to run with kerberos, you
170       must turn on the kerberos_enabled boolean. Enabled by default.
171
172       setsebool -P kerberos_enabled 1
173
174
175
176       If you want to control the ability to mmap a low area  of  the  address
177       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
178       the mmap_low_allowed boolean. Disabled by default.
179
180       setsebool -P mmap_low_allowed 1
181
182
183
184       If you want to allow system to run with  NIS,  you  must  turn  on  the
185       nis_enabled boolean. Disabled by default.
186
187       setsebool -P nis_enabled 1
188
189
190
191       If  you  want to allow confined applications to use nscd shared memory,
192       you must turn on the nscd_use_shm boolean. Disabled by default.
193
194       setsebool -P nscd_use_shm 1
195
196
197
198       If you want to disable kernel module loading,  you  must  turn  on  the
199       secure_mode_insmod boolean. Enabled by default.
200
201       setsebool -P secure_mode_insmod 1
202
203
204
205       If  you want to boolean to determine whether the system permits loading
206       policy, setting enforcing mode, and changing boolean values.  Set  this
207       to  true  and  you  have to reboot to set it back, you must turn on the
208       secure_mode_policyload boolean. Enabled by default.
209
210       setsebool -P secure_mode_policyload 1
211
212
213
214       If you want to allow unconfined executables to make their  heap  memory
215       executable.   Doing  this  is  a  really bad idea. Probably indicates a
216       badly coded executable, but could indicate an attack.  This  executable
217       should   be   reported  in  bugzilla,  you  must  turn  on  the  selin‐
218       uxuser_execheap boolean. Disabled by default.
219
220       setsebool -P selinuxuser_execheap 1
221
222
223
224       If you want to  allow  all  unconfined  executables  to  use  libraries
225       requiring  text  relocation  that  are not labeled textrel_shlib_t, you
226       must turn on the selinuxuser_execmod boolean. Enabled by default.
227
228       setsebool -P selinuxuser_execmod 1
229
230
231
232       If you want to allow unconfined executables to make  their  stack  exe‐
233       cutable.   This  should  never, ever be necessary. Probably indicates a
234       badly coded executable, but could indicate an attack.  This  executable
235       should  be reported in bugzilla, you must turn on the selinuxuser_exec‐
236       stack boolean. Enabled by default.
237
238       setsebool -P selinuxuser_execstack 1
239
240
241
242       If you want to support X userspace object manager, you must turn on the
243       xserver_object_manager boolean. Enabled by default.
244
245       setsebool -P xserver_object_manager 1
246
247
248

MANAGED FILES

250       The  SELinux  process type lvm_t can manage files labeled with the fol‐
251       lowing file types.  The paths listed are the default  paths  for  these
252       file types.  Note the processes UID still need to have DAC permissions.
253
254       file_type
255
256            all files on the system
257
258

FILE CONTEXTS

260       SELinux requires files to have an extended attribute to define the file
261       type.
262
263       You can see the context of a file using the -Z option to ls
264
265       Policy governs the access  confined  processes  have  to  these  files.
266       SELinux  lvm  policy is very flexible allowing users to setup their lvm
267       processes in as secure a method as possible.
268
269       EQUIVALENCE DIRECTORIES
270
271
272       lvm policy stores data with multiple different file context types under
273       the /var/run/multipathd directory.  If you would like to store the data
274       in a different directory you can use the semanage command to create  an
275       equivalence  mapping.   If you wanted to store this data under the /srv
276       dirctory you would execute the following command:
277
278       semanage fcontext -a -e /var/run/multipathd /srv/multipathd
279       restorecon -R -v /srv/multipathd
280
281       STANDARD FILE CONTEXT
282
283       SELinux defines the file context types for the lvm, if  you  wanted  to
284       store  files  with  these types in a diffent paths, you need to execute
285       the semanage command  to  sepecify  alternate  labeling  and  then  use
286       restorecon to put the labels on disk.
287
288       semanage fcontext -a -t lvm_var_run_t '/srv/mylvm_content(/.*)?'
289       restorecon -R -v /srv/mylvm_content
290
291       Note:  SELinux  often  uses  regular expressions to specify labels that
292       match multiple files.
293
294       The following file types are defined for lvm:
295
296
297
298       lvm_etc_t
299
300       - Set files with the lvm_etc_t type, if you want to store lvm files  in
301       the /etc directories.
302
303
304
305       lvm_exec_t
306
307       - Set files with the lvm_exec_t type, if you want to transition an exe‐
308       cutable to the lvm_t domain.
309
310
311       Paths:
312            /lib/lvm-10/.*,        /lib/lvm-200/.*,        /usr/lib/lvm-10/.*,
313            /usr/lib/lvm-200/.*,    /usr/lib/systemd/system-generators/lvm2.*,
314            /sbin/lvm,   /sbin/lvs,    /sbin/pvs,    /sbin/vgs,    /sbin/vgck,
315            /sbin/dmraid,     /sbin/kpartx,     /sbin/lvmsar,    /sbin/lvscan,
316            /sbin/pvdata,    /sbin/pvmove,     /sbin/pvscan,     /sbin/vgscan,
317            /sbin/dmsetup,    /sbin/e2fsadm,   /sbin/lvmetad,   /sbin/lvmsadc,
318            /sbin/vgmerge,   /sbin/vgsplit,   /usr/sbin/lvm,    /usr/sbin/lvs,
319            /usr/sbin/pvs,   /usr/sbin/vgs,   /sbin/lvchange,  /sbin/lvcreate,
320            /sbin/lvextend,  /sbin/lvmpolld,  /sbin/lvreduce,  /sbin/lvremove,
321            /sbin/lvrename,  /sbin/lvresize,  /sbin/pvchange,  /sbin/pvcreate,
322            /sbin/pvremove,  /sbin/vgchange,  /sbin/vgcreate,  /sbin/vgexport,
323            /sbin/vgextend,  /sbin/vgimport,  /sbin/vgreduce,  /sbin/vgremove,
324            /sbin/vgrename, /usr/sbin/vgck, /sbin/lvdisplay,  /sbin/lvmchange,
325            /sbin/pvdisplay,  /sbin/vgdisplay,  /sbin/vgmknodes, /sbin/vgwrap‐
326            per,   /sbin/cryptsetup,    /sbin/lvm.static,    /sbin/multipathd,
327            /usr/sbin/dmraid,        /usr/sbin/kpartx,       /usr/sbin/lvmsar,
328            /usr/sbin/lvscan,       /usr/sbin/pvdata,        /usr/sbin/pvmove,
329            /usr/sbin/pvscan,       /usr/sbin/vgscan,       /sbin/mount.crypt,
330            /sbin/lvmdiskscan,      /sbin/vgcfgbackup,      /usr/sbin/dmsetup,
331            /usr/sbin/e2fsadm,      /usr/sbin/lvmetad,      /usr/sbin/lvmsadc,
332            /usr/sbin/vgmerge,     /usr/sbin/vgsplit,      /sbin/umount.crypt,
333            /sbin/vgcfgrestore,     /usr/sbin/dmeventd,    /usr/sbin/lvchange,
334            /usr/sbin/lvcreate,    /usr/sbin/lvextend,     /usr/sbin/lvmpolld,
335            /usr/sbin/lvmlockd,     /usr/sbin/lvreduce,    /usr/sbin/lvremove,
336            /usr/sbin/lvrename,    /usr/sbin/lvresize,     /usr/sbin/pvchange,
337            /usr/sbin/pvcreate,     /usr/sbin/pvremove,    /usr/sbin/vgchange,
338            /usr/sbin/vgcreate,    /usr/sbin/vgexport,     /usr/sbin/vgextend,
339            /usr/sbin/vgimport,     /usr/sbin/vgreduce,    /usr/sbin/vgremove,
340            /usr/sbin/vgrename,   /sbin/lvmiopversion,    /sbin/vgscan.static,
341            /usr/sbin/lvdisplay,   /usr/sbin/lvmchange,   /usr/sbin/pvdisplay,
342            /usr/sbin/vgdisplay,   /usr/sbin/vgmknodes,   /usr/sbin/vgwrapper,
343            /sbin/dmsetup.static,  /usr/sbin/cryptsetup, /usr/sbin/lvm.static,
344            /usr/sbin/multipathd,                       /sbin/vgchange.static,
345            /usr/sbin/lvmdiskscan,   /usr/sbin/mount.crypt,   /usr/sbin/vgcfg‐
346            backup,      /sbin/multipath.static,       /usr/sbin/vgcfgrestore,
347            /usr/sbin/lvmiopversion,                  /usr/sbin/vgscan.static,
348            /usr/sbin/dmsetup.static,               /usr/sbin/vgchange.static,
349            /usr/sbin/multipath.static,            /usr/lib/storaged/storaged,
350            /lib/udev/udisks-lvm-pv-export,    /usr/libexec/storaged/storaged,
351            /usr/lib/udev/udisks-lvm-pv-export,      /usr/lib/systemd/systemd-
352            cryptsetup, /usr/lib/storaged/storaged-lvm-helper
353
354
355       lvm_lock_t
356
357       - Set files with the lvm_lock_t type, if you want to treat the files as
358       lvm lock data, stored under the /var/lock directory
359
360
361       Paths:
362            /etc/lvm/lock(/.*)?, /var/lock/lvm(/.*)?, /var/lock/dmraid(/.*)?
363
364
365       lvm_metadata_t
366
367       -  Set  files  with  the  lvm_metadata_t type, if you want to treat the
368       files as lvm metadata data.
369
370
371       Paths:
372            /etc/lvmtab(/.*)?,   /etc/lvmtab.d(/.*)?,    /etc/lvm/cache(/.*)?,
373            /etc/multipath(/.*)?,      /etc/lvm/backup(/.*)?,     /etc/lvm/ar‐
374            chive(/.*)?, /var/cache/multipathd(/.*)?, /etc/lvm/.cache
375
376
377       lvm_tmp_t
378
379       - Set files with the lvm_tmp_t type, if you want to store lvm temporary
380       files in the /tmp directories.
381
382
383
384       lvm_unit_file_t
385
386       -  Set  files  with  the lvm_unit_file_t type, if you want to treat the
387       files as lvm unit content.
388
389
390       Paths:
391            /usr/lib/systemd/system/lvm2.*.service,   /usr/lib/systemd/genera‐
392            tor/lvm.*
393
394
395       lvm_var_lib_t
396
397       -  Set  files with the lvm_var_lib_t type, if you want to store the lvm
398       files under the /var/lib directory.
399
400
401
402       lvm_var_run_t
403
404       - Set files with the lvm_var_run_t type, if you want to store  the  lvm
405       files under the /run or /var/run directory.
406
407
408       Paths:
409            /var/run/lvm(/.*)?,  /var/run/dmevent.*,  /var/run/storaged(/.*)?,
410            /var/run/multipathd(/.*)?, /var/run/multipathd.sock
411
412
413       Note: File context can be temporarily modified with the chcon  command.
414       If  you want to permanently change the file context you need to use the
415       semanage fcontext command.  This will modify the SELinux labeling data‐
416       base.  You will need to use restorecon to apply the labels.
417
418

COMMANDS

420       semanage  fcontext  can also be used to manipulate default file context
421       mappings.
422
423       semanage permissive can also be used to manipulate  whether  or  not  a
424       process type is permissive.
425
426       semanage  module can also be used to enable/disable/install/remove pol‐
427       icy modules.
428
429       semanage boolean can also be used to manipulate the booleans
430
431
432       system-config-selinux is a GUI tool available to customize SELinux pol‐
433       icy settings.
434
435

AUTHOR

437       This manual page was auto-generated using sepolicy manpage .
438
439

SEE ALSO

441       selinux(8), lvm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) ,
442       setsebool(8)
443
444
445
446lvm                                19-04-25                     lvm_selinux(8)
Impressum