selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jwcart2@tycho.nsa.gov (James Carter)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 06/13] Move use of sendmail_exec_t from sendmail.te to mta.te
Date: Wed, 11 Apr 2018 14:56:36 -0400	[thread overview]
Message-ID: <20180411185639.23547-7-jwcart2@tycho.nsa.gov> (raw)
In-Reply-To: <20180411185639.23547-1-jwcart2@tycho.nsa.gov>

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 <jwcart2@tycho.nsa.gov>
---
 mta.if      | 19 +++++++++++++++++++
 sendmail.te |  3 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/mta.if b/mta.if
index 2bff433..7c3154d 100644
--- a/mta.if
+++ b/mta.if
@@ -530,6 +530,25 @@ interface(`mta_sendmail_exec',`
 
 ########################################
 ## <summary>
+##	Make sendmail usable as an entry
+##      point for the domain.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to be entered.
+##	</summary>
+## </param>
+#
+interface(`mta_sendmail_entry_point',`
+	gen_require(`
+		type sendmail_exec_t;
+	')
+
+	domain_entry_file($1, sendmail_exec_t)
+')
+
+########################################
+## <summary>
 ##	Read mail server configuration content.
 ## </summary>
 ## <param name="domain">
diff --git a/sendmail.te b/sendmail.te
index 8d2669e..3503f31 100644
--- a/sendmail.te
+++ b/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;
 
 ########################################
-- 
2.13.6

  parent reply	other threads:[~2018-04-11 18:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 18:56 [refpolicy] [PATCH 00/13] Fix issues identified by spt_lint.lua to contrib James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 01/13] Remove unnecessary semicolons James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 02/13] Mark unused parameter as unused James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 03/13] Add unused parameter and mark " James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 04/13] Remove use of undeclared attribute from portage.te James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 05/13] Move use of httpd_t from mojomojo.te to apache.te James Carter
2018-04-11 18:56 ` James Carter [this message]
2018-04-11 18:56 ` [refpolicy] [PATCH 07/13] Fix typos in identifier names James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 08/13] Remove undeclared identifiers from shorewall interfaces James Carter
2018-04-11 18:56 ` [refpolicy] [PATCH 09/13] Fix interfaces that use an undeclared identifier James Carter
2018-04-12 22:47 ` [refpolicy] [PATCH 00/13] Fix issues identified by spt_lint.lua to contrib Chris PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180411185639.23547-7-jwcart2@tycho.nsa.gov \
    --to=jwcart2@tycho.nsa.gov \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).