|
Chris PeBenito |
4bf4ed |
## <module name="lvm" layer="system">
|
|
Chris PeBenito |
4bf4ed |
## <summary>Policy for logical volume management programs.</summary>
|
|
Chris PeBenito |
1bde83 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="lvm_domtrans">
|
|
Chris PeBenito |
daa0e0 |
## <description>
|
|
Chris PeBenito |
daa0e0 |
## Execute lvm programs in the lvm domain.
|
|
Chris PeBenito |
daa0e0 |
## </description>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="domain">
|
|
Chris PeBenito |
daa0e0 |
## The type of the process performing this action.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## </interface>
|
|
Chris PeBenito |
1bde83 |
#
|
|
Chris PeBenito |
c9428d |
define(`lvm_domtrans',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
80048c |
domain_auto_trans($1, lvm_exec_t, lvm_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 lvm_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow lvm_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow lvm_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow lvm_t $1:process sigchld;
|
|
Chris PeBenito |
1bde83 |
')
|
|
Chris PeBenito |
1bde83 |
|
|
Chris PeBenito |
c9428d |
define(`lvm_domtrans_depend',`
|
|
Chris PeBenito |
0c73cd |
type lvm_t, lvm_exec_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class file { getattr read execute };
|
|
Chris PeBenito |
0c73cd |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
0c73cd |
class fd use;
|
|
Chris PeBenito |
0c73cd |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
1bde83 |
')
|
|
Chris PeBenito |
1bde83 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
c9428d |
## <interface name="lvm_run">
|
|
Chris PeBenito |
daa0e0 |
## <description>
|
|
Chris PeBenito |
daa0e0 |
## Execute lvm programs in the lvm domain.
|
|
Chris PeBenito |
daa0e0 |
## </description>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="domain">
|
|
Chris PeBenito |
daa0e0 |
## The type of the process performing this action.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="role">
|
|
Chris PeBenito |
daa0e0 |
## The role to allow the LVM domain.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="terminal">
|
|
Chris PeBenito |
daa0e0 |
## The type of the terminal allow the LVM domain to use.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## </interface>
|
|
Chris PeBenito |
1bde83 |
#
|
|
Chris PeBenito |
c9428d |
define(`lvm_run',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
lvm_domtrans($1)
|
|
Chris PeBenito |
0c73cd |
role $2 types lvm_t;
|
|
Chris PeBenito |
0c73cd |
allow lvm_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
c9428d |
define(`lvm_run_depend',`
|
|
Chris PeBenito |
0c73cd |
type lvm_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
daa0e0 |
## <interface name="lvm_read_config">
|
|
Chris PeBenito |
daa0e0 |
## <description>
|
|
Chris PeBenito |
daa0e0 |
## Read LVM configuration files.
|
|
Chris PeBenito |
daa0e0 |
## </description>
|
|
Chris PeBenito |
daa0e0 |
## <parameter name="domain">
|
|
Chris PeBenito |
daa0e0 |
## The type of the process performing this action.
|
|
Chris PeBenito |
daa0e0 |
## </parameter>
|
|
Chris PeBenito |
daa0e0 |
## </interface>
|
|
Chris PeBenito |
1bde83 |
#
|
|
Chris PeBenito |
1bde83 |
define(`lvm_read_config',`
|
|
Chris PeBenito |
0c73cd |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
80048c |
allow $1 lvm_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
80048c |
allow $1 lvm_etc_t:file r_file_perms;
|
|
Chris PeBenito |
1bde83 |
')
|
|
Chris PeBenito |
1bde83 |
|
|
Chris PeBenito |
1bde83 |
define(`lvm_read_config_depend',`
|
|
Chris PeBenito |
0c73cd |
type lvm_t, lvm_exec_t;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
80048c |
class dir r_dir_perms;
|
|
Chris PeBenito |
80048c |
class file r_file_perms;
|
|
Chris PeBenito |
1bde83 |
')
|
|
Chris PeBenito |
1bde83 |
|
|
Chris PeBenito |
4bf4ed |
## </module>
|