mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[LSASRV]
Do not store a key name in an LSA object. Fixes CORE-6792. svn path=/trunk/; revision=57771
This commit is contained in:
parent
7e62b6e39e
commit
28296864ff
1 changed files with 9 additions and 5 deletions
|
@ -796,7 +796,8 @@ LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject,
|
||||||
|
|
||||||
NewObject = RtlAllocateHeap(RtlGetProcessHeap(),
|
NewObject = RtlAllocateHeap(RtlGetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
sizeof(LSA_DB_OBJECT) + wcslen(ObjectName) + sizeof(WCHAR));
|
// sizeof(LSA_DB_OBJECT) + wcslen(ObjectName) + sizeof(WCHAR));
|
||||||
|
sizeof(LSA_DB_OBJECT));
|
||||||
if (NewObject == NULL)
|
if (NewObject == NULL)
|
||||||
{
|
{
|
||||||
NtClose(ObjectKeyHandle);
|
NtClose(ObjectKeyHandle);
|
||||||
|
@ -809,7 +810,7 @@ LsapOpenDbObject(IN PLSA_DB_OBJECT ParentObject,
|
||||||
NewObject->Access = DesiredAccess;
|
NewObject->Access = DesiredAccess;
|
||||||
NewObject->KeyHandle = ObjectKeyHandle;
|
NewObject->KeyHandle = ObjectKeyHandle;
|
||||||
NewObject->ParentObject = ParentObject;
|
NewObject->ParentObject = ParentObject;
|
||||||
wcscpy(NewObject->Name, ObjectName);
|
// wcscpy(NewObject->Name, ObjectName);
|
||||||
|
|
||||||
if (ParentObject != NULL)
|
if (ParentObject != NULL)
|
||||||
ParentObject->RefCount++;
|
ParentObject->RefCount++;
|
||||||
|
@ -900,9 +901,10 @@ NTSTATUS
|
||||||
LsapDeleteDbObject(IN PLSA_DB_OBJECT DbObject)
|
LsapDeleteDbObject(IN PLSA_DB_OBJECT DbObject)
|
||||||
{
|
{
|
||||||
PLSA_DB_OBJECT ParentObject = NULL;
|
PLSA_DB_OBJECT ParentObject = NULL;
|
||||||
|
#if 0
|
||||||
WCHAR KeyName[64];
|
WCHAR KeyName[64];
|
||||||
ULONG EnumIndex;
|
ULONG EnumIndex;
|
||||||
|
#endif
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
DbObject->RefCount--;
|
DbObject->RefCount--;
|
||||||
|
@ -912,6 +914,7 @@ LsapDeleteDbObject(IN PLSA_DB_OBJECT DbObject)
|
||||||
|
|
||||||
if (DbObject->KeyHandle != NULL)
|
if (DbObject->KeyHandle != NULL)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
EnumIndex = 0;
|
EnumIndex = 0;
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
|
@ -933,16 +936,17 @@ LsapDeleteDbObject(IN PLSA_DB_OBJECT DbObject)
|
||||||
|
|
||||||
// EnumIndex++;
|
// EnumIndex++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
NtClose(DbObject->KeyHandle);
|
NtClose(DbObject->KeyHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DbObject->ParentObject != NULL)
|
if (DbObject->ParentObject != NULL)
|
||||||
{
|
{
|
||||||
ParentObject = DbObject->ParentObject;
|
ParentObject = DbObject->ParentObject;
|
||||||
|
#if 0
|
||||||
LsapRegDeleteKey(ParentObject->KeyHandle,
|
LsapRegDeleteKey(ParentObject->KeyHandle,
|
||||||
DbObject->Name);
|
DbObject->Name);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlFreeHeap(RtlGetProcessHeap(), 0, DbObject);
|
RtlFreeHeap(RtlGetProcessHeap(), 0, DbObject);
|
||||||
|
|
Loading…
Reference in a new issue