selinux-policy/policy/modules/services/timidity.te
Chris PeBenito 1900668638 trunk: Unified labeled networking policy from Paul Moore.
The latest revision of the labeled policy patches which enable both labeled 
and unlabeled policy support for NetLabel.  This revision takes into account
Chris' feedback from the first version and reduces the number of interface
calls in each domain down to two at present: one for unlabeled access, one for
NetLabel access.  The older, transport layer specific interfaces, are still  
present for use by third-party modules but are not used in the default policy
modules.

trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore.

This patch changes the policy to use the netmsg initial SID as the "base"
SID/context for NetLabel packets which only have MLS security attributes.
Currently we use the unlabeled initial SID which makes it very difficult to
distinquish between actual unlabeled packets and those packets which have MLS
security attributes.
2007-06-27 15:23:21 +00:00

93 lines
2.7 KiB
Plaintext

policy_module(timidity,1.3.1)
# 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;
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)
fs_tmpfs_filetrans(timidity_t,timidity_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
kernel_read_kernel_sysctls(timidity_t)
# read /proc/cpuinfo
kernel_read_system_state(timidity_t)
corenet_all_recvfrom_unlabeled(timidity_t)
corenet_all_recvfrom_netlabel(timidity_t)
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)
dev_read_sound(timidity_t)
dev_write_sound(timidity_t)
fs_search_auto_mountpoints(timidity_t)
domain_use_interactive_fds(timidity_t)
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)
libs_use_ld_so(timidity_t)
libs_use_shared_libs(timidity_t)
# read libartscbackend.la
libs_read_lib_files(timidity_t)
logging_send_syslog_msg(timidity_t)
sysnet_read_config(timidity_t)
userdom_dontaudit_use_unpriv_user_fds(timidity_t)
# 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.
userdom_search_sysadm_home_dirs(timidity_t)
ifdef(`targeted_policy',`
term_dontaudit_use_unallocated_ttys(timidity_t)
term_dontaudit_use_generic_ptys(timidity_t)
files_dontaudit_read_root_files(timidity_t)
')
optional_policy(`
seutil_sigchld_newrole(timidity_t)
')
optional_policy(`
udev_read_db(timidity_t)
')