2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Spice agent for Linux.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run vdagent.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`vdagent_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type vdagent_t, vdagent_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, vdagent_exec_t, vdagent_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
## <summary>
|
|
|
|
## Get attributes of vdagent executable files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`vdagent_getattr_exec_files',`
|
|
|
|
gen_require(`
|
|
|
|
type vdagent_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 vdagent_exec_t:file getattr_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Get attributes of vdagent log files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`vdagent_getattr_log',`
|
|
|
|
gen_require(`
|
|
|
|
type vdagent_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
allow $1 vdagent_log_t:file getattr_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2020-06-27 20:49:41 +00:00
|
|
|
## Read vdagent pid files. (Deprecated)
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`vdagent_read_pid_files',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated.')
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to vdagent with a unix
|
|
|
|
## domain stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`vdagent_stream_connect',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type vdagent_runtime_t, vdagent_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
|
|
|
stream_connect_pattern($1, vdagent_runtime_t, vdagent_runtime_t, vdagent_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an vdagent environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`vdagent_admin',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type vdagent_t, vdagent_runtime_t, vdagentd_initrc_exec_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
type vdagent_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 vdagent_t:process signal_perms;
|
|
|
|
ps_process_pattern($1, vdagent_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, vdagentd_t, vdagentd_initrc_exec_t)
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
admin_pattern($1, vdagent_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, vdagent_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|