From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 830CC1381F3 for ; Sat, 22 Jun 2013 19:36:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0991BE09EB; Sat, 22 Jun 2013 19:36:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 93F55E09EB for ; Sat, 22 Jun 2013 19:35:59 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9345A33E349 for ; Sat, 22 Jun 2013 19:35:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3AEB0E468F for ; Sat, 22 Jun 2013 19:35:57 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1371929590.599135d648102117fc5756f900c855b69b61d2ec.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/mozilla.fc policy/modules/contrib/mozilla.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 599135d648102117fc5756f900c855b69b61d2ec X-VCS-Branch: master Date: Sat, 22 Jun 2013 19:35:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 643c9a8a-54dd-4ee0-bf49-5f48309b930e X-Archives-Hash: a5e3ef021bece2e9a95498671960b877 commit: 599135d648102117fc5756f900c855b69b61d2ec Author: Sven Vermeulen siphos be> AuthorDate: Sat Jun 22 19:33:10 2013 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Sat Jun 22 19:33:10 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=599135d6 Fix bug 471908 - Add support for xdg cache in mozilla The firefox browser seems to use/support ~/.cache/mozilla now, so we add in a mozilla_xdg_cache_t type with the proper permissions surrounding it for this purpose. --- policy/modules/contrib/mozilla.fc | 1 + policy/modules/contrib/mozilla.te | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/policy/modules/contrib/mozilla.fc b/policy/modules/contrib/mozilla.fc index 9e74bfa..54e1ba4 100644 --- a/policy/modules/contrib/mozilla.fc +++ b/policy/modules/contrib/mozilla.fc @@ -1,3 +1,4 @@ +HOME_DIR/\.cache/mozilla(/.*)? gen_context(system_u:object_r:mozilla_xdg_cache_t,s0) HOME_DIR/\.galeon(/.*)? gen_context(system_u:object_r:mozilla_home_t,s0) HOME_DIR/\.mozilla(/.*)? gen_context(system_u:object_r:mozilla_home_t,s0) HOME_DIR/\.mozilla/plugins(/.*)? gen_context(system_u:object_r:mozilla_plugin_home_t,s0) diff --git a/policy/modules/contrib/mozilla.te b/policy/modules/contrib/mozilla.te index 3255a31..aedcc00 100644 --- a/policy/modules/contrib/mozilla.te +++ b/policy/modules/contrib/mozilla.te @@ -624,6 +624,9 @@ gen_tunable(mozilla_bind_all_unreserved_ports, false) ## gen_tunable(mozilla_plugin_connect_all_unreserved, false) + type mozilla_xdg_cache_t; + xdg_cache_home_content(mozilla_xdg_cache_t) + ##################### # # Mozilla policy @@ -634,6 +637,10 @@ gen_tunable(mozilla_plugin_connect_all_unreserved, false) manage_fifo_files_pattern(mozilla_t, mozilla_tmp_t, mozilla_tmp_t) + manage_files_pattern(mozilla_t, mozilla_xdg_cache_t, mozilla_xdg_cache_t) + manage_dirs_pattern(mozilla_t, mozilla_xdg_cache_t, mozilla_xdg_cache_t) + xdg_cache_home_filetrans(mozilla_t, mozilla_xdg_cache_t, dir, "mozilla") + corenet_dontaudit_tcp_bind_generic_port(mozilla_t) corenet_dontaudit_tcp_sendrecv_generic_port(mozilla_t) corenet_sendrecv_tor_client_packets(mozilla_t)