aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgenutil
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-02-14 17:40:29 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-02-16 11:19:58 +0100
commita811acf74cd12fa810de74dec80c9853384a1247 (patch)
tree0fad48f2125f77219b857cdb3c276b7b14b472ba /pkg/specgenutil
parent98962a28f5d89fa7545688bbfca635744279ff7a (diff)
downloadpodman-a811acf74cd12fa810de74dec80c9853384a1247.tar.gz
podman-a811acf74cd12fa810de74dec80c9853384a1247.tar.bz2
podman-a811acf74cd12fa810de74dec80c9853384a1247.zip
pkg: support passing down options for idmap
[NO NEW TESTS NEEDED] the feature is still being worked in crun: https://github.com/containers/crun/pull/874 also needs: https://github.com/containers/common/pull/927 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/specgenutil')
-rw-r--r--pkg/specgenutil/volumes.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go
index 6b9624ebb..2bd79b186 100644
--- a/pkg/specgenutil/volumes.go
+++ b/pkg/specgenutil/volumes.go
@@ -356,7 +356,11 @@ func getBindMount(args []string) (spec.Mount, error) {
}
setOwnership = true
case "idmap":
- newMount.Options = append(newMount.Options, "idmap")
+ if len(kv) > 1 {
+ newMount.Options = append(newMount.Options, fmt.Sprintf("idmap=%s", kv[1]))
+ } else {
+ newMount.Options = append(newMount.Options, "idmap")
+ }
case "consistency":
// Often used on MACs and mistakenly on Linux platforms.
// Since Docker ignores this option so shall we.