GNU Coreutils bug 21062 coreutils-8.24 - cp(1) check failures on tmpfs filesystem (Solaris 10 / Solaris 11) /* Avoid spoiling errno when we are going to ignore it immediately anyway */ --- coreutils-9.5/lib/set-permissions.c.orig +++ coreutils-9.5/lib/set-permissions.c @@ -231,6 +231,7 @@ { if (errno == ENOSYS) { + errno = 0; *must_chmod = true; return 0; } @@ -265,6 +266,7 @@ { if (errno == ENOSYS || errno == EOPNOTSUPP) { + errno = 0; *must_chmod = true; return 0; } @@ -635,6 +637,7 @@ if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL) && acl_nontrivial (ctx->count, ctx->entries) == 0) ret = 0; + errno = 0; } else *acls_set = true; @@ -652,6 +655,7 @@ if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP) && acl_ace_nontrivial (ctx->ace_count, ctx->ace_entries) == 0) ret = 0; + errno = 0; } else *acls_set = true;