summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-06-25 17:53:49 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-25 18:00:28 +0200
commit6eefff6471bb1b02635291f4536f101ec1c42f6e (patch)
treea9ea44c3bc8f04e50188da0558215bfac6a2b756
parent0b9143df881f5de0f36f31bc2598e864fdeae7ed (diff)
downloadpodman-6eefff6471bb1b02635291f4536f101ec1c42f6e.tar.gz
podman-6eefff6471bb1b02635291f4536f101ec1c42f6e.tar.bz2
podman-6eefff6471bb1b02635291f4536f101ec1c42f6e.zip
vendor github.com/containers/common@v0.14.3
Includes several fixes for config parsing and AppArmor. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r--go.mod2
-rw-r--r--go.sum2
-rw-r--r--vendor/github.com/containers/common/pkg/apparmor/apparmor.go6
-rw-r--r--vendor/github.com/containers/common/pkg/apparmor/apparmor_linux.go9
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go6
-rw-r--r--vendor/github.com/containers/common/version/version.go4
-rw-r--r--vendor/modules.txt3
7 files changed, 21 insertions, 11 deletions
diff --git a/go.mod b/go.mod
index d02dfa0b4..64981efc1 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
github.com/containernetworking/cni v0.7.2-0.20200304161608-4fae32b84921
github.com/containernetworking/plugins v0.8.6
github.com/containers/buildah v1.15.0
- github.com/containers/common v0.14.0
+ github.com/containers/common v0.14.3
github.com/containers/conmon v2.0.18+incompatible
github.com/containers/image/v5 v5.5.1
github.com/containers/psgo v1.5.1
diff --git a/go.sum b/go.sum
index fdc506fac..e069825da 100644
--- a/go.sum
+++ b/go.sum
@@ -70,6 +70,8 @@ github.com/containers/buildah v1.15.0 h1:p9cYJwcQ5Fnv0iBeHAFwHR0K+kcv7LbyAjUtc+H
github.com/containers/buildah v1.15.0/go.mod h1:j0AY2kWpmaOPPV5GKDJY9dMtekk5WMmMhcB+z0OW+vc=
github.com/containers/common v0.14.0 h1:hiZFDPf6ajKiDmojN5f5X3gboKPO73NLrYb0RXfrQiA=
github.com/containers/common v0.14.0/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg=
+github.com/containers/common v0.14.3 h1:LNsRPkap5Q/EqPyhiLKRZg8u629U8CEeoB49ilG6ZR4=
+github.com/containers/common v0.14.3/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg=
github.com/containers/conmon v2.0.18+incompatible h1:rjwjNnE756NuXcdE/uUmj4kDbrykslPuBMHI31wh43E=
github.com/containers/conmon v2.0.18+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/image/v5 v5.4.4/go.mod h1:g7cxNXitiLi6pEr9/L9n/0wfazRuhDKXU15kV86N8h8=
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