bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63931: ls colors one symlink too much as non-broken in symlink chain


From: Paul Eggert
Subject: bug#63931: ls colors one symlink too much as non-broken in symlink chain
Date: Tue, 6 Jun 2023 15:10:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 6/6/23 13:32, Pádraig Brady wrote:
I'll think a bit more about it and add a test before applying.

I wouldn't test that the 'ls' output exactly matches the 'cat' output. For example, it should be OK for stat_for_mode to pass the parent directory fd (instead of AT_FDCWD) to statx, for efficiency, and in that case the number of symbolic links traversed by 'ls' won't match the number traversed by 'cat', because the full name might traverse symlinks that statx (dirfd, ...) won't.

And it's OK if these two numbers don't match, as users shouldn't assume that the ELOOP limit is a constant.

With that in mind, the code change you proposed is reasonably innocuous, although it slows things down a bit in the usual case. Not sure it's worth doing (I guess it does fix a race but there are other unfixable races in this area....).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]