-
Notifications
You must be signed in to change notification settings - Fork 246
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
Conversation
…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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM, thanks @nalind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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! |
@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. |
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.