From d55b94642cf8a11bddf62f2b24796677bb03ff3f Mon Sep 17 00:00:00 2001 From: Vincas Dargis Date: Sat, 23 Jun 2018 17:07:05 +0300 Subject: [PATCH] Add mesa abstraction Add mesa abstraction to allow writing to the Mesa-specific cache locations and listing devices. Abstraction is needed for applications utilizing OpenGL API with Mesa implementation available on the system. --- profiles/apparmor.d/abstractions/mesa | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 profiles/apparmor.d/abstractions/mesa diff --git a/profiles/apparmor.d/abstractions/mesa b/profiles/apparmor.d/abstractions/mesa new file mode 100644 index 000000000..7d4eea995 --- /dev/null +++ b/profiles/apparmor.d/abstractions/mesa @@ -0,0 +1,13 @@ +# vim:syntax=apparmor +# Rules for Mesa implementation of the OpenGL API + + # System files + /dev/dri/ r, # libGLX_mesa.so calls drmGetDevice2() + + # User files + owner @{HOME}/.cache/ w, # if user clears all caches + owner @{HOME}/.cache/mesa_shader_cache/ w, + owner @{HOME}/.cache/mesa_shader_cache/index rw, + owner @{HOME}/.cache/mesa_shader_cache/??/ w, + owner @{HOME}/.cache/mesa_shader_cache/??/* rw, +