diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-02-14 17:40:29 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2022-02-16 11:19:58 +0100 |
commit | a811acf74cd12fa810de74dec80c9853384a1247 (patch) | |
tree | 0fad48f2125f77219b857cdb3c276b7b14b472ba /pkg/util | |
parent | 98962a28f5d89fa7545688bbfca635744279ff7a (diff) | |
download | podman-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/util')
-rw-r--r-- | pkg/util/mountOpts.go | 12 |
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") |