]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch
backup: improve error when copy-before-write fails for fleecing
[pve-qemu.git] / debian / patches / pve / 0015-PVE-qapi-modify-spice-query.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Mon, 6 Apr 2020 12:16:45 +0200
4 Subject: [PATCH] PVE: qapi: modify spice query
5
6 Provide the last ticket in the SpiceInfo struct optionally.
7
8 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
9 [FE: adapt to QAPI change]
10 Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 ---
12 qapi/ui.json | 3 +++
13 ui/spice-core.c | 4 ++++
14 2 files changed, 7 insertions(+)
15
16 diff --git a/qapi/ui.json b/qapi/ui.json
17 index 006616aa77..dfd1d3e36b 100644
18 --- a/qapi/ui.json
19 +++ b/qapi/ui.json
20 @@ -317,11 +317,14 @@
21 #
22 # @channels: a list of @SpiceChannel for each active spice channel
23 #
24 +# @ticket: The last ticket set with set_password
25 +#
26 # Since: 0.14
27 ##
28 { 'struct': 'SpiceInfo',
29 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
30 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
31 + '*ticket': 'str',
32 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']},
33 'if': 'CONFIG_SPICE' }
34
35 diff --git a/ui/spice-core.c b/ui/spice-core.c
36 index b20c25aee0..26baeb7846 100644
37 --- a/ui/spice-core.c
38 +++ b/ui/spice-core.c
39 @@ -548,6 +548,10 @@ static SpiceInfo *qmp_query_spice_real(Error **errp)
40 micro = SPICE_SERVER_VERSION & 0xff;
41 info->compiled_version = g_strdup_printf("%d.%d.%d", major, minor, micro);
42
43 + if (auth_passwd) {
44 + info->ticket = g_strdup(auth_passwd);
45 + }
46 +
47 if (port) {
48 info->has_port = true;
49 info->port = port;