mirror of
https://github.com/opencontainers/runc.git
synced 2026-11-06 05:17:05 +00:00
AppArmor returns ENOENT from the write to attr/apparmor/exec when it does not know the profile we asked for. runc passed that through as-is, producing unable to apply apparmor profile: apparmor failed to apply profile: write /proc/thread-self/attr/apparmor/exec: no such file or directory which reads like a problem with the procfs file we have just written to. Name the profile and say what the kernel means: unable to apply apparmor profile "crio-default": profile not loaded While at it, move the error wrapping from linuxStandardInit.Init to applyProfile for more uniform and clear errors. Add an integration test, along with a way to skip it where AppArmor is not available. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>