[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] PATCH: Set close-on-exec flag for QEMU disks

  • To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Mon, 05 Mar 2007 13:25:23 +0000
  • Delivery-date: Mon, 05 Mar 2007 05:24:41 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcdfKbp2+S9InMscEdu3zwAX8io7RQ==
  • Thread-topic: [Xen-devel] PATCH: Set close-on-exec flag for QEMU disks

On 2/3/07 21:40, "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:

> QEMU does not currently set the close-on-exec flag after opening its virtual
> disk images. This causes problems when it later runs the /etc/xen/qemu-ifup
> script because the file descriptors get propagated to networking commands
> like brctl / ifconfig. The SELinux policy quite rightly does not allow the
> networking scripts to access the virtual disk images, so these inherited
> file descriptors for AVC denials to be logged.
> The attached patch modifies all the QEMU disk driver backends to make sure
> the close-on-exec flag is turned on

It would be nicer to implement an open_cloexec() function in e.g., vl.c to
do the open() and fcntl() in one go and in one place.

There are lots of uses of open() throughout the qemu sources and the patch
only fixes up a subset of them -- is this correct?

 -- Keir

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.