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

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

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]