summaryrefslogtreecommitdiff
path: root/cmd/podman
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 /cmd/podman
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 'cmd/podman')
-rw-r--r--cmd/podman/common/volumes.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index 0468f15e0..dfbb7b1b2 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -323,8 +323,8 @@ func getBindMount(args []string) (spec.Mount, error) {
if len(kv) == 1 {
return newMount, errors.Wrapf(optionArgError, kv[0])
}
- if err := parse.ValidateVolumeHostDir(kv[1]); err != nil {
- return newMount, err
+ if len(kv[1]) == 0 {
+ return newMount, errors.Wrapf(optionArgError, "host directory cannot be empty")
}
newMount.Source = kv[1]
setSource = true