* globals.cc (ro_u_volume): New R/O unicode string.
* path.cc (symlink_info::check_reparse_point): Fix check for volume mount points to work on Vista and later as well.
This commit is contained in:
parent
84acd4c989
commit
11788f8ce0
|
@ -1,3 +1,9 @@
|
||||||
|
2009-08-24 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* globals.cc (ro_u_volume): New R/O unicode string.
|
||||||
|
* path.cc (symlink_info::check_reparse_point): Fix check for volume
|
||||||
|
mount points to work on Vista and later as well.
|
||||||
|
|
||||||
2009-08-22 Corinna Vinschen <corinna@vinschen.de>
|
2009-08-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* strfuncs.cc (__set_charset_from_codepage): Add codepages 20866
|
* strfuncs.cc (__set_charset_from_codepage): Add codepages 20866
|
||||||
|
|
|
@ -100,6 +100,7 @@ UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
|
||||||
UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
|
UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
|
||||||
UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
|
UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
|
||||||
UNICODE_STRING _RDATA ro_u_unixfs = _ROU (L"UNIXFS");
|
UNICODE_STRING _RDATA ro_u_unixfs = _ROU (L"UNIXFS");
|
||||||
|
UNICODE_STRING _RDATA ro_u_volume = _ROU (L"\\??\\Volume{");
|
||||||
#undef _RDATA
|
#undef _RDATA
|
||||||
#undef _ROU
|
#undef _ROU
|
||||||
|
|
||||||
|
|
|
@ -1865,9 +1865,16 @@ symlink_info::check_reparse_point (HANDLE h)
|
||||||
}
|
}
|
||||||
else if (rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
|
else if (rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
|
||||||
{
|
{
|
||||||
if (rp->SymbolicLinkReparseBuffer.PrintNameLength == 0)
|
UNICODE_STRING subst;
|
||||||
|
|
||||||
|
RtlInitCountedUnicodeString (&subst,
|
||||||
|
(WCHAR *)((char *)rp->MountPointReparseBuffer.PathBuffer
|
||||||
|
+ rp->MountPointReparseBuffer.SubstituteNameOffset),
|
||||||
|
rp->MountPointReparseBuffer.SubstituteNameLength);
|
||||||
|
if (rp->MountPointReparseBuffer.PrintNameLength == 0
|
||||||
|
|| RtlEqualUnicodePathPrefix (&subst, &ro_u_volume, TRUE))
|
||||||
{
|
{
|
||||||
/* Likely a volume mount point. Not treated as symlink. */
|
/* Volume mount point. Not treated as symlink. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sys_wcstombs (srcbuf, SYMLINK_MAX + 1,
|
sys_wcstombs (srcbuf, SYMLINK_MAX + 1,
|
||||||
|
|
Loading…
Reference in New Issue