From 8e5b294ac3429b8c59dd014a1583d0d77ea2380a Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 18 Jun 2019 16:21:40 -0400 Subject: 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 --- pkg/util/mountOpts.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'pkg/util') 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") } -- cgit v1.2.3-54-g00ecf