Skip to contentSkip to conversation

logrotate: allow systemd to start logrotate

PATCH Superseded Nicolas Iooss 2 participants 2 messages Aug 27, 2017 – Aug 29, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 logrotate: allow systemd to start logrotate

On Arch Linux, logrotate is a service launched by systemd:

avc: denied { execute_no_trans } for pid=216 comm="(ogrotate)" path="/usr/bin/logrotate" dev="vda1" ino=396833 scontext=system_u:system_r:init_t tcontext=system_u:object_r:logrotate_exec_t tclass=file permissive=1

---
 logrotate.te | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
logrotate.te +1 -1
index 9e40550df70a..5150cc54c9a2 100644
@@ -13,7 +13,7 @@ type logrotate_exec_t;
 domain_type(logrotate_t)
 domain_obj_id_change_exemption(logrotate_t)
 domain_system_change_exemption(logrotate_t)
-domain_entry_file(logrotate_t, logrotate_exec_t)
+init_daemon_domain(logrotate_t, logrotate_exec_t)
 role logrotate_roles types logrotate_t;
 
 type logrotate_lock_t;
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 logrotate: allow systemd to start logrotate

Quoted 16 lines · Nicolas Iooss via refpolicy

On Arch Linux, logrotate is a service launched by systemd:

avc: denied { execute_no_trans } for pid=216 comm="(ogrotate)" path="/usr/bin/logrotate" dev="vda1" ino=396833 scontext=system_u:system_r:init_t tcontext=system_u:object_r:logrotate_exec_t tclass=file permissive=1

---
  logrotate.te | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
logrotate.te +0 -0
index 9e40550df70a..5150cc54c9a2 100644

logrotate.te type logrotate_exec_t; · line 19

Quoted 8 lines
logrotate.te +1 -1
@@ -13,7 +13,7 @@ type logrotate_exec_t;
  domain_type(logrotate_t)
  domain_obj_id_change_exemption(logrotate_t)
  domain_system_change_exemption(logrotate_t)
-domain_entry_file(logrotate_t, logrotate_exec_t)
+init_daemon_domain(logrotate_t, logrotate_exec_t)
  role logrotate_roles types logrotate_t;
 
  type logrotate_lock_t;

It is still a short-lived process, so it should be an init_system_domain().

Signature · 1 line
Chris PeBenito