summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-21 21:00:16 -0400
committerGitHub <noreply@github.com>2020-10-21 21:00:16 -0400
commit2cd2359a6d9ba4135495dc9be616bb1edebb170d (patch)
tree97fc6e19db7e79683b242958b038c528eb451533 /cmd/podman/common
parent2bd920b00540280696d19dc95ab6e562aebd6b7d (diff)
parent33366a2cda518fafed0e72cf6e53b55abfa3c5e5 (diff)
downloadpodman-2cd2359a6d9ba4135495dc9be616bb1edebb170d.tar.gz
podman-2cd2359a6d9ba4135495dc9be616bb1edebb170d.tar.bz2
podman-2cd2359a6d9ba4135495dc9be616bb1edebb170d.zip
Merge pull request #7772 from TomSweeneyRedHat/dev/tsweeney/splitn
Convert Split() calls with an equal sign to SplitN()
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/volumes.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index 2a82451e4..71f897264 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -238,7 +238,7 @@ func getBindMount(args []string) (spec.Mount, error) {
var setSource, setDest, setRORW, setSuid, setDev, setExec, setRelabel bool
for _, val := range args {
- kv := strings.Split(val, "=")
+ kv := strings.SplitN(val, "=", 2)
switch kv[0] {
case "bind-nonrecursive":
newMount.Options = append(newMount.Options, "bind")
@@ -366,7 +366,7 @@ func getTmpfsMount(args []string) (spec.Mount, error) {
var setDest, setRORW, setSuid, setDev, setExec, setTmpcopyup bool
for _, val := range args {
- kv := strings.Split(val, "=")
+ kv := strings.SplitN(val, "=", 2)
switch kv[0] {
case "tmpcopyup", "notmpcopyup":
if setTmpcopyup {
@@ -441,7 +441,7 @@ func getDevptsMount(args []string) (spec.Mount, error) {
var setDest bool
for _, val := range args {
- kv := strings.Split(val, "=")
+ kv := strings.SplitN(val, "=", 2)
switch kv[0] {
case "target", "dst", "destination":
if len(kv) == 1 {
@@ -473,7 +473,7 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) {
var setSource, setDest, setRORW, setSuid, setDev, setExec bool
for _, val := range args {
- kv := strings.Split(val, "=")
+ kv := strings.SplitN(val, "=", 2)
switch kv[0] {
case "ro", "rw":
if setRORW {