Chris PeBenito f30e6e
## <summary>Yum/Apt Mirroring</summary>
Chris PeBenito f30e6e
Chris PeBenito f30e6e
########################################
Chris PeBenito f30e6e
## <summary>
Chris PeBenito f30e6e
##	Execute yam in the yam domain.
Chris PeBenito f30e6e
## </summary>
Chris PeBenito f30e6e
## <param name="domain">
Chris PeBenito f30e6e
##	<summary>
Chris PeBenito f30e6e
##	Domain allowed access.
Chris PeBenito f30e6e
##	</summary>
Chris PeBenito f30e6e
## </param>
Chris PeBenito f30e6e
#
Chris PeBenito f30e6e
interface(`yam_domtrans',`
Chris PeBenito f30e6e
	gen_require(`
Chris PeBenito f30e6e
		type yam_t, yam_exec_t;
Chris PeBenito f30e6e
	')
Chris PeBenito f30e6e
Chris PeBenito f30e6e
	corecmd_search_sbin($1)
Chris PeBenito f30e6e
	domain_auto_trans($1,yam_exec_t,yam_t)
Chris PeBenito f30e6e
Chris PeBenito f30e6e
	allow $1 yam_t:fd use;
Chris PeBenito f30e6e
	allow yam_t $1:fd use;
Chris PeBenito f30e6e
	allow yam_t $1:fifo_file rw_file_perms;
Chris PeBenito f30e6e
	allow yam_t $1:process sigchld;
Chris PeBenito f30e6e
')
Chris PeBenito f30e6e
Chris PeBenito f30e6e
########################################
Chris PeBenito f30e6e
## <summary>
Chris PeBenito f30e6e
##	Execute yam in the yam domain, and
Chris PeBenito f30e6e
##	allow the specified role the yam domain.
Chris PeBenito f30e6e
## </summary>
Chris PeBenito f30e6e
## <param name="domain">
Chris PeBenito f30e6e
##	<summary>
Chris PeBenito f30e6e
##	Domain allowed access.
Chris PeBenito f30e6e
##	</summary>
Chris PeBenito f30e6e
## </param>
Chris PeBenito f30e6e
## <param name="role">
Chris PeBenito f30e6e
##	<summary>
Chris PeBenito f30e6e
##	The role to be allowed the yam domain.
Chris PeBenito f30e6e
##	</summary>
Chris PeBenito f30e6e
## </param>
Chris PeBenito f30e6e
## <param name="terminal">
Chris PeBenito f30e6e
##	<summary>
Chris PeBenito f30e6e
##	The type of the terminal allow the yam domain to use.
Chris PeBenito f30e6e
##	</summary>
Chris PeBenito f30e6e
## </param>
Chris PeBenito f30e6e
#
Chris PeBenito f30e6e
interface(`yam_run',`
Chris PeBenito f30e6e
	gen_require(`
Chris PeBenito f30e6e
		type yam_t;
Chris PeBenito f30e6e
	')
Chris PeBenito f30e6e
Chris PeBenito f30e6e
	yam_domtrans($1)
Chris PeBenito f30e6e
	role $2 types yam_t;
Chris PeBenito f30e6e
	allow yam_t $3:chr_file rw_term_perms;
Chris PeBenito f30e6e
')
Chris PeBenito f30e6e
Chris PeBenito f30e6e
########################################
Chris PeBenito f30e6e
## <summary>
Chris PeBenito f30e6e
##	Read yam content.
Chris PeBenito f30e6e
## </summary>
Chris PeBenito f30e6e
## <param name="domain">
Chris PeBenito f30e6e
##	<summary>
Chris PeBenito f30e6e
##	Domain allowed access.
Chris PeBenito f30e6e
##	</summary>
Chris PeBenito f30e6e
## </param>
Chris PeBenito f30e6e
#
Chris PeBenito f30e6e
interface(`yam_read_content',`
Chris PeBenito f30e6e
	gen_require(`
Chris PeBenito f30e6e
		type yam_content_t;
Chris PeBenito f30e6e
	')
Chris PeBenito f30e6e
Chris PeBenito f30e6e
	allow $1 yam_content_t:dir list_dir_perms;
Chris PeBenito f30e6e
	allow $1 yam_content_t:file read_file_perms;
Chris PeBenito f30e6e
	allow $1 yam_content_t:lnk_file { getattr read };
Chris PeBenito f30e6e
')