## <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>
<<<<<<< HEAD
## Getattr on vdagent executable.
=======
## Get attributes of vdagent executable files.
>>>>>>> 662a00bca8f52af8056f41abd0fdec77ea835b2a
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`vdagent_getattr_exec_files',`
gen_require(`
type vdagent_exec_t;
')
<<<<<<< HEAD
allow $1 vdagent_exec_t:file getattr;
=======
allow $1 vdagent_exec_t:file getattr_file_perms;
>>>>>>> 662a00bca8f52af8056f41abd0fdec77ea835b2a
')
#######################################
## <summary>
<<<<<<< HEAD
## Get the attributes of vdagent logs.
=======
## Get attributes of vdagent log files.
>>>>>>> 662a00bca8f52af8056f41abd0fdec77ea835b2a
## </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>
## Read vdagent pid files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`vdagent_read_pid_files',`
gen_require(`
type vdagent_var_run_t;
')
files_search_pids($1)
allow $1 vdagent_var_run_t:file read_file_perms;
')
#####################################
## <summary>
<<<<<<< HEAD
## Connect to vdagent over a unix domain
## stream socket.
=======
## Connect to vdagent with a unix
## domain stream socket.
>>>>>>> 662a00bca8f52af8056f41abd0fdec77ea835b2a
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`vdagent_stream_connect',`
gen_require(`
type vdagent_var_run_t, vdagent_t;
')
files_search_pids($1)
stream_connect_pattern($1, vdagent_var_run_t, vdagent_var_run_t, vdagent_t)
')
########################################
## <summary>
## All of the rules required to
## administrate an vdagent environment.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`vdagent_admin',`
gen_require(`
type vdagent_t, vdagent_var_run_t, vdagentd_initrc_exec_t;
type vdagent_log_t;
')
allow $1 vdagent_t:process signal_perms;
ps_process_pattern($1, vdagent_t)
tunable_policy(`deny_ptrace',`',`
allow $1 vdagent_t:process ptrace;
')
init_labeled_script_domtrans($1, vdagentd_initrc_exec_t)
domain_system_change_exemption($1)
role_transition $2 vdagentd_initrc_exec_t system_r;
allow $2 system_r;
logging_search_logs($1)
admin_pattern($1, vdagent_log_t)
files_search_pids($1)
admin_pattern($1, vdagent_var_run_t)
')