HomeFreeBSD

install: do not follow symlinks

Description

install: do not follow symlinks

In case the target of install is a dead symlink, install(1) used to not
consider it as "existing" because of the usage of stat(2) instead of
lstat(2). meaning the old file (the symlink) is not removed before the new
file is created. The symlink is being followed and the new file becoming the
target of the symlink instead of the target of install(1)

Reviewed by: jhb, brooks
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4191

Details

Provenance
baptAuthored on
Reviewer
jhb
Differential Revision
D4191: Install should not follow the symlinks
Parents
rS291090: Convert vmstat to use libxo.
Branches
Unknown
Tags
Unknown