On 2024-11-09 09:16, Pádraig Brady wrote:
$ src/ls -lZ INSTALL
lrwxrwxrwx 1 padraig padraig ? ...
This is still an issue here.
Oh, thanks for reminding me. That's a Gnulib bug, fixed here:
https://lists.gnu.org/r/bug-gnulib/2024-11/msg00075.html
with the fix propagated into Coreutils by installing the attached.
I thinks this closes out all the problems mentioned in this bug report,
so I'm boldly closing it. We can reopen it if I'm wrong.From b048c4d37f4f1b313c6334525ad3f4589efda1a4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 9 Nov 2024 10:29:14 -0800
Subject: [PATCH 1/2] build: update gnulib submodule to latest
---
gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnulib b/gnulib
index ba9136b76..74b6a2a73 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit ba9136b7646ef9e01ffad3ddcf232002354531d0
+Subproject commit 74b6a2a7386cf8586c1244297d4d87dde123db42
--
2.47.0
From 45ba6c6f54c771778761776e496ed3d6a4622b19 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 9 Nov 2024 16:51:02 -0800
Subject: [PATCH 2/2] ls: add test case for ls -Z bug
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Problem reported by Pádraig Brady <https://bugs.gnu.org/73418#35>.
This bug was fixed by the recent gnulib update.
* tests/ls/selinux-segfault.sh:
Also test for ls -Z on broken symlinks.
---
tests/ls/selinux-segfault.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/ls/selinux-segfault.sh b/tests/ls/selinux-segfault.sh
index ebcfbfe13..9ac1d950c 100755
--- a/tests/ls/selinux-segfault.sh
+++ b/tests/ls/selinux-segfault.sh
@@ -30,4 +30,19 @@ mkdir sedir || framework_failure_
ln -sf missing sedir/broken || framework_failure_
returns_ 1 ls -L -R -Z -m sedir > out || fail=1
+nl='
+'
+if sestatus=$(LC_ALL=C sestatus); then
+ sestatus_line_1=${sestatus%%$nl*}
+ case $sestatus_line_1 in
+ 'SELinux status:'*' enabled')
+ ls_output=$(LC_ALL=C ls -lnZ sedir/broken) || fail=1
+ set x $ls_output
+ case $6 in
+ *:*:*:*) ;;
+ *) fail=1;
+ esac
+ esac
+fi
+
Exit $fail
--
2.47.0