From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 04F30138330 for ; Mon, 3 Oct 2016 06:26:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9BE621C0C9; Mon, 3 Oct 2016 06:26:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B86B121C0C9 for ; Mon, 3 Oct 2016 06:26:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6B7A340E13 for ; Mon, 3 Oct 2016 06:26:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4575A24AD for ; Mon, 3 Oct 2016 06:26:34 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1475474792.31afb6134c5d0dca49042de96801d28601a905d3.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/mozilla.te policy/modules/contrib/pulseaudio.if X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 31afb6134c5d0dca49042de96801d28601a905d3 X-VCS-Branch: next Date: Mon, 3 Oct 2016 06:26:34 +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: 6dc98d2e-8456-48ee-86e3-3138537cbb95 X-Archives-Hash: f16e8e94018b0cc2d309e2cb6b1a8619 commit: 31afb6134c5d0dca49042de96801d28601a905d3 Author: Guido Trentalancia via refpolicy oss tresys com> AuthorDate: Sat Sep 10 16:26:46 2016 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Oct 3 06:06:32 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=31afb613 mozilla: let mozilla play audio Let mozilla play audio: - add new interfaces to the pulseaudio module; - let mozilla read alsa configuration files; - add further permissions to mozilla needed to use pulseaudio to play audio. Signed-off-by: Guido Trentalancia trentalancia.net> policy/modules/contrib/mozilla.te | 9 +++++ policy/modules/contrib/pulseaudio.if | 77 ++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/policy/modules/contrib/mozilla.te b/policy/modules/contrib/mozilla.te index cd1aea3..ca45f5c 100644 --- a/policy/modules/contrib/mozilla.te +++ b/policy/modules/contrib/mozilla.te @@ -217,6 +217,11 @@ tunable_policy(`use_samba_home_dirs',` ') optional_policy(` + alsa_read_config(mozilla_t) + alsa_read_home_files(mozilla_t) +') + +optional_policy(` apache_read_user_scripts(mozilla_t) apache_read_user_content(mozilla_t) ') @@ -269,6 +274,8 @@ optional_policy(` optional_policy(` pulseaudio_run(mozilla_t, mozilla_roles) + pulseaudio_rw_tmpfs_files(mozilla_t) + pulseaudio_use_fds(mozilla_t) ') optional_policy(` @@ -493,6 +500,8 @@ optional_policy(` optional_policy(` pulseaudio_run(mozilla_plugin_t, mozilla_plugin_roles) + pulseaudio_rw_tmpfs_files(mozilla_plugin_t) + pulseaudio_use_fds(mozilla_plugin_t) ') optional_policy(` diff --git a/policy/modules/contrib/pulseaudio.if b/policy/modules/contrib/pulseaudio.if index f057680..11238f2 100644 --- a/policy/modules/contrib/pulseaudio.if +++ b/policy/modules/contrib/pulseaudio.if @@ -371,3 +371,80 @@ interface(`pulseaudio_client_domain',` pulseaudio_domtrans($1) pulseaudio_tmpfs_content($2) ') + +####################################### +## +## Read pulseaudio tmpfs files. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_read_tmpfs_files',` + gen_require(` + type pulseaudio_tmpfs_t; + ') + + fs_search_tmpfs($1) + read_files_pattern($1, pulseaudio_tmpfs_t, pulseaudio_tmpfs_t) +') + +####################################### +## +## Read and write pulseaudio tmpfs +## files. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_rw_tmpfs_files',` + gen_require(` + type pulseaudio_tmpfs_t; + ') + + fs_search_tmpfs($1) + rw_files_pattern($1, pulseaudio_tmpfs_t, pulseaudio_tmpfs_t) +') + +######################################## +## +## Use file descriptors for +## pulseaudio. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_use_fds',` + gen_require(` + type pulseaudio_t; + ') + + allow $1 pulseaudio_t:fd use; +') + +######################################## +## +## Do not audit attempts to use the +## file descriptors for pulseaudio. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_dontaudit_use_fds',` + gen_require(` + type pulseaudio_t; + ') + + dontaudit $1 pulseaudio_t:fd use; +') From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF935138330 for ; Mon, 3 Oct 2016 06:21:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5841A21C088; Mon, 3 Oct 2016 06:20:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C49A21C088 for ; Mon, 3 Oct 2016 06:20:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 807F1340E09 for ; Mon, 3 Oct 2016 06:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8591F24B2 for ; Mon, 3 Oct 2016 06:20:52 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1475474792.31afb6134c5d0dca49042de96801d28601a905d3.perfinion@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.te policy/modules/contrib/pulseaudio.if X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 31afb6134c5d0dca49042de96801d28601a905d3 X-VCS-Branch: master Date: Mon, 3 Oct 2016 06:20:52 +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: 26681e1a-f304-48ab-8b95-3cef55bf5d2a X-Archives-Hash: b92a0d3f419120173d52650e96cb8381 Message-ID: <20161003062052.okAkiwXRfAXkvt-qRUI0hAL61t1wMJN61PwF54kQoRA@z> commit: 31afb6134c5d0dca49042de96801d28601a905d3 Author: Guido Trentalancia via refpolicy oss tresys com> AuthorDate: Sat Sep 10 16:26:46 2016 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Oct 3 06:06:32 2016 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=31afb613 mozilla: let mozilla play audio Let mozilla play audio: - add new interfaces to the pulseaudio module; - let mozilla read alsa configuration files; - add further permissions to mozilla needed to use pulseaudio to play audio. Signed-off-by: Guido Trentalancia trentalancia.net> policy/modules/contrib/mozilla.te | 9 +++++ policy/modules/contrib/pulseaudio.if | 77 ++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/policy/modules/contrib/mozilla.te b/policy/modules/contrib/mozilla.te index cd1aea3..ca45f5c 100644 --- a/policy/modules/contrib/mozilla.te +++ b/policy/modules/contrib/mozilla.te @@ -217,6 +217,11 @@ tunable_policy(`use_samba_home_dirs',` ') optional_policy(` + alsa_read_config(mozilla_t) + alsa_read_home_files(mozilla_t) +') + +optional_policy(` apache_read_user_scripts(mozilla_t) apache_read_user_content(mozilla_t) ') @@ -269,6 +274,8 @@ optional_policy(` optional_policy(` pulseaudio_run(mozilla_t, mozilla_roles) + pulseaudio_rw_tmpfs_files(mozilla_t) + pulseaudio_use_fds(mozilla_t) ') optional_policy(` @@ -493,6 +500,8 @@ optional_policy(` optional_policy(` pulseaudio_run(mozilla_plugin_t, mozilla_plugin_roles) + pulseaudio_rw_tmpfs_files(mozilla_plugin_t) + pulseaudio_use_fds(mozilla_plugin_t) ') optional_policy(` diff --git a/policy/modules/contrib/pulseaudio.if b/policy/modules/contrib/pulseaudio.if index f057680..11238f2 100644 --- a/policy/modules/contrib/pulseaudio.if +++ b/policy/modules/contrib/pulseaudio.if @@ -371,3 +371,80 @@ interface(`pulseaudio_client_domain',` pulseaudio_domtrans($1) pulseaudio_tmpfs_content($2) ') + +####################################### +## +## Read pulseaudio tmpfs files. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_read_tmpfs_files',` + gen_require(` + type pulseaudio_tmpfs_t; + ') + + fs_search_tmpfs($1) + read_files_pattern($1, pulseaudio_tmpfs_t, pulseaudio_tmpfs_t) +') + +####################################### +## +## Read and write pulseaudio tmpfs +## files. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_rw_tmpfs_files',` + gen_require(` + type pulseaudio_tmpfs_t; + ') + + fs_search_tmpfs($1) + rw_files_pattern($1, pulseaudio_tmpfs_t, pulseaudio_tmpfs_t) +') + +######################################## +## +## Use file descriptors for +## pulseaudio. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_use_fds',` + gen_require(` + type pulseaudio_t; + ') + + allow $1 pulseaudio_t:fd use; +') + +######################################## +## +## Do not audit attempts to use the +## file descriptors for pulseaudio. +## +## +## +## Domain allowed access. +## +## +# +interface(`pulseaudio_dontaudit_use_fds',` + gen_require(` + type pulseaudio_t; + ') + + dontaudit $1 pulseaudio_t:fd use; +')