Chris PeBenito 0fbfa5
# DESC timidity - MIDI to WAV converter and player
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Author: Thomas Bleher <ThomasBleher@gmx.de>
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Note: You only need this policy if you want to run timidity as a server
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
daemon_base_domain(timidity)
Chris PeBenito 0fbfa5
can_network_server(timidity_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t device_t:lnk_file read;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# read /usr/share/alsa/alsa.conf
Chris PeBenito 0fbfa5
allow timidity_t usr_t:file { getattr read };
Chris PeBenito 0fbfa5
# read /etc/esd.conf and /proc/cpuinfo
Chris PeBenito 0fbfa5
allow timidity_t { etc_t proc_t }:file { getattr read };
Chris PeBenito 0fbfa5
# read libartscbackend.la - should these be shlib_t?
Chris PeBenito 0fbfa5
allow timidity_t lib_t:file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t sound_device_t:chr_file { read write ioctl };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# stupid timidity won't start if it can't search its current directory.
Chris PeBenito 0fbfa5
# allow this so /etc/init.d/alsasound start works from /root
Chris PeBenito 0fbfa5
allow timidity_t sysadm_home_dir_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t tmp_t:dir search;
Chris PeBenito 0fbfa5
tmpfs_domain(timidity)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t self:shm create_shm_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow timidity_t devpts_t:dir search;
Chris PeBenito 0fbfa5
allow timidity_t self:capability { dac_override dac_read_search };
Chris PeBenito 0fbfa5
allow timidity_t self:process getsched;