summaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-17 05:04:00 -0500
committerGitHub <noreply@github.com>2022-02-17 05:04:00 -0500
commitdeb75f56543cf1f596082250dd82e4b0ec746e88 (patch)
tree9ac45d6ebd82ac748e033ec48c2e4e9cf3d4c458 /pkg/util
parent3c99cff3d13276b73011047e92f3d952bacbb8a2 (diff)
parenta811acf74cd12fa810de74dec80c9853384a1247 (diff)
downloadpodman-deb75f56543cf1f596082250dd82e4b0ec746e88.tar.gz
podman-deb75f56543cf1f596082250dd82e4b0ec746e88.tar.bz2
podman-deb75f56543cf1f596082250dd82e4b0ec746e88.zip
Merge pull request #13228 from giuseppe/idmap-options
pkg: support passing down options for idmap
Diffstat (limited to 'pkg/util')
-rw-r--r--pkg/util/mountOpts.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go
index d8b14c0df..2a0101791 100644
--- a/pkg/util/mountOpts.go
+++ b/pkg/util/mountOpts.go
@@ -45,14 +45,18 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string
}
}
- switch splitOpt[0] {
- case "O":
- foundOverlay = true
- case "idmap":
+ if strings.HasPrefix(splitOpt[0], "idmap") {
if foundIdmap {
return nil, errors.Wrapf(ErrDupeMntOption, "the 'idmap' option can only be set once")
}
foundIdmap = true
+ newOptions = append(newOptions, opt)
+ continue
+ }
+
+ switch splitOpt[0] {
+ case "O":
+ foundOverlay = true
case "exec", "noexec":
if foundExec {
return nil, errors.Wrapf(ErrDupeMntOption, "only one of 'noexec' and 'exec' can be used")