Subject: bug#77597: coreutils 9.6: regression in handling security.selinux attribute for ls(1)

From: Pádraig Brady <[email-masked]>
Date: Mon, 7 Apr 2025 19:03:08 +0100

On 06/04/2025 02:49, Rahul Sandhu wrote:
> Hey,
> 
> coreutils 9.6 appears to have a regression in `ls(1)` for SELinux-aware
> builds. `ls -Z` fails to obtain the security context for certain
> filesystem objects (e.g. `/sys`). Example to reproduce on Gentoo with
> refpolicy:
> 
> rsandhu@graphite ~ $ ls -alZ /run/ | grep '?'
> drwxr-xr-x   3 root     root     ?                                               60 Apr  5 16:38 credentials
> drwxr-xr-x   3 root     root     ?                                               80 Apr  2 16:30 initramfs
> drwxr-xr-x   2 root     root     ?                                               40 Apr  2 16:23 modprobe.d

This may be fixed with https://github.com/coreutils/coreutils/commit/cb2abbac7

Could you try the latest snapshot to see if it fixes this for you?

   wget https://pixelbeat.org/cu/coreutils-ss.tar.xz
   tar -xf coreutils-ss.tar.xz
   cd coreutils-9.6.53-14af8/
   ./configure && make -j4
   src/ls -alZ /run/

thanks,
Pádraig.