Skip to content

storage/overlay: use userxattr when probing idmapped lower layers - #1022

Open
tim-day-387 wants to merge 1 commit into
podman-container-tools:mainfrom
tim-day-387:rootless-idmap-check
Open

storage/overlay: use userxattr when probing idmapped lower layers#1022
tim-day-387 wants to merge 1 commit into
podman-container-tools:mainfrom
tim-day-387:rootless-idmap-check

Conversation

@tim-day-387

@tim-day-387 tim-day-387 commented Jul 26, 2026

Copy link
Copy Markdown

From the commit message:

supportsIdmappedLowerLayers() performs a test overlay mount to detect whether the kernel supports idmapped lower layers. When running rootless, the kernel requires the userxattr mount option for unprivileged overlay mounts, so the probe mount always failed and rootless podman incorrectly reported idmapped mounts as unsupported.

Pass userxattr in the probe mount options when running rootless, so the check reflects actual kernel support.

Fixes: 9eb030e ("overlay: use idmapped lower layers where supported")

This fix mirrors all of the other code paths for mounting overlay rootless. I've tested this on my local install and I see /run/user/1000/containers/overlay/idmapped-lower-dir-true get correctly populated.

supportsIdmappedLowerLayers() performs a test overlay mount to detect
whether the kernel supports idmapped lower layers. When running
rootless, the kernel requires the userxattr mount option for
unprivileged overlay mounts, so the probe mount always failed and
rootless podman incorrectly reported idmapped mounts as unsupported.

Pass userxattr in the probe mount options when running rootless, so
the check reflects actual kernel support.

Fixes: 9eb030e ("overlay: use idmapped lower layers where supported")
Signed-off-by: Timothy Day <timday@thelustrecollective.com>
@github-actions github-actions Bot added the storage Related to "storage" package label Jul 26, 2026

@giuseppe giuseppe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it shouldn't matter for the mount test, but doesn't hurt.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants