selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sugar, David" <dsugar@tresys.com>
To: "selinux-refpolicy@vger.kernel.org"  <selinux-refpolicy@vger.kernel.org>
Subject: [PATCH] Add interface xdm_run_domain
Date: Thu, 4 Apr 2019 12:29:13 +0000	[thread overview]
Message-ID: <20190404122900.8945-1-dsugar@tresys.com> (raw)

This interface is needed when using the various script options in
lightdm (others?) configuration file.  I'm using with 'display-setup-script'
and 'greeter-setup-script', but I suspect the same would be useful for
'display-stopped-script', 'session-cleanup-script' and others.  In these
cases lightdm will be executing a configured script to perform some action
during the specified phase of the greeter/session.  But without this interface
there is no way to transition into a new domain to execute the action.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
 policy/modules/services/xserver.if | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/policy/modules/services/xserver.if b/policy/modules/services/xserver.if
index 854f3b90..2faef71d 100644
--- a/policy/modules/services/xserver.if
+++ b/policy/modules/services/xserver.if
@@ -734,6 +734,37 @@ interface(`xserver_relabel_console_pipes',`
 	allow $1 xconsole_device_t:fifo_file { getattr relabelfrom relabelto };
 ')
 
+########################################
+## <summary>
+##	Allow display manager to execute the specified program in
+##	the specified domain.
+## </summary>
+## <desc>
+##	<p>
+##	This is a interface to support the lightdm *-setup-script
+##	options.  This will allow the command run by lightdm to
+##	be run in a domain other than xdm_t.
+##	</p>
+## </desc>
+## <param name="domain">
+##	<summary>
+##	Domain to execute in.
+##	</summary>
+## </param>
+## <param name="entry_file">
+##	<summary>
+##	Domain entry point file.
+##	</summary>
+## </param>
+#
+interface(`xdm_run_domain',`
+	gen_require(`
+		type xdm_t;
+	')
+
+	domtrans_pattern(xdm_t,$2,$1)
+')
+
 ########################################
 ## <summary>
 ##	Use file descriptors for xdm.
-- 
2.20.1


             reply	other threads:[~2019-04-04 12:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 12:29 Sugar, David [this message]
2019-04-04 12:29 ` [PATCH] Resolve some denials related to sending journal messages Sugar, David
2019-04-08  0:52   ` Chris PeBenito
2019-04-08 13:33     ` Sugar, David
2019-04-08 13:41       ` Dominick Grift
2019-04-08 13:56         ` Sugar, David
2019-04-08  0:52 ` [PATCH] Add interface xdm_run_domain 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=20190404122900.8945-1-dsugar@tresys.com \
    --to=dsugar@tresys.com \
    --cc=selinux-refpolicy@vger.kernel.org \
    /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).