diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-02-21 09:42:22 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-02-26 09:37:00 -0500 |
commit | d41d8d090e330fe2f0a3c75d24c409d9c345f841 (patch) | |
tree | af3c98f4ff6b6874202990e13131a4dbc9566950 /libpod/options.go | |
parent | da70c9db6fb92c69d722d51873840c4e54dbe86d (diff) | |
download | podman-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/options.go')
-rw-r--r-- | libpod/options.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 675ebffda..184d5d59f 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -50,6 +50,7 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption { // Also set libpod volume path, so we are a subdirectory // of the c/storage store by default rt.config.VolumePath = filepath.Join(config.GraphRoot, "volumes") + rt.configuredFrom.volPathSet = true setField = true } @@ -363,6 +364,7 @@ func WithVolumePath(volPath string) RuntimeOption { } rt.config.VolumePath = volPath + rt.configuredFrom.volPathSet = true return nil } |