Chris PeBenito f11f0c
Chris PeBenito 5ea24b
policy_module(timidity,1.1.0)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
# Note: You only need this policy if you want to run timidity as a server
Chris PeBenito f11f0c
Chris PeBenito f11f0c
########################################
Chris PeBenito f11f0c
#
Chris PeBenito f11f0c
# Declarations
Chris PeBenito f11f0c
#
Chris PeBenito f11f0c
Chris PeBenito f11f0c
type timidity_t;
Chris PeBenito f11f0c
type timidity_exec_t;
Chris PeBenito f11f0c
init_daemon_domain(timidity_t,timidity_exec_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
type timidity_tmpfs_t;
Chris PeBenito f11f0c
files_tmpfs_file(timidity_tmpfs_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
########################################
Chris PeBenito f11f0c
#
Chris PeBenito f11f0c
# Local policy
Chris PeBenito f11f0c
#
Chris PeBenito f11f0c
Chris PeBenito f11f0c
allow timidity_t self:capability { dac_override dac_read_search };
Chris PeBenito f11f0c
dontaudit timidity_t self:capability sys_tty_config;
Chris PeBenito f11f0c
allow timidity_t self:process { signal_perms getsched };
Chris PeBenito f11f0c
allow timidity_t self:shm create_shm_perms;
Chris PeBenito f11f0c
allow timidity_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito f11f0c
allow timidity_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito f11f0c
allow timidity_t self:udp_socket create_socket_perms;
Chris PeBenito f11f0c
Chris PeBenito f11f0c
allow timidity_t timidity_tmpfs_t:dir create_dir_perms;
Chris PeBenito f11f0c
allow timidity_t timidity_tmpfs_t:file create_file_perms;
Chris PeBenito f11f0c
allow timidity_t timidity_tmpfs_t:lnk_file create_lnk_perms;
Chris PeBenito f11f0c
allow timidity_t timidity_tmpfs_t:sock_file create_file_perms;
Chris PeBenito f11f0c
allow timidity_t timidity_tmpfs_t:fifo_file create_file_perms;
Chris PeBenito 9d5949
fs_filetrans_tmpfs(timidity_t,timidity_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
Chris PeBenito f11f0c
Chris PeBenito f11f0c
kernel_read_kernel_sysctl(timidity_t)
Chris PeBenito f11f0c
# read /proc/cpuinfo
Chris PeBenito f11f0c
kernel_read_system_state(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
corenet_tcp_sendrecv_generic_if(timidity_t)
Chris PeBenito f11f0c
corenet_udp_sendrecv_generic_if(timidity_t)
Chris PeBenito f11f0c
corenet_raw_sendrecv_generic_if(timidity_t)
Chris PeBenito f11f0c
corenet_tcp_sendrecv_all_nodes(timidity_t)
Chris PeBenito f11f0c
corenet_udp_sendrecv_all_nodes(timidity_t)
Chris PeBenito f11f0c
corenet_raw_sendrecv_all_nodes(timidity_t)
Chris PeBenito f11f0c
corenet_tcp_sendrecv_all_ports(timidity_t)
Chris PeBenito f11f0c
corenet_udp_sendrecv_all_ports(timidity_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(timidity_t)
Chris PeBenito f11f0c
corenet_tcp_bind_all_nodes(timidity_t)
Chris PeBenito f11f0c
corenet_udp_bind_all_nodes(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
dev_read_sysfs(timidity_t)
Chris PeBenito f11f0c
dev_read_snd_dev(timidity_t)
Chris PeBenito f11f0c
dev_write_snd_dev(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
fs_search_auto_mountpoints(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
term_dontaudit_use_console(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
domain_use_wide_inherit_fd(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
files_search_tmp(timidity_t)
Chris PeBenito f11f0c
# read /usr/share/alsa/alsa.conf
Chris PeBenito f11f0c
files_read_usr_files(timidity_t)
Chris PeBenito f11f0c
# read /etc/esd.conf
Chris PeBenito f11f0c
files_read_etc_files(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
init_use_fd(timidity_t)
Chris PeBenito f11f0c
init_use_script_pty(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
libs_use_ld_so(timidity_t)
Chris PeBenito f11f0c
libs_use_shared_libs(timidity_t)
Chris PeBenito f11f0c
# read libartscbackend.la
Chris PeBenito f11f0c
libs_read_lib(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
logging_send_syslog_msg(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
sysnet_read_config(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
userdom_dontaudit_use_unpriv_user_fd(timidity_t)
Chris PeBenito f11f0c
# stupid timidity won't start if it can't search its current directory.
Chris PeBenito f11f0c
# allow this so /etc/init.d/alsasound start works from /root
Chris PeBenito f11f0c
# cjp: this should be fixed if possible so this rule can be removed.
Chris PeBenito f11f0c
userdom_search_sysadm_home_dir(timidity_t)
Chris PeBenito f11f0c
Chris PeBenito f11f0c
ifdef(`targeted_policy',`
Chris PeBenito f11f0c
	term_dontaudit_use_unallocated_tty(timidity_t)
Chris PeBenito f11f0c
	term_dontaudit_use_generic_pty(timidity_t)
Chris PeBenito f11f0c
	files_dontaudit_read_root_file(timidity_t)
Chris PeBenito f11f0c
')
Chris PeBenito f11f0c
Chris PeBenito f11f0c
optional_policy(`selinuxutil',`
Chris PeBenito f11f0c
	seutil_sigchld_newrole(timidity_t)
Chris PeBenito f11f0c
')
Chris PeBenito f11f0c
Chris PeBenito f11f0c
optional_policy(`udev',`
Chris PeBenito f11f0c
	udev_read_db(timidity_t)
Chris PeBenito f11f0c
')