Chris PeBenito 185272
Chris PeBenito 9570b2
policy_module(thunderbird, 2.1.0)
Chris PeBenito 185272
Chris PeBenito 185272
########################################
Chris PeBenito 185272
#
Chris PeBenito 185272
# Declarations
Chris PeBenito 185272
#
Chris PeBenito 185272
Chris PeBenito 296273
type thunderbird_t;
Chris PeBenito 185272
type thunderbird_exec_t;
Chris PeBenito 296273
typealias thunderbird_t alias { user_thunderbird_t staff_thunderbird_t sysadm_thunderbird_t };
Chris PeBenito 296273
typealias thunderbird_t alias { auditadm_thunderbird_t secadm_thunderbird_t };
Chris PeBenito 296273
application_domain(thunderbird_t, thunderbird_exec_t)
Chris PeBenito 296273
ubac_constrained(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
type thunderbird_home_t;
Chris PeBenito 296273
typealias thunderbird_home_t alias { user_thunderbird_home_t staff_thunderbird_home_t sysadm_thunderbird_home_t };
Chris PeBenito 296273
typealias thunderbird_home_t alias { auditadm_thunderbird_home_t secadm_thunderbird_home_t };
Chris PeBenito 296273
files_poly_member(thunderbird_home_t)
Chris PeBenito 296273
userdom_user_home_content(thunderbird_home_t)
Chris PeBenito 296273
Chris PeBenito 296273
type thunderbird_tmpfs_t;
Chris PeBenito 296273
typealias thunderbird_tmpfs_t alias { user_thunderbird_tmpfs_t staff_thunderbird_tmpfs_t sysadm_thunderbird_tmpfs_t };
Chris PeBenito 296273
typealias thunderbird_tmpfs_t alias { auditadm_thunderbird_tmpfs_t secadm_thunderbird_tmpfs_t };
Chris PeBenito 296273
files_tmpfs_file(thunderbird_tmpfs_t)
Chris PeBenito 296273
ubac_constrained(thunderbird_tmpfs_t)
Chris PeBenito 296273
Chris PeBenito 296273
########################################
Chris PeBenito 296273
#
Chris PeBenito 296273
# Local policy
Chris PeBenito 296273
#
Chris PeBenito 296273
Chris PeBenito 296273
allow thunderbird_t self:capability sys_nice;
Chris PeBenito 296273
allow thunderbird_t self:process { signal_perms setsched getsched execheap execmem execstack };
Chris PeBenito 296273
allow thunderbird_t self:fifo_file { ioctl read write getattr };
Chris PeBenito 296273
allow thunderbird_t self:unix_dgram_socket { create connect };
Chris PeBenito 296273
allow thunderbird_t self:unix_stream_socket { create accept connect write getattr read listen bind };
Chris PeBenito 296273
allow thunderbird_t self:tcp_socket create_socket_perms;
Chris PeBenito 296273
allow thunderbird_t self:shm { read write create destroy unix_read unix_write };
Chris PeBenito 296273
Chris PeBenito 296273
# Access ~/.thunderbird
Chris PeBenito 296273
manage_dirs_pattern(thunderbird_t, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273
manage_files_pattern(thunderbird_t, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273
manage_lnk_files_pattern(thunderbird_t, thunderbird_home_t, thunderbird_home_t)
Chris PeBenito 296273
userdom_search_user_home_dirs(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
manage_files_pattern(thunderbird_t, thunderbird_tmpfs_t, thunderbird_tmpfs_t)
Chris PeBenito 296273
manage_lnk_files_pattern(thunderbird_t, thunderbird_tmpfs_t, thunderbird_tmpfs_t)
Chris PeBenito 296273
manage_fifo_files_pattern(thunderbird_t, thunderbird_tmpfs_t, thunderbird_tmpfs_t)
Chris PeBenito 296273
manage_sock_files_pattern(thunderbird_t, thunderbird_tmpfs_t, thunderbird_tmpfs_t)
Chris PeBenito 296273
fs_tmpfs_filetrans(thunderbird_t, thunderbird_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
Chris PeBenito 296273
Chris PeBenito 296273
# Allow netstat
Chris PeBenito 296273
kernel_read_network_state(thunderbird_t)
Chris PeBenito 296273
kernel_read_net_sysctls(thunderbird_t)
Chris PeBenito 296273
kernel_read_system_state(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
# Startup shellscript
Chris PeBenito 296273
corecmd_exec_shell(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
corenet_all_recvfrom_unlabeled(thunderbird_t)
Chris PeBenito 296273
corenet_all_recvfrom_netlabel(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_generic_if(thunderbird_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_ipp_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_ldap_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_innd_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_smtp_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_pop_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_http_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_ipp_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_ldap_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_innd_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_smtp_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_pop_port(thunderbird_t)
Chris PeBenito 296273
corenet_tcp_connect_http_port(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_ipp_client_packets(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_ldap_client_packets(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_innd_client_packets(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_smtp_client_packets(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_pop_client_packets(thunderbird_t)
Chris PeBenito 296273
corenet_sendrecv_http_client_packets(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
dev_read_urand(thunderbird_t)
Chris PeBenito 296273
dev_dontaudit_search_sysfs(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
files_list_tmp(thunderbird_t)
Chris PeBenito 296273
files_read_usr_files(thunderbird_t)
Chris PeBenito 296273
files_read_etc_files(thunderbird_t)
Chris PeBenito 296273
files_read_etc_runtime_files(thunderbird_t)
Chris PeBenito 296273
files_read_var_files(thunderbird_t)
Chris PeBenito 296273
files_read_var_symlinks(thunderbird_t)
Chris PeBenito 296273
files_dontaudit_getattr_all_tmp_files(thunderbird_t)
Chris PeBenito 296273
files_dontaudit_getattr_boot_dirs(thunderbird_t)
Chris PeBenito 296273
files_dontaudit_getattr_lost_found_dirs(thunderbird_t)
Chris PeBenito 296273
files_dontaudit_search_mnt(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
fs_getattr_xattr_fs(thunderbird_t)
Chris PeBenito 296273
fs_list_inotifyfs(thunderbird_t)
Chris PeBenito 296273
# Access ~/.thunderbird
Chris PeBenito 296273
fs_search_auto_mountpoints(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
auth_use_nsswitch(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
miscfiles_read_fonts(thunderbird_t)
Chris PeBenito 296273
miscfiles_read_localization(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
userdom_manage_user_tmp_dirs(thunderbird_t)
Chris PeBenito 296273
userdom_read_user_tmp_files(thunderbird_t)
Chris PeBenito 296273
userdom_manage_user_tmp_sockets(thunderbird_t)
Chris PeBenito 296273
# .kde/....gtkrc
Chris PeBenito 296273
userdom_read_user_home_content_files(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
xserver_user_x_domain_template(thunderbird, thunderbird_t, thunderbird_tmpfs_t)
Chris PeBenito 296273
xserver_read_xdm_tmp_files(thunderbird_t)
Chris PeBenito 296273
xserver_dontaudit_getattr_xdm_tmp_sockets(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
# Access ~/.thunderbird
Chris PeBenito 296273
tunable_policy(`use_nfs_home_dirs',`
Chris PeBenito 296273
	fs_manage_nfs_dirs(thunderbird_t)
Chris PeBenito 296273
	fs_manage_nfs_files(thunderbird_t)
Chris PeBenito 296273
	fs_manage_nfs_symlinks(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
tunable_policy(`use_samba_home_dirs',`
Chris PeBenito 296273
	fs_manage_cifs_dirs(thunderbird_t)
Chris PeBenito 296273
	fs_manage_cifs_files(thunderbird_t)
Chris PeBenito 296273
	fs_manage_cifs_symlinks(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
tunable_policy(`mail_read_content && use_nfs_home_dirs',`
Chris PeBenito 296273
	files_list_home(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	fs_list_auto_mountpoints(thunderbird_t)
Chris PeBenito 296273
	fs_read_nfs_files(thunderbird_t)
Chris PeBenito 296273
	fs_read_nfs_symlinks(thunderbird_t)
Chris PeBenito 296273
',`
Chris PeBenito 296273
	files_dontaudit_list_home(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	fs_dontaudit_list_auto_mountpoints(thunderbird_t)
Chris PeBenito 296273
	fs_dontaudit_list_nfs(thunderbird_t)
Chris PeBenito 296273
	fs_dontaudit_read_nfs_files(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
tunable_policy(`mail_read_content && use_samba_home_dirs',`
Chris PeBenito 296273
	files_list_home(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	fs_list_auto_mountpoints(thunderbird_t)
Chris PeBenito 296273
	fs_read_cifs_files(thunderbird_t)
Chris PeBenito 296273
	fs_read_cifs_symlinks(thunderbird_t)
Chris PeBenito 296273
',`
Chris PeBenito 296273
	files_dontaudit_list_home(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	fs_dontaudit_list_auto_mountpoints(thunderbird_t)
Chris PeBenito 296273
	fs_dontaudit_read_cifs_files(thunderbird_t)
Chris PeBenito 296273
	fs_dontaudit_list_cifs(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
tunable_policy(`mail_read_content',`
Chris PeBenito 296273
	userdom_list_user_tmp(thunderbird_t)
Chris PeBenito 296273
	userdom_read_user_tmp_files(thunderbird_t)
Chris PeBenito 296273
	userdom_read_user_tmp_symlinks(thunderbird_t)
Chris PeBenito 296273
	userdom_search_user_home_dirs(thunderbird_t)
Chris PeBenito 296273
	userdom_read_user_home_content_files(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	ifndef(`enable_mls',`
Chris PeBenito 296273
		fs_search_removable(thunderbird_t)
Chris PeBenito 296273
		fs_read_removable_files(thunderbird_t)
Chris PeBenito 296273
		fs_read_removable_symlinks(thunderbird_t)
Chris PeBenito 296273
	')
Chris PeBenito 296273
',`
Chris PeBenito 296273
	files_dontaudit_list_tmp(thunderbird_t)
Chris PeBenito 296273
	files_dontaudit_list_home(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	fs_dontaudit_list_removable(thunderbird_t)
Chris PeBenito 296273
	fs_dontaudit_read_removable_files(thunderbird_t)
Chris PeBenito 296273
Chris PeBenito 296273
	userdom_dontaudit_list_user_tmp(thunderbird_t)
Chris PeBenito 296273
	userdom_dontaudit_read_user_tmp_files(thunderbird_t)
Chris PeBenito 296273
	userdom_dontaudit_list_user_home_dirs(thunderbird_t)
Chris PeBenito 296273
	userdom_dontaudit_read_user_home_content_files(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	dbus_system_bus_client(thunderbird_t)
Chris PeBenito 296273
	dbus_session_bus_client(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	cups_read_rw_config(thunderbird_t)
Chris PeBenito 296273
	cups_dbus_chat(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	gnome_stream_connect_gconf(thunderbird_t)
Chris PeBenito 296273
	gnome_domtrans_gconfd(thunderbird_t)
Chris PeBenito 296273
	gnome_manage_config(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	gpg_domtrans(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	lpd_domtrans_lpr(thunderbird_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	mozilla_read_user_home_files(thunderbird_t)
Chris PeBenito 296273
	mozilla_domtrans(thunderbird_t)
Chris PeBenito 296273
	mozilla_dbus_chat(thunderbird_t)
Chris PeBenito 296273
')