]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Error out when using SPICE TLS with spice_tls=0
authorChristophe Fergeau <cfergeau@redhat.com>
Fri, 24 Feb 2012 10:34:45 +0000 (11:34 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 24 Feb 2012 16:25:44 +0000 (09:25 -0700)
commiteda0fc7a823c4053548a3f1dc1b02eea5e8a8b14
treed8f43b4acd32d310e31845998b84b4d36b9ff2cc
parentf246cdb5aca13ac9409b2ad43087e3078615ffcb
Error out when using SPICE TLS with spice_tls=0

It's possible to disable SPICE TLS in qemu.conf. When this happens,
libvirt ignores any SPICE TLS port or x509 directory that may have
been set when it builds the qemu command line to use. However, it's
not ignoring the secure channels that may have been set and adds
tls-channel arguments to qemu command line.
Current qemu versions don't report an error when this happens, and try to use
TLS for the specified channels.

Before this patch

<domain type='kvm'>
  <name>auto-tls-port</name>
  <memory>65536</memory>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
  </os>
  <devices>
    <graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0' ke
      <listen type='address' address='0'/>
      <channel name='main' mode='secure'/>
      <channel name='inputs' mode='secure'/>
    </graphics>
  </devices>
</domain>

generates

-spice port=5900,addr=0,disable-ticketing,tls-channel=main,tls-channel=inputs

and starts QEMU.

After this patch, an error is reported if a TLS port is set in the XML
or if secure channels are specified but TLS is disabled in qemu.conf.
This is the behaviour the oVirt people (where I spotted this issue) said
they would expect.

This fixes bug #790436
src/qemu/qemu_command.c