|
Chris PeBenito |
77b81c |
## <summary>Mplayer media player and encoder</summary>
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
#######################################
|
|
Chris PeBenito |
77b81c |
## <summary>
|
|
Chris PeBenito |
bbcd3c |
## The per role template for the mplayer module.
|
|
Chris PeBenito |
77b81c |
## </summary>
|
|
Chris PeBenito |
77b81c |
## <desc>
|
|
Chris PeBenito |
77b81c |
##
|
|
Chris PeBenito |
77b81c |
## This template creates a derived domains which are used
|
|
Chris PeBenito |
77b81c |
## for mplayer media player.
|
|
Chris PeBenito |
77b81c |
##
|
|
Chris PeBenito |
77b81c |
##
|
|
Chris PeBenito |
77b81c |
## This template is invoked automatically for each user, and
|
|
Chris PeBenito |
77b81c |
## generally does not need to be invoked directly
|
|
Chris PeBenito |
77b81c |
## by policy writers.
|
|
Chris PeBenito |
77b81c |
##
|
|
Chris PeBenito |
77b81c |
## </desc>
|
|
Chris PeBenito |
77b81c |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
77b81c |
## <summary>
|
|
Chris PeBenito |
77b81c |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
77b81c |
## is the prefix for user_t).
|
|
Chris PeBenito |
77b81c |
## </summary>
|
|
Chris PeBenito |
77b81c |
## </param>
|
|
Chris PeBenito |
77b81c |
## <param name="user_domain">
|
|
Chris PeBenito |
77b81c |
## <summary>
|
|
Chris PeBenito |
77b81c |
## The type of the user domain.
|
|
Chris PeBenito |
77b81c |
## </summary>
|
|
Chris PeBenito |
77b81c |
## </param>
|
|
Chris PeBenito |
77b81c |
## <param name="user_role">
|
|
Chris PeBenito |
77b81c |
## <summary>
|
|
Chris PeBenito |
77b81c |
## The role associated with the user domain.
|
|
Chris PeBenito |
77b81c |
## </summary>
|
|
Chris PeBenito |
77b81c |
## </param>
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
bbcd3c |
template(`mplayer_per_role_template',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type mencoder_exec_t, mplayer_exec_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
########################################
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
# Declarations
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
type $1_mencoder_t;
|
|
Chris PeBenito |
d46cfe |
application_domain($1_mencoder_t,mencoder_exec_t)
|
|
Chris PeBenito |
77b81c |
role $3 types $1_mencoder_t;
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
type $1_mplayer_t;
|
|
Chris PeBenito |
d46cfe |
application_domain($1_mplayer_t,mplayer_exec_t)
|
|
Chris PeBenito |
77b81c |
role $3 types $1_mplayer_t;
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
type $1_mplayer_home_t alias $1_mplayer_rw_t;
|
|
Chris PeBenito |
77b81c |
files_poly_member($1_mplayer_home_t)
|
|
Chris PeBenito |
77b81c |
userdom_user_home_content($1,$1_mplayer_home_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
type $1_mplayer_tmpfs_t;
|
|
Chris PeBenito |
77b81c |
files_tmpfs_file($1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
########################################
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
# mencoder local policy
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern($1_mencoder_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern($1_mencoder_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern($1_mencoder_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read global config
|
|
Chris PeBenito |
c0868a |
allow $1_mencoder_t mplayer_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern($1_mencoder_t,mplayer_etc_t,mplayer_etc_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern($1_mencoder_t,mplayer_etc_t,mplayer_etc_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# domain transition
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($2, mencoder_exec_t, $1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Allow the user domain to signal/ps.
|
|
Chris PeBenito |
c0868a |
ps_process_pattern($2,$1_mencoder_t,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
allow $2 $1_mencoder_t:process signal_perms;
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read /proc files and directories
|
|
Chris PeBenito |
77b81c |
# Necessary for /proc/meminfo, /proc/cpuinfo, etc..
|
|
Chris PeBenito |
77b81c |
kernel_read_system_state($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
# Sysctl on kernel version
|
|
Chris PeBenito |
77b81c |
kernel_read_kernel_sysctls($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Required for win32 binary loader
|
|
Chris PeBenito |
77b81c |
dev_rwx_zero($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
# Access to DVD/CD/V4L
|
|
Chris PeBenito |
77b81c |
dev_read_video_dev($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read data in /usr/share (fonts, icons..)
|
|
Chris PeBenito |
77b81c |
files_read_usr_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_read_usr_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
fs_search_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Access to DVD/CD/V4L
|
|
Chris PeBenito |
77b81c |
storage_raw_read_removable_device($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
libs_use_ld_so($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
libs_use_shared_libs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
miscfiles_read_localization($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_use_user_terminals($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
# Handle removable media, /tmp, and /home
|
|
Chris PeBenito |
77b81c |
userdom_list_user_tmp($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_symlinks($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_home_content_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_home_content_symlinks($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read content to encode
|
|
Chris PeBenito |
eeab57 |
ifdef(`enable_mls',`',`
|
|
Chris PeBenito |
77b81c |
fs_search_removable($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_removable_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_removable_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_execmem',`
|
|
Chris PeBenito |
77b81c |
allow $1_mencoder_t self:process execmem;
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_execmod',`
|
|
Chris PeBenito |
77b81c |
dev_execmod_zero($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_mplayer_execstack',`
|
|
Chris PeBenito |
77b81c |
allow $1_mencoder_t self:process { execmem execstack };
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read content to encode
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_nfs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_nfs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_read_nfs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_nfs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_cifs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_read_cifs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_read_cifs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_cifs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`read_default_t',`
|
|
Chris PeBenito |
77b81c |
files_list_default($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_read_default_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_read_default_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_read_default_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_default($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`read_untrusted_content',`
|
|
Chris PeBenito |
77b81c |
files_list_tmp($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_list_user_untrusted_content($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_untrusted_content_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_untrusted_content_symlinks($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_list_user_tmp_untrusted_content($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_untrusted_content_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_untrusted_content_symlinks($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_tmp($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_home_dirs($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_untrusted_content($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_read_user_untrusted_content_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_tmp_untrusted_content($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_read_user_tmp_untrusted_content_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
6b19be |
tunable_policy(`write_untrusted_content',`
|
|
Chris PeBenito |
6b19be |
userdom_manage_user_untrusted_content_files($1, $1_mplayer_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
77b81c |
# Save encoded files
|
|
Chris PeBenito |
77b81c |
tunable_policy(`write_untrusted_content && use_nfs_home_dirs',`
|
|
Chris PeBenito |
77b81c |
files_search_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
fs_search_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_manage_nfs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_manage_nfs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`write_untrusted_content && use_samba_home_dirs',`
|
|
Chris PeBenito |
77b81c |
files_search_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
fs_search_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_symlinks($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_manage_cifs_dirs($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_manage_cifs_files($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`write_untrusted_content',`
|
|
Chris PeBenito |
77b81c |
files_search_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_tmp_filetrans($1_mencoder_t,$1_untrusted_content_tmp_t,file)
|
|
Chris PeBenito |
77b81c |
files_tmp_filetrans($1_mencoder_t,$1_untrusted_content_tmp_t,dir)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_manage_user_untrusted_content_files($1,$1_mencoder_t,file)
|
|
Chris PeBenito |
77b81c |
userdom_manage_user_untrusted_content_files($1,$1_mencoder_t,dir)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_tmp($1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_home_dirs($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_manage_user_tmp_files($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_manage_user_home_content_dirs($1,$1_mencoder_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
########################################
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
# mplayer local policy
|
|
Chris PeBenito |
77b81c |
#
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
allow $1_mplayer_t self:process { signal_perms getsched };
|
|
Chris PeBenito |
c0868a |
allow $1_mplayer_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
6b19be |
allow $1_mplayer_t self:sem create_sem_perms;
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern($1_mplayer_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern($1_mplayer_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern($1_mplayer_t,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
77b81c |
userdom_search_user_home_dirs($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern($1_mplayer_t,$1_mplayer_tmpfs_t,$1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern($1_mplayer_t,$1_mplayer_tmpfs_t,$1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
c0868a |
manage_fifo_files_pattern($1_mplayer_t,$1_mplayer_tmpfs_t,$1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
c0868a |
manage_sock_files_pattern($1_mplayer_t,$1_mplayer_tmpfs_t,$1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
77b81c |
fs_tmpfs_filetrans($1_mplayer_t,$1_mplayer_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read global config
|
|
Chris PeBenito |
c0868a |
allow $1_mplayer_t mplayer_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern($1_mplayer_t,mplayer_etc_t,mplayer_etc_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern($1_mplayer_t,mplayer_etc_t,mplayer_etc_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Home access
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
relabel_dirs_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
relabel_files_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
c0868a |
relabel_lnk_files_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# domain transition
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($2, mplayer_exec_t, $1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Allow the user domain to signal/ps.
|
|
Chris PeBenito |
c0868a |
ps_process_pattern($2,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
allow $2 $1_mplayer_t:process signal_perms;
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
kernel_dontaudit_list_unlabeled($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
kernel_dontaudit_getattr_unlabeled_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
kernel_dontaudit_read_unlabeled_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Necessary for /proc/meminfo, /proc/cpuinfo, etc..
|
|
Chris PeBenito |
77b81c |
kernel_read_system_state($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Sysctl on kernel version
|
|
Chris PeBenito |
77b81c |
kernel_read_kernel_sysctls($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Run bash/sed (??)
|
|
Chris PeBenito |
77b81c |
corecmd_exec_bin($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
corecmd_exec_shell($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Required for win32 binary loader
|
|
Chris PeBenito |
77b81c |
dev_rwx_zero($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Access to DVD/CD/V4L
|
|
Chris PeBenito |
77b81c |
dev_read_video_dev($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Audio, alsa.conf
|
|
Chris PeBenito |
77b81c |
dev_read_sound_mixer($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
dev_write_sound_mixer($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# RTC clock
|
|
Chris PeBenito |
77b81c |
dev_read_realtime_clock($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Access to DVD/CD/V4L
|
|
Chris PeBenito |
77b81c |
storage_raw_read_removable_device($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
files_read_etc_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_non_security($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_getattr_non_security_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_read_non_security_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Unfortunately the ancient file dialog starts in /
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Read /etc/mtab
|
|
Chris PeBenito |
77b81c |
files_read_etc_runtime_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Read data in /usr/share (fonts, icons..)
|
|
Chris PeBenito |
77b81c |
files_read_usr_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_read_usr_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_getattr_all_fs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_search_auto_mountpoints($1_mplayer_t)
|
|
Chris PeBenito |
6b19be |
fs_list_inotifyfs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
libs_use_ld_so($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
libs_use_shared_libs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
miscfiles_read_localization($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
miscfiles_read_fonts($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_use_user_terminals($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
# Read media files
|
|
Chris PeBenito |
77b81c |
userdom_list_user_tmp($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_symlinks($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_home_content_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_home_content_symlinks($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
xserver_user_client_template($1,$1_mplayer_t,$1_mplayer_tmpfs_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read songs
|
|
Chris PeBenito |
eeab57 |
ifdef(`enable_mls',`',`
|
|
Chris PeBenito |
77b81c |
fs_search_removable($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_removable_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_removable_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_execmem',`
|
|
Chris PeBenito |
77b81c |
allow $1_mplayer_t self:process execmem;
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_execmod',`
|
|
Chris PeBenito |
77b81c |
dev_execmod_zero($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_mplayer_execstack',`
|
|
Chris PeBenito |
77b81c |
allow $1_mplayer_t self:process { execmem execstack };
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_dirs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_nfs_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_dirs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_manage_cifs_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Legacy domain issues
|
|
Chris PeBenito |
77b81c |
tunable_policy(`allow_mplayer_execstack',`
|
|
Chris PeBenito |
77b81c |
allow $1_mplayer_t $1_mplayer_tmpfs_t:file execute;
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
# Read songs
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_list_auto_mountpoints($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_nfs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_nfs_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_read_nfs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_nfs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
77b81c |
fs_list_auto_mountpoints($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_cifs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_read_cifs_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_auto_mountpoints($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_read_cifs_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
fs_dontaudit_list_cifs($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`read_default_t',`
|
|
Chris PeBenito |
77b81c |
files_list_default($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_read_default_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_read_default_symlinks($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_read_default_files($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_default($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
tunable_policy(`read_untrusted_content',`
|
|
Chris PeBenito |
77b81c |
files_list_tmp($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
77b81c |
userdom_list_user_untrusted_content($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_untrusted_content_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_untrusted_content_symlinks($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_list_user_tmp_untrusted_content($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_untrusted_content_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_read_user_tmp_untrusted_content_symlinks($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
',`
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_tmp($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
files_dontaudit_list_home($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_home_dirs($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_untrusted_content($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_read_user_untrusted_content_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_list_user_tmp_untrusted_content($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
userdom_dontaudit_read_user_tmp_untrusted_content_files($1,$1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
77b81c |
alsa_read_rw_config($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
77b81c |
nscd_socket_use($1_mplayer_t)
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
77b81c |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Run mplayer in mplayer domain.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <desc>
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## Run mplayer in mplayer domain.
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## This is a templated interface, and should only
|
|
Chris PeBenito |
6b19be |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## </desc>
|
|
Chris PeBenito |
6b19be |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
6b19be |
## is the prefix for user_t).
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
template(`mplayer_domtrans_user_mplayer',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type $1_mplayer_t, mplayer_exec_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
domtrans_pattern($2, mplayer_exec_t,$1_mplayer_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Read mplayer per user homedir
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <desc>
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## Read mplayer per user homedir
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## This is a templated interface, and should only
|
|
Chris PeBenito |
6b19be |
## be called from a per-userdomain template.
|
|
Chris PeBenito |
6b19be |
##
|
|
Chris PeBenito |
6b19be |
## </desc>
|
|
Chris PeBenito |
6b19be |
## <param name="userdomain_prefix">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## The prefix of the user domain (e.g., user
|
|
Chris PeBenito |
6b19be |
## is the prefix for user_t).
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
6b19be |
template(`mplayer_read_user_home_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
type $1_mplayer_home_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
read_files_pattern($2,$1_mplayer_home_t,$1_mplayer_home_t)
|
|
Chris PeBenito |
6b19be |
')
|