2019-02-18 20:00:33

by Sugar, David

[permalink] [raw]
Subject: [PATCH] Add interface to get status of rsyslog service

Signed-off-by: Dave Sugar <[email protected]>
---
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



2019-02-18 20:00:34

by Sugar, David

[permalink] [raw]
Subject: [PATCH] Add interface to run cdrecord in caller domain

Signed-off-by: Dave Sugar <[email protected]>
---
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


2019-02-20 03:31:58

by Chris PeBenito

[permalink] [raw]
Subject: Re: [PATCH] Add interface to run cdrecord in caller domain

On Mon, 2019-02-18 at 20:00 +0000, Sugar, David wrote:
> Signed-off-by: Dave Sugar <[email protected]>
> ---
> 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



2019-02-20 03:32:07

by Chris PeBenito

[permalink] [raw]
Subject: Re: [PATCH] Add interface to get status of rsyslog service

On Mon, 2019-02-18 at 20:00 +0000, Sugar, David wrote:
> Signed-off-by: Dave Sugar <[email protected]>
> ---
> 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