Red Hat Bugzilla – Bug 872542
AWStats SELinux module lacks tunable for PurgeLogFile=1 setup
Last modified: 2013-11-21 05:10:29 EST
+++ This bug was initially created as a clone of Bug #872345 +++ Description of problem: Currently if SELinux enabled on Fedora 16+ or RHEL6 and awstats installed (via EPEL for RHEL) - enabling "PurgeLogFile=1" option creates SELinux denials. Version-Release number of selected component (if applicable): RHEL: awstats-7.0-2.el6.noarch selinux-policy-3.7.19-155.el6_3.4.noarch selinux-policy-targeted-3.7.19-155.el6_3.4.noarch F16: awstats-7.0-6.fc16.noarch selinux-policy-3.10.0-91.fc16.noarch selinux-policy-targeted-3.10.0-91.fc16.noarch How reproducible: always Steps to Reproduce: 1. install Fedora/RHEL+EPEL 2. enable SELinux 3. install awstats 4. configure awstats to purge httpd log files: PurgeLogFile=1 Actual results: type=AVC msg=audit(1349467262.084:790): avc: denied { write } for pid=7413 comm="awstats.pl" name="moodle22-access_log" dev=dm-6 ino=39 scontext=system_u:system_r:awstats_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:httpd_log_t:s0 tclass=file and un-purged files. Expected results: files processed by awstats and logfiles purged after processing. Additional info: I have "fixed" it locally by building additional SELinux policy module: module awstats-httpd-logs 1.1; require { type httpd_log_t; type awstats_t; class file write; } #============= awstats_t ============== allow awstats_t httpd_log_t:file write; however I believe it should be part of base awstats module with a tunable boolean switching on/off behavior with default to "off".
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
Moving it to RHEL6.5.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1598.html