Bug 848339

Summary: SELinux is preventing /usr/bin/perl from 'read' accesses on the file /var/lightsquid/20120801/.features.
Product: [Fedora] Fedora Reporter: Deepak Mahajan <mahajan.deepak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: aleksey, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1681e434be835db585154ee26b8de75cb56f27ed1703b8f1d43d40f89329f620
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-20 02:57:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: description
none
Lightsquid revisited
none
lightsquid patch
none
lightsquid patch v1 none

Description Deepak Mahajan 2012-08-15 09:54:42 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.2-1.fc16.x86_64
time:           Wednesday 15 August 2012 03:23:47 PM IST

description:    Text file, 7231 bytes

Comment 1 Deepak Mahajan 2012-08-15 09:54:46 UTC
Created attachment 604566 [details]
File: description

Comment 2 Daniel Walsh 2012-08-15 12:03:17 UTC
miroslav, I have added fixes for this in squid.* for Fedora 18.

Comment 3 Daniel Walsh 2012-08-15 12:08:14 UTC
lightsquid should really be using /var/lib/lightsquid or /var/cache/lightsquid, or /var/spool/lightsquid, depending on the content in the /var/lightsquid directory.

Comment 4 Miroslav Grepl 2012-08-20 08:14:51 UTC
Added.

Comment 5 Dominick Grift 2012-09-10 10:48:13 UTC
Created attachment 611395 [details]
Lightsquid revisited

I was just looking at this policy and i believe it needs to be rewritten (see my attached patch which is untested)

See: 

http://git.fedorahosted.org/cgit/selinux-policy.git/commit/?h=master_contrib&id=fe60d21b03b5c6fb710d09851396571d9b3ad444

Some issues:

This app is basically a cron system entry that parses squid log and generates reports.

The lightsquid cgi webapp reads and displays the reports.

It is not a init daemon domain

/usr/sbin/logparser.pl can bin bin_t

/etc/cron.daily/lightsquid can be the entry point to the lightsquid domain

httpd_t doesnt have to read /var/lightsquid if you create a apache content template (lightsquid)

/var/lightsquid is not defined/labeled

Comment 6 Dominick Grift 2012-09-10 10:50:36 UTC
Created attachment 611396 [details]
lightsquid patch

something went wrong. see attached patch

Comment 7 Dominick Grift 2012-09-10 11:06:23 UTC
Created attachment 611400 [details]
lightsquid patch v1

Prveious patch had a small issue

Comment 8 Miroslav Grepl 2012-09-11 05:48:25 UTC
We treat it with the squid policy.

Dominick,
do you think a new policy is really needed?

Comment 9 Daniel Walsh 2012-09-18 16:08:59 UTC
I don't think we should add a new domain for this.  We have too many domains as it is.

Comment 10 Fedora Update System 2012-11-13 18:29:32 UTC
selinux-policy-3.10.0-96.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-96.fc16

Comment 11 Fedora Update System 2012-11-15 02:42:36 UTC
Package selinux-policy-3.10.0-96.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-96.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18243/selinux-policy-3.10.0-96.fc16
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-11-20 02:57:43 UTC
selinux-policy-3.10.0-96.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.