mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
vendor containers/storage@main
Mainly to pull in fixes for #1382 which is impossible to reproduce locally so let's optimistically mark it as fixed and reopen if needed in the future. Fixes: #1382 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
6
vendor/github.com/containers/storage/drivers/chown_darwin.go
generated
vendored
6
vendor/github.com/containers/storage/drivers/chown_darwin.go
generated
vendored
@@ -83,7 +83,7 @@ func (c *platformChowner) LChown(path string, info os.FileInfo, toHost, toContai
|
||||
uid, gid = mappedPair.UID, mappedPair.GID
|
||||
}
|
||||
if uid != int(st.Uid) || gid != int(st.Gid) {
|
||||
cap, err := system.Lgetxattr(path, "security.capability")
|
||||
capability, err := system.Lgetxattr(path, "security.capability")
|
||||
if err != nil && !errors.Is(err, system.EOPNOTSUPP) && err != system.ErrNotSupportedPlatform {
|
||||
return fmt.Errorf("%s: %w", os.Args[0], err)
|
||||
}
|
||||
@@ -98,8 +98,8 @@ func (c *platformChowner) LChown(path string, info os.FileInfo, toHost, toContai
|
||||
return fmt.Errorf("%s: %w", os.Args[0], err)
|
||||
}
|
||||
}
|
||||
if cap != nil {
|
||||
if err := system.Lsetxattr(path, "security.capability", cap, 0); err != nil {
|
||||
if capability != nil {
|
||||
if err := system.Lsetxattr(path, "security.capability", capability, 0); err != nil {
|
||||
return fmt.Errorf("%s: %w", os.Args[0], err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user