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 2F2B21382C5 for ; Sun, 22 Apr 2018 12:00:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3624CE0919; Sun, 22 Apr 2018 12:00:49 +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 12A75E0916 for ; Sun, 22 Apr 2018 12:00:49 +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 178DA335C75 for ; Sun, 22 Apr 2018 12:00:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 19A80297 for ; Sun, 22 Apr 2018 12:00:44 +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: <1524397983.70cfb901fc6c8a692295ebb15914e13fc6e1223e.perfinion@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.if policy/modules/contrib/sendmail.te X-VCS-Directories: policy/modules/contrib/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 70cfb901fc6c8a692295ebb15914e13fc6e1223e X-VCS-Branch: master Date: Sun, 22 Apr 2018 12:00:44 +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: 20b68aa7-fc99-4f62-bf64-148b90505599 X-Archives-Hash: 652519ddd965e6404c24a44c0ba7f4cd commit: 70cfb901fc6c8a692295ebb15914e13fc6e1223e Author: James Carter tycho nsa gov> AuthorDate: Wed Apr 11 18:56:36 2018 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sun Apr 22 11:53:03 2018 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=70cfb901 Move use of sendmail_exec_t from sendmail.te to mta.te The type sendmail_exec_t is actually declared in mta.te. Created mta.if:mta_sendmail_entry_point() to make sendmail_exec_t usable as an entry point for a domain. Modified sendmail.te to use the new interface along with the application_type() interface to replace the call to application_domain() using sendmail_exec_t. Signed-off-by: James Carter tycho.nsa.gov> policy/modules/contrib/mta.if | 19 +++++++++++++++++++ policy/modules/contrib/sendmail.te | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/policy/modules/contrib/mta.if b/policy/modules/contrib/mta.if index 4384caae..f98346fe 100644 --- a/policy/modules/contrib/mta.if +++ b/policy/modules/contrib/mta.if @@ -536,6 +536,25 @@ interface(`mta_sendmail_exec',` can_exec($1, sendmail_exec_t) ') +######################################## +## +## Make sendmail usable as an entry +## point for the domain. +## +## +## +## Domain to be entered. +## +## +# +interface(`mta_sendmail_entry_point',` + gen_require(` + type sendmail_exec_t; + ') + + domain_entry_file($1, sendmail_exec_t) +') + ######################################## ## ## Read mail server configuration content. diff --git a/policy/modules/contrib/sendmail.te b/policy/modules/contrib/sendmail.te index 8d2669ee..3503f315 100644 --- a/policy/modules/contrib/sendmail.te +++ b/policy/modules/contrib/sendmail.te @@ -32,7 +32,8 @@ mta_mailserver_sender(sendmail_t) role sendmail_roles types sendmail_t; type unconfined_sendmail_t; -application_domain(unconfined_sendmail_t, sendmail_exec_t) +application_type(unconfined_sendmail_t) +mta_sendmail_entry_point(unconfined_sendmail_t) role sendmail_unconfined_roles types unconfined_sendmail_t; ########################################