]> TLD Linux GIT Repositories - packages/libvirt.git/blob - libvirt-qemu-acl.patch
- updated to 8.0.0
[packages/libvirt.git] / libvirt-qemu-acl.patch
1 diff -ur libvirt-8.0.0.orig/src/qemu/qemu_command.c libvirt-8.0.0/src/qemu/qemu_command.c
2 --- libvirt-8.0.0.orig/src/qemu/qemu_command.c  2022-01-23 12:17:21.722539037 +0100
3 +++ libvirt-8.0.0/src/qemu/qemu_command.c       2022-01-23 12:17:43.308582727 +0100
4 @@ -8327,6 +8327,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-8.0.0.orig/src/qemu/qemu.conf libvirt-8.0.0/src/qemu/qemu.conf
16 --- libvirt-8.0.0.orig/src/qemu/qemu.conf       2022-01-23 12:17:21.720539033 +0100
17 +++ libvirt-8.0.0/src/qemu/qemu.conf    2022-01-23 12:17:43.308582727 +0100
18 @@ -147,6 +147,15 @@
19  #vnc_sasl = 1
20  
21  
22 +# Enable the VNC access control lists. When switched on this will
23 +# initially block all vnc users from accessing the vnc server. To
24 +# add and remove ids from the ACLs you will need to send the appropriate
25 +# commands to the qemu monitor as required by your particular version of
26 +# QEMU. See the QEMU documentation for more details.
27 +# 
28 +# vnc_acl = 1
29 +
30 +
31  # The default SASL configuration file is located in /etc/sasl/
32  # When running libvirtd unprivileged, it may be desirable to
33  # override the configs in this location. Set this parameter to
34 diff -ur libvirt-8.0.0.orig/src/qemu/qemu_conf.c libvirt-8.0.0/src/qemu/qemu_conf.c
35 --- libvirt-8.0.0.orig/src/qemu/qemu_conf.c     2022-01-23 12:17:21.722539037 +0100
36 +++ libvirt-8.0.0/src/qemu/qemu_conf.c  2022-01-23 12:17:43.308582727 +0100
37 @@ -450,6 +450,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      if (cfg->vncPassword &&
45          strlen(cfg->vncPassword) > 8) {
46 diff -ur libvirt-8.0.0.orig/src/qemu/qemu_conf.h libvirt-8.0.0/src/qemu/qemu_conf.h
47 --- libvirt-8.0.0.orig/src/qemu/qemu_conf.h     2022-01-23 12:17:21.722539037 +0100
48 +++ libvirt-8.0.0/src/qemu/qemu_conf.h  2022-01-23 12:17:43.309582729 +0100
49 @@ -114,6 +114,7 @@
50      bool vncTLSx509verify;
51      bool vncTLSx509verifyPresent;
52      bool vncSASL;
53 +    bool vncACL;
54      char *vncTLSx509certdir;
55      char *vncTLSx509secretUUID;
56      char *vncListen;