SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Add interface to get status of rsyslog service
@ 2019-02-18 20:00 Sugar, David
  2019-02-18 20:00 ` [PATCH] Add interface to run cdrecord in caller domain Sugar, David
  2019-02-20  3:32 ` [PATCH] Add interface to get status of rsyslog service Chris PeBenito
  0 siblings, 2 replies; 4+ messages in thread
From: Sugar, David @ 2019-02-18 20:00 UTC (permalink / raw)
  To: selinux-refpolicy

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

diff --git a/policy/modules/system/logging.if b/policy/modules/system/logging.if
index 16091eb6..21ec6501 100644
--- a/policy/modules/system/logging.if
+++ b/policy/modules/system/logging.if
@@ -1222,6 +1222,25 @@ interface(`logging_admin_audit',`
 	dontaudit $1 auditd_log_t:file map;
 ')
 
+########################################
+## <summary>
+##	Allow specified domain to check status of syslog unit
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`logging_status_syslog',`
+	gen_require(`
+		type syslogd_unit_t;
+		class service status;
+	')
+
+	allow $1 syslogd_unit_t:service status;
+')
+
 ########################################
 ## <summary>
 ##	All of the rules required to administrate
-- 
2.20.1


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

* [PATCH] Add interface to run cdrecord in caller domain
  2019-02-18 20:00 [PATCH] Add interface to get status of rsyslog service Sugar, David
@ 2019-02-18 20:00 ` Sugar, David
  2019-02-20  3:31   ` Chris PeBenito
  2019-02-20  3:32 ` [PATCH] Add interface to get status of rsyslog service Chris PeBenito
  1 sibling, 1 reply; 4+ messages in thread
From: Sugar, David @ 2019-02-18 20:00 UTC (permalink / raw)
  To: selinux-refpolicy

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

diff --git a/policy/modules/apps/cdrecord.if b/policy/modules/apps/cdrecord.if
index fbc20f69..ba81fb1a 100644
--- a/policy/modules/apps/cdrecord.if
+++ b/policy/modules/apps/cdrecord.if
@@ -30,3 +30,22 @@ interface(`cdrecord_role',`
 	allow $2 cdrecord_t:process { ptrace signal_perms };
 	ps_process_pattern($2, cdrecord_t)
 ')
+
+########################################
+## <summary>
+##	Execute cdrecord in the caller domain.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`cdrecord_exec',`
+	gen_require(`
+		type cdrecord_exec_t;
+	')
+
+	corecmd_search_bin($1)
+	can_exec($1, cdrecord_exec_t)
+')
-- 
2.20.1


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

* Re: [PATCH] Add interface to run cdrecord in caller domain
  2019-02-18 20:00 ` [PATCH] Add interface to run cdrecord in caller domain Sugar, David
@ 2019-02-20  3:31   ` Chris PeBenito
  0 siblings, 0 replies; 4+ messages in thread
From: Chris PeBenito @ 2019-02-20  3:31 UTC (permalink / raw)
  To: Sugar, David, selinux-refpolicy

On Mon, 2019-02-18 at 20:00 +0000, Sugar, David wrote:
> Signed-off-by: Dave Sugar <dsugar@tresys.com>
> ---
>  policy/modules/apps/cdrecord.if | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/policy/modules/apps/cdrecord.if
> b/policy/modules/apps/cdrecord.if
> index fbc20f69..ba81fb1a 100644
> --- a/policy/modules/apps/cdrecord.if
> +++ b/policy/modules/apps/cdrecord.if
> @@ -30,3 +30,22 @@ interface(`cdrecord_role',`
>  	allow $2 cdrecord_t:process { ptrace signal_perms };
>  	ps_process_pattern($2, cdrecord_t)
>  ')
> +
> +########################################
> +## <summary>
> +##	Execute cdrecord in the caller domain.
> +## </summary>
> +## <param name="domain">
> +##	<summary>
> +##	Domain allowed access.
> +##	</summary>
> +## </param>
> +#
> +interface(`cdrecord_exec',`
> +	gen_require(`
> +		type cdrecord_exec_t;
> +	')
> +
> +	corecmd_search_bin($1)
> +	can_exec($1, cdrecord_exec_t)
> +')

Merged.

-- 
Chris PeBenito



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

* Re: [PATCH] Add interface to get status of rsyslog service
  2019-02-18 20:00 [PATCH] Add interface to get status of rsyslog service Sugar, David
  2019-02-18 20:00 ` [PATCH] Add interface to run cdrecord in caller domain Sugar, David
@ 2019-02-20  3:32 ` Chris PeBenito
  1 sibling, 0 replies; 4+ messages in thread
From: Chris PeBenito @ 2019-02-20  3:32 UTC (permalink / raw)
  To: Sugar, David, selinux-refpolicy

On Mon, 2019-02-18 at 20:00 +0000, Sugar, David wrote:
> Signed-off-by: Dave Sugar <dsugar@tresys.com>
> ---
>  policy/modules/system/logging.if | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/policy/modules/system/logging.if
> b/policy/modules/system/logging.if
> index 16091eb6..21ec6501 100644
> --- a/policy/modules/system/logging.if
> +++ b/policy/modules/system/logging.if
> @@ -1222,6 +1222,25 @@ interface(`logging_admin_audit',`
>  	dontaudit $1 auditd_log_t:file map;
>  ')
>  
> +########################################
> +## <summary>
> +##	Allow specified domain to check status of syslog unit
> +## </summary>
> +## <param name="domain">
> +##	<summary>
> +##	Domain allowed access.
> +##	</summary>
> +## </param>
> +#
> +interface(`logging_status_syslog',`
> +	gen_require(`
> +		type syslogd_unit_t;
> +		class service status;
> +	')
> +
> +	allow $1 syslogd_unit_t:service status;
> +')
> +
>  ########################################
>  ## <summary>
>  ##	All of the rules required to administrate

This should be up after logging_domtrans_syslog().

-- 
Chris PeBenito



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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 20:00 [PATCH] Add interface to get status of rsyslog service Sugar, David
2019-02-18 20:00 ` [PATCH] Add interface to run cdrecord in caller domain Sugar, David
2019-02-20  3:31   ` Chris PeBenito
2019-02-20  3:32 ` [PATCH] Add interface to get status of rsyslog service 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