selinux-policy/policy/modules/apps/yam.if
2006-07-12 20:32:27 +00:00

77 lines
1.5 KiB
Plaintext

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