feat(full): add some services profile.

This commit is contained in:
Alexandre Pujol 2023-11-19 21:39:36 +00:00
parent dd767f13c0
commit 07e7810d15
Failed to generate hash of commit
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# Profile for a systemd service, it does not specify an attachment path because
# it is intended to be used only via "Px -> *.service" exec transitions from systemd
abi <abi/3.0>,
include <tunables/global>
profile dmesg.service {
include <abstractions/base>
@{bin}/savelog mr,
@{bin}/basename rix,
@{bin}/chmod rix,
@{bin}/date rix,
@{bin}/dirname rix,
@{bin}/gzip rix,
@{bin}/ln rix,
@{bin}/mv rix,
@{bin}/rm rix,
@{bin}/touch rix,
/var/log/ r,
/var/log/dmesg rw,
/var/log/dmesg.* rwl -> /var/log/dmesg,
include if exists <usr/dmesg.service.d>
include if exists <local/dmesg.service>
}

View file

@ -0,0 +1,22 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# Profile for a systemd service, it does not specify an attachment path because
# it is intended to be used only via "Px -> *.service" exec transitions from systemd
abi <abi/3.0>,
include <tunables/global>
profile ldconfig.service {
include <abstractions/base>
@{bin}/ldconfig mr,
@{lib}/ r,
/var/cache/ldconfig/{,**} rw,
include if exists <usr/ldconfig.service.d>
include if exists <local/ldconfig.service>
}