From: Anthony Liguori <aliguori@us.ibm.com>
To: Keir Fraser <keir@xensource.com>
Cc: xen-devel@lists.xensource.com,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: PATCH: Set close-on-exec flag for QEMU disks
Date: Mon, 05 Mar 2007 15:23:43 -0600 [thread overview]
Message-ID: <45EC8A5F.3020308@us.ibm.com> (raw)
In-Reply-To: <C211CAC3.A969%keir@xensource.com>
Keir Fraser wrote:
> On 2/3/07 21:40, "Daniel P. Berrange" <berrange@redhat.com> 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 few areas where scripts are executed. Why not just introduce
an exec() wrapper that closes file descriptors appropriately.
That makes it less likely that this problem will occur in the future.
Regards,
Anthony Liguori
> 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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
next prev parent reply other threads:[~2007-03-05 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 21:40 PATCH: Set close-on-exec flag for QEMU disks Daniel P. Berrange
2007-03-05 13:25 ` Keir Fraser
2007-03-05 21:23 ` Anthony Liguori [this message]
2007-03-06 16:34 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45EC8A5F.3020308@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=berrange@redhat.com \
--cc=keir@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.