Add fc for /var/lib/misc/logrotate.status
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
@@ -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
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
@@ -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
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@@ -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
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
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