[libvirt] [PATCH] security driver: ignore EINVAL when chowning an image file

Eric Blake eblake at redhat.com
Fri Jun 3 16:13:28 UTC 2011


On 06/03/2011 10:04 AM, Laine Stump wrote:
> This fixes:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=702044
>   https://bugzilla.redhat.com/show_bug.cgi?id=709454
> 
> Both of these complain of a failure to use an image file that resides
> on a read-only NFS volume. The function in the DAC security driver
> that chowns image files to the qemu user:group before using them
> already has special cases to ignore failure of chown on read-only file
> systems, and in a few other cases, but it hadn't been checking for
> EINVAL, which is what is returned if the qemu user doesn't even exist
> on the NFS server.

ACK.

> -        if (chown_errno == EOPNOTSUPP) {
> +        if (chown_errno == EOPNOTSUPP || chown_errno == EINVAL) {
>              VIR_INFO("Setting user and group to '%d:%d' on '%s' not supported by filesystem",

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110603/1396a1bb/attachment-0001.sig>


More information about the libvir-list mailing list