Re: [PATCHv2] Error out when using SPICE TLS with spice_tls=0

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

 



On Tue, Feb 28, 2012 at 05:04:57PM +0100, Michal Privoznik wrote:
> On 24.02.2012 11:34, Christophe Fergeau wrote:
> >  src/qemu/qemu_command.c |   12 +++++++++++-
> >  1 files changed, 11 insertions(+), 1 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> > index 5a34504..4f3e61e 100644
> > --- a/src/qemu/qemu_command.c
> > +++ b/src/qemu/qemu_command.c
> > @@ -5231,7 +5231,12 @@ qemuBuildCommandLine(virConnectPtr conn,
> >  
> >          virBufferAsprintf(&opt, "port=%u", def->graphics[0]->data.spice.port);
> >  
> > -        if (driver->spiceTLS && def->graphics[0]->data.spice.tlsPort != -1)
> > +        if (def->graphics[0]->data.spice.tlsPort != -1)
> > +            if (!driver->spiceTLS) {
> > +                qemuReportError(VIR_ERR_XML_ERROR,
> > +                                _("spice TLS port set in XML configuration, but TLS is disabled in qemu.conf"));
> > +                goto error;
> > +            }
> >              virBufferAsprintf(&opt, ",tls-port=%u", def->graphics[0]->data.spice.tlsPort);
> 
> In fact, this needs to be wrapped with curly braces as the check for
> tlsPort != -1 is meant to protect virBufferAsprintf() in the first
> place. Sorry for not catching this earlier.

Ugh, sorry about that silly bug, thanks for catching it.

Christophe

Attachment: pgpA7PH6HYfOu.pgp
Description: PGP signature

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