Skip to content

Commit

Permalink
chown: ignore both pkg/system.EOPNOTSUPP and pkg/system.ErrNotSupport…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
nalind committed Mar 10, 2021
1 parent 7df1ede commit f03222f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/chown_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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 {
return fmt.Errorf("%s: %v", os.Args[0], err)
}

Expand Down

0 comments on commit f03222f

Please sign in to comment.