On 15/11/2026 09:34, Collin Funk wrote:
Commit 0d74ac470 (copy: make backup files more reliably, 2017-07-30)
made 'cp' and 'install' use renameat2 to make backups, but forgot 'ln'
despite mentioning it in the NEWS entry. This patch makes that change
for 'ln'. Not sure whether it's preferred to update old NEWS entries
for accuracy (and then run 'make update-NEWS-hash'), so I left it
as-is for now.
There were other behavior changes WRT backups in that commit. I'll
have a look at that separately since the OSS scanner issue was just
about the race.
Given kernel 3.15 is so old, and macOS also supports atomic rename,
I'd simplify the NEWS to something like:
'ln' now avoids races that could lose backup data in unlikely
- circumstances. Since the fix relies on the renameat2 system call of
- Linux kernel 3.15 and later, the races are still present on other
- platforms.
+ circumstances, on systems providing support for atomic rename.
[This bug was present in "the beginning".]
It would be useful I think to make the original NEWS entry
more accurate, by removing the reference to ln.
Otherwise LGTM.
cheers,
Padraig