mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[ADVAPI32]
* Move a couple functions from sec.c to security.c. CORE-8540 svn path=/trunk/; revision=64989
This commit is contained in:
@@ -168,29 +168,6 @@ GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
DWORD dwRevision)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlCreateSecurityDescriptor(pSecurityDescriptor,
|
||||
dwRevision);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastError(RtlNtStatusToDosError(Status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
@@ -207,47 +184,6 @@ IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||
return (BOOL)Result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
|
||||
PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
|
||||
LPDWORD lpdwAbsoluteSecurityDescriptorSize,
|
||||
PACL pDacl,
|
||||
LPDWORD lpdwDaclSize,
|
||||
PACL pSacl,
|
||||
LPDWORD lpdwSaclSize,
|
||||
PSID pOwner,
|
||||
LPDWORD lpdwOwnerSize,
|
||||
PSID pPrimaryGroup,
|
||||
LPDWORD lpdwPrimaryGroupSize)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlSelfRelativeToAbsoluteSD(pSelfRelativeSecurityDescriptor,
|
||||
pAbsoluteSecurityDescriptor,
|
||||
lpdwAbsoluteSecurityDescriptorSize,
|
||||
pDacl,
|
||||
lpdwDaclSize,
|
||||
pSacl,
|
||||
lpdwSaclSize,
|
||||
pOwner,
|
||||
lpdwOwnerSize,
|
||||
pPrimaryGroup,
|
||||
lpdwPrimaryGroupSize);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastError(RtlNtStatusToDosError(Status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
@@ -854,6 +854,66 @@ GetLengthSid(PSID pSid)
|
||||
return (DWORD)RtlLengthSid(pSid);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||
DWORD dwRevision)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlCreateSecurityDescriptor(pSecurityDescriptor,
|
||||
dwRevision);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastError(RtlNtStatusToDosError(Status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
|
||||
PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
|
||||
LPDWORD lpdwAbsoluteSecurityDescriptorSize,
|
||||
PACL pDacl,
|
||||
LPDWORD lpdwDaclSize,
|
||||
PACL pSacl,
|
||||
LPDWORD lpdwSaclSize,
|
||||
PSID pOwner,
|
||||
LPDWORD lpdwOwnerSize,
|
||||
PSID pPrimaryGroup,
|
||||
LPDWORD lpdwPrimaryGroupSize)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlSelfRelativeToAbsoluteSD(pSelfRelativeSecurityDescriptor,
|
||||
pAbsoluteSecurityDescriptor,
|
||||
lpdwAbsoluteSecurityDescriptorSize,
|
||||
pDacl,
|
||||
lpdwDaclSize,
|
||||
pSacl,
|
||||
lpdwSaclSize,
|
||||
pOwner,
|
||||
lpdwOwnerSize,
|
||||
pPrimaryGroup,
|
||||
lpdwPrimaryGroupSize);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastError(RtlNtStatusToDosError(Status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetKernelObjectSecurity [ADVAPI32.@]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user