selinux-policy/policy/modules/apps/mplayer.if

105 lines
2.2 KiB
Plaintext
Raw Normal View History

2006-03-09 20:28:51 +00:00
## <summary>Mplayer media player and encoder</summary>
2008-11-05 16:10:46 +00:00
########################################
2006-03-09 20:28:51 +00:00
## <summary>
2008-11-05 16:10:46 +00:00
## Role access for mplayer
2006-03-09 20:28:51 +00:00
## </summary>
2008-11-05 16:10:46 +00:00
## <param name="role">
2006-03-09 20:28:51 +00:00
## <summary>
2008-11-05 16:10:46 +00:00
## Role allowed access
2006-03-09 20:28:51 +00:00
## </summary>
## </param>
2008-11-05 16:10:46 +00:00
## <param name="domain">
2006-03-09 20:28:51 +00:00
## <summary>
2008-11-05 16:10:46 +00:00
## User domain for the role
2006-03-09 20:28:51 +00:00
## </summary>
## </param>
#
2008-11-05 16:10:46 +00:00
interface(`mplayer_role',`
gen_require(`
2008-11-05 16:10:46 +00:00
type mencoder_t, mencoder_exec_t;
type mplayer_t, mplayer_exec_t;
type mplayer_home_t;
')
2006-03-09 20:28:51 +00:00
2008-11-05 16:10:46 +00:00
role $1 types { mencoder_t mplayer_t };
2008-10-17 15:52:39 +00:00
2006-03-09 20:28:51 +00:00
# domain transition
2008-11-05 16:10:46 +00:00
domtrans_pattern($2, mencoder_exec_t, mencoder_t)
2006-03-09 20:28:51 +00:00
# Allow the user domain to signal/ps.
2008-11-05 16:10:46 +00:00
ps_process_pattern($2, mencoder_t)
allow $2 mencoder_t:process signal_perms;
2006-03-09 20:28:51 +00:00
# Home access
2008-11-05 16:10:46 +00:00
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)
2006-03-09 20:28:51 +00:00
# domain transition
2008-11-05 16:10:46 +00:00
domtrans_pattern($2, mplayer_exec_t, mplayer_t)
2006-03-09 20:28:51 +00:00
# Allow the user domain to signal/ps.
2008-11-05 16:10:46 +00:00
ps_process_pattern($2, mplayer_t)
allow $2 mplayer_t:process signal_perms;
2006-03-09 20:28:51 +00:00
')
########################################
## <summary>
## Run mplayer in mplayer domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
2008-11-05 16:10:46 +00:00
interface(`mplayer_domtrans',`
gen_require(`
2008-11-05 16:10:46 +00:00
type mplayer_t, mplayer_exec_t;
')
2008-11-05 16:10:46 +00:00
domtrans_pattern($1, mplayer_exec_t, mplayer_t)
')
2009-03-11 13:32:23 +00:00
########################################
## <summary>
2009-06-26 14:40:13 +00:00
## Execute mplayer in the caller domain.
2009-03-11 13:32:23 +00:00
## </summary>
## <param name="domain">
2009-06-26 14:40:13 +00:00
## <summary>
## Domain allowed access.
## </summary>
2009-03-11 13:32:23 +00:00
## </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>
#
2008-11-05 16:10:46 +00:00
interface(`mplayer_read_user_home_files',`
gen_require(`
2008-11-05 16:10:46 +00:00
type mplayer_home_t;
')
2008-11-05 16:10:46 +00:00
read_files_pattern($1, mplayer_home_t, mplayer_home_t)
userdom_search_user_home_dirs($1)
')