diff --git a/apparmor.d/groups/service/dmesg.service b/apparmor.d/groups/service/dmesg.service new file mode 100644 index 00000000..cc12313d --- /dev/null +++ b/apparmor.d/groups/service/dmesg.service @@ -0,0 +1,33 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# 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 , + +include + +profile dmesg.service { + include + + @{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 + include if exists +} \ No newline at end of file diff --git a/apparmor.d/groups/service/ldconfig.service b/apparmor.d/groups/service/ldconfig.service new file mode 100644 index 00000000..736b7ae7 --- /dev/null +++ b/apparmor.d/groups/service/ldconfig.service @@ -0,0 +1,22 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# 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 , + +include + +profile ldconfig.service { + include + + @{bin}/ldconfig mr, + @{lib}/ r, + + /var/cache/ldconfig/{,**} rw, + + include if exists + include if exists +} \ No newline at end of file