1900668638
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.
114 lines
3.0 KiB
Plaintext
114 lines
3.0 KiB
Plaintext
|
|
policy_module(soundserver,1.2.1)
|
|
|
|
########################################
|
|
#
|
|
# 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 };
|
|
|
|
manage_files_pattern(soundd_t,soundd_state_t,soundd_state_t)
|
|
manage_lnk_files_pattern(soundd_t,soundd_state_t,soundd_state_t)
|
|
|
|
manage_dirs_pattern(soundd_t,soundd_tmp_t,soundd_tmp_t)
|
|
manage_files_pattern(soundd_t,soundd_tmp_t,soundd_tmp_t)
|
|
files_tmp_filetrans(soundd_t, soundd_tmp_t, { file dir })
|
|
|
|
manage_files_pattern(soundd_t,soundd_tmpfs_t,soundd_tmpfs_t)
|
|
manage_lnk_files_pattern(soundd_t,soundd_tmpfs_t,soundd_tmpfs_t)
|
|
manage_fifo_files_pattern(soundd_t,soundd_tmpfs_t,soundd_tmpfs_t)
|
|
manage_sock_files_pattern(soundd_t,soundd_tmpfs_t,soundd_tmpfs_t)
|
|
fs_tmpfs_filetrans(soundd_t,soundd_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
|
|
|
manage_files_pattern(soundd_t,soundd_var_run_t,soundd_var_run_t)
|
|
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)
|
|
|
|
corenet_all_recvfrom_unlabeled(soundd_t)
|
|
corenet_all_recvfrom_netlabel(soundd_t)
|
|
corenet_tcp_sendrecv_generic_if(soundd_t)
|
|
corenet_udp_sendrecv_generic_if(soundd_t)
|
|
corenet_tcp_sendrecv_all_nodes(soundd_t)
|
|
corenet_udp_sendrecv_all_nodes(soundd_t)
|
|
corenet_tcp_sendrecv_all_ports(soundd_t)
|
|
corenet_udp_sendrecv_all_ports(soundd_t)
|
|
corenet_tcp_bind_all_nodes(soundd_t)
|
|
corenet_tcp_bind_soundd_port(soundd_t)
|
|
corenet_sendrecv_soundd_server_packets(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)
|
|
|
|
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)
|
|
')
|