2005-09-08 00:09:32 +00:00
|
|
|
/* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS system libraries
|
|
|
|
* PURPOSE: Locally unique identifier (LUID) helper functions
|
|
|
|
* FILE: lib/rtl/luid.c
|
2010-01-09 22:43:16 +00:00
|
|
|
* PROGRAMER: Eric Kohl
|
2004-05-31 19:33:59 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
2005-07-26 08:39:07 +00:00
|
|
|
#include <rtl.h>
|
2004-05-31 19:33:59 +00:00
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
2005-10-19 17:03:38 +00:00
|
|
|
VOID NTAPI
|
2004-05-31 19:33:59 +00:00
|
|
|
RtlCopyLuid(PLUID LuidDest,
|
|
|
|
PLUID LuidSrc)
|
|
|
|
{
|
2005-02-22 17:58:19 +00:00
|
|
|
PAGED_CODE_RTL();
|
2005-05-09 01:41:02 +00:00
|
|
|
|
2004-05-31 19:33:59 +00:00
|
|
|
LuidDest->LowPart = LuidSrc->LowPart;
|
|
|
|
LuidDest->HighPart = LuidSrc->HighPart;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2005-10-19 17:03:38 +00:00
|
|
|
VOID NTAPI
|
2004-05-31 19:33:59 +00:00
|
|
|
RtlCopyLuidAndAttributesArray(ULONG Count,
|
|
|
|
PLUID_AND_ATTRIBUTES Src,
|
|
|
|
PLUID_AND_ATTRIBUTES Dest)
|
|
|
|
{
|
|
|
|
ULONG i;
|
2005-05-09 01:41:02 +00:00
|
|
|
|
2005-02-22 17:58:19 +00:00
|
|
|
PAGED_CODE_RTL();
|
2004-05-31 19:33:59 +00:00
|
|
|
|
|
|
|
for (i = 0; i < Count; i++)
|
|
|
|
{
|
|
|
|
RtlCopyMemory(&Dest[i],
|
|
|
|
&Src[i],
|
|
|
|
sizeof(LUID_AND_ATTRIBUTES));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-17 07:57:37 +00:00
|
|
|
#undef RtlEqualLuid
|
2004-05-31 19:33:59 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2005-10-19 17:03:38 +00:00
|
|
|
BOOLEAN NTAPI
|
2004-05-31 19:33:59 +00:00
|
|
|
RtlEqualLuid(PLUID Luid1,
|
|
|
|
PLUID Luid2)
|
|
|
|
{
|
2005-02-22 17:58:19 +00:00
|
|
|
PAGED_CODE_RTL();
|
2005-05-09 01:41:02 +00:00
|
|
|
|
2004-05-31 19:33:59 +00:00
|
|
|
return (Luid1->LowPart == Luid2->LowPart &&
|
|
|
|
Luid1->HighPart == Luid2->HighPart);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|