Chris PeBenito a3cf80
## <summary>Xen hypervisor</summary>
Chris PeBenito a3cf80
Chris PeBenito a3cf80
########################################
Chris PeBenito a3cf80
## <summary>
Chris PeBenito a3cf80
##	Execute a domain transition to run xend.
Chris PeBenito a3cf80
## </summary>
Chris PeBenito a3cf80
## <param name="domain">
Chris PeBenito a3cf80
## 	<summary>
Chris PeBenito a3cf80
##	Domain allowed to transition.
Chris PeBenito a3cf80
## 	</summary>
Chris PeBenito a3cf80
## </param>
Chris PeBenito a3cf80
#
Chris PeBenito a3cf80
interface(`xen_domtrans',`
Chris PeBenito a3cf80
	gen_requires(`
Chris PeBenito a3cf80
		type xend_t, xend_exec_t;
Chris PeBenito a3cf80
	')
Chris PeBenito a3cf80
Chris PeBenito a3cf80
	domain_auto_trans($1,xend_exec_t,xend_t)
Chris PeBenito a3cf80
Chris PeBenito a3cf80
	allow $1 xend_t:fd use;
Chris PeBenito a3cf80
	allow xend_t $1:fd use;
Chris PeBenito a3cf80
	allow xend_t $1:fifo_file rw_file_perms;
Chris PeBenito a3cf80
	allow xend_t $1:process sigchld;
Chris PeBenito a3cf80
')
Chris PeBenito a3cf80
Chris PeBenito a3cf80
Chris PeBenito a3cf80
########################################
Chris PeBenito a3cf80
## <summary>
Chris PeBenito a3cf80
##	Allow the specified domain to append
Chris PeBenito a3cf80
##	xend log files.
Chris PeBenito a3cf80
## </summary>
Chris PeBenito a3cf80
## <param name="domain">
Chris PeBenito a3cf80
## 	<summary>
Chris PeBenito a3cf80
##	Domain allowed to transition.
Chris PeBenito a3cf80
## 	</summary>
Chris PeBenito a3cf80
## </param>
Chris PeBenito a3cf80
#
Chris PeBenito a3cf80
interface(`xen_append_log',`
Chris PeBenito a3cf80
	gen_require(`
Chris PeBenito a3cf80
		type var_log_t, xend_var_log_t;
Chris PeBenito a3cf80
	')
Chris PeBenito a3cf80
Chris PeBenito a3cf80
	logging_search_logs($1)
Chris PeBenito a3cf80
	allow $1 xend_var_log_t:file { getattr append };
Chris PeBenito a3cf80
	dontaudit $1 xend_var_log_t:file write;
Chris PeBenito a3cf80
')
Chris PeBenito a3cf80
Chris PeBenito a3cf80
########################################
Chris PeBenito a3cf80
## <summary>
Chris PeBenito 0e1c46
##	Do not audit attempts to read and write
Chris PeBenito e99359
##	Xen unix domain stream sockets.  These
Chris PeBenito e99359
##	are leaked file descriptors.
Chris PeBenito 0e1c46
## </summary>
Chris PeBenito 0e1c46
## <param name="domain">
Chris PeBenito 0e1c46
##	<summary>
Chris PeBenito e99359
##	Domain to not audit.
Chris PeBenito 0e1c46
##	</summary>
Chris PeBenito 0e1c46
## </param>
Chris PeBenito 0e1c46
#
Chris PeBenito 0e1c46
interface(`xen_dontaudit_rw_unix_stream_sockets',`
Chris PeBenito 0e1c46
       gen_require(`
Chris PeBenito 0e1c46
               type xend_t;
Chris PeBenito 0e1c46
       ')
Chris PeBenito 0e1c46
Chris PeBenito 0e1c46
       dontaudit $1 xend_t:unix_stream_socket { read write };
Chris PeBenito 0e1c46
')
Chris PeBenito 0e1c46
Chris PeBenito 0e1c46
########################################
Chris PeBenito 0e1c46
## <summary>
Chris PeBenito a3cf80
##	Connect to xenstored over an unix stream socket.
Chris PeBenito a3cf80
## </summary>
Chris PeBenito a3cf80
## <param name="domain">
Chris PeBenito a3cf80
##	<summary>
Chris PeBenito a3cf80
##	Domain allowed access.
Chris PeBenito a3cf80
##	</summary>
Chris PeBenito a3cf80
## </param>
Chris PeBenito a3cf80
#
Chris PeBenito a3cf80
interface(`xen_stream_connect_xenstore',`
Chris PeBenito a3cf80
	gen_require(`
Chris PeBenito a3cf80
		type xenstored_t, xenstored_var_run_t;
Chris PeBenito a3cf80
	')
Chris PeBenito a3cf80
Chris PeBenito a3cf80
	files_search_pids($1)
Chris PeBenito a3cf80
	allow $1 xenstored_var_run_t:dir search;
Chris PeBenito a3cf80
	allow $1 xenstored_var_run_t:sock_file { getattr write };
Chris PeBenito a3cf80
	allow $1 xenstored_t:unix_stream_socket connectto;
Chris PeBenito a3cf80
')
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
## <summary>
Chris PeBenito e99359
##	Connect to xend over an unix domain stream socket.
Chris PeBenito e99359
## </summary>
Chris PeBenito e99359
## <param name="domain">
Chris PeBenito e99359
##	<summary>
Chris PeBenito e99359
##	Domain allowed access.
Chris PeBenito e99359
##	</summary>
Chris PeBenito e99359
## </param>
Chris PeBenito e99359
#
Chris PeBenito e99359
interface(`xen_stream_connect',`
Chris PeBenito e99359
	gen_require(`
Chris PeBenito e99359
		type xend_t, xend_var_run_t;
Chris PeBenito e99359
	')
Chris PeBenito e99359
Chris PeBenito e99359
	files_search_pids($1)
Chris PeBenito e99359
	allow $1 xend_var_run_t:dir search;
Chris PeBenito e99359
	allow $1 xend_var_run_t:sock_file { getattr write };
Chris PeBenito e99359
	allow $1 xend_t:unix_stream_socket connectto;
Chris PeBenito e99359
')
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
## <summary>
Chris PeBenito e99359
##	Execute a domain transition to run xm.
Chris PeBenito e99359
## </summary>
Chris PeBenito e99359
## <param name="domain">
Chris PeBenito e99359
## <summary>
Chris PeBenito e99359
##	Domain allowed to transition.
Chris PeBenito e99359
## </summary>
Chris PeBenito e99359
## </param>
Chris PeBenito e99359
#
Chris PeBenito e99359
interface(`xen_domtrans_xm',`
Chris PeBenito e99359
	gen_requires(`
Chris PeBenito e99359
		type xm_t, xm_exec_t;
Chris PeBenito e99359
	')
Chris PeBenito e99359
Chris PeBenito e99359
	domain_auto_trans($1,xm_exec_t,xm_t)
Chris PeBenito e99359
	allow xm_t $1:fd use;
Chris PeBenito e99359
	allow xm_t:$1:fifo_file rw_file_perms;
Chris PeBenito e99359
	allow xm_t $1:process sigchld;
Chris PeBenito e99359
')