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 E26A9139694 for ; Thu, 30 Mar 2017 17:09:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 06AB0234032; Thu, 30 Mar 2017 17:09:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 C5A15234031 for ; Thu, 30 Mar 2017 17:09:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 853A234165C for ; Thu, 30 Mar 2017 17:09:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9764473F6 for ; Thu, 30 Mar 2017 17:09:02 +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: <1490892640.c9989029f0a837b7512f7b076fc5e5db711e1b38.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: c9989029f0a837b7512f7b076fc5e5db711e1b38 X-VCS-Branch: next Date: Thu, 30 Mar 2017 17:09:02 +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: 8d9ba59b-81b6-44e9-b790-419ad2e17e2c X-Archives-Hash: c56f9b0ebd76f1249d0e09c297c8f3cf commit: c9989029f0a837b7512f7b076fc5e5db711e1b38 Author: Jason Zaman perfinion com> AuthorDate: Thu Mar 30 04:58:28 2017 +0000 Commit: Jason Zaman gentoo org> CommitDate: Thu Mar 30 16:50:40 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c9989029 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 4345bd08..160c5f85 100644 --- a/policy/modules/contrib/gpg.te +++ b/policy/modules/contrib/gpg.te @@ -138,6 +138,10 @@ tunable_policy(`use_samba_home_dirs',` ') optional_policy(` + dirmngr_domtrans(gpg_t) +') + +optional_policy(` evolution_read_orbit_tmp_files(gpg_t) ')