]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: path_conv: Try to handle native symlinks more sanely
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 19 Apr 2021 12:49:14 +0000 (14:49 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 19 Apr 2021 12:49:14 +0000 (14:49 +0200)
commit456c3a46386f38887407603b2c64b7f63a4871c5
treeeafdb8d79ca00db1e6a2f3a6108348286e3d09b8
parent183e5f0a15f44f9a1d5d69ef0ffcfcce1ce1e680
Cygwin: path_conv: Try to handle native symlinks more sanely

For local paths, add a check if the inner path components contain native
symlinks or junctions.  Compare the incoming path with the path returned
by NtQueryInformationFile(FileNameInformation).  If they differ, there
must be at least one native symlink or junction in the path.  If so,
treat the currently evaluated file as non-existant.  This forces
path_conv::check to backtrack inner path components until we eliminated
all native symlinks or junctions and have a normalized path.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/path.cc
This page took 0.028414 seconds and 5 git commands to generate.