Commit graph

3 commits

Author SHA1 Message Date
Christian Boltz
5d9d4483fb
Add Documentation=... to apparmor.service
This is taken from Debian's apparmor.service, and is the first (and
easiest) step to get the upstream and Debian file closer.
2023-10-29 10:49:33 +01:00
Christian Boltz
3a9b0fd74a
Adjust cache paths in apparmor.service
The initial apparmor.service assumed the profile cache is in
/var/lib/apparmor/ which was an openSUSE-specific path that was chosen
for historical reasons, but was far from perfect.

In the meantime, the profile cache moved to /var/cache/apparmor/ and the
read-only/packaged version was added in /usr/share/apparmor/cache/

This commit adjusts apparmor.service to use these paths.
2018-06-16 23:14:19 +02:00
Christian Boltz
671ddccf19 Add apparmor.service and aa-teardown
... and the apparmor.systemd wrapper.

Also add a new 'install-systemd' target to the Makefile to install these
systemd-related files on (open)SUSE by default. Other distributions can
follow by adding a dependency on 'install-systemd' on their
'install-$DISTRO' target.

Note that apparmor.service has ExecStop=/bin/true to avoid that running
processes get unconfined if someone accidently types
    systemctl restart apparmor   (instead of using "reload")

Use aa-teardown if you really want to unload all profiles.

The files in this commit are used in openSUSE since a while, and also in
Arch Linux.

BTW: The condition on var-lib.mount is because openSUSE uses
/var/lib/apparmor/cache/ - but with the changed btrfs layout on
openSUSE, maybe I'll change that to /var/cache/apparmor/ which is
a) used by Debian and b) more sane
2018-03-24 19:28:24 +00:00