diff options
author | baude <bbaude@redhat.com> | 2018-04-16 15:16:00 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-16 20:25:24 +0000 |
commit | 474d95e5a45a320426ae716d7bdc6c18311cd721 (patch) | |
tree | 517d81b77acffeba075ae39cbbfd5144b2c5892d /cmd/podman/create.go | |
parent | 6c5ebb0315fc6527c0d75ca53fb6b027d20802a5 (diff) | |
download | podman-474d95e5a45a320426ae716d7bdc6c18311cd721.tar.gz podman-474d95e5a45a320426ae716d7bdc6c18311cd721.tar.bz2 podman-474d95e5a45a320426ae716d7bdc6c18311cd721.zip |
validate dns-search values prior to creation
Signed-off-by: baude <bbaude@redhat.com>
Closes: #628
Approved by: baude
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r-- | cmd/podman/create.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go index a1d3ead20..b95309980 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -593,6 +593,12 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string, return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'") } + // Validate domains are good + for _, dom := range c.StringSlice("dns-search") { + if _, err := validateDomain(dom); err != nil { + return nil, err + } + } ImageVolumes := data.ContainerConfig.Volumes var imageVolType = map[string]string{ |