]> xenbits.xensource.com Git - libvirt.git/commitdiff
virt-aa-helper: disallow VNC socket read permissions
authorSimon Arlott <bugzilla.redhat.simon@arlott.org>
Fri, 8 Apr 2016 13:01:33 +0000 (09:01 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 20 Apr 2016 13:58:47 +0000 (09:58 -0400)
The VM does not need read permission for its own VNC socket to create(),
bind(), accept() connections or to receive(), send(), etc. on connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1312573

src/security/virt-aa-helper.c

index 5db9c02abb03e67df2bfc4f2e0d00057ac0467fc..7eeb4eff6da735aef1357e3bd88bb8940063c6b3 100644 (file)
@@ -1062,7 +1062,7 @@ get_files(vahControl * ctl)
     for (i = 0; i < ctl->def->ngraphics; i++) {
         if (ctl->def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
             ctl->def->graphics[i]->data.vnc.socket &&
-            vah_add_file(&buf, ctl->def->graphics[i]->data.vnc.socket, "rw"))
+            vah_add_file(&buf, ctl->def->graphics[i]->data.vnc.socket, "w"))
             goto cleanup;
     }