Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34647 - Add SElinux policy for logrotate
Summary: Add SElinux policy for logrotate
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Chris PeBenito (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-28 14:28 UTC by Tad Glines
Modified: 2003-11-29 09:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
logrotate file_contexts (logrotate.fc,379 bytes, text/plain)
2003-11-28 14:31 UTC, Tad Glines
Details
logrotate policy (logrotate.te,3.57 KB, text/plain)
2003-11-28 14:32 UTC, Tad Glines
Details
logrotate file_contexts (new) (logrotate.fc,376 bytes, text/plain)
2003-11-28 23:27 UTC, Tad Glines
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tad Glines 2003-11-28 14:28:56 UTC
Converted NSA's logrotate policy files for use on gentoo.

Reproducible: Always
Steps to Reproduce:
Comment 1 Tad Glines 2003-11-28 14:31:46 UTC
Created attachment 21420 [details]
logrotate file_contexts
Comment 2 Tad Glines 2003-11-28 14:32:27 UTC
Created attachment 21421 [details]
logrotate policy
Comment 3 Tad Glines 2003-11-28 14:36:24 UTC
The only difference is a one line change to logrotate.fc.
The crontab file syslogd becomes logrotate.cron.
Comment 4 Chris PeBenito (RETIRED) gentoo-dev 2003-11-28 20:39:50 UTC
Hmm, I wouldn't think that it would even need that line in the file contexts, because of the system_crond_entry(logrotate_exec_t, logrotate_t).  Are you sure thats needed?
Comment 5 Tad Glines 2003-11-28 21:04:55 UTC
Without that line the logrotate.cron file is labeled crond_script_exec_t.
There is no domain_auto_trans(crond_t, logrotate_exec_t, logrotate_t).
So either the above needed to be added to crond.te, or change the line in the logrotete.fc. It just seemed easier to change the label on the logrotate.cron file.
Comment 6 Tad Glines 2003-11-28 21:16:34 UTC
Belay that last comment. Your right, it should. I'll take a another look at it, and do some more testing.
Comment 7 Tad Glines 2003-11-28 23:27:45 UTC
Created attachment 21447 [details]
logrotate file_contexts (new)

With the default label the syslog.croin script won't work.
However when it is labled logrotate_exec_t, it works fine.
So, if you want to stock syslog.cron log file rotator to work but don't want to
emerge logrotate, the this policy will solve that problem.
Comment 8 Tad Glines 2003-11-28 23:30:38 UTC
Both logrotate and syslog.cron work with this policy. the logrotate.cron should have the default crond_script_exec_t label, the syslog.cron needs the logrotate_exec_t label. However, if logrotate.conf is modified to rotate the /var/log files then syslog.cron should be removed.
Comment 9 Chris PeBenito (RETIRED) gentoo-dev 2003-11-29 09:34:06 UTC
sec-policy/selinux-logrotate-20031129 committed, added it to logrotate-3.6.5-r1 RDEPEND.  Thanks for the submission.