summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-02-21 09:42:22 -0500
committerMatthew Heon <matthew.heon@pm.me>2019-02-26 09:37:00 -0500
commitd41d8d090e330fe2f0a3c75d24c409d9c345f841 (patch)
treeaf3c98f4ff6b6874202990e13131a4dbc9566950 /libpod/runtime.go
parentda70c9db6fb92c69d722d51873840c4e54dbe86d (diff)
downloadpodman-d41d8d090e330fe2f0a3c75d24c409d9c345f841.tar.gz
podman-d41d8d090e330fe2f0a3c75d24c409d9c345f841.tar.bz2
podman-d41d8d090e330fe2f0a3c75d24c409d9c345f841.zip
Validate VolumePath against DB configuration
If this doesn't match, we end up not being able to access named volumes mounted into containers, which is bad. Use the same validation that we use for other critical paths to ensure this one also matches. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 762cea32f..6e250b7a0 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -235,6 +235,7 @@ type runtimeConfiguredFrom struct {
storageRunRootSet bool
libpodStaticDirSet bool
libpodTmpDirSet bool
+ volPathSet bool
}
var (
@@ -645,12 +646,16 @@ func makeRuntime(runtime *Runtime) (err error) {
if !runtime.configuredFrom.libpodTmpDirSet && dbConfig.LibpodTmp != "" {
runtime.config.TmpDir = dbConfig.LibpodTmp
}
+ if !runtime.configuredFrom.volPathSet && dbConfig.VolumePath != "" {
+ runtime.config.VolumePath = dbConfig.VolumePath
+ }
logrus.Debugf("Using graph driver %s", runtime.config.StorageConfig.GraphDriverName)
logrus.Debugf("Using graph root %s", runtime.config.StorageConfig.GraphRoot)
logrus.Debugf("Using run root %s", runtime.config.StorageConfig.RunRoot)
logrus.Debugf("Using static dir %s", runtime.config.StaticDir)
logrus.Debugf("Using tmp dir %s", runtime.config.TmpDir)
+ logrus.Debugf("Using volume path %s", runtime.config.VolumePath)
// Validate our config against the database, now that we've set our
// final storage configuration