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 B93321382C5 for ; Sun, 7 Feb 2021 03:21:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10B05E08E8; Sun, 7 Feb 2021 03:21:21 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 ED213E08E8 for ; Sun, 7 Feb 2021 03:21:20 +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 D675C343873 for ; Sun, 7 Feb 2021 03:21:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 894CA4BE for ; Sun, 7 Feb 2021 03:21:18 +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: <1612646110.b3afcd57276f8844ab25af288948cca8c543abfa.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/services/dovecot.if policy/modules/services/postfix.te X-VCS-Directories: policy/modules/services/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: b3afcd57276f8844ab25af288948cca8c543abfa X-VCS-Branch: master Date: Sun, 7 Feb 2021 03:21:18 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 92f6e610-5420-44f3-9da3-0985ae5b4762 X-Archives-Hash: a69a34e42d323b33596b005075b09ca9 commit: b3afcd57276f8844ab25af288948cca8c543abfa Author: Kenton Groombridge concord sh> AuthorDate: Tue Feb 2 16:34:44 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Feb 6 21:15:10 2021 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b3afcd57 dovecot, postfix: add missing accesses postfix_pipe_t requires reading dovecot configuration and connecting to dovecot stream sockets if configured to use dovecot for local mail delivery. Signed-off-by: Kenton Groombridge concord.sh> Signed-off-by: Jason Zaman gentoo.org> policy/modules/services/dovecot.if | 22 ++++++++++++++++++++++ policy/modules/services/postfix.te | 2 ++ 2 files changed, 24 insertions(+) diff --git a/policy/modules/services/dovecot.if b/policy/modules/services/dovecot.if index 1aa28f47..ec66a893 100644 --- a/policy/modules/services/dovecot.if +++ b/policy/modules/services/dovecot.if @@ -61,6 +61,28 @@ interface(`dovecot_domtrans_deliver',` domtrans_pattern($1, dovecot_deliver_exec_t, dovecot_deliver_t) ') +######################################## +## +## Read dovecot configuration content. +## +## +## +## Domain allowed access. +## +## +## +# +interface(`dovecot_read_config',` + gen_require(` + type dovecot_etc_t; + ') + + files_search_etc($1) + allow $1 dovecot_etc_t:dir list_dir_perms; + allow $1 dovecot_etc_t:file read_file_perms; + allow $1 dovecot_etc_t:lnk_file read_lnk_file_perms; +') + ######################################## ## ## Create, read, write, and delete diff --git a/policy/modules/services/postfix.te b/policy/modules/services/postfix.te index 5e25fa75..05c0b4a5 100644 --- a/policy/modules/services/postfix.te +++ b/policy/modules/services/postfix.te @@ -596,6 +596,8 @@ corecmd_exec_bin(postfix_pipe_t) optional_policy(` dovecot_domtrans_deliver(postfix_pipe_t) + dovecot_read_config(postfix_pipe_t) + dovecot_stream_connect(postfix_pipe_t) ') optional_policy(`