summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-11-25 16:43:53 +0100
committerPaul Holzinger <paul.holzinger@web.de>2020-11-26 12:55:33 +0100
commitf7f85fef7c7086a39e57eb36e875209bb9553f4e (patch)
tree0e47e8982f9113ca487d9a3aadf1d9f4f0d0dd88 /pkg/specgen
parentd4083954f26761b66f9165e40b08d1e6fe989c1c (diff)
downloadpodman-f7f85fef7c7086a39e57eb36e875209bb9553f4e.tar.gz
podman-f7f85fef7c7086a39e57eb36e875209bb9553f4e.tar.bz2
podman-f7f85fef7c7086a39e57eb36e875209bb9553f4e.zip
Do not validate the volume source path in specgen
The volume src path should not be validated in specgen since the remote client also uses that part and the path must only exists on the server. This now fails later and only on the server and not the client. I don't think I can add a test for this because the CI runs server and client always on the same vm. Fixes #8473 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/volumes.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/specgen/volumes.go b/pkg/specgen/volumes.go
index 1178f9960..41efee3b3 100644
--- a/pkg/specgen/volumes.go
+++ b/pkg/specgen/volumes.go
@@ -84,11 +84,10 @@ func GenVolumeMounts(volumeFlag []string) (map[string]spec.Mount, map[string]*Na
return nil, nil, nil, err
}
}
-
// Do not check source dir for anonymous volumes
if len(splitVol) > 1 {
- if err := parse.ValidateVolumeHostDir(src); err != nil {
- return nil, nil, nil, err
+ if len(src) == 0 {
+ return nil, nil, nil, errors.New("host directory cannot be empty")
}
}
if err := parse.ValidateVolumeCtrDir(dest); err != nil {