apparmor.d/apparmor.d/groups/_full/systemd-service

73 lines
1.6 KiB
Text
Raw Normal View History

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
2024-03-10 15:49:31 +01:00
# Profile for generic systemd unit services. Only used by tiny systemd services
# that start a shell or use context specific programs.
2024-02-01 19:33:19 +01:00
# It does not specify an attachment path because it is intended to be used only
# via "Px -> systemd-service" exec transitions from the systemd profile.
abi <abi/4.0>,
include <tunables/global>
profile systemd-service flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
capability chown,
capability fsetid,
2024-02-11 13:44:40 +01:00
@{bin}/ldconfig rix,
@{bin}/savelog rix,
@{bin}/systemctl rix,
@{bin}/gzip rix,
2024-01-25 23:46:22 +01:00
@{coreutils_path} rix,
2024-02-23 21:21:22 +01:00
@{sh_path} rmix,
2024-02-11 13:44:40 +01:00
2024-03-20 01:04:39 +01:00
# ifup@.service
@{bin}/ifup rPx,
2024-02-11 13:44:40 +01:00
# shadow.service
@{bin}/pwck rPx,
@{bin}/grpck rPx,
@{bin}/grub-editenv rPx,
@{bin}/ibus-daemon rPx,
2024-03-10 22:17:50 +01:00
@{bin}/* r,
@{lib}/ r,
2024-02-01 19:33:19 +01:00
/var/cache/ldconfig/{,**} rw,
/boot/grub/grubenv rw,
/boot/grub/ w,
2024-01-25 23:46:22 +01:00
/var/log/ r,
/var/log/dmesg rw,
/var/log/dmesg.* rwl -> /var/log/dmesg,
# man-db.service
/usr/{,local/}share/man/{,**} r,
2024-03-10 22:17:50 +01:00
/etc/manpath.config r,
/var/cache/man/{,**} rwk,
# snapd.system-shutdown.service
@{run}/initramfs/shutdown rw,
@{run}/initramfs/ rw,
# cockpit.socket
@{run}/cockpit/@{rand8} rw,
@{run}/cockpit/motd w,
@{PROC}/cmdline r,
@{PROC}/sys/kernel/osrelease r,
2024-02-01 19:33:19 +01:00
include if exists <usr/systemd-service.d>
include if exists <local/systemd-service>
}
# vim:syntax=apparmor