mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-25 09:52:23 -05:00
dll: relative symbolic link resolution testing
This commit is contained in:
parent
5888e9ab05
commit
ccec269dd6
@ -1181,14 +1181,14 @@ FSP_API NTSTATUS FspFileSystemResolveReparsePoints(FSP_FILE_SYSTEM *FileSystem,
|
||||
ReparseTargetPathLength >= sizeof(WCHAR) && L'\\' == ReparseTargetPath[0])
|
||||
goto reparse_data_exit;
|
||||
|
||||
if (0 == --MaxTries)
|
||||
return STATUS_REPARSE_POINT_NOT_RESOLVED;
|
||||
|
||||
/* if device relative symlink replace whole path; else replace last path component */
|
||||
NewRemainderPath = ReparseTargetPathLength >= sizeof(WCHAR) && L'\\' == ReparseTargetPath[0] ?
|
||||
TargetPath : LastPathComponent;
|
||||
|
||||
reparse:
|
||||
if (0 == --MaxTries)
|
||||
return STATUS_REPARSE_POINT_NOT_RESOLVED;
|
||||
|
||||
RemainderPathSize = (lstrlenW(RemainderPath) + 1) * sizeof(WCHAR);
|
||||
if (NewRemainderPath + (ReparseTargetPathLength + RemainderPathSize) / sizeof(WCHAR) >
|
||||
TargetPath + *PSize / sizeof(WCHAR))
|
||||
|
@ -444,7 +444,7 @@ static void reparse_symlink_relative_dotest(ULONG Flags, PWSTR Prefix, ULONG Fil
|
||||
my_symlink(L"\\loop", L"loop");
|
||||
my_symlink(L"\\1\\1.1\\l1.1.1", L"1.1.1");
|
||||
my_symlinkd(L"\\2\\l1", L"..\\1");
|
||||
my_symlinkd(L"\\1\\l2", L"..\\2");
|
||||
my_symlinkd(L"\\1\\l2", L"..\\.\\2");
|
||||
my_symlinkd(L"\\2\\a1", L"\\1");
|
||||
my_symlinkd(L"\\1\\a2", L"\\2");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user