- As a general rule, follow symbolic links in the destination as long as the target is within the destination hierarchy.
- As a special case, allow the destination itself to be a symbolic link, and even a dead one (in which case we create the target).
- The file-to-file case remains unrestricted.
Currently, if a symlink we aren't allowed to follow is encountered,
cp will behave just like it would if the file was not writable. We
should consider whether it would be better to replace the offending
link instead.
Fixes: 0729d1e8fd90
MFC after: never
Relnotes: yes
Sponsored by: Klara, Inc.