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 B0E9D139694 for ; Sun, 7 May 2017 17:47:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6049121C0E1; Sun, 7 May 2017 17:47:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 12E7D21C0E1 for ; Sun, 7 May 2017 17:47:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A239A3416D7 for ; Sun, 7 May 2017 17:47:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 53A137457 for ; Sun, 7 May 2017 17:47:13 +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: <1494178829.301b59bff67c4833c98e6fec5bd2cb04a13e31a2.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/dirmngr.if policy/modules/contrib/gpg.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 301b59bff67c4833c98e6fec5bd2cb04a13e31a2 X-VCS-Branch: next Date: Sun, 7 May 2017 17:47:13 +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: dbfef6e2-7fae-429e-b9fb-59dbeacb7c80 X-Archives-Hash: 0a3a31373ed4fc60f9a34a0f8a51600e commit: 301b59bff67c4833c98e6fec5bd2cb04a13e31a2 Author: Jason Zaman perfinion com> AuthorDate: Thu Mar 30 04:58:28 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun May 7 17:40:29 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=301b59bf dirmngr: add to roles and allow gpg to domtrans policy/modules/contrib/dirmngr.if | 69 +++++++++++++++++++++++++++++++++++++++ policy/modules/contrib/gpg.te | 4 +++ 2 files changed, 73 insertions(+) diff --git a/policy/modules/contrib/dirmngr.if b/policy/modules/contrib/dirmngr.if index 4cd2810e..2f6875a6 100644 --- a/policy/modules/contrib/dirmngr.if +++ b/policy/modules/contrib/dirmngr.if @@ -1,5 +1,74 @@ ## Server for managing and downloading certificate revocation lists. +############################################################ +## +## Role access for dirmngr. +## +## +## +## Role allowed access. +## +## +## +## +## User domain for the role. +## +## +# +interface(`dirmngr_role',` + gen_require(` + type dirmngr_t, dirmngr_exec_t; + ') + + role $1 types dirmngr_t; + + domtrans_pattern($2, dirmngr_exec_t, dirmngr_t) + + allow $2 dirmngr_t:process { ptrace signal_perms }; + ps_process_pattern($2, dirmngr_t) + + allow dirmngr_t $2:fd use; + allow dirmngr_t $2:fifo_file { read write }; +') + +######################################## +## +## Execute dirmngr in the dirmngr domain. +## +## +## +## Domain allowed to transition. +## +## +# +interface(`dirmngr_domtrans',` + gen_require(` + type dirmngr_t, dirmngr_exec_t; + ') + + corecmd_search_bin($1) + domtrans_pattern($1, dirmngr_exec_t, dirmngr_t) +') + +######################################## +## +## Execute the dirmngr in the caller domain. +## +## +## +## Domain allowed access. +## +## +# +interface(`dirmngr_exec',` + gen_require(` + type dirmngr_exec_t; + ') + + corecmd_search_bin($1) + can_exec($1, dirmngr_exec_t) +') + ######################################## ## ## All of the rules required to diff --git a/policy/modules/contrib/gpg.te b/policy/modules/contrib/gpg.te index c145fb4c..1b8448c7 100644 --- a/policy/modules/contrib/gpg.te +++ b/policy/modules/contrib/gpg.te @@ -139,6 +139,10 @@ tunable_policy(`use_samba_home_dirs',` ') optional_policy(` + dirmngr_domtrans(gpg_t) +') + +optional_policy(` evolution_read_orbit_tmp_files(gpg_t) ')