2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Multilayer virtual switch.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute openvswitch in the openvswitch domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openvswitch_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type openvswitch_t, openvswitch_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, openvswitch_exec_t, openvswitch_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read openvswitch pid files. (Deprecated)
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openvswitch_read_pid_files',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated, please use openvswitch_read_runtime_files() instead.')
|
|
|
|
openvswitch_read_runtime_files($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read openvswitch runtime files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`openvswitch_read_runtime_files',`
|
2018-06-23 13:00:56 +00:00
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type openvswitch_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
read_files_pattern($1, openvswitch_runtime_t, openvswitch_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an openvswitch environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`openvswitch_admin',`
|
|
|
|
gen_require(`
|
|
|
|
type openvswitch_t, openvswitch_initrc_exec_t, openvswitch_conf_t;
|
2019-09-08 20:55:02 +00:00
|
|
|
type openvswitch_var_lib_t, openvswitch_log_t, openvswitch_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 openvswitch_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, openvswitch_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, openvswitch_t, openvswitch_initrc_exec_t)
|
|
|
|
|
|
|
|
files_search_etc($1)
|
|
|
|
admin_pattern($1, openvswitch_conf_t)
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
admin_pattern($1, openvswitch_var_lib_t)
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
admin_pattern($1, openvswitch_log_t)
|
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, openvswitch_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|