Skip to contentSkip to conversation

Add interface to get status of rsyslog service

PATCH Superseded Sugar, David 2 participants 4 messages Feb 18, 2019 – Feb 20, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add interface to get status of rsyslog service

---
 policy/modules/system/logging.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
policy/modules/system/logging.if +19 -0
index 16091eb6..21ec6501 100644
@@ -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
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 Add interface to run cdrecord in caller domain

---
 policy/modules/apps/cdrecord.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
policy/modules/apps/cdrecord.if +19 -0
index fbc20f69..ba81fb1a 100644
@@ -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)
+')
Signature · 1 line
2.20.1
#2 lore raw

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

Quoted 23 lines · David
---
 policy/modules/apps/cdrecord.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
policy/modules/apps/cdrecord.if +9 -0
index fbc20f69..ba81fb1a 100644
@@ -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>

policy/modules/apps/cdrecord.if interface(`cdrecord_role',` · line 51

Quoted 10 lines
policy/modules/apps/cdrecord.if +10 -0
+## </param>
+#
+interface(`cdrecord_exec',`
+	gen_require(`
+		type cdrecord_exec_t;
+	')
+
+	corecmd_search_bin($1)
+	can_exec($1, cdrecord_exec_t)
+')

Merged.

Signature · 1 line
Chris PeBenito
#3 lore raw
In reply to Sugar, David
Quoted 26 lines · David
---
 policy/modules/system/logging.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
policy/modules/system/logging.if +12 -0
index 16091eb6..21ec6501 100644
@@ -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(`

policy/modules/system/logging.if interface(`logging_admin_audit',` · line 1246

Quoted 10 lines
policy/modules/system/logging.if +7 -0
+		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().

Signature · 1 line
Chris PeBenito