vendor c/common@main

In hope to fix a CI flake.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-05-10 13:56:10 +02:00
parent f65e13eb7a
commit ecf0177a01
33 changed files with 127 additions and 70 deletions

View File

@@ -251,19 +251,17 @@ func CheckProfileAndLoadDefault(name string) (string, error) {
if unshare.IsRootless() {
if name != "" {
return "", errors.Wrapf(ErrApparmorRootless, "cannot load AppArmor profile %q", name)
} else {
logrus.Debug("Skipping loading default AppArmor profile (rootless mode)")
return "", nil
}
logrus.Debug("Skipping loading default AppArmor profile (rootless mode)")
return "", nil
}
// Check if AppArmor is disabled and error out if a profile is to be set.
if !runcaa.IsEnabled() {
if name == "" {
return "", nil
} else {
return "", errors.Errorf("profile %q specified but AppArmor is disabled on the host", name)
}
return "", errors.Errorf("profile %q specified but AppArmor is disabled on the host", name)
}
if name == "" {