[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/1] add vnc unix sockets to apparmor policy



When using vnc gaphics over a unix socket, virt-aa-helper needs to provide
access for the qemu domain to access the sockfile.

Signed-off-by: Serge Hallyn <serge hallyn ubuntu com>
---
 src/security/virt-aa-helper.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index e480b30..c6b9903 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1003,6 +1003,13 @@ get_files(vahControl * ctl)
         if (vah_add_file(&buf, ctl->def->os.loader, "r") != 0)
             goto clean;
 
+    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"))
+                goto clean;
+    }
+
     if (ctl->def->ngraphics == 1 &&
         ctl->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL)
         if (vah_add_file(&buf, ctl->def->graphics[0]->data.sdl.xauth,
-- 
1.7.10.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]