Bug 1013910

Summary: SELinux is preventing oxenstored from 'open' accesses on the file /var/log/xenstored.log.
Product: [Fedora] Fedora Reporter: Jeremy Fitzhardinge <jeremy>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:fa2e32dc194f39c9bbcd4f475fdedf4f0585857e0405a2a3b577736f6085af1a
Fixed In Version: selinux-policy-3.12.1-74.9.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-14 06:59:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jeremy Fitzhardinge 2013-10-01 03:33:30 UTC
Description of problem:
oxenstored needs to write /var/log/xenstored.log
SELinux is preventing oxenstored from 'open' accesses on the file /var/log/xenstored.log.

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

If you believe that oxenstored should be allowed open access on the xenstored.log file 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 oxenstored /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xenstored_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log/xenstored.log [ file ]
Source                        oxenstored
Source Path                   oxenstored
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.4.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-200.fc19.x86_64 #1 SMP Sat
                              Sep 14 15:04:51 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-30 20:26:07 PDT
Last Seen                     2013-09-30 20:26:07 PDT
Local ID                      8022218c-d251-4fb6-b747-afc1c88818ca

Raw Audit Messages
type=AVC msg=audit(1380597967.354:29): avc:  denied  { open } for  pid=722 comm="oxenstored" path="/var/log/xenstored.log" dev="dm-2" ino=144600 scontext=system_u:system_r:xenstored_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file


Hash: oxenstored,xenstored_t,var_log_t,file,open

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.1-200.fc19.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2013-10-01 09:11:05 UTC
Hi Jeremy, 

I believe "/var/log/xenstored.log" is default path or did you setup this path? 

For now you can use : "# chcon -t xenstored_var_log_t /var/log/xenstored.log".

Comment 2 Daniel Walsh 2013-10-04 14:33:56 UTC
01bcac323f563c708264645cadb9c748d909b381 fixes this in git.

Comment 3 Lukas Vrabec 2013-10-07 09:26:35 UTC
backported.

Comment 4 Fedora Update System 2013-10-08 20:47:30 UTC
selinux-policy-3.12.1-74.9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.9.fc19

Comment 5 Fedora Update System 2013-10-10 01:14:31 UTC
Package selinux-policy-3.12.1-74.9.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-74.9.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18701/selinux-policy-3.12.1-74.9.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-10-14 06:59:33 UTC
selinux-policy-3.12.1-74.9.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-10-14 17:21:39 UTC
selinux-policy-3.12.1-74.9.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.