Skip to contentSkip to conversation

Add syslog-ng .pid and .ctl files to logging policy

PATCH New Chris Richards 2 participants 3 messages Feb 23, 2010 – Feb 24, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Add syslog-ng .pid and .ctl files to logging policy

---
 policy/modules/system/logging.fc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
policy/modules/system/logging.fc +2 -0
index b5e845a..1b797d9 100644
@@ -61,6 +61,8 @@ ifdef(`distro_redhat',`
 /var/run/log		-s	gen_context(system_u:object_r:devlog_t,s0)
 /var/run/metalog\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
 /var/run/syslogd\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
+/var/run/syslog-ng\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
+/var/run/syslog-ng\.ctl	-s	gen_context(system_u_object_r:devlog_t,s0)
 
 /var/spool/postfix/pid	-d	gen_context(system_u:object_r:var_run_t,s0)
 
Signature · 1 line
1.6.4.4
#1 lore raw

PATCH 2/2 Add syslog-ng .pid and .ctl files to logging policy

Quoted 10 lines · Chris Richards
---
 policy/modules/system/logging.fc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
policy/modules/system/logging.fc +0 -0
index b5e845a..1b797d9 100644

policy/modules/system/logging.fc ifdef(`distro_redhat',` · line 65

Quoted 5 lines
policy/modules/system/logging.fc +2 -0
@@ -61,6 +61,8 @@ ifdef(`distro_redhat',`
 /var/run/log		-s	gen_context(system_u:object_r:devlog_t,s0)
 /var/run/metalog\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
 /var/run/syslogd\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
+/var/run/syslog-ng\.pid	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
+/var/run/syslog-ng\.ctl	-s	gen_context(system_u_object_r:devlog_t,s0)

It doesn't seem correct to label this control socket devlog_t, which is supposed to be for receiving messages to be logged.

Quoted 2 lines
policy/modules/system/logging.fc +0 -0
 /var/spool/postfix/pid	-d	gen_context(system_u:object_r:var_run_t,s0)
 
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
#2 lore raw

PATCH 2/2 Add syslog-ng .pid and .ctl files to logging policy

Quoted 6 lines · Christopher J. PeBenito
Quoted 2 lines

+/var/run/syslog-ng\.ctl -s gen_context(system_u_object_r:devlog_t,s0)

It doesn't seem correct to label this control socket devlog_t, which is supposed to be for receiving messages to be logged.

I'm inclined to agree, but all I was really trying to do here was get the file contexts in line with what the policy was already doing so that restorecon wouldn't bork everything.

I'll go back and take a look at this a bit more.