Bug 747933 - SELinux is preventing /usr/bin/perl from 'read' accesses on the directory /var/log/varnish.
Summary: SELinux is preventing /usr/bin/perl from 'read' accesses on the directory /va...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:5e4c5bd5b88...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-21 12:44 UTC by Paulo Anes
Modified: 2011-12-04 02:37 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Clone Of:
Environment:
Last Closed: 2011-12-04 02:37:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Paulo Anes 2011-10-21 12:44:55 UTC
Logwatch is trying to read  /var/log/varnish and doesn't have selinux permission to do so.
Or logwatch should be fixed to don't try to read this log or selinux policy should be fixed.


SELinux is preventing /usr/bin/perl from 'read' accesses on the directory /var/log/varnish.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that perl should be allowed read access on the varnish directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep logwatch /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logwatch_t:s0-s0:c0.c1023
Target Context                system_u:object_r:varnishlog_log_t:s0
Target Objects                /var/log/varnish [ dir ]
Source                        logwatch
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.12.4-160.fc15
Target RPM Packages           varnish-2.1.5-2.fc15
Policy RPM                    selinux-policy-3.9.16-40.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-0.fc15.i686 #1 SMP Tue Oct
                              4 00:51:19 UTC 2011 i686 i686
Alert Count                   8
First Seen                    Thu 13 Oct 2011 11:23:02 AM WEST
Last Seen                     Fri 21 Oct 2011 11:10:03 AM WEST
Local ID                      a29cedfc-8e87-40ce-b6c9-feca80fc0447

Raw Audit Messages
type=AVC msg=audit(1319191803.926:112): avc:  denied  { read } for  pid=3227 comm="logwatch" name="varnish" dev=dm-0 ino=2565969 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=system_u:object_r:varnishlog_log_t:s0 tclass=dir


type=SYSCALL msg=audit(1319191803.926:112): arch=i386 syscall=open success=no exit=EACCES a0=bfcf9b1c a1=98800 a2=76760c a3=bfcfcc2c items=0 ppid=3225 pid=3227 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=6 comm=logwatch exe=/usr/bin/perl subj=system_u:system_r:logwatch_t:s0-s0:c0.c1023 key=(null)

Hash: logwatch,logwatch_t,varnishlog_log_t,dir,read

audit2allow

#============= logwatch_t ==============
allow logwatch_t varnishlog_log_t:dir read;

audit2allow -R

#============= logwatch_t ==============
allow logwatch_t varnishlog_log_t:dir read;

Comment 1 Daniel Walsh 2011-10-21 13:49:38 UTC
varnishlog_log_t needs to use this interface.

logging_log_file(varnishlog_log_t)

Comment 2 Miroslav Grepl 2011-10-24 06:43:20 UTC
Fixed in selinux-policy-3.9.16-45.fc15

Comment 3 Fedora Update System 2011-11-16 16:19:16 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 4 Fedora Update System 2011-11-17 23:37:37 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-12-04 02:37:34 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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