Skip to content
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

chown: ignore both pkg/system.EOPNOTSUPP and pkg/system.ErrNotSupportedPlatform #851

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

nalind
Copy link
Member

@nalind nalind commented Mar 10, 2021

Where we ignored a pkg/system.ErrNotSupportedPlatform error from pkg/system.Lgetxattr(), also ignore ENOTSUP/EOPNOTSUPP, as we already do elsewhere. Should fix containers/podman#9687.

…edPlatform

Where we ignored a pkg/system.ErrNotSupportedPlatform error
from pkg/system.Lgetxattr(), also ignore ENOTSUP/EOPNOTSUPP, as we
already do elsewhere.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@@ -49,7 +50,7 @@ func platformLChown(path string, info os.FileInfo, toHost, toContainer *idtools.
}
if uid != int(st.Uid) || gid != int(st.Gid) {
cap, err := system.Lgetxattr(path, "security.capability")
if err != nil && err != system.ErrNotSupportedPlatform {
if err != nil && !errors.Is(err, system.EOPNOTSUPP) && err != system.ErrNotSupportedPlatform {
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@mheon
Copy link
Member

mheon commented Mar 10, 2021

LGTM, thanks @nalind

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppe giuseppe merged commit 3c13812 into containers:master Mar 11, 2021
@flyn-org
Copy link

flyn-org commented Mar 11, 2021

@nalind, silly question from someone who is new to container-related development: how does this change make its way back to podman to fix #9687? The reason I ask is that the podman repository contains a copy of containers/storage. Does the podman build process pull this code from here, or does it use its local copy? Why is there a copy in the podman repository?

Thank you for the quick work, by the way!

@rhatdan
Copy link
Member

rhatdan commented Mar 11, 2021

@flyn-org We will cut a release of containers/storage and then in podman we will vendor in (Copy/Update) its code with the newly released code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman: fails when underlying filesystem does not support security labels (EXT4_FS_SECURITY)
5 participants