summaryrefslogtreecommitdiff
path: root/cmd/podman/import.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-29 17:37:51 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-30 19:58:22 +0000
commitd5d6e6859286ab9310e4a79082d50c816941f1ae (patch)
tree0b06e31977db05efbab498d264ef74dfa374b34d /cmd/podman/import.go
parentd1b03f470e8285613ccdf84f00e47143e7361c3b (diff)
downloadpodman-d5d6e6859286ab9310e4a79082d50c816941f1ae.tar.gz
podman-d5d6e6859286ab9310e4a79082d50c816941f1ae.tar.bz2
podman-d5d6e6859286ab9310e4a79082d50c816941f1ae.zip
Make ':' a restricted character for file names
file names for podman load, save, export, and import cannot contain ":" in them. It is a reserved character for parsing filenames. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #694 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/import.go')
-rw-r--r--cmd/podman/import.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/import.go b/cmd/podman/import.go
index 5a4fa45d9..446516024 100644
--- a/cmd/podman/import.go
+++ b/cmd/podman/import.go
@@ -75,6 +75,10 @@ func importCmd(c *cli.Context) error {
return errors.Errorf("too many arguments. Usage TARBALL [REFERENCE]")
}
+ if err := validateFileName(source); err != nil {
+ return err
+ }
+
changes := v1.ImageConfig{}
if c.IsSet("change") {
changes, err = util.GetImageConfig(c.StringSlice("change"))