selinux-policy/policy/modules/apps/mplayer.if
Dominick Grift 03b86663f0 apps: domain { allowed to transition, allowed access, to not audit }.
Signed-off-by: Dominick Grift <domg472@gmail.com>
2010-08-05 08:20:59 -04:00

105 lines
2.2 KiB
Plaintext

## <summary>Mplayer media player and encoder</summary>
########################################
## <summary>
## Role access for mplayer
## </summary>
## <param name="role">
## <summary>
## Role allowed access
## </summary>
## </param>
## <param name="domain">
## <summary>
## User domain for the role
## </summary>
## </param>
#
interface(`mplayer_role',`
gen_require(`
type mencoder_t, mencoder_exec_t;
type mplayer_t, mplayer_exec_t;
type mplayer_home_t;
')
role $1 types { mencoder_t mplayer_t };
# domain transition
domtrans_pattern($2, mencoder_exec_t, mencoder_t)
# Allow the user domain to signal/ps.
ps_process_pattern($2, mencoder_t)
allow $2 mencoder_t:process signal_perms;
# Home access
manage_dirs_pattern($2, mplayer_home_t, mplayer_home_t)
manage_files_pattern($2, mplayer_home_t, mplayer_home_t)
manage_lnk_files_pattern($2, mplayer_home_t, mplayer_home_t)
relabel_dirs_pattern($2, mplayer_home_t, mplayer_home_t)
relabel_files_pattern($2, mplayer_home_t, mplayer_home_t)
relabel_lnk_files_pattern($2, mplayer_home_t, mplayer_home_t)
# domain transition
domtrans_pattern($2, mplayer_exec_t, mplayer_t)
# Allow the user domain to signal/ps.
ps_process_pattern($2, mplayer_t)
allow $2 mplayer_t:process signal_perms;
')
########################################
## <summary>
## Run mplayer in mplayer domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`mplayer_domtrans',`
gen_require(`
type mplayer_t, mplayer_exec_t;
')
domtrans_pattern($1, mplayer_exec_t, mplayer_t)
')
########################################
## <summary>
## Execute mplayer in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
#
interface(`mplayer_exec',`
gen_require(`
type mplayer_exec_t;
')
can_exec($1, mplayer_exec_t)
')
########################################
## <summary>
## Read mplayer per user homedir
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`mplayer_read_user_home_files',`
gen_require(`
type mplayer_home_t;
')
read_files_pattern($1, mplayer_home_t, mplayer_home_t)
userdom_search_user_home_dirs($1)
')