Chris PeBenito 9570b2
policy_module(timidity, 1.9.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Note: You only need this policy if you want to run timidity as a server
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type timidity_t;
Chris PeBenito 17de1b
type timidity_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(timidity_t, timidity_exec_t)
Chris PeBenito 0bfccd
application_domain(timidity_t, timidity_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type timidity_tmpfs_t;
Chris PeBenito 17de1b
files_tmpfs_file(timidity_tmpfs_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow timidity_t self:capability { dac_override dac_read_search };
Chris PeBenito 17de1b
dontaudit timidity_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow timidity_t self:process { signal_perms getsched };
Chris PeBenito 17de1b
allow timidity_t self:shm create_shm_perms;
Chris PeBenito 17de1b
allow timidity_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow timidity_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow timidity_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(timidity_t, timidity_tmpfs_t, timidity_tmpfs_t)
Chris PeBenito 0bfccd
manage_files_pattern(timidity_t, timidity_tmpfs_t, timidity_tmpfs_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(timidity_t, timidity_tmpfs_t, timidity_tmpfs_t)
Chris PeBenito 0bfccd
manage_fifo_files_pattern(timidity_t, timidity_tmpfs_t, timidity_tmpfs_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(timidity_t, timidity_tmpfs_t, timidity_tmpfs_t)
Chris PeBenito 0bfccd
fs_tmpfs_filetrans(timidity_t, timidity_tmpfs_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(timidity_t)
Chris PeBenito 17de1b
# read /proc/cpuinfo
Chris PeBenito 17de1b
kernel_read_system_state(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(timidity_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(timidity_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(timidity_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(timidity_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(timidity_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(timidity_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(timidity_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(timidity_t)
Chris PeBenito 17de1b
dev_read_sound(timidity_t)
Chris PeBenito 17de1b
dev_write_sound(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_search_auto_mountpoints(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_search_tmp(timidity_t)
Chris PeBenito 17de1b
# read /usr/share/alsa/alsa.conf
Chris PeBenito 17de1b
files_read_usr_files(timidity_t)
Chris PeBenito 17de1b
# read /etc/esd.conf
Chris PeBenito 17de1b
files_read_etc_files(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# read libartscbackend.la
Chris PeBenito 17de1b
libs_read_lib_files(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(timidity_t)
Chris PeBenito e9c6cd
Chris PeBenito 17de1b
# stupid timidity won't start if it can't search its current directory.
Chris PeBenito 17de1b
# allow this so /etc/init.d/alsasound start works from /root
Chris PeBenito 17de1b
# cjp: this should be fixed if possible so this rule can be removed.
Chris PeBenito 296273
userdom_search_user_home_dirs(timidity_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(timidity_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(timidity_t)
Chris PeBenito 17de1b
')