mirror of
https://github.com/containers/podman.git
synced 2025-11-16 11:07:44 +08:00
vendor github.com/containers/common@v0.14.3
Includes several fixes for config parsing and AppArmor. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/common/pkg/apparmor/apparmor.go
generated
vendored
6
vendor/github.com/containers/common/pkg/apparmor/apparmor.go
generated
vendored
@@ -2,14 +2,16 @@ package apparmor
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/containers/common/version"
|
||||
)
|
||||
|
||||
const (
|
||||
// ProfilePrefix is used for version-independent presence checks.
|
||||
ProfilePrefix = "apparmor_profile"
|
||||
ProfilePrefix = "containers-default-"
|
||||
|
||||
// Profile default name
|
||||
Profile = "container-default"
|
||||
Profile = ProfilePrefix + version.Version
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
9
vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go
generated
vendored
9
vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go
generated
vendored
@@ -255,9 +255,11 @@ func CheckProfileAndLoadDefault(name string) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// If the specified name is not empty or is not a default libpod one,
|
||||
// ignore it and return the name.
|
||||
if name != "" && !strings.HasPrefix(name, ProfilePrefix) {
|
||||
if name == "" {
|
||||
name = Profile
|
||||
} else if !strings.HasPrefix(name, ProfilePrefix) {
|
||||
// If the specified name is not a default one, ignore it and return the
|
||||
// name.
|
||||
isLoaded, err := IsLoaded(name)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -268,7 +270,6 @@ func CheckProfileAndLoadDefault(name string) (string, error) {
|
||||
return name, nil
|
||||
}
|
||||
|
||||
name = Profile
|
||||
// To avoid expensive redundant loads on each invocation, check
|
||||
// if it's loaded before installing it.
|
||||
isLoaded, err := IsLoaded(name)
|
||||
|
||||
Reference in New Issue
Block a user