-/* $Id: semgr.c,v 1.40 2004/08/15 16:39:12 chorns Exp $
+/* $Id: semgr.c,v 1.41 2004/08/28 22:22:39 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
-#define NDEBUG
+//#define NDEBUG
#include <internal/debug.h>
#define TAG_SXPT TAG('S', 'X', 'P', 'T')
ULONG SaclLength = 0;
ULONG Length = 0;
ULONG Control = 0;
- ULONG Current;
+ ULONG_PTR Current;
PSID Owner = NULL;
PSID Group = NULL;
PACL Dacl = NULL;
Descriptor->Control = Control | SE_SELF_RELATIVE;
- Current = (ULONG)Descriptor + sizeof(SECURITY_DESCRIPTOR);
+ Current = (ULONG_PTR)Descriptor + sizeof(SECURITY_DESCRIPTOR);
if (SaclLength != 0)
{
RtlCopyMemory((PVOID)Current,
Sacl,
SaclLength);
- Descriptor->Sacl = (PACL)((ULONG)Current - (ULONG)Descriptor);
+ Descriptor->Sacl = (PACL)((ULONG_PTR)Current - (ULONG_PTR)Descriptor);
Current += SaclLength;
}
RtlCopyMemory((PVOID)Current,
Dacl,
DaclLength);
- Descriptor->Dacl = (PACL)((ULONG)Current - (ULONG)Descriptor);
+ Descriptor->Dacl = (PACL)((ULONG_PTR)Current - (ULONG_PTR)Descriptor);
Current += DaclLength;
}
RtlCopyMemory((PVOID)Current,
Owner,
OwnerLength);
- Descriptor->Owner = (PSID)((ULONG)Current - (ULONG)Descriptor);
+ Descriptor->Owner = (PSID)((ULONG_PTR)Current - (ULONG_PTR)Descriptor);
Current += OwnerLength;
}
memmove((PVOID)Current,
Group,
GroupLength);
- Descriptor->Group = (PSID)((ULONG)Current - (ULONG)Descriptor);
+ Descriptor->Group = (PSID)((ULONG_PTR)Current - (ULONG_PTR)Descriptor);
}
/* FIXME: Unlock subject context */