diff options
Diffstat (limited to 'vendor')
5 files changed, 18 insertions, 10 deletions
diff --git a/vendor/github.com/containers/common/pkg/apparmor/apparmor.go b/vendor/github.com/containers/common/pkg/apparmor/apparmor.go index 8b4207efc..8046f45f5 100644 --- a/vendor/github.com/containers/common/pkg/apparmor/apparmor.go +++ b/vendor/github.com/containers/common/pkg/apparmor/apparmor.go @@ -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 ( diff --git a/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go b/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go index f0fab4597..307249f3d 100644 --- a/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go +++ b/vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go @@ -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) diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go index ce479088e..d60464739 100644 --- a/vendor/github.com/containers/common/pkg/config/config.go +++ b/vendor/github.com/containers/common/pkg/config/config.go @@ -822,6 +822,7 @@ func stringsEq(a, b []string) bool { var ( configOnce sync.Once + configErr error config *Config ) @@ -837,11 +838,10 @@ var ( // The system defaults container config files can be overwritten using the // CONTAINERS_CONF environment variable. This is usually done for testing. func Default() (*Config, error) { - var err error configOnce.Do(func() { - config, err = NewConfig("") + config, configErr = NewConfig("") }) - return config, err + return config, configErr } func Path() string { diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go new file mode 100644 index 000000000..38a45dfb2 --- /dev/null +++ b/vendor/github.com/containers/common/version/version.go @@ -0,0 +1,4 @@ +package version + +// Version is the version of the build. +const Version = "0.14.3" diff --git a/vendor/modules.txt b/vendor/modules.txt index 882ea5d25..497381b52 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -84,13 +84,14 @@ github.com/containers/buildah/pkg/secrets github.com/containers/buildah/pkg/supplemented github.com/containers/buildah/pkg/umask github.com/containers/buildah/util -# github.com/containers/common v0.14.0 +# github.com/containers/common v0.14.3 github.com/containers/common/pkg/apparmor github.com/containers/common/pkg/auth github.com/containers/common/pkg/capabilities github.com/containers/common/pkg/cgroupv2 github.com/containers/common/pkg/config github.com/containers/common/pkg/sysinfo +github.com/containers/common/version # github.com/containers/conmon v2.0.18+incompatible github.com/containers/conmon/runner/config # github.com/containers/image/v5 v5.5.1 |