diff --git a/profiles/apparmor.d/abstractions/X b/profiles/apparmor.d/abstractions/X index ced3c6ba9..06408d374 100644 --- a/profiles/apparmor.d/abstractions/X +++ b/profiles/apparmor.d/abstractions/X @@ -10,6 +10,7 @@ # # ------------------------------------------------------------------ + #include # .ICEauthority files required for X authentication, per user @@ -45,14 +46,6 @@ # EGL /usr/lib/@{multiarch}/egl/*.so* mr, - # DRI - /usr/lib{,32,64}/dri/** mr, - /usr/lib/@{multiarch}/dri/** mr, - /usr/lib/fglrx/dri/** mr, - /dev/dri/** rw, - /etc/drirc r, - owner @{HOME}/.drirc r, - # Xcompose owner @{HOME}/.XCompose r, diff --git a/profiles/apparmor.d/abstractions/dri-common b/profiles/apparmor.d/abstractions/dri-common new file mode 100644 index 000000000..d6337727d --- /dev/null +++ b/profiles/apparmor.d/abstractions/dri-common @@ -0,0 +1,12 @@ +# vim:syntax=apparmor + +# This file contains common DRI-specific rules useful for GUI applications +# (needed by libdrm and similar). + + /usr/lib{,32,64}/dri/** mr, + /usr/lib/@{multiarch}/dri/** mr, + /usr/lib/fglrx/dri/** mr, + /dev/dri/** rw, + /etc/drirc r, + owner @{HOME}/.drirc r, + diff --git a/profiles/apparmor.d/abstractions/dri-enumerate b/profiles/apparmor.d/abstractions/dri-enumerate new file mode 100644 index 000000000..1162a08e2 --- /dev/null +++ b/profiles/apparmor.d/abstractions/dri-enumerate @@ -0,0 +1,9 @@ +# vim:syntax=apparmor + +# This file contains common DRI-specific rules useful for GUI applications that +# needs to enumerate graphic devices (as with drmParsePciDeviceInfo() from +# libdrm). + + # TODO: use @{sys} after it's moved into tunables/kernelvars (LP: #1728551) + /sys/devices/pci[0-9]*/**/{device,subsystem_device,subsystem_vendor,uevent,vendor} r, +