mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Add some hacks to Cm to allow creating registry keys that finish with a backslash (this works under NT).
- Also add a REALLY nasty hack that forces OBJ_CASE_INSENSITIVE on all Registry APIs... this is needed because we seem to completely mess up case sensitivity otherwise and any user-mode caller that doesn't specify that flag will fail. - These two fixes fix all the WINE failures for the "ntdll reg" test and should increase compatibility with some applications. - Runtime Library Registry Wrappers Fixes and Optimizations: - Use an array of registry paths instead of duplicating them - Fix implenmentation of RTL_REGISTRY_HANDLE. - Verify all Appends for failure before continuing. - Use the strict minimum key permissions isntead of KEY_ALL_ACCESS. - Don't use OBJ_OPENIF - Use CAPS for \\REGISTRY\\USER (required to match a Windows quirk exposed by a WINE test) - Use the correct length in RtlpNtQueryValueKey - Generic cleanups, formatting and commenting. svn path=/trunk/; revision=22682
This commit is contained in:
parent
96c859e6a6
commit
bbfd29210c
3 changed files with 489 additions and 507 deletions
File diff suppressed because it is too large
Load diff
|
@ -411,13 +411,26 @@ NtCreateKey(OUT PHANDLE KeyHandle,
|
|||
because NtCreateKey doesn't create trees */
|
||||
Start = RemainingPath.Buffer;
|
||||
if (*Start == L'\\')
|
||||
{
|
||||
Start++;
|
||||
//RemainingPath.Length -= sizeof(WCHAR);
|
||||
//RemainingPath.MaximumLength -= sizeof(WCHAR);
|
||||
//RemainingPath.Buffer++;
|
||||
//DPRINT1("String: %wZ\n", &RemainingPath);
|
||||
}
|
||||
|
||||
if (RemainingPath.Buffer[(RemainingPath.Length / sizeof(WCHAR)) - 1] == '\\')
|
||||
{
|
||||
RemainingPath.Buffer[(RemainingPath.Length / sizeof(WCHAR)) - 1] = UNICODE_NULL;
|
||||
RemainingPath.Length -= sizeof(WCHAR);
|
||||
RemainingPath.MaximumLength -= sizeof(WCHAR);
|
||||
}
|
||||
|
||||
for (i = 1; i < RemainingPath.Length / sizeof(WCHAR); i++)
|
||||
{
|
||||
if (L'\\' == RemainingPath.Buffer[i])
|
||||
{
|
||||
DPRINT("NtCreateKey() doesn't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath);
|
||||
DPRINT1("NtCreateKey() doesn't create trees! (found \'\\\' in remaining path: \"%wZ\"!)\n", &RemainingPath);
|
||||
|
||||
PostCreateKeyInfo.Object = NULL;
|
||||
PostCreateKeyInfo.Status = STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
|
@ -1397,6 +1410,13 @@ NtOpenKey(OUT PHANDLE KeyHandle,
|
|||
}
|
||||
}
|
||||
|
||||
if (ObjectAttributes->ObjectName->Buffer[(ObjectAttributes->ObjectName->Length / sizeof(WCHAR)) - 1] == '\\')
|
||||
{
|
||||
ObjectAttributes->ObjectName->Buffer[(ObjectAttributes->ObjectName->Length / sizeof(WCHAR)) - 1] = UNICODE_NULL;
|
||||
ObjectAttributes->ObjectName->Length -= sizeof(WCHAR);
|
||||
ObjectAttributes->ObjectName->MaximumLength -= sizeof(WCHAR);
|
||||
}
|
||||
|
||||
/* WINE checks for the length also */
|
||||
/*if (ObjectAttributes->ObjectName->Length > MAX_NAME_LENGTH)
|
||||
return(STATUS_BUFFER_OVERFLOW);*/
|
||||
|
|
|
@ -110,6 +110,7 @@ CmFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo,
|
|||
Attributes = ObjectCreateInfo->Attributes;
|
||||
if (ObjectType == ObSymbolicLinkType)
|
||||
Attributes |= OBJ_OPENLINK;
|
||||
Attributes |= OBJ_CASE_INSENSITIVE; // hello! My name is ReactOS CM and I'm brain-dead!
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue