Skip to contentSkip to conversation

Label /etc/cron.daily/logrotate correctly.

PATCH New Luis Ressel 2 participants 4 messages Nov 17, 2013 – Nov 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Label /etc/cron.daily/logrotate correctly.

This is used at least on Gentoo, but I could imagine this also exists on other distros.

---
 logrotate.fc | 1 +
 1 file changed, 1 insertion(+)
logrotate.fc +1 -0
index a11d5be..207ec10 100644
@@ -1,3 +1,4 @@
+/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/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 1/1 Label /etc/cron.daily/logrotate correctly.

For this to work, can_exec(logrotate_t, logrotate_exec_t) is also required.

Btw: "allow logrotate_t self:process ~{ ptrace setcurrent setexec
setrlimit execmem execstack execheap };" (currently in
contrib/logrotate.te) sounds a bit much to me...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20131118/2ecaa8f8/attachment.bin

#2 lore raw

PATCH 1/1 Label /etc/cron.daily/logrotate correctly.

Quoted 3 lines · Luis Ressel

For this to work, can_exec(logrotate_t, logrotate_exec_t) is also required.

Thanks, applied

Quoted 7 lines

Btw: "allow logrotate_t self:process ~{ ptrace setcurrent setexec setrlimit execmem execstack execheap };" (currently in contrib/logrotate.te) sounds a bit much to me...
_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

#3 lore raw

PATCH 1/1 Label /etc/cron.daily/logrotate correctly.

In reply to Luis Ressel
Quoted 11 lines · Luis Ressel

This is used at least on Gentoo, but I could imagine this also exists on other distros.

---
 logrotate.fc | 1 +
 1 file changed, 1 insertion(+)
logrotate.fc +0 -0
index a11d5be..207ec10 100644

logrotate.fc line 4

Quoted 4 lines
logrotate.fc +1 -0
@@ -1,3 +1,4 @@
+/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/sbin/logrotate	--	gen_context(system_u:object_r:logrotate_exec_t,s0)

Thanks, Applied