libextractor (1771B)
1 # Last Modified: Wed Nov 11 2026 2 #include <tunables/global> 3 4 # vim:syntax=apparmor 5 6 7 profile libextractor { 8 #include <abstractions/base> 9 10 # libextractor kills the plugin process once it no longer needs it 11 signal (receive) set=(kill), 12 13 /dev/shm/LE-* r, 14 @{HOME}/.cache/gstreamer-1.0/registry.*.bin r, 15 @{HOME}/.cache/gstreamer-1.0/registry.*.bin.tmp* a, 16 owner @{PROC}/@{pid}/cmdline r, 17 owner @{PROC}/@{pid}/fd/ r, 18 /sys/devices/system/cpu/ r, 19 /usr/lib/gstreamer-1.0/gst-plugin-scanner rix, 20 /usr/lib/@{multiarch}/gstreamer-1.0/gst-plugin-scanner rix, 21 /usr/lib/@{multiarch}/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner rix, 22 /usr/libexec/gstreamer-1.0/gst-plugin-scanner rix, 23 # the GStreamer-based plugins (thumbnailgst, previewgst) load their 24 # decoders and encoders from here at run time 25 /usr/lib/gstreamer-1.0/*.so mr, 26 /usr/lib/@{multiarch}/gstreamer-1.0/*.so mr, 27 # GStreamer may not write its registry from here (other applications 28 # trust it), so it rescans its plugins in gst-plugin-scanner. That 29 # scan need not probe for devices, and orc falls back to C code 30 # without writing JIT code to files; deny both quietly. 31 deny @{HOME}/.cache/{,gstreamer-1.0/} w, 32 deny @{HOME}/orcexec.* w, 33 deny /tmp/orcexec.* w, 34 deny @{run}/user/*/orcexec.* w, 35 deny /dev/ r, 36 deny /sys/bus/ r, 37 deny /sys/class/ r, 38 deny network netlink raw, 39 # note that no network rule allows anything in this profile: the 40 # media plugins feed FFmpeg and GStreamer from a pipe and must never 41 # open a stream of their own 42 # (plugins installed below /usr/lib are covered by abstractions/base) 43 /usr/local/lib/libextractor/libextractor_*.so* mr, 44 /usr/local/lib/libextractor_common.so.* mr, 45 /etc/magic r, 46 /usr/share/file/misc/magic.mgc r, 47 48 }