summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2025-03-28 20:24:18 +0000
committerPádraig Brady <P@draigBrady.com>2025-03-30 15:12:52 +0100
commit31c97c31ff3d473637c91d1add3a7bc99cc3d88f (patch)
tree9090d3eb3d076d1a170f8ad459328e6145530700
parentmv: port test to OpenBSD 7.5 (diff)
downloadcoreutils-31c97c31ff3d473637c91d1add3a7bc99cc3d88f.tar.gz
coreutils-31c97c31ff3d473637c91d1add3a7bc99cc3d88f.zip
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.
-rw-r--r--NEWS4
-rw-r--r--src/ls.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index dfafa8ab2..a77a49f74 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 244484439..46ec42037 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