314 lines
9.7 KiB
Plaintext
314 lines
9.7 KiB
Plaintext
|
|
policy_module(telepathy, 1.0.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations.
|
|
#
|
|
|
|
## <desc>
|
|
## <p>
|
|
## Allow the Telepathy connection managers
|
|
## to connect to any generic TCP port.
|
|
## </p>
|
|
## </desc>
|
|
gen_tunable(telepathy_tcp_connect_generic_network_ports, false)
|
|
|
|
attribute telepathy_domain;
|
|
attribute telepathy_executable;
|
|
|
|
telepathy_domain_template(gabble)
|
|
|
|
type telepathy_gabble_cache_home_t;
|
|
userdom_user_home_content(telepathy_gabble_cache_home_t)
|
|
|
|
telepathy_domain_template(idle)
|
|
telepathy_domain_template(mission_control)
|
|
|
|
type telepathy_mission_control_home_t;
|
|
userdom_user_home_content(telepathy_mission_control_home_t)
|
|
|
|
type telepathy_mission_control_cache_home_t;
|
|
userdom_user_home_content(telepathy_mission_control_cache_home_t)
|
|
|
|
telepathy_domain_template(msn)
|
|
telepathy_domain_template(salut)
|
|
telepathy_domain_template(sofiasip)
|
|
telepathy_domain_template(stream_engine)
|
|
telepathy_domain_template(sunshine)
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Butterfly and Haze local policy.
|
|
#
|
|
|
|
allow telepathy_msn_t self:process setsched;
|
|
allow telepathy_msn_t self:netlink_route_socket create_netlink_socket_perms;
|
|
allow telepathy_msn_t self:unix_dgram_socket { write create connect };
|
|
|
|
manage_dirs_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
|
|
manage_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
|
|
manage_sock_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
|
|
exec_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
|
|
files_tmp_filetrans(telepathy_msn_t, telepathy_msn_tmp_t, { dir file sock_file })
|
|
userdom_user_tmp_filetrans(telepathy_msn_t, telepathy_msn_tmp_t, { dir file sock_file })
|
|
userdom_dontaudit_setattr_user_tmp(telepathy_msn_t)
|
|
|
|
corenet_sendrecv_http_client_packets(telepathy_msn_t)
|
|
corenet_sendrecv_msnp_client_packets(telepathy_msn_t)
|
|
corenet_tcp_connect_http_port(telepathy_msn_t)
|
|
corenet_tcp_connect_msnp_port(telepathy_msn_t)
|
|
|
|
corecmd_exec_bin(telepathy_msn_t)
|
|
corecmd_exec_shell(telepathy_msn_t)
|
|
corecmd_read_bin_symlinks(telepathy_msn_t)
|
|
|
|
dev_read_urand(telepathy_msn_t)
|
|
|
|
files_read_etc_files(telepathy_msn_t)
|
|
files_read_usr_files(telepathy_msn_t)
|
|
|
|
kernel_read_system_state(telepathy_msn_t)
|
|
|
|
auth_use_nsswitch(telepathy_msn_t)
|
|
|
|
logging_send_syslog_msg(telepathy_msn_t)
|
|
|
|
miscfiles_read_certs(telepathy_msn_t)
|
|
|
|
sysnet_read_config(telepathy_msn_t)
|
|
|
|
optional_policy(`
|
|
dbus_system_bus_client(telepathy_msn_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
gnome_read_gconf_home_files(telepathy_msn_t)
|
|
')
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Gabble local policy.
|
|
#
|
|
|
|
allow telepathy_gabble_t self:netlink_route_socket create_netlink_socket_perms;
|
|
allow telepathy_gabble_t self:tcp_socket { listen accept };
|
|
allow telepathy_gabble_t self:unix_dgram_socket { write read create getattr sendto };
|
|
|
|
manage_dirs_pattern(telepathy_gabble_t, telepathy_gabble_tmp_t, telepathy_gabble_tmp_t)
|
|
manage_sock_files_pattern(telepathy_gabble_t, telepathy_gabble_tmp_t, telepathy_gabble_tmp_t)
|
|
files_tmp_filetrans(telepathy_gabble_t, telepathy_gabble_tmp_t, { dir sock_file })
|
|
|
|
# ~/.cache/gabble/caps-cache.db-journal
|
|
optional_policy(`
|
|
manage_dirs_pattern(telepathy_gabble_t, telepathy_gabble_cache_home_t, telepathy_gabble_cache_home_t)
|
|
manage_files_pattern(telepathy_gabble_t, telepathy_gabble_cache_home_t, telepathy_gabble_cache_home_t)
|
|
gnome_cache_filetrans(telepathy_gabble_t, telepathy_gabble_cache_home_t, { dir file })
|
|
')
|
|
|
|
corenet_sendrecv_commplex_client_packets(telepathy_gabble_t)
|
|
corenet_sendrecv_http_client_packets(telepathy_gabble_t)
|
|
corenet_sendrecv_jabber_client_client_packets(telepathy_gabble_t)
|
|
corenet_sendrecv_vnc_client_packets(telepathy_gabble_t)
|
|
|
|
corenet_tcp_connect_commplex_port(telepathy_gabble_t)
|
|
corenet_tcp_connect_http_port(telepathy_gabble_t)
|
|
corenet_tcp_connect_jabber_client_port(telepathy_gabble_t)
|
|
corenet_tcp_connect_vnc_port(telepathy_gabble_t)
|
|
|
|
dev_read_rand(telepathy_gabble_t)
|
|
dev_read_urand(telepathy_gabble_t)
|
|
|
|
files_read_etc_files(telepathy_gabble_t)
|
|
files_read_usr_files(telepathy_gabble_t)
|
|
|
|
miscfiles_read_certs(telepathy_gabble_t)
|
|
|
|
sysnet_read_config(telepathy_gabble_t)
|
|
|
|
optional_policy(`
|
|
dbus_system_bus_client(telepathy_gabble_t)
|
|
')
|
|
|
|
tunable_policy(`use_nfs_home_dirs', `
|
|
fs_manage_nfs_dirs(telepathy_gabble_t)
|
|
fs_manage_nfs_files(telepathy_gabble_t)
|
|
')
|
|
|
|
tunable_policy(`use_samba_home_dirs', `
|
|
fs_manage_cifs_dirs(telepathy_gabble_t)
|
|
fs_manage_cifs_files(telepathy_gabble_t)
|
|
')
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Idle local policy.
|
|
#
|
|
|
|
allow telepathy_idle_t self:netlink_route_socket create_netlink_socket_perms;
|
|
|
|
corenet_sendrecv_ircd_client_packets(telepathy_idle_t)
|
|
corenet_tcp_connect_ircd_port(telepathy_idle_t)
|
|
|
|
files_read_etc_files(telepathy_idle_t)
|
|
|
|
sysnet_read_config(telepathy_idle_t)
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Mission-Control local policy.
|
|
#
|
|
|
|
manage_dirs_pattern(telepathy_mission_control_t, telepathy_mission_control_home_t, telepathy_mission_control_home_t)
|
|
manage_files_pattern(telepathy_mission_control_t, telepathy_mission_control_home_t, telepathy_mission_control_home_t)
|
|
userdom_user_home_dir_filetrans(telepathy_mission_control_t, telepathy_mission_control_home_t, { dir file })
|
|
userdom_search_user_home_dirs(telepathy_mission_control_t)
|
|
|
|
dev_read_rand(telepathy_mission_control_t)
|
|
|
|
files_read_etc_files(telepathy_mission_control_t)
|
|
files_read_usr_files(telepathy_mission_control_t)
|
|
|
|
tunable_policy(`use_nfs_home_dirs', `
|
|
fs_manage_nfs_dirs(telepathy_mission_control_t)
|
|
fs_manage_nfs_files(telepathy_mission_control_t)
|
|
')
|
|
|
|
tunable_policy(`use_samba_home_dirs', `
|
|
fs_manage_cifs_dirs(telepathy_mission_control_t)
|
|
fs_manage_cifs_files(telepathy_mission_control_t)
|
|
')
|
|
|
|
auth_use_nsswitch(telepathy_mission_control_t)
|
|
|
|
# ~/.cache/.mc_connections.
|
|
optional_policy(`
|
|
manage_files_pattern(telepathy_mission_control_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_cache_home_t)
|
|
gnome_cache_filetrans(telepathy_mission_control_t, telepathy_mission_control_cache_home_t, file)
|
|
')
|
|
|
|
optional_policy(`
|
|
gnome_read_gconf_home_files(telepathy_mission_control_t)
|
|
gnome_setattr_cache_home_dir(telepathy_mission_control_t)
|
|
gnome_read_generic_cache_files(telepathy_mission_control_t)
|
|
')
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Salut local policy.
|
|
#
|
|
|
|
allow telepathy_salut_t self:netlink_route_socket create_netlink_socket_perms;
|
|
allow telepathy_salut_t self:tcp_socket { accept listen };
|
|
|
|
manage_sock_files_pattern(telepathy_salut_t, telepathy_salut_tmp_t, telepathy_salut_tmp_t)
|
|
files_tmp_filetrans(telepathy_salut_t, telepathy_salut_tmp_t, sock_file)
|
|
|
|
corenet_sendrecv_presence_server_packets(telepathy_salut_t)
|
|
corenet_tcp_bind_presence_port(telepathy_salut_t)
|
|
corenet_tcp_connect_presence_port(telepathy_salut_t)
|
|
|
|
dev_read_urand(telepathy_salut_t)
|
|
|
|
files_read_etc_files(telepathy_salut_t)
|
|
|
|
sysnet_read_config(telepathy_salut_t)
|
|
|
|
optional_policy(`
|
|
dbus_system_bus_client(telepathy_salut_t)
|
|
|
|
optional_policy(`
|
|
avahi_dbus_chat(telepathy_salut_t)
|
|
')
|
|
')
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Sofiasip local policy.
|
|
#
|
|
|
|
allow telepathy_sofiasip_t self:netlink_route_socket create_netlink_socket_perms;
|
|
allow telepathy_sofiasip_t self:rawip_socket { create_socket_perms listen };
|
|
allow telepathy_sofiasip_t self:tcp_socket { listen };
|
|
|
|
corenet_sendrecv_sip_client_packets(telepathy_sofiasip_t)
|
|
corenet_tcp_connect_sip_port(telepathy_sofiasip_t)
|
|
|
|
dev_read_urand(telepathy_sofiasip_t)
|
|
|
|
kernel_request_load_module(telepathy_sofiasip_t)
|
|
|
|
sysnet_read_config(telepathy_sofiasip_t)
|
|
|
|
#######################################
|
|
#
|
|
# Telepathy Sunshine local policy.
|
|
#
|
|
|
|
manage_files_pattern(telepathy_sunshine_t, telepathy_sunshine_tmp_t, telepathy_sunshine_tmp_t)
|
|
exec_files_pattern(telepathy_sunshine_t, telepathy_sunshine_tmp_t, telepathy_sunshine_tmp_t)
|
|
files_tmp_filetrans(telepathy_sunshine_t, telepathy_sunshine_tmp_t, file)
|
|
|
|
corecmd_list_bin(telepathy_sunshine_t)
|
|
|
|
dev_read_urand(telepathy_sunshine_t)
|
|
|
|
files_read_etc_files(telepathy_sunshine_t)
|
|
files_read_usr_files(telepathy_sunshine_t)
|
|
|
|
kernel_read_system_state(telepathy_sunshine_t)
|
|
|
|
optional_policy(`
|
|
xserver_read_xdm_pid(telepathy_sunshine_t)
|
|
xserver_stream_connect(telepathy_sunshine_t)
|
|
')
|
|
|
|
#######################################
|
|
#
|
|
# telepathy domains common policy
|
|
#
|
|
|
|
allow telepathy_domain self:process { getsched signal };
|
|
allow telepathy_domain self:fifo_file rw_fifo_file_perms;
|
|
allow telepathy_domain self:tcp_socket create_socket_perms;
|
|
allow telepathy_domain self:udp_socket create_socket_perms;
|
|
|
|
corenet_all_recvfrom_netlabel(telepathy_domain)
|
|
corenet_all_recvfrom_unlabeled(telepathy_domain)
|
|
corenet_raw_bind_generic_node(telepathy_domain)
|
|
corenet_raw_sendrecv_generic_if(telepathy_domain)
|
|
corenet_raw_sendrecv_generic_node(telepathy_domain)
|
|
corenet_tcp_bind_generic_node(telepathy_domain)
|
|
corenet_tcp_sendrecv_generic_if(telepathy_domain)
|
|
corenet_tcp_sendrecv_generic_node(telepathy_domain)
|
|
corenet_udp_bind_generic_node(telepathy_domain)
|
|
|
|
fs_search_auto_mountpoints(telepathy_domain)
|
|
|
|
miscfiles_read_localization(telepathy_domain)
|
|
|
|
# This interface does not facilitate files_search_tmp which appears to be a bug.
|
|
userdom_stream_connect(telepathy_domain)
|
|
userdom_use_user_terminals(telepathy_domain)
|
|
|
|
tunable_policy(`telepathy_tcp_connect_generic_network_ports', `
|
|
corenet_tcp_connect_generic_port(telepathy_domain)
|
|
corenet_sendrecv_generic_client_packets(telepathy_domain)
|
|
')
|
|
|
|
optional_policy(`
|
|
automount_dontaudit_getattr_tmp_dirs(telepathy_domain)
|
|
')
|
|
|
|
optional_policy(`
|
|
nis_use_ypbind(telepathy_domain)
|
|
')
|
|
|
|
optional_policy(`
|
|
telepathy_dbus_chat(telepathy_domain)
|
|
')
|
|
|
|
optional_policy(`
|
|
xserver_rw_xdm_pipes(telepathy_domain)
|
|
')
|