Bug 244435

Summary: SELinux needs new rule to allow xenconsoled to log in /var/log/xen/console
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Berrangé <berrange>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: ebenes, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0544 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 16:39:57 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:
Bug Depends On:    
Bug Blocks: 202636    

Description Daniel Berrangé 2007-06-15 17:03:25 UTC
Description of problem:
Bug 202636  for Xen in RHEL-5.1  adds ability for xenconsoled to persistently
log guest & hypervisor console data to files in /var/log/xen/console. The
current SELinux policy does not allow it to do this, so we need extra rules added.

Version-Release number of selected component (if applicable):
selinux-policy-2.4.6-75.el5

How reproducible:
Always

Steps to Reproduce:
1. Edit /etc/sysconfig/xend and set XENCONSOLED_LOG_GUESTS=yes
2. Reboot
3. Start a new PV guest 'rhel5pv'
  
Actual results:
No log file 
type=AVC msg=audit(1181955852.515:55): avc:  denied  { create } for  pid=3320
comm="xenconsoled" name="guest-rhel5pv.log"
scontext=system_u:system_r:xenconsoled_t:s0
tcontext=system_u:object_r:xend_var_log_t:s0 tclass=file


Expected results:
Log file /var/log/xen/console/guest-rhel5pv.log  created

Additional info:

Comment 1 RHEL Program Management 2007-06-15 17:14:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 2 Daniel Walsh 2007-06-18 14:38:14 UTC
You can add this rule by executing the following command

# grep xenconsol /var/log/audit/audit.log | audit2allow -M myxen
# ls semodule -i myxen.pp

Fixed in selinux-policy-2.4.6-76

Comment 5 Eduard Benes 2007-08-22 15:35:21 UTC
Could you try the new policy available at the link below and reply 
whether the new packages solve your problem. 

http://people.redhat.com/dwalsh/SELinux/RHEL5/noarch/

Comment 8 errata-xmlrpc 2007-11-07 16:39:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0544.html