From: Pádraig Brady Date: Fri, 28 Mar 2025 20:24:18 +0000 (+0000) Subject: ls: print correct xattr error on all platforms X-Git-Tag: v9.7~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31c97c31ff3d473637c91d1add3a7bc99cc3d88f;p=thirdparty%2Fcoreutils.git ls: print correct xattr error on all platforms * src/ls.c (gobble_file): Output errno, as u.err is not populated by file_has_aclinfo() on all platforms. * NEWS: Mention the bug fix. --- diff --git a/NEWS b/NEWS index dfafa8ab22..a77a49f74f 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,10 @@ GNU coreutils NEWS -*- outline -*- on systems like Android with SELinux but without xattr support. [bug introduced in coreutils-9.6] + `ls -l` could output spurious "Not supported" errors in certain cases, + like with dangling symlinks on cygwin. + [bug introduced in coreutils-9.6] + 'who -m' now outputs entries for remote logins. Previously login entries prefixed with the service (like "sshd") were not matched. [bug introduced in coreutils-9.4] diff --git a/src/ls.c b/src/ls.c index 244484439f..46ec42037b 100644 --- a/src/ls.c +++ b/src/ls.c @@ -3549,7 +3549,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode, any_has_acl |= f->acl_type != ACL_T_NONE; if (format == long_format && n < 0 && !cannot_access_acl) - error (0, ai.u.err, "%s", quotef (full_name)); + error (0, errno, "%s", quotef (full_name)); else { /* When requesting security context information, don't make