]> xenbits.xensource.com Git - libvirt.git/commit
virt-aa-helper: generate rules for gl enabled graphics devices
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 14 Jan 2019 13:15:06 +0000 (15:15 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 23 Jan 2019 06:54:58 +0000 (07:54 +0100)
commitfb01e1a44daea773cd53f275cad6f031506c20db
tree6b28e18a0b02426c13b79c1a9c738fdfde0807ce
parent4fb769f5e02833ecf6ad495af3f3c705364e2d2c
virt-aa-helper: generate rules for gl enabled graphics devices

This adds the virt-aa-helper support for gl enabled graphics devices to
generate rules for the needed rendernode paths.

Example in domain xml:
<graphics type='spice'>
  <gl enable='yes' rendernode='/dev/dri/bar'/>
</graphics>

results in:
  "/dev/dri/bar" rw,

Special cases are:
- multiple devices with rendernodes -> all are added
- non explicit rendernodes -> follow recently added virHostGetDRMRenderNode
- rendernode without opengl (in egl-headless for example) -> still add
  the node

Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/virt-aa-helper.c
tests/virt-aa-helper-test