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