]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0016-PVE-qapi-modify-spice-query.patch
update sources for v4.0.1
[pve-qemu.git] / debian / patches / pve / 0016-PVE-qapi-modify-spice-query.patch
CommitLineData
23102ed6 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
95259824
WB
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3Date: Wed, 9 Dec 2015 14:32:11 +0100
53e83913 4Subject: [PATCH] PVE: qapi: modify spice query
95259824
WB
5
6Provide the last ticket in the SpiceInfo struct optionally.
b855dce7
TL
7
8Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
95259824 9---
6838f038
WB
10 qapi/ui.json | 3 +++
11 ui/spice-core.c | 5 +++++
95259824
WB
12 2 files changed, 8 insertions(+)
13
6838f038 14diff --git a/qapi/ui.json b/qapi/ui.json
b855dce7 15index 59e412139a..bcd781a1b9 100644
6838f038
WB
16--- a/qapi/ui.json
17+++ b/qapi/ui.json
53e83913 18@@ -211,11 +211,14 @@
95259824
WB
19 #
20 # @channels: a list of @SpiceChannel for each active spice channel
21 #
a544966d 22+# @ticket: The last ticket set with set_password
95259824
WB
23+#
24 # Since: 0.14.0
25 ##
26 { 'struct': 'SpiceInfo',
27 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
28 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
29+ '*ticket': 'str',
53e83913
WB
30 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
31 'if': 'defined(CONFIG_SPICE)' }
95259824 32
95259824 33diff --git a/ui/spice-core.c b/ui/spice-core.c
b855dce7 34index 5593dfcb06..bd80c18210 100644
95259824
WB
35--- a/ui/spice-core.c
36+++ b/ui/spice-core.c
b855dce7 37@@ -538,6 +538,11 @@ SpiceInfo *qmp_query_spice(Error **errp)
95259824
WB
38 micro = SPICE_SERVER_VERSION & 0xff;
39 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
40
41+ if (auth_passwd) {
42+ info->has_ticket = true;
43+ info->ticket = g_strdup(auth_passwd);
44+ }
45+
46 if (port) {
47 info->has_port = true;
48 info->port = port;