()
| 31 | ) |
| 32 | |
| 33 | func 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 |
| 48 | func cleanupIptablesRules(containerID string, cniNames []string) error { |
no test coverage detected
searching dependent graphs…