]> git.proxmox.com Git - pve-qemu.git/blame - debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch
update submodule and patches to 7.1.0
[pve-qemu.git] / debian / patches / pve / 0015-PVE-qapi-modify-spice-query.patch
CommitLineData
23102ed6 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
95259824 2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
83faa3fe
TL
3Date: Mon, 6 Apr 2020 12:16:45 +0200
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
5b15e2ec 15index cf58ab4283..0be2388941 100644
6838f038
WB
16--- a/qapi/ui.json
17+++ b/qapi/ui.json
5b15e2ec 18@@ -310,11 +310,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 23+#
8dca018b 24 # Since: 0.14
95259824
WB
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 30 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
4567474e 31 'if': 'CONFIG_SPICE' }
95259824 32
95259824 33diff --git a/ui/spice-core.c b/ui/spice-core.c
dc9827a6 34index 37774f1c0a..367f77f2b4 100644
95259824
WB
35--- a/ui/spice-core.c
36+++ b/ui/spice-core.c
8dca018b 37@@ -534,6 +534,11 @@ static SpiceInfo *qmp_query_spice_real(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;