volumes: add new option idmap#12298
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
36a8b8a to
3170904
Compare
|
/hold |
needed by containers/podman#12298 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
c/common PR: containers/common#827 |
pkg/util/mountOpts.go
Outdated
There was a problem hiding this comment.
I've copied the same logic as O.
I'll drop it
There was a problem hiding this comment.
I am just wondering if this would be an issue with Z, or RO?
There was a problem hiding this comment.
-v foo:/foo:idmap,Z seems to work fine
3170904 to
8eeb0bc
Compare
8eeb0bc to
018805f
Compare
docs/source/markdown/podman-run.1.md
Outdated
There was a problem hiding this comment.
| · idmap: true or false (default). If specified create an idmapped mount to the target user namespace in the container. | |
| · idmap: true or false (default). If specified, create an idmapped mount to the target user namespace in the container. |
018805f to
1bc19be
Compare
1bc19be to
a18624d
Compare
|
comments addressed and pushed a new version |
|
Tests are failing. |
pass down the "idmap" mount option to the OCI runtime. Needs: containers/crun#780 Closes: containers#12154 [NO NEW TESTS NEEDED] there is no crun version yet that support the new feature. Test case (must run as root): podman run --rm -v foo:/foo alpine touch /foo/bar podman run --uidmap 0:1:1000 --rm -v foo:/foo:idmap alpine ls -l /foo total 0 -rw-r--r-- 1 root root 0 Nov 15 14:01 bar Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
a18624d to
e83d366
Compare
|
rebased |
|
All green |
|
LGTM |
|
/lgtm |
pass down the "idmap" mount option to the OCI runtime.
Needs: containers/crun#780
Closes: #12154
[NO NEW TESTS NEEDED] there is no crun version yet that support the
new feature.
Test case (must run as root):
podman run --rm -v foo:/foo alpine touch /foo/bar
podman run --uidmap 0:1:1000 --rm -v foo:/foo:idmap alpine ls -l /foo
total 0
-rw-r--r-- 1 root root 0 Nov 15 14:01 bar
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com