2005-05-31 19:52:57 +00:00
|
|
|
## <summary>Policy for logical volume management programs.</summary>
|
2005-05-13 14:36:35 +00:00
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute lvm programs in the lvm domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:36:35 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`lvm_domtrans',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type lvm_t, lvm_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1, lvm_exec_t, lvm_t)
|
2005-05-13 14:36:35 +00:00
|
|
|
')
|
|
|
|
|
2009-11-24 14:19:45 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2009-11-24 16:11:38 +00:00
|
|
|
## Execute lvm programs in the caller domain.
|
2009-11-24 14:19:45 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2009-11-24 16:11:38 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed access.
|
2009-11-24 16:11:38 +00:00
|
|
|
## </summary>
|
2009-11-24 14:19:45 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`lvm_exec',`
|
2009-11-24 16:11:38 +00:00
|
|
|
gen_require(`
|
|
|
|
type lvm_exec_t;
|
|
|
|
')
|
2009-11-24 14:19:45 +00:00
|
|
|
|
2010-05-24 15:06:48 +00:00
|
|
|
corecmd_search_bin($1)
|
2009-11-24 16:11:38 +00:00
|
|
|
can_exec($1, lvm_exec_t)
|
2009-11-24 14:19:45 +00:00
|
|
|
')
|
2009-11-24 16:11:38 +00:00
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute lvm programs in the lvm domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The role to allow the LVM domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-13 14:36:35 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`lvm_run',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
|
|
|
type lvm_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
lvm_domtrans($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types lvm_t;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2017-02-25 14:35:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send lvm a null signal.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2021-06-30 08:03:44 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2017-02-25 14:35:10 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`lvm_signull',`
|
|
|
|
gen_require(`
|
|
|
|
type lvm_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 lvm_t:process signull;
|
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read LVM configuration files.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-13 14:36:35 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`lvm_read_config',`
|
2005-06-17 17:59:26 +00:00
|
|
|
gen_require(`
|
2007-03-06 15:35:02 +00:00
|
|
|
type lvm_etc_t;
|
2005-06-17 17:59:26 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 lvm_etc_t:dir list_dir_perms;
|
2009-05-06 14:44:57 +00:00
|
|
|
read_files_pattern($1, lvm_etc_t, lvm_etc_t)
|
2005-05-13 14:36:35 +00:00
|
|
|
')
|
2007-03-06 15:35:02 +00:00
|
|
|
|
2020-03-17 12:39:30 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Map lvm config files.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Allow the specified domain to map lvm config files.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## Related interfaces:
|
|
|
|
## </p>
|
|
|
|
## <ul>
|
|
|
|
## <li>lvm_read_config()</li>
|
|
|
|
## </ul>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`lvm_map_config',`
|
|
|
|
gen_require(`
|
|
|
|
type lvm_etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 lvm_etc_t:file map;
|
|
|
|
')
|
|
|
|
|
2007-03-06 15:35:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Manage LVM configuration files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`lvm_manage_config',`
|
|
|
|
gen_require(`
|
|
|
|
type lvm_etc_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2009-05-06 14:44:57 +00:00
|
|
|
manage_dirs_pattern($1, lvm_etc_t, lvm_etc_t)
|
|
|
|
manage_files_pattern($1, lvm_etc_t, lvm_etc_t)
|
2007-03-06 15:35:02 +00:00
|
|
|
')
|
2009-11-24 14:19:45 +00:00
|
|
|
|
2015-10-23 14:16:59 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create lvm_lock_t directories
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`lvm_create_lock_dirs',`
|
|
|
|
gen_require(`
|
|
|
|
type lvm_lock_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
create_dirs_pattern($1, lvm_lock_t, lvm_lock_t)
|
|
|
|
files_add_entry_lock_dirs($1)
|
|
|
|
')
|
|
|
|
|
2017-02-24 01:03:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read and write a lvm unnamed pipe. (Deprecated)
|
2017-02-24 01:03:23 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2021-06-30 08:03:44 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
2017-02-24 01:03:23 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`lvm_rw_inherited_pid_pipes',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated.')
|
2017-02-24 01:03:23 +00:00
|
|
|
')
|
|
|
|
|
2015-07-11 09:15:44 +00:00
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an lvm environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`lvm_admin',`
|
|
|
|
gen_require(`
|
2021-03-06 18:40:58 +00:00
|
|
|
type lvm_t, lvm_etc_t, lvm_lock_t, lvm_metadata_t;
|
|
|
|
type lvm_var_lib_t, lvm_runtime_t, lvm_tmp_t;
|
2015-07-11 09:15:44 +00:00
|
|
|
')
|
|
|
|
|
2021-03-06 18:40:58 +00:00
|
|
|
admin_process_pattern($1, lvm_t)
|
2015-07-11 09:15:44 +00:00
|
|
|
|
|
|
|
files_search_etc($1)
|
2017-03-12 09:32:02 +00:00
|
|
|
admin_pattern($1, { lvm_etc_t lvm_metadata_t })
|
2015-07-11 09:15:44 +00:00
|
|
|
|
|
|
|
files_search_locks($1)
|
|
|
|
admin_pattern($1, lvm_lock_t)
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
admin_pattern($1, lvm_var_lib_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2021-03-06 18:40:58 +00:00
|
|
|
admin_pattern($1, lvm_runtime_t)
|
2015-07-11 09:15:44 +00:00
|
|
|
|
|
|
|
files_search_tmp($1)
|
|
|
|
admin_pattern($1, lvm_tmp_t)
|
|
|
|
')
|