summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-09 20:09:12 +0200
committerGitHub <noreply@github.com>2019-08-09 20:09:12 +0200
commit4b91f60e893d2f0cdc4c410b4693a22efc1d48f4 (patch)
tree0aef038f6ab977389b41e4064fb26744bc2a4f6d
parentdc3816819d24921dfe8204e79d383c9ecea46612 (diff)
parentf070913c6a7fa1e5b79b637237bfe68d15742202 (diff)
downloadpodman-4b91f60e893d2f0cdc4c410b4693a22efc1d48f4.tar.gz
podman-4b91f60e893d2f0cdc4c410b4693a22efc1d48f4.tar.bz2
podman-4b91f60e893d2f0cdc4c410b4693a22efc1d48f4.zip
Merge pull request #3762 from jwhonce/issue/3426
Improve dns-search validation, empty domains now return an error
-rw-r--r--cmd/podman/shared/create.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 7dccc41f1..24279b871 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -627,6 +627,11 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'")
}
+ // Check for explicit dns-search domain of ''
+ if c.Changed("dns-search") && len(c.StringSlice("dns-search")) == 0 {
+ return nil, errors.Errorf("'' is not a valid domain")
+ }
+
// Validate domains are good
for _, dom := range c.StringSlice("dns-search") {
if dom == "." {