RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 872542 - AWStats SELinux module lacks tunable for PurgeLogFile=1 setup
Summary: AWStats SELinux module lacks tunable for PurgeLogFile=1 setup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.4
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 872345
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-02 11:43 UTC by Daniel Walsh
Modified: 2013-11-21 10:10 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.7.19-210.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 872345
Environment:
Last Closed: 2013-11-21 10:10:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1598 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-11-20 21:39:24 UTC

Description Daniel Walsh 2012-11-02 11:43:12 UTC
+++ 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".

Comment 2 RHEL Program Management 2012-12-14 08:17:13 UTC
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.

Comment 3 Miroslav Grepl 2012-12-14 10:46:18 UTC
Moving it to RHEL6.5.

Comment 7 errata-xmlrpc 2013-11-21 10:10:29 UTC
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


Note You need to log in before you can comment on or make changes to this bug.