From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BACCA138202 for ; Thu, 6 Dec 2012 15:42:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70DC221C075; Thu, 6 Dec 2012 15:41:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD51021C057 for ; Thu, 6 Dec 2012 15:41:49 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C0A1633DA8D for ; Thu, 6 Dec 2012 15:41:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 6130CE544A for ; Thu, 6 Dec 2012 15:41:47 +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: <1354736413.f1fd3633cdb27abddbb94b153797d5180dcef72a.SwifT@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/mta.fc policy/modules/contrib/mta.if policy/modules/contrib/mta.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: f1fd3633cdb27abddbb94b153797d5180dcef72a X-VCS-Branch: master Date: Thu, 6 Dec 2012 15:41:47 +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: 0325860d-c191-480e-81d4-244c31606c78 X-Archives-Hash: e1dc98ce1367703a983ed6bc034d6f30 commit: f1fd3633cdb27abddbb94b153797d5180dcef72a Author: Sven Vermeulen siphos be> AuthorDate: Wed Dec 5 19:29:04 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Wed Dec 5 19:40:13 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=f1fd3633 Gentoo uses .maildir as a default Next to the ~/Maildir location, ~/.maildir is also a very popular location to use as a mailbox destination. So update the MTA interface to also include this location as a valid mailbox destination, and include the proper file transition for it. --- policy/modules/contrib/mta.fc | 4 ++++ policy/modules/contrib/mta.if | 4 ++++ policy/modules/contrib/mta.te | 4 ++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/policy/modules/contrib/mta.fc b/policy/modules/contrib/mta.fc index 4fed862..6345cf3 100644 --- a/policy/modules/contrib/mta.fc +++ b/policy/modules/contrib/mta.fc @@ -31,3 +31,7 @@ HOME_DIR/Maildir(/.*)? gen_context(system_u:object_r:mail_home_rw_t,s0) /var/spool/(client)?mqueue(/.*)? gen_context(system_u:object_r:mqueue_spool_t,s0) /var/spool/mqueue\.in(/.*)? gen_context(system_u:object_r:mqueue_spool_t,s0) /var/spool/mail(/.*)? gen_context(system_u:object_r:mail_spool_t,s0) + +ifdef(`distro_gentoo',` +HOME_DIR/\.maildir(/.*)? gen_context(system_u:object_r:mail_home_rw_t,s0) +') diff --git a/policy/modules/contrib/mta.if b/policy/modules/contrib/mta.if index 020f0a2..57cbe16 100644 --- a/policy/modules/contrib/mta.if +++ b/policy/modules/contrib/mta.if @@ -116,6 +116,10 @@ interface(`mta_role',` optional_policy(` mailman_run($2, $1) ') + + ifdef(`distro_gentoo',` + userdom_user_home_dir_filetrans($2, mail_home_rw_t, dir, ".maildir") + ') ') ######################################## diff --git a/policy/modules/contrib/mta.te b/policy/modules/contrib/mta.te index f6b8c2d..faac07d 100644 --- a/policy/modules/contrib/mta.te +++ b/policy/modules/contrib/mta.te @@ -383,6 +383,10 @@ optional_policy(` uucp_domtrans_uux(mailserver_delivery) ') +ifdef(`distro_gentoo',` + userdom_user_home_dir_filetrans(mailserver_delivery, mail_home_rw_t, dir, ".maildir") +') + ######################################## # # User local policy