mirror of
https://github.com/SELinuxProject/refpolicy
synced 2025-03-23 03:26:34 +00:00
add soundserver, bug 1547
This commit is contained in:
parent
9e725d8a1a
commit
9b244cb0d4
@ -64,6 +64,7 @@
|
|||||||
resmgr
|
resmgr
|
||||||
rhgb
|
rhgb
|
||||||
snort
|
snort
|
||||||
|
soundserver
|
||||||
speedtouch
|
speedtouch
|
||||||
thunderbird
|
thunderbird
|
||||||
tor (Erich Schubert)
|
tor (Erich Schubert)
|
||||||
|
10
refpolicy/policy/modules/services/soundserver.fc
Normal file
10
refpolicy/policy/modules/services/soundserver.fc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/etc/nas(/.*)? gen_require(system_u:object_r:soundd_etc_t,s0)
|
||||||
|
/etc/yiff(/.*)? gen_require(system_u:object_r:soundd_etc_t,s0)
|
||||||
|
|
||||||
|
/usr/bin/nasd -- gen_require(system_u:object_r:soundd_exec_t,s0)
|
||||||
|
/usr/bin/gpe-soundserver -- gen_require(system_u:object_r:soundd_exec_t,s0)
|
||||||
|
|
||||||
|
/usr/sbin/yiff -- gen_require(system_u:object_r:soundd_exec_t,s0)
|
||||||
|
|
||||||
|
/var/run/yiff-[0-9]+\.pid -- gen_require(system_u:object_r:soundd_var_run_t,s0)
|
||||||
|
/var/state/yiff(/.*)? gen_require(system_u:object_r:soundd_state_t,s0)
|
21
refpolicy/policy/modules/services/soundserver.if
Normal file
21
refpolicy/policy/modules/services/soundserver.if
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
## <summary>sound server for network audio server programs, nasd, yiff, etc</summary>
|
||||||
|
|
||||||
|
########################################
|
||||||
|
## <summary>
|
||||||
|
## Connect to the sound server over a TCP socket
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`soundserver_tcp_connect',`
|
||||||
|
gen_require(`
|
||||||
|
type soundserver_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
allow $1 soundserver_t:tcp_socket { connectto recvfrom };
|
||||||
|
allow soundserver_t $1:tcp_socket { acceptfrom recvfrom };
|
||||||
|
kernel_tcp_recvfrom($1)
|
||||||
|
')
|
123
refpolicy/policy/modules/services/soundserver.te
Normal file
123
refpolicy/policy/modules/services/soundserver.te
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
|
||||||
|
policy_module(soundserver,1.0.0)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Declarations
|
||||||
|
#
|
||||||
|
|
||||||
|
type soundd_t;
|
||||||
|
type soundd_exec_t;
|
||||||
|
init_daemon_domain(soundd_t,soundd_exec_t)
|
||||||
|
|
||||||
|
type soundd_etc_t alias etc_soundd_t;
|
||||||
|
files_type(soundd_etc_t)
|
||||||
|
|
||||||
|
type soundd_state_t;
|
||||||
|
files_type(soundd_state_t)
|
||||||
|
|
||||||
|
type soundd_tmp_t;
|
||||||
|
files_tmp_file(soundd_tmp_t)
|
||||||
|
|
||||||
|
# for yiff - probably need some rules for the client support too
|
||||||
|
type soundd_tmpfs_t;
|
||||||
|
files_tmpfs_file(soundd_tmpfs_t)
|
||||||
|
|
||||||
|
type soundd_var_run_t;
|
||||||
|
files_pid_file(soundd_var_run_t)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Declarations
|
||||||
|
#
|
||||||
|
|
||||||
|
dontaudit soundd_t self:capability sys_tty_config;
|
||||||
|
allow soundd_t self:process { setpgid signal_perms };
|
||||||
|
allow soundd_t self:tcp_socket create_stream_socket_perms;
|
||||||
|
allow soundd_t self:udp_socket create_socket_perms;
|
||||||
|
# for yiff
|
||||||
|
allow soundd_t self:shm create_shm_perms;
|
||||||
|
|
||||||
|
allow soundd_t soundd_etc_t:dir list_dir_perms;
|
||||||
|
allow soundd_t soundd_etc_t:file read_file_perms;
|
||||||
|
allow soundd_t soundd_etc_t:lnk_file { getattr read };
|
||||||
|
|
||||||
|
allow soundd_t soundd_state_t:dir rw_dir_perms;
|
||||||
|
allow soundd_t soundd_state_t:file manage_file_perms;
|
||||||
|
allow soundd_t soundd_state_t:lnk_file create_lnk_perms;
|
||||||
|
|
||||||
|
allow soundd_t soundd_tmp_t:dir manage_dir_perms;
|
||||||
|
allow soundd_t soundd_tmp_t:file manage_file_perms;
|
||||||
|
files_tmp_filetrans(soundd_t, soundd_tmp_t, { file dir })
|
||||||
|
|
||||||
|
allow soundd_t soundd_tmpfs_t:dir rw_dir_perms;
|
||||||
|
allow soundd_t soundd_tmpfs_t:file manage_file_perms;
|
||||||
|
allow soundd_t soundd_tmpfs_t:lnk_file create_lnk_perms;
|
||||||
|
allow soundd_t soundd_tmpfs_t:sock_file manage_file_perms;
|
||||||
|
allow soundd_t soundd_tmpfs_t:fifo_file manage_file_perms;
|
||||||
|
fs_tmpfs_filetrans(soundd_t,soundd_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
||||||
|
|
||||||
|
allow soundd_t soundd_var_run_t:file manage_file_perms;
|
||||||
|
allow soundd_t soundd_var_run_t:dir rw_dir_perms;
|
||||||
|
files_pid_filetrans(soundd_t,soundd_var_run_t,file)
|
||||||
|
|
||||||
|
kernel_read_kernel_sysctls(soundd_t)
|
||||||
|
kernel_list_proc(soundd_t)
|
||||||
|
kernel_read_proc_symlinks(soundd_t)
|
||||||
|
kernel_tcp_recvfrom(soundd_t)
|
||||||
|
|
||||||
|
corenet_tcp_sendrecv_generic_if(soundd_t)
|
||||||
|
corenet_udp_sendrecv_generic_if(soundd_t)
|
||||||
|
corenet_raw_sendrecv_generic_if(soundd_t)
|
||||||
|
corenet_tcp_sendrecv_all_nodes(soundd_t)
|
||||||
|
corenet_udp_sendrecv_all_nodes(soundd_t)
|
||||||
|
corenet_raw_sendrecv_all_nodes(soundd_t)
|
||||||
|
corenet_tcp_sendrecv_all_ports(soundd_t)
|
||||||
|
corenet_udp_sendrecv_all_ports(soundd_t)
|
||||||
|
corenet_non_ipsec_sendrecv(soundd_t)
|
||||||
|
corenet_tcp_bind_all_nodes(soundd_t)
|
||||||
|
corenet_udp_bind_all_nodes(soundd_t)
|
||||||
|
corenet_tcp_bind_soundd_port(soundd_t)
|
||||||
|
|
||||||
|
dev_read_sysfs(soundd_t)
|
||||||
|
dev_read_sound(soundd_t)
|
||||||
|
dev_write_sound(soundd_t)
|
||||||
|
|
||||||
|
domain_use_interactive_fds(soundd_t)
|
||||||
|
|
||||||
|
files_read_etc_files(soundd_t)
|
||||||
|
files_read_etc_runtime_files(soundd_t)
|
||||||
|
|
||||||
|
fs_getattr_all_fs(soundd_t)
|
||||||
|
fs_search_auto_mountpoints(soundd_t)
|
||||||
|
|
||||||
|
term_dontaudit_use_console(soundd_t)
|
||||||
|
|
||||||
|
init_use_fds(soundd_t)
|
||||||
|
init_use_script_ptys(soundd_t)
|
||||||
|
|
||||||
|
libs_use_ld_so(soundd_t)
|
||||||
|
libs_use_shared_libs(soundd_t)
|
||||||
|
|
||||||
|
logging_send_syslog_msg(soundd_t)
|
||||||
|
|
||||||
|
miscfiles_read_localization(soundd_t)
|
||||||
|
|
||||||
|
sysnet_read_config(soundd_t)
|
||||||
|
|
||||||
|
userdom_dontaudit_use_unpriv_user_fds(soundd_t)
|
||||||
|
userdom_dontaudit_search_sysadm_home_dirs(soundd_t)
|
||||||
|
|
||||||
|
ifdef(`targeted_policy',`
|
||||||
|
term_dontaudit_use_unallocated_ttys(soundd_t)
|
||||||
|
term_dontaudit_use_generic_ptys(soundd_t)
|
||||||
|
files_dontaudit_read_root_files(soundd_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
seutil_sigchld_newrole(soundd_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
udev_read_db(soundd_t)
|
||||||
|
')
|
@ -442,6 +442,10 @@ template(`base_user_template',`
|
|||||||
slrnpull_search_spool($1_t)
|
slrnpull_search_spool($1_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
soundserver_tcp_connect($1_t)
|
||||||
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
squid_use($1_t)
|
squid_use($1_t)
|
||||||
')
|
')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
policy_module(userdomain,1.3.18)
|
policy_module(userdomain,1.3.19)
|
||||||
|
|
||||||
gen_require(`
|
gen_require(`
|
||||||
role sysadm_r, staff_r, user_r;
|
role sysadm_r, staff_r, user_r;
|
||||||
|
Loading…
Reference in New Issue
Block a user