summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-07-22 09:19:21 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-22 05:29:34 -0400
commitca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9 (patch)
tree689cb7dc9ef2371c3abe7d8ed0c96b95be4797d7 /vendor
parent344a791ac2019b078dd334ef0a492ee37fe0a937 (diff)
downloadpodman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.tar.gz
podman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.tar.bz2
podman-ca049ef6f9fb540369a5d6ef470c3b2bb4f7b7a9.zip
Bump github.com/containers/common from 0.16.0 to 0.17.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.16.0 to 0.17.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.16.0...v0.17.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go24
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go9
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
4 files changed, 26 insertions, 11 deletions
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index b3278bb28..80c478505 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -622,9 +622,17 @@ func (c *ContainersConfig) Validate() error {
// execution checks. It returns an `error` on validation failure, otherwise
// `nil`.
func (c *NetworkConfig) Validate() error {
- if c.NetworkConfigDir != _cniConfigDir {
- err := isDirectory(c.NetworkConfigDir)
+ expectedConfigDir := _cniConfigDir
+ if unshare.IsRootless() {
+ home, err := unshare.HomeDir()
if err != nil {
+ return err
+ }
+ expectedConfigDir = filepath.Join(home, _cniConfigDirRootless)
+ }
+ if c.NetworkConfigDir != expectedConfigDir {
+ err := isDirectory(c.NetworkConfigDir)
+ if err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "invalid network_config_dir: %s", c.NetworkConfigDir)
}
}
@@ -874,6 +882,10 @@ func Default() (*Config, error) {
if config != nil || configErr != nil {
return config, configErr
}
+ return defConfig()
+}
+
+func defConfig() (*Config, error) {
config, configErr = NewConfig("")
return config, configErr
}
@@ -969,13 +981,11 @@ func (c *Config) Write() error {
// the cached containers.conf files.
func Reload() (*Config, error) {
configMutex.Lock()
- configErr = nil
- config = nil
- configMutex.Unlock()
- return Default()
+ defer configMutex.Unlock()
+ return defConfig()
}
-func (c *Config) ActiveDestination() (string, string, error){
+func (c *Config) ActiveDestination() (string, string, error) {
if uri, found := os.LookupEnv("CONTAINER_HOST"); found {
var ident string
if v, found := os.LookupEnv("CONTAINER_SSHKEY"); found {
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index 12cf1b421..57b703f53 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -92,8 +92,10 @@ const (
// InstallPrefix is the prefix where podman will be installed.
// It can be overridden at build time.
_installPrefix = "/usr"
- // _cniConfigDir is the directory where cni plugins are found
+ // _cniConfigDir is the directory where cni configuration is found
_cniConfigDir = "/etc/cni/net.d/"
+ // _cniConfigDirRootless is the directory where cni plugins are found
+ _cniConfigDirRootless = ".config/cni/net.d/"
// CgroupfsCgroupsManager represents cgroupfs native cgroup manager
CgroupfsCgroupsManager = "cgroupfs"
// DefaultApparmorProfile specifies the default apparmor profile for the container.
@@ -138,6 +140,8 @@ func DefaultConfig() (*Config, error) {
netns := "bridge"
+ cniConfig := _cniConfigDir
+
defaultEngineConfig.SignaturePolicyPath = DefaultSignaturePolicyPath
if unshare.IsRootless() {
home, err := unshare.HomeDir()
@@ -152,6 +156,7 @@ func DefaultConfig() (*Config, error) {
}
}
netns = "slirp4netns"
+ cniConfig = filepath.Join(home, _cniConfigDirRootless)
}
cgroupNS := "host"
@@ -198,7 +203,7 @@ func DefaultConfig() (*Config, error) {
},
Network: NetworkConfig{
DefaultNetwork: "podman",
- NetworkConfigDir: _cniConfigDir,
+ NetworkConfigDir: cniConfig,
CNIPluginDirs: cniBinDir,
},
Engine: *defaultEngineConfig,
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index b75bbe971..2913fe974 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.16.0"
+const Version = "0.17.0"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 913cb71eb..85d02ddd2 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -84,7 +84,7 @@ 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.16.0
+# github.com/containers/common v0.17.0
github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/auth
github.com/containers/common/pkg/capabilities