Re: [PATCH] screenshot: Set access rights to temporary file

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

 



On Wed, Jun 29, 2011 at 10:23:38AM +0200, Michal Privoznik wrote:
> Although we create a temporary file, it is owned by root:root and have
> rights 0600. In case qemu does not run under root, it is unable to write
> to that file and thus we transfer 0B sized file.

Hmm, why didn't QEMU return an error in the monitor in that case ?
Sounds like a BZ needs to be filed against QEMU

> ---
>  src/qemu/qemu_driver.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 8b65c26..562ec42 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2729,6 +2729,8 @@ qemuDomainScreenshot(virDomainPtr dom,
>          goto endjob;
>      }
>  
> +    virSecurityManagerSetSavedStateLabel(qemu_driver->securityManager, vm, tmp);
> +
>      qemuDomainObjEnterMonitor(vm);
>      if (qemuMonitorScreendump(priv->mon, tmp) < 0) {
>          qemuDomainObjExitMonitor(vm);

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]