]> TLD Linux GIT Repositories - packages/libvirt.git/blob - libvirt-qemu-acl.patch
- updated to 9.0.0
[packages/libvirt.git] / libvirt-qemu-acl.patch
1 diff -ur libvirt-9.0.0.orig/src/qemu/qemu_command.c libvirt-9.0.0/src/qemu/qemu_command.c
2 --- libvirt-9.0.0.orig/src/qemu/qemu_command.c  2023-02-08 18:27:57.203025166 +0100
3 +++ libvirt-9.0.0/src/qemu/qemu_command.c       2023-02-08 18:28:12.916022463 +0100
4 @@ -7880,6 +7880,10 @@
5              virCommandAddEnvPair(cmd, "SASL_CONF_PATH", cfg->vncSASLdir);
6  
7          /* TODO: Support ACLs later */
8 +
9 +        if (cfg->vncACL)
10 +           virBufferAddLit(&opt, ",acl");
11 +
12      }
13  
14      if (graphics->data.vnc.powerControl != VIR_TRISTATE_BOOL_ABSENT) {
15 diff -ur libvirt-9.0.0.orig/src/qemu/qemu_conf.c libvirt-9.0.0/src/qemu/qemu_conf.c
16 --- libvirt-9.0.0.orig/src/qemu/qemu_conf.c     2023-02-08 18:27:57.204025166 +0100
17 +++ libvirt-9.0.0/src/qemu/qemu_conf.c  2023-02-08 18:28:12.917022463 +0100
18 @@ -444,6 +444,8 @@
19          return -1;
20      if (virConfGetValueBool(conf, "vnc_allow_host_audio", &cfg->vncAllowHostAudio) < 0)
21          return -1;
22 +    if (virConfGetValueBool(conf, "vnc_acl", &cfg->vncACL) < 0)
23 +        return -1;
24  
25      if (cfg->vncPassword &&
26          strlen(cfg->vncPassword) > 8) {
27 diff -ur libvirt-9.0.0.orig/src/qemu/qemu_conf.h libvirt-9.0.0/src/qemu/qemu_conf.h
28 --- libvirt-9.0.0.orig/src/qemu/qemu_conf.h     2023-02-08 18:27:57.204025166 +0100
29 +++ libvirt-9.0.0/src/qemu/qemu_conf.h  2023-02-08 18:28:12.917022463 +0100
30 @@ -119,6 +119,7 @@
31      bool vncTLSx509verify;
32      bool vncTLSx509verifyPresent;
33      bool vncSASL;
34 +    bool vncACL;
35      char *vncTLSx509certdir;
36      char *vncTLSx509secretUUID;
37      char *vncListen;
38 diff -ur libvirt-9.0.0.orig/src/qemu/qemu.conf.in libvirt-9.0.0/src/qemu/qemu.conf.in
39 --- libvirt-9.0.0.orig/src/qemu/qemu.conf.in    2023-02-08 18:27:57.202025167 +0100
40 +++ libvirt-9.0.0/src/qemu/qemu.conf.in 2023-02-08 18:28:12.917022463 +0100
41 @@ -147,6 +147,15 @@
42  #vnc_sasl = 1
43  
44  
45 +# Enable the VNC access control lists. When switched on this will
46 +# initially block all vnc users from accessing the vnc server. To
47 +# add and remove ids from the ACLs you will need to send the appropriate
48 +# commands to the qemu monitor as required by your particular version of
49 +# QEMU. See the QEMU documentation for more details.
50 +#
51 +# vnc_acl = 1
52 +
53 +
54  # The default SASL configuration file is located in /etc/sasl/
55  # When running libvirtd unprivileged, it may be desirable to
56  # override the configs in this location. Set this parameter to