Dan Walsh 3eaa99
Dan Walsh 3eaa99
policy_module(telepathy, 1.0.0)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
########################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Declarations.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
## <desc>
Dan Walsh 3eaa99
## 

Dan Walsh 3eaa99
##  Allow the Telepathy connection managers
Dan Walsh 3eaa99
##  to connect to any generic TCP port.
Dan Walsh 3eaa99
## 

Dan Walsh 3eaa99
## </desc>
Dan Walsh 3eaa99
gen_tunable(telepathy_tcp_connect_generic_network_ports, false)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
attribute telepathy_domain;
Dan Walsh 3eaa99
attribute telepathy_executable;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
telepathy_domain_template(gabble)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
type telepathy_gabble_cache_home_t;
Dan Walsh 3eaa99
userdom_user_home_content(telepathy_gabble_cache_home_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
telepathy_domain_template(idle)
Dan Walsh 3eaa99
telepathy_domain_template(mission_control)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
type telepathy_mission_control_home_t;
Dan Walsh 3eaa99
userdom_user_home_content(telepathy_mission_control_home_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
type telepathy_mission_control_cache_home_t;
Dan Walsh 3eaa99
userdom_user_home_content(telepathy_mission_control_cache_home_t)
Dan Walsh 3eaa99
Dan Walsh b45aaa
type telepathy_sunshine_home_t;
Dan Walsh b45aaa
userdom_user_home_content(telepathy_sunshine_home_t)
Dan Walsh b45aaa
Dan Walsh 3eaa99
telepathy_domain_template(msn)
Dan Walsh 3eaa99
telepathy_domain_template(salut)
Dan Walsh 3eaa99
telepathy_domain_template(sofiasip)
Dan Walsh 3eaa99
telepathy_domain_template(stream_engine)
Dan Walsh 3eaa99
telepathy_domain_template(sunshine)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Butterfly and Haze local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow telepathy_msn_t self:process setsched;
Dan Walsh 3eaa99
allow telepathy_msn_t self:netlink_route_socket create_netlink_socket_perms;
Dan Walsh 3eaa99
allow telepathy_msn_t self:unix_dgram_socket { write create connect };
Dan Walsh 3eaa99
Dan Walsh 3eaa99
manage_dirs_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
Dan Walsh 3eaa99
manage_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
Dan Walsh 3eaa99
manage_sock_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
Dan Walsh 3eaa99
exec_files_pattern(telepathy_msn_t, telepathy_msn_tmp_t, telepathy_msn_tmp_t)
Dan Walsh a947da
files_tmp_filetrans(telepathy_msn_t, telepathy_msn_tmp_t, { dir file sock_file })
Dan Walsh a947da
userdom_user_tmp_filetrans(telepathy_msn_t, telepathy_msn_tmp_t, { dir file sock_file })
Dan Walsh 3eaa99
userdom_dontaudit_setattr_user_tmp(telepathy_msn_t)
Dan Walsh f5b49a
can_exec(telepathy_msn_t, telepathy_msn_tmp_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_sendrecv_http_client_packets(telepathy_msn_t)
Dominick Grift e66aa7
corenet_sendrecv_mmcc_client_packets(telepathy_msn_t)
Dan Walsh 3eaa99
corenet_sendrecv_msnp_client_packets(telepathy_msn_t)
Dan Walsh 3eaa99
corenet_tcp_connect_http_port(telepathy_msn_t)
Dominick Grift e66aa7
corenet_tcp_connect_mmcc_port(telepathy_msn_t)
Dan Walsh 3eaa99
corenet_tcp_connect_msnp_port(telepathy_msn_t)
Dan Walsh e51122
corenet_tcp_connect_sametime_port(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corecmd_exec_bin(telepathy_msn_t)
Dan Walsh 3eaa99
corecmd_exec_shell(telepathy_msn_t)
Dan Walsh 3eaa99
corecmd_read_bin_symlinks(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_urand(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
files_read_etc_files(telepathy_msn_t)
Dan Walsh 3eaa99
files_read_usr_files(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
auth_use_nsswitch(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh ddd1cc
init_read_state(telepathy_msn_t)
Dan Walsh ddd1cc
Dan Walsh f5b49a
libs_exec_ldconfig(telepathy_msn_t)
Dan Walsh f5b49a
Dan Walsh 3eaa99
logging_send_syslog_msg(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 366396
miscfiles_read_all_certs(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_read_config(telepathy_msn_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        dbus_system_bus_client(telepathy_msn_t)
Dan Walsh c6fa93
	optional_policy(`
Dan Walsh c6fa93
		networkmanager_dbus_chat(telepathy_msn_t)
Dan Walsh c6fa93
	')
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        gnome_read_gconf_home_files(telepathy_msn_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Gabble local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow telepathy_gabble_t self:netlink_route_socket create_netlink_socket_perms;
Dan Walsh 3eaa99
allow telepathy_gabble_t self:tcp_socket { listen accept };
Dan Walsh 3eaa99
allow telepathy_gabble_t self:unix_dgram_socket { write read create getattr sendto };
Dan Walsh 3eaa99
Dan Walsh 3eaa99
manage_dirs_pattern(telepathy_gabble_t, telepathy_gabble_tmp_t, telepathy_gabble_tmp_t)
Dan Walsh 3eaa99
manage_sock_files_pattern(telepathy_gabble_t, telepathy_gabble_tmp_t, telepathy_gabble_tmp_t)
Dan Walsh 3eaa99
files_tmp_filetrans(telepathy_gabble_t, telepathy_gabble_tmp_t, { dir sock_file })
Dan Walsh 3eaa99
Dan Walsh 3eaa99
# ~/.cache/gabble/caps-cache.db-journal
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        manage_dirs_pattern(telepathy_gabble_t, telepathy_gabble_cache_home_t, telepathy_gabble_cache_home_t)
Dan Walsh 3eaa99
        manage_files_pattern(telepathy_gabble_t, telepathy_gabble_cache_home_t, telepathy_gabble_cache_home_t)
Dan Walsh 3eaa99
        gnome_cache_filetrans(telepathy_gabble_t, telepathy_gabble_cache_home_t, { dir file })
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_sendrecv_commplex_client_packets(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_sendrecv_http_client_packets(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_sendrecv_jabber_client_client_packets(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_sendrecv_vnc_client_packets(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_tcp_connect_commplex_port(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_tcp_connect_http_port(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_tcp_connect_jabber_client_port(telepathy_gabble_t)
Dan Walsh 3eaa99
corenet_tcp_connect_vnc_port(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_rand(telepathy_gabble_t)
Dan Walsh 3eaa99
dev_read_urand(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh f5b49a
files_read_config_files(telepathy_gabble_t)
Dan Walsh 3eaa99
files_read_usr_files(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh 366396
miscfiles_read_all_certs(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_read_config(telepathy_gabble_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        dbus_system_bus_client(telepathy_gabble_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
tunable_policy(`use_nfs_home_dirs', `
Dan Walsh 3eaa99
        fs_manage_nfs_dirs(telepathy_gabble_t)
Dan Walsh 3eaa99
        fs_manage_nfs_files(telepathy_gabble_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
tunable_policy(`use_samba_home_dirs', `
Dan Walsh 3eaa99
        fs_manage_cifs_dirs(telepathy_gabble_t)
Dan Walsh 3eaa99
        fs_manage_cifs_files(telepathy_gabble_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Idle local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow telepathy_idle_t self:netlink_route_socket create_netlink_socket_perms;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_sendrecv_ircd_client_packets(telepathy_idle_t)
Dan Walsh 3eaa99
corenet_tcp_connect_ircd_port(telepathy_idle_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
files_read_etc_files(telepathy_idle_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_read_config(telepathy_idle_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Mission-Control local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
manage_dirs_pattern(telepathy_mission_control_t, telepathy_mission_control_home_t, telepathy_mission_control_home_t)
Dan Walsh 3eaa99
manage_files_pattern(telepathy_mission_control_t, telepathy_mission_control_home_t, telepathy_mission_control_home_t)
Dan Walsh 3eaa99
userdom_user_home_dir_filetrans(telepathy_mission_control_t, telepathy_mission_control_home_t, { dir file })
Dan Walsh 3eaa99
userdom_search_user_home_dirs(telepathy_mission_control_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_rand(telepathy_mission_control_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
files_read_etc_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
files_read_usr_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
tunable_policy(`use_nfs_home_dirs', `
Dan Walsh 3eaa99
        fs_manage_nfs_dirs(telepathy_mission_control_t)
Dan Walsh 3eaa99
        fs_manage_nfs_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
tunable_policy(`use_samba_home_dirs', `
Dan Walsh 3eaa99
        fs_manage_cifs_dirs(telepathy_mission_control_t)
Dan Walsh 3eaa99
        fs_manage_cifs_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
auth_use_nsswitch(telepathy_mission_control_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
# ~/.cache/.mc_connections.
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        manage_files_pattern(telepathy_mission_control_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_cache_home_t)
Dan Walsh 3eaa99
        gnome_cache_filetrans(telepathy_mission_control_t, telepathy_mission_control_cache_home_t, file)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        gnome_read_gconf_home_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
        gnome_setattr_cache_home_dir(telepathy_mission_control_t)
Dan Walsh 3eaa99
	gnome_read_generic_cache_files(telepathy_mission_control_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Salut local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow telepathy_salut_t self:netlink_route_socket create_netlink_socket_perms;
Dan Walsh 3eaa99
allow telepathy_salut_t self:tcp_socket { accept listen };
Dan Walsh 3eaa99
Dan Walsh 3eaa99
manage_sock_files_pattern(telepathy_salut_t, telepathy_salut_tmp_t, telepathy_salut_tmp_t)
Dan Walsh 3eaa99
files_tmp_filetrans(telepathy_salut_t, telepathy_salut_tmp_t, sock_file)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_sendrecv_presence_server_packets(telepathy_salut_t)
Dan Walsh 3eaa99
corenet_tcp_bind_presence_port(telepathy_salut_t)
Dan Walsh 3eaa99
corenet_tcp_connect_presence_port(telepathy_salut_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_urand(telepathy_salut_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
files_read_etc_files(telepathy_salut_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_read_config(telepathy_salut_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        dbus_system_bus_client(telepathy_salut_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
        optional_policy(`
Dan Walsh 3eaa99
                avahi_dbus_chat(telepathy_salut_t)
Dan Walsh 3eaa99
        ')
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Sofiasip local policy.
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 3eaa99
allow telepathy_sofiasip_t self:netlink_route_socket create_netlink_socket_perms;
Dan Walsh 3eaa99
allow telepathy_sofiasip_t self:rawip_socket { create_socket_perms listen };
Dan Walsh 3eaa99
allow telepathy_sofiasip_t self:tcp_socket { listen };
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_sendrecv_sip_client_packets(telepathy_sofiasip_t)
Dan Walsh 3eaa99
corenet_tcp_connect_sip_port(telepathy_sofiasip_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_urand(telepathy_sofiasip_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
kernel_request_load_module(telepathy_sofiasip_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
sysnet_read_config(telepathy_sofiasip_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# Telepathy Sunshine local policy.
Dan Walsh 3eaa99
#
Dan Walsh b45aaa
manage_dirs_pattern(telepathy_sunshine_t, telepathy_sunshine_home_t, telepathy_sunshine_home_t)
Dan Walsh b45aaa
manage_files_pattern(telepathy_sunshine_t, telepathy_sunshine_home_t, telepathy_sunshine_home_t)
Dan Walsh b45aaa
userdom_user_home_dir_filetrans(telepathy_sunshine_t, telepathy_sunshine_home_t, { dir file })
Dan Walsh b45aaa
userdom_search_user_home_dirs(telepathy_sunshine_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
manage_files_pattern(telepathy_sunshine_t, telepathy_sunshine_tmp_t, telepathy_sunshine_tmp_t)
Dan Walsh 3eaa99
exec_files_pattern(telepathy_sunshine_t, telepathy_sunshine_tmp_t, telepathy_sunshine_tmp_t)
Dan Walsh 3eaa99
files_tmp_filetrans(telepathy_sunshine_t, telepathy_sunshine_tmp_t, file)
Dan Walsh 3eaa99
Dan Walsh b45aaa
corecmd_exec_bin(telepathy_sunshine_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
dev_read_urand(telepathy_sunshine_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
files_read_etc_files(telepathy_sunshine_t)
Dan Walsh 3eaa99
files_read_usr_files(telepathy_sunshine_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        xserver_read_xdm_pid(telepathy_sunshine_t)
Dan Walsh 3eaa99
        xserver_stream_connect(telepathy_sunshine_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
#######################################
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
# telepathy domains common policy
Dan Walsh 3eaa99
#
Dan Walsh 3eaa99
Dan Walsh 0b8f4c
allow telepathy_domain self:process { getsched signal sigkill };
Dan Walsh 3eaa99
allow telepathy_domain self:fifo_file rw_fifo_file_perms;
Dan Walsh 3eaa99
allow telepathy_domain self:tcp_socket create_socket_perms;
Dan Walsh 3eaa99
allow telepathy_domain self:udp_socket create_socket_perms;
Dan Walsh 3eaa99
Dan Walsh 3eaa99
corenet_all_recvfrom_netlabel(telepathy_domain)
Dan Walsh 3eaa99
corenet_all_recvfrom_unlabeled(telepathy_domain)
Dan Walsh 3eaa99
corenet_raw_bind_generic_node(telepathy_domain)
Dan Walsh 3eaa99
corenet_raw_sendrecv_generic_if(telepathy_domain)
Dan Walsh 3eaa99
corenet_raw_sendrecv_generic_node(telepathy_domain)
Dan Walsh 3eaa99
corenet_tcp_bind_generic_node(telepathy_domain)
Dan Walsh 3eaa99
corenet_tcp_sendrecv_generic_if(telepathy_domain)
Dan Walsh 3eaa99
corenet_tcp_sendrecv_generic_node(telepathy_domain)
Dan Walsh 3eaa99
corenet_udp_bind_generic_node(telepathy_domain)
Dan Walsh 3eaa99
Dan Walsh 5ef740
kernel_read_system_state(telepathy_domain)
Dan Walsh 5ef740
Dan Walsh 3eaa99
fs_search_auto_mountpoints(telepathy_domain)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
miscfiles_read_localization(telepathy_domain)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
# This interface does not facilitate files_search_tmp which appears to be a bug.
Dan Walsh 3eaa99
userdom_stream_connect(telepathy_domain)
Dan Walsh 3eaa99
userdom_use_user_terminals(telepathy_domain)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
tunable_policy(`telepathy_tcp_connect_generic_network_ports', `
Dan Walsh 3eaa99
        corenet_tcp_connect_generic_port(telepathy_domain)
Dan Walsh 3eaa99
        corenet_sendrecv_generic_client_packets(telepathy_domain)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        automount_dontaudit_getattr_tmp_dirs(telepathy_domain)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        nis_use_ypbind(telepathy_domain)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        telepathy_dbus_chat(telepathy_domain)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh 3eaa99
        xserver_rw_xdm_pipes(telepathy_domain)
Dan Walsh 3eaa99
')