Re: [PATCH] Fix tunnelled migration with qemu running as qemu:qemu.

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

 



On 08/12/10 - 01:54:18PM, Eric Blake wrote:
> On 08/12/2010 08:25 AM, Chris Lalancette wrote:
> > The problem is that on the source of the migration, libvirtd
> > is responsible for creating the unix socket over which the data
> > will flow.  Since libvirtd is running as root, this file will
> > be created as root.  When the qemu process running as qemu:qemu
> > goes to access the unix file to write data to it, it will get
> > permission denied and fail.  Make sure to change the owner
> > of the unix file to qemu:qemu.
> > 
> > Thanks to Justin Clift for testing this patch out for me.
> > 
> > Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
> > ---
> >  src/qemu/qemu_driver.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> > index 3dfd1ae..b6b6633 100644
> > --- a/src/qemu/qemu_driver.c
> > +++ b/src/qemu/qemu_driver.c
> > @@ -10975,6 +10975,13 @@ static int doTunnelMigrate(virDomainPtr dom,
> >          goto cleanup;
> >      }
> >  
> > +    if (chown(unixfile, qemu_driver->user, qemu_driver->group) < 0) {
> > +        virReportSystemError(errno,
> > +                             _("Cannot change unix socket '%s' owner"),
> > +                             unixfile);
> > +        goto cleanup;
> > +    }
> 
> ACK.

Thanks, pushed.

-- 
Chris Lalancette

--
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]