Chris PeBenito 77b81c
## <summary>Mplayer media player and encoder</summary>
Chris PeBenito 77b81c
Chris PeBenito 77b81c
#######################################
Chris PeBenito 77b81c
## <summary>
Chris PeBenito 77b81c
##	The per user domain 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 77b81c
template(`mplayer_per_userdomain_template',`
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 77b81c
	domain_type($1_mencoder_t)
Chris PeBenito 77b81c
	domain_entry_file($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 77b81c
	domain_type($1_mplayer_t)
Chris PeBenito 77b81c
	domain_entry_file($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 77b81c
	allow $1_mencoder_t $1_mplayer_home_t:dir create_dir_perms;
Chris PeBenito 77b81c
	allow $1_mencoder_t $1_mplayer_home_t:file create_file_perms;
Chris PeBenito 77b81c
	allow $1_mencoder_t $1_mplayer_home_t:lnk_file create_lnk_perms;
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	# Read global config
Chris PeBenito 77b81c
	allow $1_mencoder_t mplayer_etc_t:dir r_dir_perms;
Chris PeBenito 77b81c
	allow $1_mencoder_t mplayer_etc_t:file r_file_perms;
Chris PeBenito 77b81c
	allow $1_mencoder_t mplayer_etc_t:lnk_file { getattr read };
Chris PeBenito 77b81c
	
Chris PeBenito 77b81c
	# domain transition
Chris PeBenito 77b81c
	domain_auto_trans($2, mencoder_exec_t, $1_mencoder_t)
Chris PeBenito 77b81c
	allow $2 $1_mencoder_t:fd use;
Chris PeBenito 77b81c
	allow $1_mencoder_t $2:fd use;
Chris PeBenito 77b81c
	allow $1_mencoder_t $2:fifo_file rw_file_perms;
Chris PeBenito 77b81c
	allow $1_mencoder_t $2:process sigchld;
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	# Allow the user domain to signal/ps.
Chris PeBenito 77b81c
	allow $2 $1_mencoder_t:dir { search getattr read };
Chris PeBenito 77b81c
	allow $2 $1_mencoder_t:{ file lnk_file } { read getattr };
Chris PeBenito 77b81c
	allow $2 $1_mencoder_t:process getattr;
Chris PeBenito 77b81c
	# We need to suppress this denial because procps tries to access
Chris PeBenito 77b81c
	# /proc/pid/environ and this now triggers a ptrace check in recent kernels
Chris PeBenito 77b81c
	# (2.4 and 2.6).  Might want to change procps to not do this, or only if
Chris PeBenito 77b81c
	# running in a privileged domain.
Chris PeBenito 77b81c
	dontaudit $2 $1_mencoder_t:process ptrace;
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 77b81c
	ifdef(`mls_policy',`',`
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 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 77b81c
	allow $1_mplayer_t self:fifo_file rw_file_perms;
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_home_t:dir manage_dir_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_home_t:file manage_file_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_home_t:lnk_file create_lnk_perms;
Chris PeBenito 77b81c
	userdom_search_user_home_dirs($1,$1_mplayer_t)
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_tmpfs_t:dir rw_dir_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_tmpfs_t:file manage_file_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_tmpfs_t:lnk_file create_lnk_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_tmpfs_t:sock_file manage_file_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $1_mplayer_tmpfs_t:fifo_file manage_file_perms;
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 77b81c
	allow $1_mplayer_t mplayer_etc_t:dir r_dir_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t mplayer_etc_t:file r_file_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t mplayer_etc_t:lnk_file { getattr read };
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	# Home access
Chris PeBenito 77b81c
	allow $2 $1_mplayer_home_t:dir manage_dir_perms;
Chris PeBenito 77b81c
	allow $2 $1_mplayer_home_t:file manage_file_perms;
Chris PeBenito 77b81c
	allow $2 $1_mplayer_home_t:lnk_file create_lnk_perms;
Chris PeBenito 77b81c
	allow $2 $1_mplayer_home_t:{ dir file lnk_file } { relabelfrom relabelto };
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	# domain transition
Chris PeBenito 77b81c
	domain_auto_trans($2, mplayer_exec_t, $1_mplayer_t)
Chris PeBenito 77b81c
	allow $2 $1_mplayer_t:fd use;
Chris PeBenito 77b81c
	allow $1_mplayer_t $2:fd use;
Chris PeBenito 77b81c
	allow $1_mplayer_t $2:fifo_file rw_file_perms;
Chris PeBenito 77b81c
	allow $1_mplayer_t $2:process sigchld;
Chris PeBenito 77b81c
Chris PeBenito 77b81c
	# Allow the user domain to signal/ps.
Chris PeBenito 77b81c
	allow $2 $1_mplayer_t:dir { search getattr read };
Chris PeBenito 77b81c
	allow $2 $1_mplayer_t:{ file lnk_file } { read getattr };
Chris PeBenito 77b81c
	allow $2 $1_mplayer_t:process getattr;
Chris PeBenito 77b81c
	# We need to suppress this denial because procps tries to access
Chris PeBenito 77b81c
	# /proc/pid/environ and this now triggers a ptrace check in recent kernels
Chris PeBenito 77b81c
	# (2.4 and 2.6).  Might want to change procps to not do this, or only if
Chris PeBenito 77b81c
	# running in a privileged domain.
Chris PeBenito 77b81c
	dontaudit $2 $1_mplayer_t:process ptrace;
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 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 77b81c
	ifdef(`mls_policy',`',`
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
')