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
This commit is contained in:
umohnani8
2018-04-29 17:37:51 -04:00
committed by Atomic Bot
parent d1b03f470e
commit d5d6e68592
11 changed files with 46 additions and 1 deletions

View File

@ -3,9 +3,10 @@ package integration
import (
"os"
"path/filepath"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"path/filepath"
)
var _ = Describe("Podman export", func() {
@ -43,4 +44,14 @@ var _ = Describe("Podman export", func() {
err = os.Remove(outfile)
Expect(err).To(BeNil())
})
It("podman export bad filename", func() {
_, ec, cid := podmanTest.RunLsContainer("")
Expect(ec).To(Equal(0))
outfile := filepath.Join(podmanTest.TempDir, "container:with:colon.tar")
result := podmanTest.Podman([]string{"export", "-o", outfile, cid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Not(Equal(0)))
})
})