Bug 842831 - RFE: security: don't change owner/label unless it's needed for launching qemu (like for /dev/sr0)
RFE: security: don't change owner/label unless it's needed for launching qemu...
Status: CLOSED DUPLICATE of bug 755535
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
All All
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
: 1063710 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-07-24 12:57 EDT by Cristian Ciupitu
Modified: 2016-04-26 09:49 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-14 16:09:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Cristian Ciupitu 2012-07-24 12:57:02 EDT
Description of problem:
When I'm adding a CD image to a guest, libvirt changes its owner and SELinux
label even if it's not needed. The file is world-readable (even if it's owned
by root) and the SELinux label is public_content_t. libvirt should mess with
files as little as possible in my opinion.

The same should be done for hard-disk images probably, but I'm not interested
in that use case right now.

Version-Release number of selected component (if applicable):
Comment 1 Jiri Denemark 2012-07-25 03:19:49 EDT
Libvirt tries to isolate running domains as much as possible, which includes labeling resources used by each domain in such a way that other domains cannot read them. If you don't want this to happen for your CD image, adding <shareable/> element into the cdrom device element should work.
Comment 2 Cristian Ciupitu 2012-08-22 19:46:44 EDT
virsh dumpxml says:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/.../xxx.iso'>
        <seclabel relabel='yes'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

yet the file is owned by qemu:qemu and has the label

Also I don't think that CD images need isolation by default.
Comment 3 Fedora End Of Life 2013-07-03 19:45:02 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 '17'.

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 17'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 17 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, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

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.
Comment 4 Cole Robinson 2013-07-11 14:24:22 EDT
Still not fixed, but this is a non-backportable bug so let's track it upstream.
Comment 5 Cole Robinson 2016-03-23 18:33:09 EDT
I sent an email about this to libvir-list last year, laying out a high level plan: https://www.redhat.com/archives/libvir-list/2015-April/msg01400.html
Comment 6 Cole Robinson 2016-04-10 13:48:47 EDT
*** Bug 1063710 has been marked as a duplicate of this bug. ***
Comment 7 Cole Robinson 2016-04-14 16:09:13 EDT

*** This bug has been marked as a duplicate of bug 755535 ***

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