summaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-06-18 16:21:40 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-06-18 17:02:20 -0400
commit8e5b294ac3429b8c59dd014a1583d0d77ea2380a (patch)
treef1ab03f0444acc92635dedcc9ba90b2d5a49e27a /pkg/util
parent292a48cab4f3d61b1805fa5f947667012049cce3 (diff)
downloadpodman-8e5b294ac3429b8c59dd014a1583d0d77ea2380a.tar.gz
podman-8e5b294ac3429b8c59dd014a1583d0d77ea2380a.tar.bz2
podman-8e5b294ac3429b8c59dd014a1583d0d77ea2380a.zip
Allow (but ignore) Cached and Delegated volume options
These are only used on OS X Docker, and ignored elsewhere - but since they are ignored, they're guaranteed to be safe everywhere, and people are using them. Fixes: #3340 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/util')
-rw-r--r--pkg/util/mountOpts.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go
index 489e7eeef..40c99384d 100644
--- a/pkg/util/mountOpts.go
+++ b/pkg/util/mountOpts.go
@@ -20,26 +20,22 @@ func ProcessOptions(options []string) []string {
foundbind, foundrw, foundro bool
rootProp string
)
+
for _, opt := range options {
switch opt {
case "bind", "rbind":
foundbind = true
- break
- }
- }
- if !foundbind {
- options = append(options, "rbind")
- }
- for _, opt := range options {
- switch opt {
- case "rw":
- foundrw = true
case "ro":
foundro = true
+ case "rw":
+ foundrw = true
case "private", "rprivate", "slave", "rslave", "shared", "rshared":
rootProp = opt
}
}
+ if !foundbind {
+ options = append(options, "rbind")
+ }
if !foundrw && !foundro {
options = append(options, "rw")
}