Bug 432948

Summary: virsh warning messages caused by SELinux
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: berrange, dwalsh, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-10 06:23:16 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mark McLoughlin 2008-02-15 06:43:33 EST
On rawhide, doing:

  $> ./virsh list
  libvir: Remote error : remoteDispatchClientRequest: internal error: library
function returned error but did not set virterror
  libvir: warning : Failed to find the network: Is the daemon running ?
   Id Name                 State
  ----------------------------------
    0 Domain-0             running

the warning goes away with SELinux in permissive mode

Denial details:

SELinux is preventing libvirtd (virtd_t) "dac_override" to <Unknown> (virtd_t).

host=zig type=AVC msg=audit(1203074426.175:139): avc:  denied  { dac_override }
for  pid=2437 comm="libvirtd" capability=1 scontext=system_u:system_r:virtd_t:s0
tcontext=system_u:system_r:virtd_t:s0 tclass=capability

host=zig type=SYSCALL msg=audit(1203074426.175:139): arch=40000003 syscall=5
success=no exit=-13 a0=71161c a1=2 a2=20bc0 a3=91fb5c0 items=0 ppid=1 pid=2437
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) comm="libvirtd" exe="/usr/sbin/libvirtd"
subj=system_u:system_r:virtd_t:s0 key=(null)


If I allow that, then I get:

SELinux is preventing libvirtd (virtd_t) "read" to ./privcmd (proc_xen_t).

host=zig type=AVC msg=audit(1203075507.240:186): avc:  denied  { read } for 
pid=2437 comm="libvirtd" name="privcmd" dev=proc ino=-268434280
scontext=system_u:system_r:virtd_t:s0 tcontext=system_u:object_r:proc_xen_t:s0
tclass=file

host=zig type=SYSCALL msg=audit(1203075507.240:186): arch=40000003 syscall=5
success=no exit=-13 a0=71161c a1=2 a2=20bc0 a3=91fb5d0 items=0 ppid=1 pid=2437
auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0
tty=(none) comm="libvirtd" exe="/usr/sbin/libvirtd"
subj=system_u:system_r:virtd_t:s0 key=(null)



Allowing that makes the warning go away

Both denials result in:

  open("/proc/xen/privcmd", O_RDWR)       = -1 EACCES (Permission denied)
Comment 1 Bug Zapper 2008-05-14 01:12:57 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Bug Zapper 2009-06-09 19:34:10 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Daniel Walsh 2009-06-10 06:23:16 EDT
This is fixed in the current release.