2022-11-30 23:09:26 +01:00
|
|
|
#include <tunables/global>
|
|
|
|
|
|
|
|
profile gotosocial flags=(attach_disconnected, mediate_deleted) {
|
2024-02-24 09:44:53 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/dbus-session-strict>
|
|
|
|
include <abstractions/gio-open>
|
|
|
|
include <abstractions/nameservice>
|
|
|
|
include <abstractions/user-tmp>
|
2022-11-30 23:09:26 +01:00
|
|
|
|
|
|
|
/gotosocial/gotosocial mrix,
|
|
|
|
/usr/local/bin/gotosocial mrix,
|
2024-02-24 09:44:53 +01:00
|
|
|
/usr/bin/gotosocial mrix,
|
|
|
|
/usr/sbin/gotosocial mrix,
|
2022-11-30 23:09:26 +01:00
|
|
|
|
|
|
|
owner /gotosocial/{,**} r,
|
2023-06-04 18:55:57 +02:00
|
|
|
owner /gotosocial/db/* wk,
|
2022-11-30 23:09:26 +01:00
|
|
|
owner /gotosocial/storage/** wk,
|
|
|
|
|
|
|
|
# Allow GoToSocial to write logs
|
|
|
|
# NOTE: you only need to allow write permissions to /var/log/syslog if you've
|
2024-02-24 09:44:53 +01:00
|
|
|
# enabled logging to syslog.
|
|
|
|
# owner /var/log/syslog w,
|
2022-11-30 23:09:26 +01:00
|
|
|
|
|
|
|
# These directories are not currently used by any of the recommended
|
|
|
|
# GoToSocial installation methods, but they may be used in the future and/or
|
|
|
|
# for custom installations.
|
|
|
|
owner /etc/gotosocial/{,**} r,
|
|
|
|
owner /usr/local/etc/gotosocial/{,**} r,
|
2024-02-24 09:44:53 +01:00
|
|
|
owner /usr/share/gotosocial/{,**} r,
|
2022-11-30 23:09:26 +01:00
|
|
|
owner /usr/local/share/gotosocial/{,**} r,
|
2024-02-24 09:44:53 +01:00
|
|
|
owner /usr/lib/gotosocial/{,**} r,
|
|
|
|
owner /usr/lib/gotosocial/db/* wk,
|
|
|
|
owner /usr/lib/gotosocial/storage/** wk,
|
|
|
|
owner /usr/local/lib/gotosocial/{,**} r,
|
|
|
|
owner /usr/local/lib/gotosocial/db/* wk,
|
|
|
|
owner /usr/local/lib/gotosocial/storage/** wk,
|
2022-11-30 23:09:26 +01:00
|
|
|
owner /var/lib/gotosocial/{,**} r,
|
2024-02-24 09:44:53 +01:00
|
|
|
owner /var/lib/gotosocial/db/* wk,
|
|
|
|
owner /var/lib/gotosocial/storage/** wk,
|
2022-11-30 23:09:26 +01:00
|
|
|
owner /opt/gotosocial/{,**} r,
|
|
|
|
owner /run/gotosocial/{,**} r,
|
|
|
|
|
2024-02-24 09:44:53 +01:00
|
|
|
/etc/mime.types r,
|
|
|
|
/etc/services r,
|
2022-11-30 23:09:26 +01:00
|
|
|
/proc/sys/net/core/somaxconn r,
|
2024-02-24 09:44:53 +01:00
|
|
|
/sys/fs/cgroup/system.slice/gotosocial.service/{,*} r,
|
2022-11-30 23:09:26 +01:00
|
|
|
/sys/kernel/mm/transparent_hugepage/hpage_pmd_size r,
|
2024-02-24 09:44:53 +01:00
|
|
|
owner /proc/*/cgroup r,
|
|
|
|
owner /proc/*/cpuset r,
|
|
|
|
owner /proc/*/mountinfo r,
|
2022-11-30 23:09:26 +01:00
|
|
|
|
|
|
|
# TCP / UDP network access
|
|
|
|
network inet stream,
|
|
|
|
network inet6 stream,
|
|
|
|
network inet dgram,
|
|
|
|
network inet6 dgram,
|
|
|
|
|
|
|
|
# Allow GoToSocial to receive signals from unconfined processes
|
|
|
|
signal (receive) peer=unconfined,
|
2024-02-24 09:44:53 +01:00
|
|
|
# Allow GoToSocial to send signals to/receive signals from worker processes
|
2022-11-30 23:09:26 +01:00
|
|
|
signal (send,receive) peer=gotosocial,
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim:syntax=apparmor
|