aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-07-11 14:50:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-07-11 14:50:18 +0100
commit42ca32f776c364c6a4c10d7100505b00b7a7f14e (patch)
tree4535f878255154feba43813aca015d8c9c7485c7 /ui
parent22df3452dcab04adf57bda370ced35193395a475 (diff)
parentb1ea7b79e1675355ea7abe2548ad71dcf7d64b60 (diff)
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20140711-1' into staging
spice: auth fixes # gpg: Signature made Fri 11 Jul 2014 10:17:15 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20140711-1: spice: auth fixes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 70df4460e4..7bb91e6bad 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -741,6 +741,7 @@ void qemu_spice_init(void)
error_report("spice: failed to enable sasl");
exit(1);
}
+ auth = "sasl";
}
if (qemu_opt_get_bool(opts, "disable-ticketing", 0)) {
auth = "none";
@@ -894,6 +895,10 @@ static int qemu_spice_set_ticket(bool fail_if_conn, bool disconnect_if_conn)
int qemu_spice_set_passwd(const char *passwd,
bool fail_if_conn, bool disconnect_if_conn)
{
+ if (strcmp(auth, "spice") != 0) {
+ return -1;
+ }
+
g_free(auth_passwd);
auth_passwd = g_strdup(passwd);
return qemu_spice_set_ticket(fail_if_conn, disconnect_if_conn);