summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/parse/net.go9
-rw-r--r--cmd/podman/parse/parse.go18
-rw-r--r--cmd/podman/parse/parse_windows.go5
-rw-r--r--test/e2e/run_test.go2
4 files changed, 24 insertions, 10 deletions
diff --git a/cmd/podman/parse/net.go b/cmd/podman/parse/net.go
index 9228c7127..a5c7a0d95 100644
--- a/cmd/podman/parse/net.go
+++ b/cmd/podman/parse/net.go
@@ -151,15 +151,6 @@ func parseEnvOrLabelFile(envOrLabel map[string]string, filename, configType stri
return scanner.Err()
}
-// ValidateFileName returns an error if filename contains ":"
-// as it is currently not supported
-func ValidateFileName(filename string) error {
- if strings.Contains(filename, ":") {
- return fmt.Errorf("invalid filename (should not contain ':') %q", filename)
- }
- return nil
-}
-
// ValidURL checks a string urlStr is a url or not
func ValidURL(urlStr string) error {
url, err := url.ParseRequestURI(urlStr)
diff --git a/cmd/podman/parse/parse.go b/cmd/podman/parse/parse.go
new file mode 100644
index 000000000..47db066d3
--- /dev/null
+++ b/cmd/podman/parse/parse.go
@@ -0,0 +1,18 @@
+//go:build !windows
+// +build !windows
+
+package parse
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ValidateFileName returns an error if filename contains ":"
+// as it is currently not supported
+func ValidateFileName(filename string) error {
+ if strings.Contains(filename, ":") {
+ return fmt.Errorf("invalid filename (should not contain ':') %q", filename)
+ }
+ return nil
+}
diff --git a/cmd/podman/parse/parse_windows.go b/cmd/podman/parse/parse_windows.go
new file mode 100644
index 000000000..794f4216d
--- /dev/null
+++ b/cmd/podman/parse/parse_windows.go
@@ -0,0 +1,5 @@
+package parse
+
+func ValidateFileName(filename string) error {
+ return nil
+}
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index b2840d544..1f6b6fa3d 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1236,7 +1236,7 @@ USER mail`, BB)
It("podman run --mount type=bind,bind-nonrecursive", func() {
SkipIfRootless("FIXME: rootless users are not allowed to mount bind-nonrecursive")
- session := podmanTest.Podman([]string{"run", "--mount", "type=bind,bind-nonrecursive,slave,src=/,target=/host", fedoraMinimal, "findmnt", "-nR", "/host"})
+ session := podmanTest.Podman([]string{"run", "--mount", "type=bind,bind-nonrecursive,private,src=/sys,target=/host-sys", fedoraMinimal, "findmnt", "-nR", "/host-sys"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.OutputToStringArray()).To(HaveLen(1))