MCPcopy Create free account
hub / github.com/containerd/nerdctl / loadAppArmor

Function loadAppArmor

pkg/ocihook/ocihook_linux.go:33–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31)
32
33func loadAppArmor() {
34 if !apparmorutil.CanLoadNewProfile() {
35 return
36 }
37 // ensure that the default profile is loaded to the host
38 if err := apparmor.LoadDefaultProfile(defaults.AppArmorProfileName); err != nil {
39 log.L.WithError(err).Errorf("failed to load AppArmor profile %q", defaults.AppArmorProfileName)
40 // We do not abort here. This is by design, and not a security issue.
41 //
42 // If the container is configured to use the default AppArmor profile
43 // but the profile was not actually loaded, runc will fail.
44 }
45}
46
47// cleanupIptablesRules cleans up iptables rules related to the container
48func cleanupIptablesRules(containerID string, cniNames []string) error {

Callers 1

onCreateRuntimeFunction · 0.70

Calls 1

CanLoadNewProfileFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…