* UPDATE HISTORY:
*/
-#ifdef WIN32_REGDBG
-#include "cm_win32.h"
-#else
#include <ddk/ntddk.h>
#include <roscfg.h>
#include <internal/ob.h>
#include <internal/debug.h>
#include "cm.h"
-#endif
static NTSTATUS
NULL,
UserMode);
}
-#ifndef WIN32_REGDBG
+
DPRINT("CmiObjectParse: %s\n", FoundObject->Name);
-#else
- {
- char buffer[_BUFFER_LEN];
- memset(buffer, 0, _BUFFER_LEN);
- strncpy(buffer, FoundObject->Name, min(FoundObject->NameSize, _BUFFER_LEN - 1));
- DPRINT("CmiObjectParse: %s\n", buffer);
- }
-#endif
*Path = EndPtr;
CmiObjectCreate(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
- struct _OBJECT_ATTRIBUTES* ObjectAttributes)
+ POBJECT_ATTRIBUTES ObjectAttributes)
{
PKEY_OBJECT pKey = ObjectBody;
KeyObject->ParentKey,
KeyObject);
- if (IsPermanentHive(KeyObject->RegistryHive))
- CmiSyncHives();
- }
- else
- {
- CmiReleaseBlock(KeyObject->RegistryHive, KeyObject->KeyCell);
+ if (!IsVolatileHive(KeyObject->RegistryHive))
+ {
+ CmiSyncHives();
+ }
}
}
+NTSTATUS STDCALL
+CmiObjectSecurity(PVOID ObjectBody,
+ SECURITY_OPERATION_CODE OperationCode,
+ SECURITY_INFORMATION SecurityInformation,
+ PSECURITY_DESCRIPTOR SecurityDescriptor,
+ PULONG BufferLength)
+{
+ DPRINT1("CmiObjectSecurity() called\n");
+
+ return(STATUS_SUCCESS);
+}
+
+
VOID
CmiAddKeyToList(PKEY_OBJECT ParentKey,
PKEY_OBJECT NewKey)
if (ParentKey->SizeOfSubKeys <= ParentKey->NumberOfSubKeys)
{
PKEY_OBJECT *tmpSubKeys = ExAllocatePool(NonPagedPool,
- (ParentKey->NumberOfSubKeys + 1) * sizeof(DWORD));
+ (ParentKey->NumberOfSubKeys + 1) * sizeof(ULONG));
if (ParentKey->NumberOfSubKeys > 0)
{
- memcpy(tmpSubKeys,
- ParentKey->SubKeys,
- ParentKey->NumberOfSubKeys * sizeof(DWORD));
+ RtlCopyMemory (tmpSubKeys,
+ ParentKey->SubKeys,
+ ParentKey->NumberOfSubKeys * sizeof(ULONG));
}
if (ParentKey->SubKeys)
WORD NameSize;
DWORD Index;
-#ifndef WIN32_REGDBG
DPRINT("Scanning key list for: %s (Parent: %s)\n",
KeyName, Parent->Name);
-#else
- {
- char buffer[_BUFFER_LEN];
- memset(buffer, 0, _BUFFER_LEN);
- strncpy(buffer, Parent->Name, min(Parent->NameSize, _BUFFER_LEN - 1));
- DPRINT("Scanning key list for: %s (Parent: %s)\n", KeyName, buffer);
- }
-#endif
NameSize = strlen(KeyName);
KeAcquireSpinLock(&CmiKeyListLock, &OldIrql);
}
}
KeReleaseSpinLock(&CmiKeyListLock, OldIrql);
-
+
return NULL;
}
DataCell->Data,
TargetPath->Length);
TargetPath->Buffer[TargetPath->Length / sizeof(WCHAR)] = 0;
- CmiReleaseBlock(RegistryHive, DataCell);
}
else
{