]> xenbits.xensource.com Git - libvirt.git/commitdiff
security: aa-helper: allow virt-aa-helper to read /dev/dri
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Tue, 12 Feb 2019 09:33:23 +0000 (10:33 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 25 Feb 2019 07:50:38 +0000 (08:50 +0100)
Change fb01e1a44 "virt-aa-helper: generate rules for gl enabled
graphics devices" implemented the detection for gl enabled
devices in virt-aa-helper. But it will in certain cases e.g. if
no rendernode was explicitly specified need to read /dev/dri
which it currently isn't allowed.

Add a rule to the apparmor profile of virt-aa-helper itself to
be able to do that.

Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/apparmor/usr.lib.libvirt.virt-aa-helper

index de9436872ca5ea16119991cd48f7b0c5c8b2e7e4..78994bcda600a158de7b8757f8925930d37f90e7 100644 (file)
@@ -19,6 +19,9 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
 
   /etc/libnl-3/classid r,
 
+  # for gl enabled graphics
+  /dev/dri/{,*} r,
+
   # for hostdev
   /sys/devices/ r,
   /sys/devices/** r,