Chris PeBenito 9b244c
Chris PeBenito 141cff
policy_module(soundserver,1.0.1)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
########################################
Chris PeBenito 9b244c
#
Chris PeBenito 9b244c
# Declarations
Chris PeBenito 9b244c
#
Chris PeBenito 9b244c
Chris PeBenito 9b244c
type soundd_t;
Chris PeBenito 9b244c
type soundd_exec_t;
Chris PeBenito 9b244c
init_daemon_domain(soundd_t,soundd_exec_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
type soundd_etc_t alias etc_soundd_t;
Chris PeBenito 9b244c
files_type(soundd_etc_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
type soundd_state_t;
Chris PeBenito 9b244c
files_type(soundd_state_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
type soundd_tmp_t;
Chris PeBenito 9b244c
files_tmp_file(soundd_tmp_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
# for yiff - probably need some rules for the client support too
Chris PeBenito 9b244c
type soundd_tmpfs_t;
Chris PeBenito 9b244c
files_tmpfs_file(soundd_tmpfs_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
type soundd_var_run_t;
Chris PeBenito 9b244c
files_pid_file(soundd_var_run_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
########################################
Chris PeBenito 9b244c
#
Chris PeBenito 9b244c
# Declarations
Chris PeBenito 9b244c
#
Chris PeBenito 9b244c
Chris PeBenito 9b244c
dontaudit soundd_t self:capability sys_tty_config;
Chris PeBenito 9b244c
allow soundd_t self:process { setpgid signal_perms };
Chris PeBenito 9b244c
allow soundd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 9b244c
allow soundd_t self:udp_socket create_socket_perms;
Chris PeBenito 9b244c
# for yiff
Chris PeBenito 9b244c
allow soundd_t self:shm create_shm_perms;
Chris PeBenito 9b244c
Chris PeBenito 9b244c
allow soundd_t soundd_etc_t:dir list_dir_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_etc_t:file read_file_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_etc_t:lnk_file { getattr read };
Chris PeBenito 9b244c
Chris PeBenito 9b244c
allow soundd_t soundd_state_t:dir rw_dir_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_state_t:file manage_file_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_state_t:lnk_file create_lnk_perms;
Chris PeBenito 9b244c
Chris PeBenito 9b244c
allow soundd_t soundd_tmp_t:dir manage_dir_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_tmp_t:file manage_file_perms;
Chris PeBenito 9b244c
files_tmp_filetrans(soundd_t, soundd_tmp_t, { file dir })
Chris PeBenito 9b244c
Chris PeBenito 9b244c
allow soundd_t soundd_tmpfs_t:dir rw_dir_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_tmpfs_t:file manage_file_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_tmpfs_t:lnk_file create_lnk_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_tmpfs_t:sock_file manage_file_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_tmpfs_t:fifo_file manage_file_perms;
Chris PeBenito 9b244c
fs_tmpfs_filetrans(soundd_t,soundd_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
Chris PeBenito 9b244c
Chris PeBenito 9b244c
allow soundd_t soundd_var_run_t:file manage_file_perms;
Chris PeBenito 9b244c
allow soundd_t soundd_var_run_t:dir rw_dir_perms;
Chris PeBenito 9b244c
files_pid_filetrans(soundd_t,soundd_var_run_t,file)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
kernel_read_kernel_sysctls(soundd_t)
Chris PeBenito 9b244c
kernel_list_proc(soundd_t)
Chris PeBenito 9b244c
kernel_read_proc_symlinks(soundd_t)
Chris PeBenito 9b244c
kernel_tcp_recvfrom(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 141cff
corenet_non_ipsec_sendrecv(soundd_t)
Chris PeBenito 9b244c
corenet_tcp_sendrecv_generic_if(soundd_t)
Chris PeBenito 9b244c
corenet_udp_sendrecv_generic_if(soundd_t)
Chris PeBenito 9b244c
corenet_tcp_sendrecv_all_nodes(soundd_t)
Chris PeBenito 9b244c
corenet_udp_sendrecv_all_nodes(soundd_t)
Chris PeBenito 9b244c
corenet_tcp_sendrecv_all_ports(soundd_t)
Chris PeBenito 9b244c
corenet_udp_sendrecv_all_ports(soundd_t)
Chris PeBenito 9b244c
corenet_tcp_bind_all_nodes(soundd_t)
Chris PeBenito 9b244c
corenet_tcp_bind_soundd_port(soundd_t)
Chris PeBenito 141cff
corenet_sendrecv_soundd_server_packets(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
dev_read_sysfs(soundd_t)
Chris PeBenito 9b244c
dev_read_sound(soundd_t)
Chris PeBenito 9b244c
dev_write_sound(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
domain_use_interactive_fds(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
files_read_etc_files(soundd_t)
Chris PeBenito 9b244c
files_read_etc_runtime_files(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
fs_getattr_all_fs(soundd_t)
Chris PeBenito 9b244c
fs_search_auto_mountpoints(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
term_dontaudit_use_console(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
init_use_fds(soundd_t)
Chris PeBenito 9b244c
init_use_script_ptys(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
libs_use_ld_so(soundd_t)
Chris PeBenito 9b244c
libs_use_shared_libs(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
logging_send_syslog_msg(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
miscfiles_read_localization(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
sysnet_read_config(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
userdom_dontaudit_use_unpriv_user_fds(soundd_t)
Chris PeBenito 9b244c
userdom_dontaudit_search_sysadm_home_dirs(soundd_t)
Chris PeBenito 9b244c
Chris PeBenito 9b244c
ifdef(`targeted_policy',`
Chris PeBenito 9b244c
	term_dontaudit_use_unallocated_ttys(soundd_t)
Chris PeBenito 9b244c
	term_dontaudit_use_generic_ptys(soundd_t)
Chris PeBenito 9b244c
	files_dontaudit_read_root_files(soundd_t)
Chris PeBenito 9b244c
')
Chris PeBenito 9b244c
Chris PeBenito 9b244c
optional_policy(`
Chris PeBenito 9b244c
	seutil_sigchld_newrole(soundd_t)
Chris PeBenito 9b244c
')
Chris PeBenito 9b244c
Chris PeBenito 9b244c
optional_policy(`
Chris PeBenito 9b244c
	udev_read_db(soundd_t)
Chris PeBenito 9b244c
')