mirror of
https://github.com/reactos/reactos.git
synced 2024-08-12 06:06:27 +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:
parent
a037c16a5b
commit
147bfd92e5
|
@ -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.@]
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue