Commit graph

11 commits

Author SHA1 Message Date
Alex Murray
3469c62b36
profiles/apparmor.d/rygel: enumerate specific bits for /sys and /dev
Instead of denying everything here, enumerate just the bits that are required
and also deny access to display devices since that is not actually needed by
rygel itself.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-12 13:05:52 +10:30
Alex Murray
472d002a96
profiles/apparmor.d/rygel: allow liborc bits for mx-extract child
mx-extract also uses these parts of gstreamer so allow it as well as for the
main rygel profile.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-12 13:05:06 +10:30
Alex Murray
459e5f9649
profiles/apparmor.d/rygel: allow to create gstreamer cache dir
It is possible this doesn't exist already so allow rygel to create it in that
case.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-12 13:04:33 +10:30
Alex Murray
00e4908d9f
profiles/apparmor.d/rygel: use fd.o abstraction for mx-extract child
This allows access to the freedesktop.org mime info amongst others which is
needed for rygel mx-extract to index files etc.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-10 12:03:14 +10:30
Alex Murray
62cdb6fd79
profiles/apparmor.d/rygel: add DBus rule for MountTracker
Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-10 12:03:00 +10:30
Alex Murray
6a23c26a12
profiles/apparmor.d/rygel: allow liborc temp files
Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-10 12:00:53 +10:30
Alex Murray
29e00fe11f
profiles/apparmor.d/rygel: silence unneeded /{dev,sys} accesses
Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-10 12:00:13 +10:30
Alex Murray
46d994ddcd
profiles/apparmor.d/rygel: allow specific access for /dev bits
It turns out we need to allow /dev/null for fd inheritance and /dev for reading
plus /dev/urandom, all of which are quite safe.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-12-09 13:29:34 +10:30
Alex Murray
df189243d1
profiles/apparmor.d/rygel: deny noise unneeded read of /sys
gst-plugin-scanner wants to try and scan hardware devices but since rygel itself
doesn't  actually use or need any access to such devices the access to these can
be denied and any log spam silenced via an explicit denial rule.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-08-23 19:45:30 +09:30
Alex Murray
37555e876c
profiles/apparmor.d/rygel: introduce rygel tunable
Allow more easy customisation of the paths allowed to rygel by introducing a
tunable which provides the @{rygel_media_dirs} variable and an example
site-local file to show how this can be easily extended. Essentially this
follows the same logic as the home tunable with @{HOME}.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-08-23 19:42:47 +09:30
Alex Murray
8ae0a531e2
profiles/apparmor.d: add rygel profile
Signed-off-by: Alex Murray <alex.murray@canonical.com>
2024-08-22 12:12:53 +09:30