]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r291091
authorbapt <bapt@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Dec 2015 20:41:44 +0000 (20:41 +0000)
committerbapt <bapt@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Dec 2015 20:41:44 +0000 (20:41 +0000)
commit28fcdcf41622769b17945a31dac2b6e2a78df5d5
tree5c3d64ed56284dcd81482690d72ab9ec7ec02ce9
parent69b72e0945f1c3e5f2d3ab9e6ff29ff87bcfbd06
MFC: r291091

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
Differential Revision: https://reviews.freebsd.org/D4191

git-svn-id: svn://svn.freebsd.org/base/stable/10@291823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/xinstall/xinstall.c