spiegel_podman/pkg/specgen
Giuseppe Scrivano c56c2fc5f8
libpod: do not block idmap with overlay (O) volumes
Allow the `idmap` volume option to be combined with the overlay `O`
option, e.g. `-v /src:/mnt:O,idmap` or `-v myvol:/mnt:O,idmap`.
Previously any option other than `U`, `upperdir` and `workdir` combined
with `O` was rejected.

The parser in GenVolumeMounts now accepts `idmap` alongside `O` and
rejects the first disallowed option instead of counting flags.  The
mappings from the container's user namespace are threaded onto the
generated overlay mount so the runtime idmaps it.  This is done for both
the anonymous/host-path overlay volumes and the named-volume overlay
path, which are handled by separate code.

When a volume is idmapped the runtime shifts the mount so that on-disk
IDs map identically into the container, so the overlay backing dirs
(contentDir, upperdir, workdir) must be owned by real root (0) rather
than the host IDs the container root maps to; otherwise they surface as
the overflow ID inside the container and are inaccessible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-09-01 09:50:51 +02:00
..
generate specgen: ensure keep-id overrides image USER 2026-08-25 22:26:31 +05:30
container_validate.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
namespaces.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
namespaces_test.go Move to deterministic network setup order 2026-04-17 10:00:32 -04:00
pod_validate.go Remove Slirp network mode constant and error on usage 2026-04-13 08:22:36 -04:00
podspecgen.go Update stale comments referencing slirp4netns 2026-04-27 10:22:26 -04:00
resources_freebsd.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
resources_linux.go vendor: update common, image, storage to main 2025-11-21 14:24:29 +01:00
specgen.go swagger: fix deprecated alias annotations and model name collisions 2026-08-10 22:14:47 +05:30
specgen_local.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
specgen_remote.go chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
specgen_test.go Convert SpecGen values to be nullable where possible 2024-01-30 10:42:24 -05:00
utils.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
utils_linux.go pkg/specgen: error out when a block device isn't 2025-06-10 13:50:02 -07:00
volumes.go libpod: do not block idmap with overlay (O) volumes 2026-09-01 09:50:51 +02:00
volumes_linux_test.go fix: mounting issue with single character volume on windows 2025-03-26 17:57:52 +01:00
volumes_windows_test.go [Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows 2025-11-21 15:32:39 +03:00
winpath.go Introduce podman machine cp command 2025-02-28 09:56:46 -05:00
winpath_linux.go [Fixes: #27571] Fix 'shouldResolveWinPaths' returning 'false' on Windows 2025-11-21 15:32:39 +03:00
winpath_unsupported.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
winpath_windows.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00