Use the new set_password monitor command to set password.
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 10 Jan 2011 11:12:33 +0000 (12:12 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 14 Jan 2011 19:36:00 +0000 (12:36 -0700)
commit9d73efdbe3ea61a13a11fdc24a2cb530eaa0b66f
tree695ae949ec65eaccd5b5c464a932898743f55943
parent4d099bc06c80f1f84025715ebf913c7a2d25b64c
Use the new set_password monitor command to set password.

We try to use that command first when setting a VNC/SPICE password. If
that doesn't work we fallback to the legacy VNC only password

Allow an expiry time to be set, if that doesn't work, throw an error
if they try to use SPICE.

Change since v1:
- moved qemuInitGraphicsPasswords to qemu_hotplug, renamed
  to qemuDomainChangeGraphicsPasswords.
- updated what looks like a typo (that appears to work anyway) in
  initial patch from Daniel:
    - ret = qemuInitGraphicsPasswords(driver, vm,
    -                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
    -                                 &vm->def->graphics[0]->data.vnc.auth,
    -                                 driver->vncPassword);
    + ret = qemuInitGraphicsPasswords(driver, vm,
    +                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
    +                                 &vm->def->graphics[0]->data.spice.auth,
    +                                 driver->spicePassword);

Based on patch by Daniel P. Berrange <berrange@redhat.com>.
src/qemu/qemu_driver.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_hotplug.h