]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
install: do not follow symlinks
authorbapt <bapt@FreeBSD.org>
Fri, 20 Nov 2015 08:45:59 +0000 (08:45 +0000)
committerbapt <bapt@FreeBSD.org>
Fri, 20 Nov 2015 08:45:59 +0000 (08:45 +0000)
commitb0f07fc79afbee7e144c22933017cc34581a51b8
treec7b54c9f68c1485b9dce758b07031059c9f9a2db
parenta2a0dfda1245853aba60ca20c9836b068a29e1e9
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
usr.bin/xinstall/xinstall.c