2005-11-28 18:29:03 +00:00
|
|
|
|
2006-10-18 19:25:27 +00:00
|
|
|
policy_module(timidity,1.2.0)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
# Note: You only need this policy if you want to run timidity as a server
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type timidity_t;
|
|
|
|
type timidity_exec_t;
|
|
|
|
init_daemon_domain(timidity_t,timidity_exec_t)
|
|
|
|
|
|
|
|
type timidity_tmpfs_t;
|
|
|
|
files_tmpfs_file(timidity_tmpfs_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow timidity_t self:capability { dac_override dac_read_search };
|
|
|
|
dontaudit timidity_t self:capability sys_tty_config;
|
|
|
|
allow timidity_t self:process { signal_perms getsched };
|
|
|
|
allow timidity_t self:shm create_shm_perms;
|
|
|
|
allow timidity_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow timidity_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow timidity_t self:udp_socket create_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(timidity_t,timidity_tmpfs_t,timidity_tmpfs_t)
|
|
|
|
manage_files_pattern(timidity_t,timidity_tmpfs_t,timidity_tmpfs_t)
|
|
|
|
manage_lnk_files_pattern(timidity_t,timidity_tmpfs_t,timidity_tmpfs_t)
|
|
|
|
manage_fifo_files_pattern(timidity_t,timidity_tmpfs_t,timidity_tmpfs_t)
|
|
|
|
manage_sock_files_pattern(timidity_t,timidity_tmpfs_t,timidity_tmpfs_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
fs_tmpfs_filetrans(timidity_t,timidity_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
2005-11-28 18:29:03 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
# read /proc/cpuinfo
|
|
|
|
kernel_read_system_state(timidity_t)
|
|
|
|
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_non_ipsec_sendrecv(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(timidity_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(timidity_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(timidity_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(timidity_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(timidity_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(timidity_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(timidity_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_read_sound(timidity_t)
|
|
|
|
dev_write_sound(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
fs_search_auto_mountpoints(timidity_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(timidity_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
files_search_tmp(timidity_t)
|
|
|
|
# read /usr/share/alsa/alsa.conf
|
|
|
|
files_read_usr_files(timidity_t)
|
|
|
|
# read /etc/esd.conf
|
|
|
|
files_read_etc_files(timidity_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(timidity_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(timidity_t)
|
|
|
|
libs_use_shared_libs(timidity_t)
|
|
|
|
# read libartscbackend.la
|
2006-02-02 21:08:12 +00:00
|
|
|
libs_read_lib_files(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
logging_send_syslog_msg(timidity_t)
|
|
|
|
|
|
|
|
sysnet_read_config(timidity_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
# stupid timidity won't start if it can't search its current directory.
|
|
|
|
# allow this so /etc/init.d/alsasound start works from /root
|
|
|
|
# cjp: this should be fixed if possible so this rule can be removed.
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_search_sysadm_home_dirs(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(timidity_t)
|
|
|
|
term_dontaudit_use_generic_ptys(timidity_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(timidity_t)
|
2005-11-28 18:29:03 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-28 18:29:03 +00:00
|
|
|
seutil_sigchld_newrole(timidity_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-28 18:29:03 +00:00
|
|
|
udev_read_db(timidity_t)
|
|
|
|
')
|