]> TLD Linux GIT Repositories - packages/libvirt.git/blob - libvirt-qemu-acl.patch
- updated to 4.10.0
[packages/libvirt.git] / libvirt-qemu-acl.patch
1 diff -urp libvirt-4.5.0.orig/src/qemu/qemu_command.c libvirt-4.5.0/src/qemu/qemu_command.c
2 --- libvirt-4.5.0.orig/src/qemu/qemu_command.c  2018-07-09 16:27:53.841864595 +0000
3 +++ libvirt-4.5.0/src/qemu/qemu_command.c       2018-07-09 16:28:11.860863521 +0000
4 @@ -7859,6 +7859,10 @@ qemuBuildGraphicsVNCCommandLine(virQEMUD
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      virCommandAddArg(cmd, "-vnc");
15 diff -urp libvirt-4.5.0.orig/src/qemu/qemu.conf libvirt-4.5.0/src/qemu/qemu.conf
16 --- libvirt-4.5.0.orig/src/qemu/qemu.conf       2018-07-09 16:27:53.844864595 +0000
17 +++ libvirt-4.5.0/src/qemu/qemu.conf    2018-07-09 16:28:11.861863521 +0000
18 @@ -135,6 +135,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 -urp libvirt-4.5.0.orig/src/qemu/qemu_conf.c libvirt-4.5.0/src/qemu/qemu_conf.c
35 --- libvirt-4.5.0.orig/src/qemu/qemu_conf.c     2018-07-09 16:27:53.842864595 +0000
36 +++ libvirt-4.5.0/src/qemu/qemu_conf.c  2018-07-09 16:28:11.861863521 +0000
37 @@ -555,6 +555,8 @@ int virQEMUDriverConfigLoadFile(virQEMUD
38          goto cleanup;
39      if (virConfGetValueBool(conf, "nographics_allow_host_audio", &cfg->nogfxAllowHostAudio) < 0)
40          goto cleanup;
41 +    if (virConfGetValueBool(conf, "vnc_acl", &cfg->vncACL) < 0)
42 +        goto cleanup;
43  
44  
45      if (virConfGetValueStringList(conf, "security_driver", true, &cfg->securityDriverNames) < 0)
46 diff -urp libvirt-4.5.0.orig/src/qemu/qemu_conf.h libvirt-4.5.0/src/qemu/qemu_conf.h
47 --- libvirt-4.5.0.orig/src/qemu/qemu_conf.h     2018-07-09 16:27:53.842864595 +0000
48 +++ libvirt-4.5.0/src/qemu/qemu_conf.h  2018-07-09 16:28:11.861863521 +0000
49 @@ -124,6 +124,7 @@ struct _virQEMUDriverConfig {
50      bool vncTLS;
51      bool vncTLSx509verify;
52      bool vncSASL;
53 +    bool vncACL;
54      char *vncTLSx509certdir;
55      char *vncListen;
56      char *vncPassword;