Skip to contentSkip to conversation

Add fc for /var/lib/misc/logrotate.status

PATCH In review Luis Ressel 2 participants 4 messages Oct 12, 2018 – Oct 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add fc for /var/lib/misc/logrotate.status

Some distros configure logrotate to put its status file somewhere else than the default /var/lib/logrotate.status. Debian puts it in /var/lib/logrotate/, and Gentoo uses /var/lib/misc/.

---
 policy/modules/admin/logrotate.fc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/admin/logrotate.fc +1 -1
index dac1af39..cd43ab28 100644
@@ -9,4 +9,4 @@
 /usr/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
 /var/lib/logrotate(/.*)?	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
-/var/lib/logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
+/var/lib/(misc/)?logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/2 Realign logrotate.fc, remove an obvious comment

---
 policy/modules/admin/logrotate.fc | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
policy/modules/admin/logrotate.fc +4 -5
index cd43ab28..fd5497f3 100644
@@ -1,12 +1,11 @@
 /etc/cron\.(daily|weekly)/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 /etc/cron\.(daily|weekly)/sysklogd	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
-/usr/bin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
+/usr/bin/logrotate			--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
-# Systemd unit file
-/usr/lib/systemd/system/[^/]*logrotate.*	--	gen_context(system_u:object_r:logrotate_unit_t,s0)
+/usr/lib/systemd/system/[^/]*logrotate.*  --	gen_context(system_u:object_r:logrotate_unit_t,s0)
 
-/usr/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
+/usr/sbin/logrotate			--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
-/var/lib/logrotate(/.*)?	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
+/var/lib/logrotate(/.*)?			gen_context(system_u:object_r:logrotate_var_lib_t,s0)
 /var/lib/(misc/)?logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
Signature · 1 line
2.19.1
#2 lore raw

Re: [PATCH 2/2] Realign logrotate.fc, remove an obvious comment

Quoted 15 lines · Luis Ressel
---
  policy/modules/admin/logrotate.fc | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
policy/modules/admin/logrotate.fc +1 -1
index cd43ab28..fd5497f3 100644
@@ -1,12 +1,11 @@
  /etc/cron\.(daily|weekly)/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
  /etc/cron\.(daily|weekly)/sysklogd	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
-/usr/bin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
+/usr/bin/logrotate			--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 

policy/modules/admin/logrotate.fc line 11

Quoted 10 lines
policy/modules/admin/logrotate.fc +3 -4
-# Systemd unit file
-/usr/lib/systemd/system/[^/]*logrotate.*	--	gen_context(system_u:object_r:logrotate_unit_t,s0)
+/usr/lib/systemd/system/[^/]*logrotate.*  --	gen_context(system_u:object_r:logrotate_unit_t,s0)
 
-/usr/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
+/usr/sbin/logrotate			--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
-/var/lib/logrotate(/.*)?	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
+/var/lib/logrotate(/.*)?			gen_context(system_u:object_r:logrotate_var_lib_t,s0)
  /var/lib/(misc/)?logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)

Merged.

Signature · 1 line
Chris PeBenito
#3 lore raw
In reply to Luis Ressel
Quoted 13 lines · Luis Ressel

Some distros configure logrotate to put its status file somewhere else than the default /var/lib/logrotate.status. Debian puts it in /var/lib/logrotate/, and Gentoo uses /var/lib/misc/.

---
  policy/modules/admin/logrotate.fc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policy/modules/admin/logrotate.fc +0 -0
index dac1af39..cd43ab28 100644

policy/modules/admin/logrotate.fc line 12

Quoted 5 lines
policy/modules/admin/logrotate.fc +1 -1
@@ -9,4 +9,4 @@
  /usr/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
 
  /var/lib/logrotate(/.*)?	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
-/var/lib/logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)
+/var/lib/(misc/)?logrotate\.status	--	gen_context(system_u:object_r:logrotate_var_lib_t,s0)

Merged.

Signature · 1 line
Chris PeBenito