Chris PeBenito 9105f9
## <summary>Policy for Mozilla and related web browsers</summary>
Chris PeBenito 9105f9
Chris PeBenito 9105f9
#######################################
Chris PeBenito 9105f9
## <summary>
Chris PeBenito bbcd3c
##	The per role template for the mozilla module.
Chris PeBenito 9105f9
## </summary>
Chris PeBenito 9105f9
## <desc>
Chris PeBenito 9105f9
##	

Chris PeBenito 9105f9
##	This template creates a derived domains which are used
Chris PeBenito 9105f9
##	for mozilla web browser.
Chris PeBenito 9105f9
##	

Chris PeBenito 9105f9
##	

Chris PeBenito 9105f9
##	This template is invoked automatically for each user, and
Chris PeBenito 9105f9
##	generally does not need to be invoked directly
Chris PeBenito 9105f9
##	by policy writers.
Chris PeBenito 9105f9
##	

Chris PeBenito 9105f9
## </desc>
Chris PeBenito 9105f9
## <param name="userdomain_prefix">
Chris PeBenito 9105f9
##	<summary>
Chris PeBenito 9105f9
##	The prefix of the user domain (e.g., user
Chris PeBenito 9105f9
##	is the prefix for user_t).
Chris PeBenito 9105f9
##	</summary>
Chris PeBenito 9105f9
## </param>
Chris PeBenito 9105f9
## <param name="user_domain">
Chris PeBenito 9105f9
##	<summary>
Chris PeBenito 9105f9
##	The type of the user domain.
Chris PeBenito 9105f9
##	</summary>
Chris PeBenito 9105f9
## </param>
Chris PeBenito 9105f9
## <param name="user_role">
Chris PeBenito 9105f9
##	<summary>
Chris PeBenito 9105f9
##	The role associated with the user domain.
Chris PeBenito 9105f9
##	</summary>
Chris PeBenito 9105f9
## </param>
Chris PeBenito 9105f9
#
Chris PeBenito bbcd3c
template(`mozilla_per_role_template',`
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	########################################
Chris PeBenito 9105f9
	#
Chris PeBenito 9105f9
	# Declarations
Chris PeBenito 9105f9
	#
Chris PeBenito 9105f9
	type $1_mozilla_t;
Chris PeBenito 9105f9
	domain_type($1_mozilla_t)
Chris PeBenito 9105f9
	domain_entry_file($1_mozilla_t,mozilla_exec_t)
Chris PeBenito 9105f9
	role $3 types $1_mozilla_t;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	type $1_mozilla_home_t alias $1_mozilla_rw_t;
Chris PeBenito 9105f9
	files_poly_member($1_mozilla_home_t)
Chris PeBenito 9105f9
	userdom_user_home_content($1,$1_mozilla_home_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	type $1_mozilla_tmpfs_t;
Chris PeBenito 9105f9
	files_tmpfs_file($1_mozilla_tmpfs_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	########################################
Chris PeBenito 9105f9
	#
Chris PeBenito 9105f9
	# Local policy
Chris PeBenito 9105f9
	#
Chris PeBenito 9105f9
	allow $1_mozilla_t self:capability { sys_nice setgid setuid };
Chris PeBenito 9105f9
	allow $1_mozilla_t self:process { sigkill signal setsched getsched setrlimit };
Chris PeBenito 9105f9
	allow $1_mozilla_t self:fifo_file { getattr read write };
Chris PeBenito 9105f9
	allow $1_mozilla_t self:shm { unix_read unix_write read write destroy create };
Chris PeBenito 9105f9
	allow $1_mozilla_t self:sem create_sem_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t self:socket create_socket_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t self:unix_stream_socket { listen accept };
Chris PeBenito 9105f9
	# Browse the web, connect to printer
Chris PeBenito 9105f9
	allow $1_mozilla_t self:tcp_socket create_socket_perms;
Chris PeBenito a5e213
	allow $1_mozilla_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# for bash - old mozilla binary
Chris PeBenito 9105f9
	can_exec($1_mozilla_t, mozilla_exec_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# X access, Home files
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_home_t:dir manage_dir_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_home_t:file manage_file_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_home_t:lnk_file create_lnk_perms;
Chris PeBenito 9105f9
	fs_search_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Mozpluggerrc
Chris PeBenito 9105f9
	allow $1_mozilla_t mozilla_conf_t:file r_file_perms;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	allow $1_mozilla_t $2:fd use;
Chris PeBenito 9105f9
	allow $1_mozilla_t $2:process sigchld;
Chris PeBenito 9105f9
	allow $1_mozilla_t $2:unix_stream_socket connectto;
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:fd use;
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:shm { associate getattr };
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:shm { unix_read unix_write };
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:unix_stream_socket connectto;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# X access, Home files
Chris PeBenito 9105f9
	allow $2 $1_mozilla_home_t:dir manage_dir_perms;
Chris PeBenito 9105f9
	allow $2 $1_mozilla_home_t:file manage_file_perms;
Chris PeBenito 9105f9
	allow $2 $1_mozilla_home_t:lnk_file create_lnk_perms;
Chris PeBenito 9105f9
	allow $2 $1_mozilla_home_t:{ dir file lnk_file } { relabelfrom relabelto };
Chris PeBenito 9105f9
	userdom_search_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_tmpfs_t:dir rw_dir_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_tmpfs_t:file manage_file_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_tmpfs_t:lnk_file create_lnk_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_tmpfs_t:sock_file manage_file_perms;
Chris PeBenito 9105f9
	allow $1_mozilla_t $1_mozilla_tmpfs_t:fifo_file manage_file_perms;
Chris PeBenito 9105f9
	fs_tmpfs_filetrans($1_mozilla_t,$1_mozilla_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Unrestricted inheritance from the caller.
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 9105f9
	allow $1_mozilla_t $2:process signull;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Allow the user domain to signal/ps.
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:dir { search getattr read };
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:{ file lnk_file } { read getattr };
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:process getattr;
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	allow $2 $1_mozilla_t:process signal_perms;
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	kernel_read_kernel_sysctls($1_mozilla_t)
Chris PeBenito 9105f9
	kernel_read_network_state($1_mozilla_t)
Chris PeBenito 9105f9
	# Access /proc, sysctl
Chris PeBenito 9105f9
	kernel_read_system_state($1_mozilla_t)
Chris PeBenito 9105f9
	kernel_read_net_sysctls($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	corecmd_search_sbin($1_mozilla_t)
Chris PeBenito 9105f9
	# Look for plugins 
Chris PeBenito 9105f9
	corecmd_list_bin($1_mozilla_t)
Chris PeBenito 9105f9
	# for bash - old mozilla binary
Chris PeBenito 9105f9
	corecmd_exec_shell($1_mozilla_t)
Chris PeBenito 9105f9
	corecmd_exec_bin($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Browse the web, connect to printer
Chris PeBenito c0d8c4
	corenet_non_ipsec_sendrecv($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_generic_if($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_raw_sendrecv_generic_if($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_all_nodes($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_raw_sendrecv_all_nodes($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_http_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_http_cache_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_ftp_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_sendrecv_ipp_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_connect_http_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_connect_http_cache_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_connect_ftp_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_connect_ipp_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_tcp_connect_generic_port($1_mozilla_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_http_client_packets($1_mozilla_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_http_cache_client_packets($1_mozilla_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_ftp_client_packets($1_mozilla_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_ipp_client_packets($1_mozilla_t)
Chris PeBenito c0d8c4
	corenet_sendrecv_generic_client_packets($1_mozilla_t)
Chris PeBenito 9105f9
	# Should not need other ports
Chris PeBenito 9105f9
	corenet_dontaudit_tcp_sendrecv_generic_port($1_mozilla_t)
Chris PeBenito 9105f9
	corenet_dontaudit_tcp_bind_generic_port($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	dev_read_urand($1_mozilla_t)
Chris PeBenito 9105f9
	dev_write_sound($1_mozilla_t)
Chris PeBenito 9105f9
	dev_read_sound($1_mozilla_t)
Chris PeBenito 9105f9
	dev_dontaudit_rw_dri($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	files_read_etc_runtime_files($1_mozilla_t)
Chris PeBenito 9105f9
	files_read_usr_files($1_mozilla_t)
Chris PeBenito 9105f9
	files_read_etc_files($1_mozilla_t)
Chris PeBenito 9105f9
	# /var/lib
Chris PeBenito 9105f9
	files_read_var_lib_files($1_mozilla_t)
Chris PeBenito 9105f9
	# interacting with gstreamer
Chris PeBenito 9105f9
	files_read_var_files($1_mozilla_t)
Chris PeBenito 9105f9
	files_read_var_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	fs_search_inotifyfs($1_mozilla_t)
Chris PeBenito 9105f9
	fs_rw_tmpfs_files($1_mozilla_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	libs_use_ld_so($1_mozilla_t)
Chris PeBenito 9105f9
	libs_use_lib_files($1_mozilla_t)
Chris PeBenito 9105f9
	libs_use_shared_libs($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	logging_send_syslog_msg($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	miscfiles_read_fonts($1_mozilla_t)
Chris PeBenito a5e213
	miscfiles_read_localization($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Browse the web, connect to printer
Chris PeBenito 9105f9
	sysnet_dns_name_resolve($1_mozilla_t)
Chris PeBenito 9105f9
	sysnet_read_config($1_mozilla_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	userdom_manage_user_home_content_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
	userdom_manage_user_home_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
	userdom_manage_user_home_content_symlinks($1,$1_mozilla_t)
Chris PeBenito 9105f9
	userdom_manage_user_tmp_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
	userdom_manage_user_tmp_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
	userdom_manage_user_tmp_sockets($1,$1_mozilla_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	xserver_user_client_template($1,$1_mozilla_t,$1_mozilla_tmpfs_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	tunable_policy(`allow_execmem',`
Chris PeBenito 9105f9
		allow $1_mozilla_t self:process { execmem execstack };
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`use_nfs_home_dirs',`
Chris PeBenito 9105f9
		fs_manage_nfs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_nfs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_nfs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`use_samba_home_dirs',`
Chris PeBenito 9105f9
		fs_manage_cifs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_cifs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_cifs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Type transition
Chris PeBenito 9105f9
	tunable_policy(`! disable_mozilla_trans',`
Chris PeBenito 9105f9
		domain_auto_trans($2, mozilla_exec_t, $1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Uploads, local html
Chris PeBenito 9105f9
	tunable_policy(`mozilla_read_content && use_nfs_home_dirs',`
Chris PeBenito 9105f9
		fs_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		files_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		fs_read_nfs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_read_nfs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_read_nfs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_list_nfs($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`mozilla_read_content && use_samba_home_dirs',`
Chris PeBenito 9105f9
		fs_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		files_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		fs_read_cifs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_read_cifs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_read_cifs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_list_cifs($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`mozilla_read_content',`
Chris PeBenito 9105f9
		userdom_list_user_tmp($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_tmp_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_tmp_symlinks($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_search_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_home_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_home_content_symlinks($1,$1_mozilla_t)
Chris PeBenito 9105f9
		
Chris PeBenito eeab57
		ifdef(`enable_mls',`',`
Chris PeBenito 9105f9
			fs_search_removable($1_mozilla_t)
Chris PeBenito 9105f9
			fs_read_removable_files($1_mozilla_t)
Chris PeBenito 9105f9
			fs_read_removable_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
		')
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_list_tmp($1_mozilla_t)
Chris PeBenito 9105f9
		files_dontaudit_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_list_removable($1_mozilla_t)
Chris PeBenito e99359
		fs_dontaudit_read_removable_files($1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_tmp($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_read_user_tmp_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_read_user_home_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`mozilla_read_content && read_default_t',`
Chris PeBenito 9105f9
		files_list_default($1_mozilla_t)
Chris PeBenito 9105f9
		files_read_default_files($1_mozilla_t)
Chris PeBenito 9105f9
		files_read_default_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_read_default_files($1_mozilla_t)
Chris PeBenito 9105f9
		files_dontaudit_list_default($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`mozilla_read_content && read_untrusted_content',`
Chris PeBenito 9105f9
		files_list_tmp($1_mozilla_t)
Chris PeBenito 9105f9
		files_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		userdom_search_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
		userdom_list_user_untrusted_content($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_untrusted_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_untrusted_content_symlinks($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_list_user_tmp_untrusted_content($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_tmp_untrusted_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_read_user_tmp_untrusted_content_symlinks($1,$1_mozilla_t)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_list_tmp($1_mozilla_t)
Chris PeBenito 9105f9
		files_dontaudit_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_untrusted_content($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_read_user_untrusted_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_tmp_untrusted_content($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_read_user_tmp_untrusted_content_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	# Save web pages
Chris PeBenito 9105f9
	tunable_policy(`write_untrusted_content && use_nfs_home_dirs',`
Chris PeBenito 9105f9
		files_search_home($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		fs_search_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_nfs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_nfs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_nfs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_manage_nfs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_manage_nfs_files($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`write_untrusted_content && use_samba_home_dirs',`
Chris PeBenito 9105f9
		files_search_home($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		fs_search_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_cifs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_cifs_files($1_mozilla_t)
Chris PeBenito 9105f9
		fs_manage_cifs_symlinks($1_mozilla_t)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_manage_cifs_dirs($1_mozilla_t)
Chris PeBenito 9105f9
		fs_dontaudit_manage_cifs_files($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	tunable_policy(`write_untrusted_content',`
Chris PeBenito 9105f9
		files_search_home($1_mozilla_t)
Chris PeBenito 9105f9
		files_tmp_filetrans($1_mozilla_t,$1_untrusted_content_tmp_t,file)
Chris PeBenito 9105f9
		files_tmp_filetrans($1_mozilla_t,$1_untrusted_content_tmp_t,dir)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		userdom_manage_user_untrusted_content_files($1,$1_mozilla_t,file)
Chris PeBenito 9105f9
		userdom_manage_user_untrusted_content_files($1,$1_mozilla_t,dir)
Chris PeBenito 9105f9
	',`
Chris PeBenito 9105f9
		files_dontaudit_list_home($1_mozilla_t)
Chris PeBenito 9105f9
		files_dontaudit_list_tmp($1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_manage_user_tmp_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_manage_user_tmp_files($1,$1_mozilla_t)
Chris PeBenito 9105f9
		userdom_dontaudit_manage_user_home_content_dirs($1,$1_mozilla_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito bb7170
	optional_policy(`
Chris PeBenito 9105f9
		apache_read_user_scripts($1,$1_mozilla_t)
Chris PeBenito 9105f9
		apache_read_user_content($1,$1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito bb7170
	optional_policy(`
Chris PeBenito 9105f9
		cups_read_rw_config($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito bb7170
	optional_policy(`
Chris PeBenito 9105f9
		dbus_system_bus_client_template($1_mozilla,$1_mozilla_t)
Chris PeBenito 9105f9
		dbus_send_system_bus($1_mozilla_t)
Chris PeBenito 9105f9
		ifdef(`TODO',`
Chris PeBenito bb7170
			optional_policy(`
Chris PeBenito 9105f9
				allow cupsd_t $1_mozilla_t:dbus send_msg;
Chris PeBenito 9105f9
			')
Chris PeBenito 9105f9
		')
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito bb7170
	optional_policy(`
Chris PeBenito 9105f9
		nscd_socket_use($1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito bb7170
	optional_policy(`
Chris PeBenito 9105f9
		lpd_domtrans_user_lpr($1,$1_mozilla_t)
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
	ifdef(`TODO',`
Chris PeBenito 9105f9
		# Java plugin
Chris PeBenito bb7170
		optional_policy(`
Chris PeBenito bbcd3c
			#reh, these are hacked in types due to the use of the java_per_role_template
Chris PeBenito 9105f9
			type $1_mozilla_tmp_t;
Chris PeBenito 9105f9
			files_tmp_file($1_mozilla_tmp_t)
Chris PeBenito 9105f9
Chris PeBenito 9105f9
			#this looks even more ugly.
Chris PeBenito 9105f9
			type $1_mozilla_tty_device_t;
Chris PeBenito 9105f9
			term_tty($1_mozilla_t,$1_mozilla_tty_device_t)
Chris PeBenito 9105f9
			type $1_mozilla_devpts_t;
Chris PeBenito 9105f9
			term_pty($1_mozilla_devpts_t)
Chris PeBenito 9105f9
			type $1_mozilla_home_dir_t;
Chris PeBenito 9105f9
			userdom_user_home_content($1,$1_mozilla_home_dir_t)
Chris PeBenito 9105f9
Chris PeBenito bbcd3c
			java_per_role_template($1_mozilla,$2,$3)
Chris PeBenito 9105f9
		')
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		######### Launch mplayer
Chris PeBenito bb7170
		optional_policy(`
Chris PeBenito 9105f9
			domain_auto_trans($1_mozilla_t, mplayer_exec_t, $1_mplayer_t)
Chris PeBenito 9105f9
			dontaudit $1_mplayer_t $1_mozilla_home_t:file { read write };
Chris PeBenito 9105f9
			dontaudit $1_mplayer_t $1_mozilla_t:unix_stream_socket { read write };
Chris PeBenito 9105f9
			dontaudit $1_mplayer_t $1_mozilla_home_t:file { read write };
Chris PeBenito 9105f9
		')
Chris PeBenito 9105f9
		#NOTE commented out in strict.
Chris PeBenito 9105f9
		######### Launch email client, and make webcal links work
Chris PeBenito 9105f9
		#ifdef(`evolution.te', `
Chris PeBenito 9105f9
		#domain_auto_trans($1_mozilla_t, evolution_exec_t, $1_evolution_t)
Chris PeBenito 9105f9
		#domain_auto_trans($1_mozilla_t, evolution_webcal_exec_t, $1_evolution_webcal_t)
Chris PeBenito 9105f9
		#')
Chris PeBenito 9105f9
		#NOTE commented out in strict
Chris PeBenito 9105f9
		#ifdef(`thunderbird.te', `
Chris PeBenito 9105f9
		#domain_auto_trans($1_mozilla_t, thunderbird_exec_t, $1_thunderbird_t)
Chris PeBenito 9105f9
		#')
Chris PeBenito 9105f9
	
Chris PeBenito 9105f9
		# Macros for mozilla/mozilla (or other browser) domains.
Chris PeBenito 9105f9
		# FIXME: Rules were removed to centralize policy in a gnome_app macro
Chris PeBenito 9105f9
		# A similar thing might be necessary for mozilla compiled without GNOME
Chris PeBenito 9105f9
		# support (is this possible?). 
Chris PeBenito 9105f9
Chris PeBenito 9105f9
		# GNOME integration
Chris PeBenito bb7170
		optional_policy(`
Chris PeBenito 9105f9
			gnome_application($1_mozilla, $1)
Chris PeBenito 9105f9
			gnome_file_dialog($1_mozilla, $1)
Chris PeBenito 9105f9
		')
Chris PeBenito 9105f9
	')
Chris PeBenito 9105f9
')