bug-coreutils@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Martin Schulte <gnu@schrader-schulte.de>
To: 63931@debbugs.gnu.org
Subject: bug#63931: ls colors one symlink too much as non-broken in symlink chain
Date: Tue, 6 Jun 2023 19:24:26 +0200	[thread overview]
Message-ID: <20230606192426.c807c0f6dbcc3486c17a213e@schrader-schulte.de> (raw)

Hello coreutils-maintainers,

I create a long chain of symlinks - ls colors the 41st element as ok while the kernel already gives up after 40 symlinks:

$ uname -a
Linux martnix4 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
$ ls --version | head -n 1
ls (GNU coreutils) 8.32
$ mkdir empty
$ cd empty
$ last=00 ; touch $last ; for ln in {01..50}; do ln -s $last $ln; last=$ln; done
$ ls --color -l {38..42}
lrwxrwxrwx 1 u g 2 Jun  6 19:00 38 -> 37   <- 38 colored as symlink
lrwxrwxrwx 1 u g 2 Jun  6 19:00 39 -> 38   <- 39 colored as symlink
lrwxrwxrwx 1 u g 2 Jun  6 19:00 40 -> 39   <- 40 colored as symlink
lrwxrwxrwx 1 u g 2 Jun  6 19:00 41 -> 40   <- 41 colored as symlink
lrwxrwxrwx 1 u g 2 Jun  6 19:00 42 -> 41   <- 42 and 41 colored as broken link
$ cat 40
$ cat 41
cat: 41: Too many levels of symbolic links

This could be reproduced with "ls (GNU coreutils) 9.3.45-6a618" compiled from the git repository.

Best regards,

Martin




             reply	other threads:[~2023-06-06 17:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06 17:24 Martin Schulte [this message]
2023-06-06 20:32 ` bug#63931: ls colors one symlink too much as non-broken in symlink chain Pádraig Brady
2023-06-06 22:10   ` Paul Eggert
2023-06-07  9:56     ` Martin Schulte
2023-06-07 12:23       ` Pádraig Brady
2023-06-07 15:01         ` Pádraig Brady
2023-06-07 20:17         ` Paul Eggert
2023-06-07 20:54           ` Pádraig Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-coreutils

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230606192426.c807c0f6dbcc3486c17a213e@schrader-schulte.de \
    --to=gnu@schrader-schulte.de \
    --cc=63931@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).