The first patch fixes chmod to now correctly diagnose
its failure to work with any files on Linux <= 6.5
when /proc is not available (like e.g. in a chroot).
Otherwise it would silently do nothing, ignoring all
the ENOTSUPs it was getting.
I'm a bit surprised we didn't get any reports for that,
but I suppose Linux 6.6 was released in 2023 and
coreutils 9.5 was released in 2024, so there wouldn't
have been huge overlap of this issue.
The second patch adds the racy fallback (without AT_SYMLINK_NOFOLLOW),
to allow chmod to work on older systems without /proc.
However I'm 60:40 against applying that one because:
1. The problematic kernels are over 3 years old now
and we did get no reports after all.
2. It should be easy enough to mount /proc to avoid the issue
3. The fallback is TOCTOU racy.
cheers,
Padraig