]> TLD Linux GIT Repositories - packages/libvirt.git/blob - libvirt-qemu-acl.patch
- updated to 1.3.3, fixed broken qemu-acl patch
[packages/libvirt.git] / libvirt-qemu-acl.patch
1 diff -urp libvirt-1.3.3.orig/src/qemu/qemu_command.c libvirt-1.3.3/src/qemu/qemu_command.c
2 --- libvirt-1.3.3.orig/src/qemu/qemu_command.c  2016-04-14 10:17:35.131170000 +0000
3 +++ libvirt-1.3.3/src/qemu/qemu_command.c       2016-04-14 10:30:12.861170000 +0000
4 @@ -7336,6 +7336,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-1.3.3.orig/src/qemu/qemu.conf libvirt-1.3.3/src/qemu/qemu.conf
16 --- libvirt-1.3.3.orig/src/qemu/qemu.conf       2016-04-14 10:17:35.131170000 +0000
17 +++ libvirt-1.3.3/src/qemu/qemu.conf    2016-04-14 10:18:01.034170000 +0000
18 @@ -80,6 +80,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-1.3.3.orig/src/qemu/qemu_conf.c libvirt-1.3.3/src/qemu/qemu_conf.c
35 --- libvirt-1.3.3.orig/src/qemu/qemu_conf.c     2016-04-14 10:17:35.130170000 +0000
36 +++ libvirt-1.3.3/src/qemu/qemu_conf.c  2016-04-14 10:18:01.034170000 +0000
37 @@ -536,6 +536,7 @@ int virQEMUDriverConfigLoadFile(virQEMUD
38      GET_VALUE_STR("vnc_sasl_dir", cfg->vncSASLdir);
39      GET_VALUE_BOOL("vnc_allow_host_audio", cfg->vncAllowHostAudio);
40      GET_VALUE_BOOL("nographics_allow_host_audio", cfg->nogfxAllowHostAudio);
41 +    GET_VALUE_LONG("vnc_acl", cfg->vncACL);
42  
43      p = virConfGetValue(conf, "security_driver");
44      if (p && p->type == VIR_CONF_LIST) {
45 diff -urp libvirt-1.3.3.orig/src/qemu/qemu_conf.h libvirt-1.3.3/src/qemu/qemu_conf.h
46 --- libvirt-1.3.3.orig/src/qemu/qemu_conf.h     2016-04-14 10:17:35.130170000 +0000
47 +++ libvirt-1.3.3/src/qemu/qemu_conf.h  2016-04-14 10:18:01.035170000 +0000
48 @@ -112,6 +112,7 @@ struct _virQEMUDriverConfig {
49      bool vncTLS;
50      bool vncTLSx509verify;
51      bool vncSASL;
52 +    bool vncACL;
53      char *vncTLSx509certdir;
54      char *vncListen;
55      char *vncPassword;