-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration of the idmap option #873
Comments
@giuseppe PTAL |
I've not originally implemented it for crun because allowing a different mapping would mean having to create a separate user namespace. If we want to support this case, how would we pass down the information to the OCI runtime? Something like the following?
|
moving to crun since it must be implemented here first |
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
opened a PR for crun: #874 |
and for podman: containers/podman#13228 and containers/common: containers/common#927 |
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
allow to specify what mapping must be used for idmapped mounts. The mapping can be specified after the `idmap` option like: `idmap=uids=0-1-10;gids=0-100-10`. When `uids` and `gids` are specified, then a new user namespace is created and used for the bind mount. Closes: containers#873 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
/kind feature
Description
The recently added idmap option [1] always maps all NS uid/gid of the container to the real ones.
There are use cases where one wants to have a container with "full" 65536 uid/gid but only wants some uid/gids mapped to the real ones for filesystem access. This is already supported by the kernel and the mount-idmapped program but is not currently possible with podman/crun.
For example, I would like to mount a directory inside a container that has a namespaced root user but prevent that namespaced root user from creating files that will be owned by the real root. In this case, the namespaced root should not be mapped or at least not be mapped to the real root.
A workaround is to use mount-idmapped to create a restrictive idmapped mount first and then mount that into the container.
Describe the results you received:
It is not possible to configure the idmap mount option.
Describe the results you expected:
It should be possible to configure the idmap mount option (like mount-idmapped).
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):**Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
The text was updated successfully, but these errors were encountered: