bug#72707: install: need_copy (for "-C") should use stat instead of lstat

2024-08-19 Thread Pádraig Brady
On 19/08/2024 03:44, Frank Heckenbach wrote: install dereferences symlinks given as sources (and I think that's good). The "-C" option, however, uses lstat rather than stat in need_copy and returns true if !S_ISREG. So the (dereferenced) file will always be copied despite "-C". Even worse, sinc

bug#72707: install: need_copy (for "-C") should use stat instead of lstat

2024-08-18 Thread Frank Heckenbach
install dereferences symlinks given as sources (and I think that's good). The "-C" option, however, uses lstat rather than stat in need_copy and returns true if !S_ISREG. So the (dereferenced) file will always be copied despite "-C". Even worse, since "-p" cannot be combined with "-C", the instal