mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 10:02:58 +00:00
[FORMATTING]
Fix indentation and coding style. No code changes! svn path=/trunk/; revision=57334
This commit is contained in:
parent
c31b441d5c
commit
c2ab3689b3
8 changed files with 1381 additions and 1349 deletions
|
@ -31,7 +31,8 @@
|
|||
*
|
||||
* @implemented
|
||||
*/
|
||||
SIZE_T NTAPI
|
||||
SIZE_T
|
||||
NTAPI
|
||||
RtlCompareMemory(IN const VOID *Source1,
|
||||
IN const VOID *Source2,
|
||||
IN SIZE_T Length)
|
||||
|
@ -39,20 +40,11 @@ RtlCompareMemory(IN const VOID *Source1,
|
|||
SIZE_T i;
|
||||
for (i = 0; (i < Length) && (((PUCHAR)Source1)[i] == ((PUCHAR)Source2)[i]); i++)
|
||||
;
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
SIZE_T
|
||||
NTAPI
|
||||
RtlCompareMemoryUlong (
|
||||
PVOID Source,
|
||||
SIZE_T Length,
|
||||
ULONG Value
|
||||
)
|
||||
/*
|
||||
* FUNCTION: Compares a block of ULONGs with an ULONG and returns the number of equal bytes
|
||||
* ARGUMENTS:
|
||||
|
@ -60,7 +52,14 @@ RtlCompareMemoryUlong (
|
|||
* Length = Number of bytes to compare
|
||||
* Value = Value to compare
|
||||
* RETURNS: Number of equal bytes
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
SIZE_T
|
||||
NTAPI
|
||||
RtlCompareMemoryUlong(IN PVOID Source,
|
||||
IN SIZE_T Length,
|
||||
IN ULONG Value)
|
||||
{
|
||||
PULONG ptr = (PULONG)Source;
|
||||
ULONG_PTR len = Length / sizeof(ULONG);
|
||||
|
@ -70,6 +69,7 @@ RtlCompareMemoryUlong (
|
|||
{
|
||||
if (*ptr != Value)
|
||||
break;
|
||||
|
||||
ptr++;
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,9 @@ RtlCompareMemoryUlong (
|
|||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFillMemory (
|
||||
PVOID Destination,
|
||||
RtlFillMemory(PVOID Destination,
|
||||
SIZE_T Length,
|
||||
UCHAR Fill
|
||||
)
|
||||
UCHAR Fill)
|
||||
{
|
||||
memset(Destination, Fill, Length);
|
||||
}
|
||||
|
@ -99,11 +97,9 @@ RtlFillMemory (
|
|||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
RtlFillMemoryUlong (
|
||||
PVOID Destination,
|
||||
RtlFillMemoryUlong(PVOID Destination,
|
||||
SIZE_T Length,
|
||||
ULONG Fill
|
||||
)
|
||||
ULONG Fill)
|
||||
{
|
||||
PULONG Dest = Destination;
|
||||
SIZE_T Count = Length / sizeof(ULONG);
|
||||
|
@ -123,28 +119,21 @@ RtlFillMemoryUlong (
|
|||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
RtlMoveMemory (
|
||||
PVOID Destination,
|
||||
RtlMoveMemory(PVOID Destination,
|
||||
CONST VOID *Source,
|
||||
SIZE_T Length
|
||||
)
|
||||
SIZE_T Length)
|
||||
{
|
||||
memmove (
|
||||
Destination,
|
||||
Source,
|
||||
Length
|
||||
);
|
||||
memmove(Destination, Source, Length);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
VOID
|
||||
FASTCALL
|
||||
RtlPrefetchMemoryNonTemporal(
|
||||
IN PVOID Source,
|
||||
IN SIZE_T Length
|
||||
)
|
||||
RtlPrefetchMemoryNonTemporal(IN PVOID Source,
|
||||
IN SIZE_T Length)
|
||||
{
|
||||
/* By nature of prefetch, this is non-portable. */
|
||||
(void)Source;
|
||||
|
@ -158,16 +147,10 @@ RtlPrefetchMemoryNonTemporal(
|
|||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
RtlZeroMemory (
|
||||
PVOID Destination,
|
||||
SIZE_T Length
|
||||
)
|
||||
RtlZeroMemory(PVOID Destination,
|
||||
SIZE_T Length)
|
||||
{
|
||||
RtlFillMemory (
|
||||
Destination,
|
||||
Length,
|
||||
0
|
||||
);
|
||||
RtlFillMemory(Destination, Length, 0);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
static VOID
|
||||
RtlpQuerySecurityDescriptorPointers(IN PISECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
|
@ -30,6 +30,7 @@ RtlpQuerySecurityDescriptorPointers(IN PISECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
{
|
||||
*Owner = ((RelSD->Owner != 0) ? (PSID)((ULONG_PTR)RelSD + RelSD->Owner) : NULL);
|
||||
}
|
||||
|
||||
if (Group != NULL)
|
||||
{
|
||||
*Group = ((RelSD->Group != 0) ? (PSID)((ULONG_PTR)RelSD + RelSD->Group) : NULL);
|
||||
|
@ -104,10 +105,12 @@ RtlpQuerySecurityDescriptor(PISECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlCreateSecurityDescriptor(OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN ULONG Revision)
|
||||
{
|
||||
|
@ -131,10 +134,12 @@ RtlCreateSecurityDescriptor(OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlCopySecurityDescriptor(IN PSECURITY_DESCRIPTOR pSourceSecurityDescriptor,
|
||||
OUT PSECURITY_DESCRIPTOR pDestinationSecurityDescriptor)
|
||||
{
|
||||
|
@ -219,7 +224,8 @@ RtlCopySecurityDescriptor(IN PSECURITY_DESCRIPTOR pSourceSecurityDescriptor,
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlCreateSecurityDescriptorRelative(OUT PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
|
||||
IN ULONG Revision)
|
||||
{
|
||||
|
@ -245,7 +251,8 @@ RtlCreateSecurityDescriptorRelative (OUT PISECURITY_DESCRIPTOR_RELATIVE Security
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG NTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlLengthSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
|
||||
{
|
||||
PSID Owner, Group;
|
||||
|
@ -292,7 +299,8 @@ RtlLengthSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetDaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PBOOLEAN DaclPresent,
|
||||
OUT PACL* Dacl,
|
||||
|
@ -312,6 +320,7 @@ RtlGetDaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
*DaclPresent = FALSE;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
*DaclPresent = TRUE;
|
||||
|
||||
RtlpQuerySecurityDescriptorPointers(pSD,
|
||||
|
@ -320,7 +329,7 @@ RtlGetDaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
NULL,
|
||||
Dacl);
|
||||
|
||||
*DaclDefaulted = ((pSD->Control & SE_DACL_DEFAULTED) ? TRUE : FALSE);
|
||||
*DaclDefaulted = ((pSD->Control & SE_DACL_DEFAULTED) != 0);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -329,7 +338,8 @@ RtlGetDaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetDaclSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN BOOLEAN DaclPresent,
|
||||
IN PACL Dacl,
|
||||
|
@ -371,7 +381,8 @@ RtlSetDaclSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN NTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
|
||||
{
|
||||
PISECURITY_DESCRIPTOR pSD = (PISECURITY_DESCRIPTOR)SecurityDescriptor;
|
||||
|
@ -406,7 +417,8 @@ RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetOwnerSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN PSID Owner,
|
||||
IN BOOLEAN OwnerDefaulted)
|
||||
|
@ -440,7 +452,8 @@ RtlSetOwnerSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetOwnerSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PSID* Owner,
|
||||
OUT PBOOLEAN OwnerDefaulted)
|
||||
|
@ -460,7 +473,7 @@ RtlGetOwnerSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
NULL,
|
||||
NULL);
|
||||
|
||||
*OwnerDefaulted = ((pSD->Control & SE_OWNER_DEFAULTED) ? TRUE : FALSE);
|
||||
*OwnerDefaulted = ((pSD->Control & SE_OWNER_DEFAULTED) != 0);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -469,7 +482,8 @@ RtlGetOwnerSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetGroupSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN PSID Group,
|
||||
IN BOOLEAN GroupDefaulted)
|
||||
|
@ -502,7 +516,8 @@ RtlSetGroupSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetGroupSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PSID* Group,
|
||||
OUT PBOOLEAN GroupDefaulted)
|
||||
|
@ -531,7 +546,8 @@ RtlGetGroupSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlMakeSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSD,
|
||||
OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
||||
IN OUT PULONG BufferLength)
|
||||
|
@ -619,7 +635,8 @@ RtlMakeSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSD,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlAbsoluteToSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
|
||||
IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
|
||||
IN PULONG BufferLength)
|
||||
|
@ -642,7 +659,8 @@ RtlAbsoluteToSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PSECURITY_DESCRIPTOR_CONTROL Control,
|
||||
OUT PULONG Revision)
|
||||
|
@ -667,7 +685,8 @@ RtlGetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
|
||||
IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet)
|
||||
|
@ -676,9 +695,7 @@ RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
= SE_OWNER_DEFAULTED | SE_GROUP_DEFAULTED
|
||||
| SE_DACL_PRESENT | SE_DACL_DEFAULTED
|
||||
| SE_SACL_PRESENT | SE_SACL_DEFAULTED
|
||||
| SE_RM_CONTROL_VALID | SE_SELF_RELATIVE
|
||||
;
|
||||
|
||||
| SE_RM_CONTROL_VALID | SE_SELF_RELATIVE;
|
||||
PISECURITY_DESCRIPTOR pSD = (PISECURITY_DESCRIPTOR)SecurityDescriptor;
|
||||
|
||||
PAGED_CODE_RTL();
|
||||
|
@ -704,7 +721,8 @@ RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlGetSaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PBOOLEAN SaclPresent,
|
||||
OUT PACL *Sacl,
|
||||
|
@ -724,6 +742,7 @@ RtlGetSaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
*SaclPresent = FALSE;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
*SaclPresent = TRUE;
|
||||
|
||||
RtlpQuerySecurityDescriptorPointers(pSD,
|
||||
|
@ -741,7 +760,8 @@ RtlGetSaclSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetSaclSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN BOOLEAN SaclPresent,
|
||||
IN PACL Sacl,
|
||||
|
@ -783,7 +803,8 @@ RtlSetSaclSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSelfRelativeToAbsoluteSD(IN PSECURITY_DESCRIPTOR SelfRelativeSD,
|
||||
OUT PSECURITY_DESCRIPTOR AbsoluteSD,
|
||||
IN PULONG AbsoluteSDSize,
|
||||
|
@ -866,7 +887,8 @@ RtlSelfRelativeToAbsoluteSD(IN PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
||||
OUT PULONG BufferSize)
|
||||
{
|
||||
|
@ -892,6 +914,7 @@ RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
{
|
||||
return STATUS_INVALID_PARAMETER_1;
|
||||
}
|
||||
|
||||
if (BufferSize == NULL)
|
||||
{
|
||||
return STATUS_INVALID_PARAMETER_2;
|
||||
|
@ -901,6 +924,7 @@ RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
{
|
||||
return STATUS_UNKNOWN_REVISION;
|
||||
}
|
||||
|
||||
if (!(pRelSD->Control & SE_SELF_RELATIVE))
|
||||
{
|
||||
return STATUS_BAD_DESCRIPTOR_FORMAT;
|
||||
|
@ -927,6 +951,7 @@ RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
{
|
||||
if (((ULONG_PTR)pGroup < (ULONG_PTR)DataStart) || DataStart == NULL)
|
||||
DataStart = pGroup;
|
||||
|
||||
if (((ULONG_PTR)pGroup + GroupLength > (ULONG_PTR)DataEnd) || DataEnd == NULL)
|
||||
DataEnd = (PVOID)((ULONG_PTR)pGroup + GroupLength);
|
||||
}
|
||||
|
@ -934,6 +959,7 @@ RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
{
|
||||
if (((ULONG_PTR)pDacl < (ULONG_PTR)DataStart) || DataStart == NULL)
|
||||
DataStart = pDacl;
|
||||
|
||||
if (((ULONG_PTR)pDacl + DaclLength > (ULONG_PTR)DataEnd) || DataEnd == NULL)
|
||||
DataEnd = (PVOID)((ULONG_PTR)pDacl + DaclLength);
|
||||
}
|
||||
|
@ -941,6 +967,7 @@ RtlSelfRelativeToAbsoluteSD2(IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
|
|||
{
|
||||
if (((ULONG_PTR)pSacl < (ULONG_PTR)DataStart) || DataStart == NULL)
|
||||
DataStart = pSacl;
|
||||
|
||||
if (((ULONG_PTR)pSacl + SaclLength > (ULONG_PTR)DataEnd) || DataEnd == NULL)
|
||||
DataEnd = (PVOID)((ULONG_PTR)pSacl + SaclLength);
|
||||
}
|
||||
|
@ -1038,6 +1065,8 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp
|
|||
IN SECURITY_INFORMATION RequiredInformation)
|
||||
{
|
||||
PISECURITY_DESCRIPTOR pSD = (PISECURITY_DESCRIPTOR)SecurityDescriptorInput;
|
||||
PSID Owner;
|
||||
PSID Group;
|
||||
|
||||
PAGED_CODE_RTL();
|
||||
|
||||
|
@ -1050,7 +1079,7 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp
|
|||
|
||||
if (pSD->Owner != 0)
|
||||
{
|
||||
PSID Owner = (PSID)((ULONG_PTR)pSD->Owner + (ULONG_PTR)pSD);
|
||||
Owner = (PSID)((ULONG_PTR)pSD->Owner + (ULONG_PTR)pSD);
|
||||
if (!RtlValidSid(Owner))
|
||||
{
|
||||
return FALSE;
|
||||
|
@ -1063,7 +1092,7 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp
|
|||
|
||||
if (pSD->Group != 0)
|
||||
{
|
||||
PSID Group = (PSID)((ULONG_PTR)pSD->Group + (ULONG_PTR)pSD);
|
||||
Group = (PSID)((ULONG_PTR)pSD->Group + (ULONG_PTR)pSD);
|
||||
if (!RtlValidSid(Group))
|
||||
{
|
||||
return FALSE;
|
||||
|
@ -1107,7 +1136,8 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN NTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlGetSecurityDescriptorRMControl(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
OUT PUCHAR RMControl)
|
||||
{
|
||||
|
@ -1130,7 +1160,8 @@ RtlGetSecurityDescriptorRMControl(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
VOID NTAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlSetSecurityDescriptorRMControl(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN PUCHAR RMControl)
|
||||
{
|
||||
|
@ -1154,7 +1185,8 @@ RtlSetSecurityDescriptorRMControl(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetAttributesSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
IN SECURITY_DESCRIPTOR_CONTROL Control,
|
||||
OUT PULONG Revision)
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
|
||||
{
|
||||
HANDLE ProcessToken;
|
||||
|
@ -35,7 +36,7 @@ RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtOpenProcessToken() failed (Status %lx)\n", Status);
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
Sqos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE);
|
||||
|
@ -43,13 +44,11 @@ RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
|
|||
Sqos.ContextTrackingMode = 0;
|
||||
Sqos.EffectiveOnly = FALSE;
|
||||
|
||||
InitializeObjectAttributes(
|
||||
&ObjAttr,
|
||||
InitializeObjectAttributes(&ObjAttr,
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
NULL);
|
||||
|
||||
ObjAttr.SecurityQualityOfService = &Sqos;
|
||||
|
||||
|
@ -63,7 +62,7 @@ RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
|
|||
{
|
||||
DPRINT1("NtDuplicateToken() failed (Status %lx)\n", Status);
|
||||
NtClose(ProcessToken);
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = ZwSetInformationThread(NtCurrentThread(),
|
||||
|
@ -78,7 +77,7 @@ RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
|
|||
ZwClose(ImpersonationToken);
|
||||
ZwClose(ProcessToken);
|
||||
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -108,7 +107,8 @@ RtlReleasePrivilege(IN PVOID ReturnedState)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlAdjustPrivilege(IN ULONG Privilege,
|
||||
IN BOOLEAN Enable,
|
||||
IN BOOLEAN CurrentThread,
|
||||
|
@ -163,6 +163,7 @@ RtlAdjustPrivilege(IN ULONG Privilege,
|
|||
DPRINT1("Failed to assign all privileges\n");
|
||||
return STATUS_PRIVILEGE_NOT_HELD;
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtAdjustPrivilegesToken() failed (Status %lx)\n", Status);
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
BOOLEAN NTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlValidSid(IN PSID Sid_)
|
||||
{
|
||||
PISID Sid = Sid_;
|
||||
|
@ -37,7 +38,8 @@ RtlValidSid(IN PSID Sid_)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG NTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
|
||||
{
|
||||
PAGED_CODE_RTL();
|
||||
|
@ -50,7 +52,8 @@ RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlInitializeSid(IN PSID Sid_,
|
||||
IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
|
||||
IN UCHAR SubAuthorityCount)
|
||||
|
@ -72,7 +75,8 @@ RtlInitializeSid(IN PSID Sid_,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PULONG NTAPI
|
||||
PULONG
|
||||
NTAPI
|
||||
RtlSubAuthoritySid(IN PSID Sid_,
|
||||
IN ULONG SubAuthority)
|
||||
{
|
||||
|
@ -87,7 +91,8 @@ RtlSubAuthoritySid(IN PSID Sid_,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PUCHAR NTAPI
|
||||
PUCHAR
|
||||
NTAPI
|
||||
RtlSubAuthorityCountSid(IN PSID Sid_)
|
||||
{
|
||||
PISID Sid = Sid_;
|
||||
|
@ -101,7 +106,8 @@ RtlSubAuthorityCountSid(IN PSID Sid_)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN NTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlEqualSid(IN PSID Sid1_,
|
||||
IN PSID Sid2_)
|
||||
{
|
||||
|
@ -114,7 +120,7 @@ RtlEqualSid(IN PSID Sid1_,
|
|||
if (Sid1->Revision != Sid2->Revision ||
|
||||
(*RtlSubAuthorityCountSid(Sid1)) != (*RtlSubAuthorityCountSid(Sid2)))
|
||||
{
|
||||
return(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SidLen = RtlLengthSid(Sid1);
|
||||
|
@ -125,7 +131,8 @@ RtlEqualSid(IN PSID Sid1_,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG NTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlLengthSid(IN PSID Sid_)
|
||||
{
|
||||
PISID Sid = Sid_;
|
||||
|
@ -140,7 +147,8 @@ RtlLengthSid(IN PSID Sid_)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlCopySid(ULONG BufferLength,
|
||||
PSID Dest,
|
||||
PSID Src)
|
||||
|
@ -163,7 +171,8 @@ RtlCopySid(ULONG BufferLength,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlCopySidAndAttributesArray(ULONG Count,
|
||||
PSID_AND_ATTRIBUTES Src,
|
||||
ULONG SidAreaSize,
|
||||
|
@ -184,8 +193,9 @@ RtlCopySidAndAttributesArray(ULONG Count,
|
|||
{
|
||||
if (RtlLengthSid(Src[i].Sid) > Length)
|
||||
{
|
||||
return(STATUS_BUFFER_TOO_SMALL);
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
SidLength = RtlLengthSid(Src[i].Sid);
|
||||
Length = Length - SidLength;
|
||||
Dest[i].Sid = SidArea;
|
||||
|
@ -195,16 +205,19 @@ RtlCopySidAndAttributesArray(ULONG Count,
|
|||
Src[i].Sid);
|
||||
SidArea = (PVOID)((ULONG_PTR)SidArea + SidLength);
|
||||
}
|
||||
|
||||
*RemainingSidArea = SidArea;
|
||||
*RemainingSidAreaSize = Length;
|
||||
return(STATUS_SUCCESS);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PSID_IDENTIFIER_AUTHORITY NTAPI
|
||||
PSID_IDENTIFIER_AUTHORITY
|
||||
NTAPI
|
||||
RtlIdentifierAuthoritySid(IN PSID Sid_)
|
||||
{
|
||||
PISID Sid = Sid_;
|
||||
|
@ -218,7 +231,8 @@ RtlIdentifierAuthoritySid(IN PSID Sid_)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
|
||||
UCHAR SubAuthorityCount,
|
||||
ULONG SubAuthority0,
|
||||
|
@ -286,7 +300,8 @@ RtlAllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
|
|||
* Docs says FreeSid does NOT return a value
|
||||
* even thou it's defined to return a PVOID...
|
||||
*/
|
||||
PVOID NTAPI
|
||||
PVOID
|
||||
NTAPI
|
||||
RtlFreeSid(IN PSID Sid)
|
||||
{
|
||||
PAGED_CODE_RTL();
|
||||
|
@ -299,7 +314,8 @@ RtlFreeSid(IN PSID Sid)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOLEAN NTAPI
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlEqualPrefixSid(IN PSID Sid1_,
|
||||
IN PSID Sid2_)
|
||||
{
|
||||
|
@ -325,7 +341,8 @@ RtlEqualPrefixSid(IN PSID Sid1_,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlConvertSidToUnicodeString(PUNICODE_STRING String,
|
||||
PSID Sid_,
|
||||
BOOLEAN AllocateBuffer)
|
||||
|
@ -343,6 +360,7 @@ RtlConvertSidToUnicodeString(PUNICODE_STRING String,
|
|||
|
||||
wcs = Buffer;
|
||||
wcs += swprintf(wcs, L"S-%u-", Sid->Revision);
|
||||
|
||||
if (Sid->IdentifierAuthority.Value[0] == 0 &&
|
||||
Sid->IdentifierAuthority.Value[1] == 0)
|
||||
{
|
||||
|
|
|
@ -167,8 +167,7 @@ RtlCutoverTimeToSystemTime(IN PTIME_FIELDS CutoverTimeFields,
|
|||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlTimeFieldsToTime(
|
||||
IN PTIME_FIELDS TimeFields,
|
||||
RtlTimeFieldsToTime(IN PTIME_FIELDS TimeFields,
|
||||
OUT PLARGE_INTEGER Time)
|
||||
{
|
||||
int CurMonth;
|
||||
|
@ -251,8 +250,7 @@ RtlTimeToElapsedTimeFields(IN PLARGE_INTEGER Time,
|
|||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
RtlTimeToTimeFields(
|
||||
IN PLARGE_INTEGER Time,
|
||||
RtlTimeToTimeFields(IN PLARGE_INTEGER Time,
|
||||
OUT PTIME_FIELDS TimeFields)
|
||||
{
|
||||
const UCHAR *Months;
|
||||
|
@ -309,8 +307,7 @@ RtlTimeToTimeFields(
|
|||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlTimeToSecondsSince1970(
|
||||
IN PLARGE_INTEGER Time,
|
||||
RtlTimeToSecondsSince1970(IN PLARGE_INTEGER Time,
|
||||
OUT PULONG SecondsSince1970)
|
||||
{
|
||||
LARGE_INTEGER IntTime;
|
||||
|
@ -332,8 +329,7 @@ RtlTimeToSecondsSince1970(
|
|||
*/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlTimeToSecondsSince1980(
|
||||
IN PLARGE_INTEGER Time,
|
||||
RtlTimeToSecondsSince1980(IN PLARGE_INTEGER Time,
|
||||
OUT PULONG SecondsSince1980)
|
||||
{
|
||||
LARGE_INTEGER IntTime;
|
||||
|
@ -403,9 +399,9 @@ RtlSystemTimeToLocalTime(IN PLARGE_INTEGER SystemTime,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
VOID NTAPI
|
||||
RtlSecondsSince1970ToTime(
|
||||
IN ULONG SecondsSince1970,
|
||||
VOID
|
||||
NTAPI
|
||||
RtlSecondsSince1970ToTime(IN ULONG SecondsSince1970,
|
||||
OUT PLARGE_INTEGER Time)
|
||||
{
|
||||
Time->QuadPart = ((LONGLONG)SecondsSince1970 * TICKSPERSEC) + TICKSTO1970;
|
||||
|
@ -416,8 +412,7 @@ RtlSecondsSince1970ToTime(
|
|||
* @implemented
|
||||
*/
|
||||
VOID NTAPI
|
||||
RtlSecondsSince1980ToTime(
|
||||
IN ULONG SecondsSince1980,
|
||||
RtlSecondsSince1980ToTime(IN ULONG SecondsSince1980,
|
||||
OUT PLARGE_INTEGER Time)
|
||||
{
|
||||
Time->QuadPart = ((LONGLONG)SecondsSince1980 * TICKSPERSEC) + TICKSTO1980;
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlQueryTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation)
|
||||
{
|
||||
RTL_QUERY_REGISTRY_TABLE QueryTable[8];
|
||||
|
@ -82,7 +83,8 @@ RtlQueryTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
RtlSetTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation)
|
||||
{
|
||||
SIZE_T Length;
|
||||
|
|
|
@ -154,7 +154,8 @@ RtlVerifyVersionInfo(
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONGLONG NTAPI
|
||||
ULONGLONG
|
||||
NTAPI
|
||||
VerSetConditionMask(IN ULONGLONG dwlConditionMask,
|
||||
IN DWORD dwTypeBitMask,
|
||||
IN BYTE dwConditionMask)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue