Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Thunderbird
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author: Ivan Gyurdiev <ivg2@cornell.edu>
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#######################################
Chris PeBenito ab58ad
# thunderbird_domain(role_prefix)
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# FIXME: Rules were removed to centralize policy in a gnome_app macro
Chris PeBenito ab58ad
# A similar thing might be necessary for mozilla compiled without GNOME
Chris PeBenito ab58ad
# support (is this possible?).
Chris PeBenito ab58ad
Chris PeBenito ab58ad
define(`thunderbird_domain', `
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Type for program
Chris PeBenito ab58ad
type $1_thunderbird_t, domain, nscd_client_domain;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Transition from user type
Chris PeBenito ab58ad
if (! disable_thunderbird_trans) {
Chris PeBenito ab58ad
domain_auto_trans($1_t, thunderbird_exec_t, $1_thunderbird_t)
Chris PeBenito ab58ad
}
Chris PeBenito ab58ad
role $1_r types $1_thunderbird_t;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# FIXME: Why does it try to do that?
Chris PeBenito ab58ad
dontaudit $1_thunderbird_t evolution_exec_t:file { getattr execute };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Why is thunderbird looking in .mozilla ?
Chris PeBenito ab58ad
# FIXME: there are legitimate uses of invoking the browser - about -> release notes
Chris PeBenito ab58ad
dontaudit $1_thunderbird_t $1_mozilla_home_t:dir search;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# .kde/....gtkrc
Chris PeBenito ab58ad
# FIXME: support properly 
Chris PeBenito ab58ad
dontaudit $1_thunderbird_t $1_home_t:file { getattr read };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# X, mail common stuff
Chris PeBenito ab58ad
x_client_domain($1_thunderbird, $1)
Chris PeBenito ab58ad
mail_client_domain($1_thunderbird, $1)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow $1_thunderbird_t self:process signull;
Chris PeBenito ab58ad
allow $1_thunderbird_t fs_t:filesystem getattr;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# GNOME support
Chris PeBenito ab58ad
ifdef(`gnome.te', `
Chris PeBenito ab58ad
gnome_application($1_thunderbird, $1)
Chris PeBenito ab58ad
gnome_file_dialog($1_thunderbird, $1)
Chris PeBenito ab58ad
allow $1_thunderbird_t $1_gnome_settings_t:file { read write };
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Access ~/.thunderbird
Chris PeBenito ab58ad
home_domain($1, thunderbird)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# RSS feeds
Chris PeBenito ab58ad
can_network_client_tcp($1_thunderbird_t, http_port_t) 
Chris PeBenito ab58ad
allow $1_thunderbird_t http_port_t:tcp_socket name_connect;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow $1_thunderbird_t self:process { execheap execmem execstack };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
')