- 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.
Modified: trunk/reactos/lib/rtl/unicodeprefix.c
Modified: trunk/reactos/ntoskrnl/ob/security.c
_____
Modified: trunk/reactos/lib/rtl/unicodeprefix.c
--- trunk/reactos/lib/rtl/unicodeprefix.c 2005-11-08 17:22:26 UTC
(rev 19060)
+++ trunk/reactos/lib/rtl/unicodeprefix.c 2005-11-08 18:54:18 UTC
(rev 19061)
@@ -10,7 +10,7 @@
#include <rtl.h>
-//#define NDEBUG
+#define NDEBUG
#include <debug.h>
/*
_____
Modified: trunk/reactos/ntoskrnl/ob/security.c
--- trunk/reactos/ntoskrnl/ob/security.c 2005-11-08 17:22:26 UTC
(rev 19060)
+++ trunk/reactos/ntoskrnl/ob/security.c 2005-11-08 18:54:18 UTC
(rev 19061)
@@ -263,8 +263,12 @@
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;
}