dll: relative symbolic link resolution testing

This commit is contained in:
Bill Zissimopoulos 2016-09-12 21:50:25 -07:00
parent 5888e9ab05
commit ccec269dd6
2 changed files with 4 additions and 4 deletions

View File

@ -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))

View File

@ -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");