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