Chris PeBenito 4bf4ed
## <summary>Policy for logical volume management programs.</summary>
Chris PeBenito 1bde83
Chris PeBenito daa0e0
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute lvm programs in the lvm domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 1bde83
#
Chris PeBenito 199895
interface(`lvm_domtrans',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type lvm_t, lvm_exec_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	corecmd_search_sbin($1)
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 daa0e0
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute lvm programs in the lvm domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="role">
Chris PeBenito 414e41
##	The role to allow the LVM domain.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="terminal">
Chris PeBenito 414e41
##	The type of the terminal allow the LVM domain to use.
Chris PeBenito 414e41
## </param>
Chris PeBenito 1bde83
#
Chris PeBenito 199895
interface(`lvm_run',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 139520
		type lvm_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	lvm_domtrans($1)
Chris PeBenito 0c73cd
	role $2 types lvm_t;
Chris PeBenito 139520
	allow lvm_t $3:chr_file rw_term_perms;
Chris PeBenito daa0e0
')
Chris PeBenito daa0e0
Chris PeBenito daa0e0
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Read LVM configuration files.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 1bde83
#
Chris PeBenito 199895
interface(`lvm_read_config',`
Chris PeBenito 139520
	gen_require(`
Chris PeBenito 12ae75
		type lvm_t, lvm_etc_t;
Chris PeBenito 139520
	')
Chris PeBenito 0c73cd
Chris PeBenito 139520
	files_search_etc($1)
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