mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 19:35:59 +00:00

lxc-copy can start container as lxc-start does in some cases, so we need to have the same profile for it. Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
19 lines
618 B
Bash
Executable File
19 lines
618 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/apparmor/profile-load ]; then
|
|
/lib/apparmor/profile-load usr.bin.lxc-copy
|
|
/lib/apparmor/profile-load usr.bin.lxc-start
|
|
/lib/apparmor/profile-load lxc-containers
|
|
elif [ -x /lib/init/apparmor-profile-load ]; then
|
|
/lib/init/apparmor-profile-load usr.bin.lxc-copy
|
|
/lib/init/apparmor-profile-load usr.bin.lxc-start
|
|
/lib/init/apparmor-profile-load lxc-containers
|
|
fi
|
|
fi
|