mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-31 07:17:22 +01:00
feat(fsp): update systemd related profiles.
This commit is contained in:
parent
e02bf03cca
commit
a334b461d0
3 changed files with 21 additions and 9 deletions
|
@ -18,6 +18,7 @@ include <tunables/global>
|
||||||
profile systemd flags=(attach_disconnected,mediate_deleted) {
|
profile systemd flags=(attach_disconnected,mediate_deleted) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/authentication>
|
include <abstractions/authentication>
|
||||||
|
include <abstractions/bus-system>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/wutmp>
|
include <abstractions/wutmp>
|
||||||
|
|
||||||
|
@ -46,15 +47,14 @@ profile systemd flags=(attach_disconnected,mediate_deleted) {
|
||||||
capability sys_tty_config,
|
capability sys_tty_config,
|
||||||
|
|
||||||
network inet dgram,
|
network inet dgram,
|
||||||
network inet raw,
|
|
||||||
network inet stream,
|
network inet stream,
|
||||||
network inet6 dgram,
|
network inet6 dgram,
|
||||||
network inet6 raw,
|
|
||||||
network inet6 stream,
|
network inet6 stream,
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
mount -> @{run}/systemd/incoming/,
|
mount -> @{run}/systemd/incoming/,
|
||||||
mount -> @{run}/systemd/mount-rootfs/{,**},
|
mount -> @{run}/systemd/mount-rootfs/{,**},
|
||||||
|
mount -> @{run}/systemd/unit-root/{,**},
|
||||||
mount -> @{sys}/fs/fuse/connections/,
|
mount -> @{sys}/fs/fuse/connections/,
|
||||||
mount -> @{sys}/kernel/config/,
|
mount -> @{sys}/kernel/config/,
|
||||||
mount -> @{sys}/kernel/debug/,
|
mount -> @{sys}/kernel/debug/,
|
||||||
|
@ -75,6 +75,7 @@ profile systemd flags=(attach_disconnected,mediate_deleted) {
|
||||||
mount fstype=sysfs sysfs -> @{run}/systemd/namespace-@{rand6}/,
|
mount fstype=sysfs sysfs -> @{run}/systemd/namespace-@{rand6}/,
|
||||||
mount fstype=tmpfs tmpfs -> @{run}/systemd/namespace-@{rand6}/dev/,
|
mount fstype=tmpfs tmpfs -> @{run}/systemd/namespace-@{rand6}/dev/,
|
||||||
mount fstype=tmpfs tmpfs -> /dev/shm/,
|
mount fstype=tmpfs tmpfs -> /dev/shm/,
|
||||||
|
mount fstype=ramfs ramfs -> /dev/shm/,
|
||||||
|
|
||||||
umount /,
|
umount /,
|
||||||
umount /dev/shm/,
|
umount /dev/shm/,
|
||||||
|
@ -94,7 +95,6 @@ profile systemd flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
|
||||||
unix (send) type=dgram,
|
unix (send) type=dgram,
|
||||||
|
|
||||||
dbus, # TODO: WIP
|
|
||||||
# dbus: own bus=system name=org.freedesktop.systemd1
|
# dbus: own bus=system name=org.freedesktop.systemd1
|
||||||
|
|
||||||
@{bin}/systemctl rix,
|
@{bin}/systemctl rix,
|
||||||
|
@ -134,15 +134,11 @@ profile systemd flags=(attach_disconnected,mediate_deleted) {
|
||||||
/etc/conf.d/{,**} r,
|
/etc/conf.d/{,**} r,
|
||||||
/etc/credstore.encrypted/{,**} r,
|
/etc/credstore.encrypted/{,**} r,
|
||||||
/etc/credstore/{,**} r,
|
/etc/credstore/{,**} r,
|
||||||
/etc/default/** r,
|
|
||||||
/etc/environment r,
|
/etc/environment r,
|
||||||
/etc/environment.d/{,**} r,
|
/etc/environment.d/{,**} r,
|
||||||
/etc/locale.conf r,
|
|
||||||
/etc/machine-id r,
|
/etc/machine-id r,
|
||||||
/etc/modules-load.d/ r,
|
/etc/modules-load.d/{,**} r,
|
||||||
/etc/networkd-dispatcher/{,**} r,
|
|
||||||
/etc/systemd/{,**} r,
|
/etc/systemd/{,**} r,
|
||||||
/etc/udev/hwdb.d/{,*} r,
|
|
||||||
|
|
||||||
/var/lib/systemd/{,**} rw,
|
/var/lib/systemd/{,**} rw,
|
||||||
owner /var/tmp/systemd-private-*/{,**} rw,
|
owner /var/tmp/systemd-private-*/{,**} rw,
|
||||||
|
|
|
@ -13,10 +13,15 @@ include <tunables/global>
|
||||||
profile systemd-service @{exec_path} flags=(attach_disconnected) {
|
profile systemd-service @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/consoles>
|
include <abstractions/consoles>
|
||||||
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
|
capability chown,
|
||||||
|
capability fsetid,
|
||||||
|
|
||||||
@{bin}/ldconfig rix,
|
@{bin}/ldconfig rix,
|
||||||
@{bin}/savelog rix,
|
@{bin}/savelog rix,
|
||||||
@{bin}/systemctl rix,
|
@{bin}/systemctl rix,
|
||||||
|
@{bin}/gzip rix,
|
||||||
@{coreutils_path} rix,
|
@{coreutils_path} rix,
|
||||||
@{shells_path} rmix,
|
@{shells_path} rmix,
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@ include <tunables/global>
|
||||||
profile systemd-user flags=(attach_disconnected,mediate_deleted) {
|
profile systemd-user flags=(attach_disconnected,mediate_deleted) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/audio>
|
include <abstractions/audio>
|
||||||
|
include <abstractions/bus-session>
|
||||||
|
include <abstractions/bus-system>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
include <abstractions/video>
|
include <abstractions/video>
|
||||||
|
|
||||||
|
@ -29,6 +31,13 @@ profile systemd-user flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
|
||||||
ptrace (read),
|
ptrace (read),
|
||||||
|
|
||||||
|
# dbus: own bus=session name=org.freedesktop.systemd1
|
||||||
|
|
||||||
|
dbus receive bus=session
|
||||||
|
interface=org.freedesktop.DBus.Introspectable
|
||||||
|
member=Introspect
|
||||||
|
peer=(name=:*, label=gnome-shell),
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
@{bin}/dbus-broker-launch rix, # To avoid issue as in #74, #80 & #235
|
@{bin}/dbus-broker-launch rix, # To avoid issue as in #74, #80 & #235
|
||||||
|
@ -62,10 +71,12 @@ profile systemd-user flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
|
||||||
/ r,
|
/ r,
|
||||||
|
|
||||||
|
/var/lib/gdm{3,}/.config/pulse/{,**} rw,
|
||||||
/var/lib/gdm{3,}/.local/state/wireplumber/{,**} rw,
|
/var/lib/gdm{3,}/.local/state/wireplumber/{,**} rw,
|
||||||
|
|
||||||
owner @{HOME}/.local/ w,
|
owner @{HOME}/.local/ w,
|
||||||
|
|
||||||
|
owner @{user_config_dirs}/pulse/{,**} rw,
|
||||||
owner @{user_config_dirs}/systemd/user/{,**} r,
|
owner @{user_config_dirs}/systemd/user/{,**} r,
|
||||||
|
|
||||||
owner @{user_state_dirs}/ w,
|
owner @{user_state_dirs}/ w,
|
||||||
|
|
Loading…
Reference in a new issue