mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-14 09:18:23 +00:00

On Ubuntu we need to set up the AppArmor profiles also under systemd. Add a new helper "lxc-apparmor-load" and integrate it into lxc.service. Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
15 lines
385 B
Bash
Executable File
15 lines
385 B
Bash
Executable File
#!/bin/sh
|
|
# lxc-apparmor-load: Load AppArmor profiles, if supported by the system
|
|
|
|
set -eu
|
|
|
|
# don't load profiles if mount mediation is not supported
|
|
SYSF=/sys/kernel/security/apparmor/features/mount/mask
|
|
if [ -f $SYSF ]; then
|
|
if [ -x /lib/init/apparmor-profile-load ]; then
|
|
/lib/init/apparmor-profile-load usr.bin.lxc-start
|
|
/lib/init/apparmor-profile-load lxc-containers
|
|
fi
|
|
fi
|
|
|