From 99e460ecbbe0489706aac141c54c9aec37c724ed Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 8 Nov 2005 18:54:18 +0000 Subject: [PATCH] - Fix hackplementation of ObLogSecurityDescriptor. Callers are supposed to free their input, so we can't re-use it; instead, allocate a new copy like we should. svn path=/trunk/; revision=19061 --- reactos/lib/rtl/unicodeprefix.c | 2 +- reactos/ntoskrnl/ob/security.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/reactos/lib/rtl/unicodeprefix.c b/reactos/lib/rtl/unicodeprefix.c index bed8483d788..7de07b25480 100644 --- a/reactos/lib/rtl/unicodeprefix.c +++ b/reactos/lib/rtl/unicodeprefix.c @@ -10,7 +10,7 @@ #include -//#define NDEBUG +#define NDEBUG #include /* diff --git a/reactos/ntoskrnl/ob/security.c b/reactos/ntoskrnl/ob/security.c index 376d439e7da..8ed7e882a5b 100644 --- a/reactos/ntoskrnl/ob/security.c +++ b/reactos/ntoskrnl/ob/security.c @@ -263,8 +263,12 @@ ObLogSecurityDescriptor(IN PSECURITY_DESCRIPTOR InputSecurityDescriptor, IN ULONG RefBias) { /* HACK: Return the same descriptor back */ - DPRINT1("ObLogSecurityDescriptor is not implemented!\n"); - *OutputSecurityDescriptor = InputSecurityDescriptor; + PSECURITY_DESCRIPTOR SdCopy; + DPRINT1("ObLogSecurityDescriptor is not implemented! %lx\n", InputSecurityDescriptor->Revision); + + SdCopy = ExAllocatePool(PagedPool, sizeof(*SdCopy)); + RtlMoveMemory(SdCopy, InputSecurityDescriptor, sizeof(*SdCopy)); + *OutputSecurityDescriptor = SdCopy; return STATUS_SUCCESS; }