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 17D52138206 for ; Thu, 18 Jan 2018 16:15:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2FA5FE08EC; Thu, 18 Jan 2018 16:15:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0996DE08E5 for ; Thu, 18 Jan 2018 16:15:46 +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 F113A335C43 for ; Thu, 18 Jan 2018 16:15:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 204671CA for ; Thu, 18 Jan 2018 16:15:42 +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: <1513228180.d56f72e0072b149d996caa98425c90be16aa5410.swift@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:swift commit in: policy/modules/contrib/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/contrib/dirmngr.te policy/modules/contrib/gpg.if X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: d56f72e0072b149d996caa98425c90be16aa5410 X-VCS-Branch: swift Date: Thu, 18 Jan 2018 16:15:42 +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: 094992eb-d0b6-4a6d-9445-cfc3883ddb0d X-Archives-Hash: e2faee96820d54314e8174b7fca6fb92 commit: d56f72e0072b149d996caa98425c90be16aa5410 Author: Jason Zaman perfinion com> AuthorDate: Wed Dec 13 18:17:19 2017 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Thu Dec 14 05:09:40 2017 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d56f72e0 dirmngr: allow filetrans in gpg_runtime_t commit 1b9cd3bd9c44732bdf756301408582bcfe9073c9 ("gpg: manage user runtime socket files and directories") changed /run/user/%{USERID}/gnupg/ to gpg_runtime_t, so the filetrans for gpg_agent_tmp_t needs updating. policy/modules/contrib/dirmngr.te | 3 +++ policy/modules/contrib/gpg.if | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/policy/modules/contrib/dirmngr.te b/policy/modules/contrib/dirmngr.te index 8f4cb991..75833a42 100644 --- a/policy/modules/contrib/dirmngr.te +++ b/policy/modules/contrib/dirmngr.te @@ -69,6 +69,7 @@ dev_read_rand(dirmngr_t) sysnet_dns_name_resolve(dirmngr_t) corenet_tcp_connect_pgpkeyserver_port(dirmngr_t) +corenet_udp_bind_generic_node(dirmngr_t) files_read_etc_files(dirmngr_t) @@ -81,5 +82,7 @@ userdom_user_runtime_filetrans(dirmngr_t, dirmngr_tmp_t, dir) optional_policy(` gpg_agent_tmp_filetrans(dirmngr_t, dirmngr_tmp_t, sock_file) + gpg_runtime_filetrans(dirmngr_t, dirmngr_tmp_t, sock_file) gpg_secret_filetrans(dirmngr_t, dirmngr_home_t, dir) + gpg_stream_connect_agent(dirmngr_t) ') diff --git a/policy/modules/contrib/gpg.if b/policy/modules/contrib/gpg.if index 6266019b..359560f8 100644 --- a/policy/modules/contrib/gpg.if +++ b/policy/modules/contrib/gpg.if @@ -239,6 +239,25 @@ interface(`gpg_agent_tmp_filetrans',` ######################################## ## +## filetrans in gpg_runtime_t dirs +## +## +## +## Domain allowed access. +## +## +# +interface(`gpg_runtime_filetrans',` + gen_require(` + type gpg_runtime_t; + ') + + filetrans_pattern($1, gpg_runtime_t, $2, $3, $4) + userdom_search_user_runtime($1) +') + +######################################## +## ## filetrans in gpg_secret_t dirs ## ##