From f03222fa585dce507f2e37006af7f907f2158847 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 10 Mar 2021 13:45:56 -0500 Subject: [PATCH] chown: ignore both pkg/system.EOPNOTSUPP and pkg/system.ErrNotSupportedPlatform 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 --- drivers/chown_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/chown_unix.go b/drivers/chown_unix.go index 7c2a73f6b8..36e3b23c01 100644 --- a/drivers/chown_unix.go +++ b/drivers/chown_unix.go @@ -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) }