From 3c1e8ff6bb9a851ab986fa50a896a5ab6392d7b8 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Mon, 21 Jun 2010 09:36:39 -0400 Subject: [PATCH] Mozilla patch from Dan Walsh. Various old fixes for mozilla. --- policy/modules/apps/mozilla.fc | 1 + policy/modules/apps/mozilla.if | 18 ++++++++++++++++++ policy/modules/apps/mozilla.te | 16 +++++++++------- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/policy/modules/apps/mozilla.fc b/policy/modules/apps/mozilla.fc index 4df06a010..93ac529f9 100644 --- a/policy/modules/apps/mozilla.fc +++ b/policy/modules/apps/mozilla.fc @@ -11,6 +11,7 @@ HOME_DIR/\.phoenix(/.*)? gen_context(system_u:object_r:mozilla_home_t,s0) /usr/bin/mozilla -- gen_context(system_u:object_r:mozilla_exec_t,s0) /usr/bin/mozilla-snapshot -- gen_context(system_u:object_r:mozilla_exec_t,s0) /usr/bin/epiphany-bin -- gen_context(system_u:object_r:mozilla_exec_t,s0) +/usr/bin/epiphany -- gen_context(system_u:object_r:mozilla_exec_t,s0) /usr/bin/mozilla-[0-9].* -- gen_context(system_u:object_r:mozilla_exec_t,s0) /usr/bin/mozilla-bin-[0-9].* -- gen_context(system_u:object_r:mozilla_exec_t,s0) diff --git a/policy/modules/apps/mozilla.if b/policy/modules/apps/mozilla.if index 61ac7206d..344a5b390 100644 --- a/policy/modules/apps/mozilla.if +++ b/policy/modules/apps/mozilla.if @@ -130,6 +130,24 @@ interface(`mozilla_dontaudit_manage_user_home_files',` dontaudit $1 mozilla_home_t:file manage_file_perms; ') +######################################## +## +## Execmod mozilla home directory content. +## +## +## +## Domain allowed access. +## +## +# +interface(`mozilla_execmod_user_home_files',` + gen_require(` + type mozilla_home_t; + ') + + allow $1 mozilla_home_t:file execmod; +') + ######################################## ## ## Run mozilla in the mozilla domain. diff --git a/policy/modules/apps/mozilla.te b/policy/modules/apps/mozilla.te index 803091cf7..62631ec0d 100644 --- a/policy/modules/apps/mozilla.te +++ b/policy/modules/apps/mozilla.te @@ -1,4 +1,4 @@ -policy_module(mozilla, 2.2.0) +policy_module(mozilla, 2.2.1) ######################################## # @@ -137,16 +137,12 @@ logging_send_syslog_msg(mozilla_t) miscfiles_read_fonts(mozilla_t) miscfiles_read_localization(mozilla_t) +miscfiles_dontaudit_setattr_fonts_dirs(mozilla_t) # Browse the web, connect to printer sysnet_dns_name_resolve(mozilla_t) -userdom_manage_user_home_content_dirs(mozilla_t) -userdom_manage_user_home_content_files(mozilla_t) -userdom_manage_user_home_content_symlinks(mozilla_t) -userdom_manage_user_tmp_dirs(mozilla_t) -userdom_manage_user_tmp_files(mozilla_t) -userdom_manage_user_tmp_sockets(mozilla_t) +userdom_use_user_ptys(mozilla_t) xserver_user_x_domain_template(mozilla, mozilla_t, mozilla_tmpfs_t) xserver_dontaudit_read_xdm_tmp_files(mozilla_t) @@ -262,6 +258,12 @@ optional_policy(` nscd_socket_use(mozilla_t) ') +optional_policy(` + pulseaudio_exec(mozilla_t) + pulseaudio_stream_connect(mozilla_t) + pulseaudio_manage_home_files(mozilla_t) +') + optional_policy(` thunderbird_domtrans(mozilla_t) ')