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 daa0e0
## <interface name="lvm_transition">
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
##	<infoflow type="write" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 1bde83
#
Chris PeBenito 1bde83
define(`lvm_transition',`
Chris PeBenito 1bde83
requires_block_template(`$0'_depend)
Chris PeBenito 1bde83
allow $1 lvm_exec_t:file { getattr read execute };
Chris PeBenito 1bde83
allow $1 lvm_t:process transition;
Chris PeBenito e7fcdc
type_transition $1 lvm_exec_t:process lvm_t;
Chris PeBenito 1bde83
dontaudit $1 lvm_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 4bf4ed
allow $1 lvm_t:fd use;
Chris PeBenito 4bf4ed
allow lvm_t $1:fd use;
Chris PeBenito 4bf4ed
allow lvm_t $1:fifo_file rw_file_perms;
Chris PeBenito 4bf4ed
allow lvm_t $1:process sigchld;
Chris PeBenito 1bde83
')
Chris PeBenito 1bde83
Chris PeBenito 1bde83
define(`lvm_transition_depend',`
Chris PeBenito 1bde83
type lvm_t, lvm_exec_t;
Chris PeBenito 1bde83
class file { getattr read execute };
Chris PeBenito 4bf4ed
class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 4bf4ed
class fd use;
Chris PeBenito 4bf4ed
class fifo_file rw_file_perms;
Chris PeBenito 1bde83
')
Chris PeBenito 1bde83
Chris PeBenito daa0e0
########################################
Chris PeBenito daa0e0
## <interface name="lvm_transition_add_role_use_terminal">
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
##	<infoflow type="both" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 1bde83
#
Chris PeBenito daa0e0
define(`lvm_transition_add_role_use_terminal',`
Chris PeBenito daa0e0
requires_block_template(`$0'_depend)
Chris PeBenito daa0e0
lvm_transition($1)
Chris PeBenito daa0e0
role $2 types lvm_t;
Chris PeBenito daa0e0
allow lvm_t $3:chr_file { getattr read write ioctl };
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
define(`lvm_transition_add_role_use_terminal_depend',`
Chris PeBenito daa0e0
type lvm_t;
Chris PeBenito daa0e0
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
##	<infoflow type="read" weight="10"/>
Chris PeBenito daa0e0
## </interface>
Chris PeBenito 1bde83
#
Chris PeBenito 1bde83
define(`lvm_read_config',`
Chris PeBenito 1bde83
requires_block_template(`$0'_depend)
Chris PeBenito 1bde83
allow $1 lvm_etc_t:dir { getattr search read };
Chris PeBenito 1bde83
allow $1 lvm_etc_t:file { getattr read };
Chris PeBenito 1bde83
')
Chris PeBenito 1bde83
Chris PeBenito 1bde83
define(`lvm_read_config_depend',`
Chris PeBenito 1bde83
type lvm_t, lvm_exec_t;
Chris PeBenito 1bde83
class file { getattr read };
Chris PeBenito 1bde83
')
Chris PeBenito 1bde83
Chris PeBenito 4bf4ed
## </module>