apparmor.service 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. [Unit]
  2. Description=Load AppArmor profiles
  3. DefaultDependencies=no
  4. Before=sysinit.target
  5. After=local-fs.target
  6. After=systemd-journald-audit.socket
  7. RequiresMountsFor=/var/cache/apparmor
  8. AssertPathIsReadWrite=/sys/kernel/security/apparmor/.load
  9. ConditionSecurity=apparmor
  10. Documentation=man:apparmor(7)
  11. Documentation=https://gitlab.com/apparmor/apparmor/wikis/home/
  12. # Don't start this unit on the Ubuntu Live CD
  13. ConditionPathExists=!/rofs/etc/apparmor.d
  14. # Don't start this unit on the Debian Live CD when using overlayfs
  15. ConditionPathExists=!/run/live/overlay/work
  16. [Service]
  17. Type=oneshot
  18. ExecStart=/lib/apparmor/apparmor.systemd reload
  19. ExecReload=/lib/apparmor/apparmor.systemd reload
  20. # systemd maps 'restart' to 'stop; start' which means removing AppArmor confinement
  21. # from running processes (and not being able to re-apply it later).
  22. # Upstream systemd developers refused to implement an option that allows overriding
  23. # this behaviour, therefore we have to make ExecStop a no-op to error out on the
  24. # safe side.
  25. #
  26. # If you really want to unload all AppArmor profiles, run aa-teardown
  27. ExecStop=/bin/true
  28. RemainAfterExit=yes
  29. [Install]
  30. WantedBy=sysinit.target