mirror of
https://github.com/reactos/reactos.git
synced 2025-05-13 14:20:31 +00:00
[ACPPAGE] Do not allow shims to be applied to files in System32/WinSxs.
CORE-13618 svn path=/trunk/; revision=75552
This commit is contained in:
parent
0435bc7005
commit
a5b5ed5bd3
1 changed files with 21 additions and 0 deletions
|
@ -158,6 +158,27 @@ HRESULT CLayerUIPropPage::InitFile(PCWSTR Filename)
|
||||||
}
|
}
|
||||||
return InitFile(Buffer);
|
return InitFile(Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CString tmp;
|
||||||
|
if (tmp.GetEnvironmentVariable(L"SystemRoot"))
|
||||||
|
{
|
||||||
|
tmp += L"\\System32";
|
||||||
|
if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
|
||||||
|
ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
|
||||||
|
{
|
||||||
|
ACDBG(L"Ignoring System32: %s\r\n", (PCWSTR)ExpandedFilename);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
tmp.GetEnvironmentVariable(L"SystemRoot");
|
||||||
|
tmp += L"\\WinSxs";
|
||||||
|
if (ExpandedFilename.GetLength() >= tmp.GetLength() &&
|
||||||
|
ExpandedFilename.Left(tmp.GetLength()).MakeLower() == tmp.MakeLower())
|
||||||
|
{
|
||||||
|
ACDBG(L"Ignoring WinSxs: %s\r\n", (PCWSTR)ExpandedFilename);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t n = 0; g_AllowedExtensions[n]; ++n)
|
for (size_t n = 0; g_AllowedExtensions[n]; ++n)
|
||||||
{
|
{
|
||||||
if (!wcsicmp(g_AllowedExtensions[n], pwszExt))
|
if (!wcsicmp(g_AllowedExtensions[n], pwszExt))
|
||||||
|
|
Loading…
Reference in a new issue