SELinux-Refpolicy Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1/1 v2] Add interface udev_run_domain
@ 2018-11-02  0:36 David Sugar
  2018-11-10  0:04 ` Chris PeBenito
  0 siblings, 1 reply; 2+ messages in thread
From: David Sugar @ 2018-11-02  0:36 UTC (permalink / raw)
  To: selinux-refpolicy

This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user executable to perform some action.  This interface allows a domain transition to occur for the run action.

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

diff --git a/policy/modules/system/udev.if b/policy/modules/system/udev.if
index a2067895..fee55852 100644
--- a/policy/modules/system/udev.if
+++ b/policy/modules/system/udev.if
@@ -36,6 +36,37 @@ interface(`udev_domtrans',`
 	domtrans_pattern($1, udev_exec_t, udev_t)
 ')
 
+########################################
+## <summary>
+##	Allow udev to execute the specified program in
+##	the specified domain.
+## </summary>
+## <desc>
+##	<p>
+##	This is a interface to support the UDEV 'RUN'
+##	command.  This will allow the command run by
+##	udev to be run in a domain other than udev_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(`udev_run_domain',`
+	gen_require(`
+		type udev_t;
+	')
+
+	domtrans_pattern(udev_t,$2,$1)
+')
+
 ########################################
 ## <summary>
 ##	Execute udev in the caller domain.
-- 
2.14.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1 v2] Add interface udev_run_domain
  2018-11-02  0:36 [PATCH 1/1 v2] Add interface udev_run_domain David Sugar
@ 2018-11-10  0:04 ` Chris PeBenito
  0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2018-11-10  0:04 UTC (permalink / raw)
  To: David Sugar, selinux-refpolicy

On 11/01/2018 08:36 PM, David Sugar wrote:
> This interface is useful when using the 'RUN' option in UDEV rules where udev will be executing a user executable to perform some action.  This interface allows a domain transition to occur for the run action.
> 
> Signed-off-by: Dave Sugar <dsugar@tresys.com>
> ---
>   policy/modules/system/udev.if | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
> 
> diff --git a/policy/modules/system/udev.if b/policy/modules/system/udev.if
> index a2067895..fee55852 100644
> --- a/policy/modules/system/udev.if
> +++ b/policy/modules/system/udev.if
> @@ -36,6 +36,37 @@ interface(`udev_domtrans',`
>   	domtrans_pattern($1, udev_exec_t, udev_t)
>   ')
>   
> +########################################
> +## <summary>
> +##	Allow udev to execute the specified program in
> +##	the specified domain.
> +## </summary>
> +## <desc>
> +##	<p>
> +##	This is a interface to support the UDEV 'RUN'
> +##	command.  This will allow the command run by
> +##	udev to be run in a domain other than udev_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(`udev_run_domain',`
> +	gen_require(`
> +		type udev_t;
> +	')
> +
> +	domtrans_pattern(udev_t,$2,$1)
> +')

Merged.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02  0:36 [PATCH 1/1 v2] Add interface udev_run_domain David Sugar
2018-11-10  0:04 ` Chris PeBenito

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org selinux-refpolicy@archiver.kernel.org
	public-inbox-index selinux-refpolicy


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/ public-inbox