mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +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
2 changed files with 60 additions and 64 deletions
|
@ -168,29 +168,6 @@ GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
||||||
return TRUE;
|
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
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -207,47 +184,6 @@ IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor)
|
||||||
return (BOOL)Result;
|
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
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -854,6 +854,66 @@ GetLengthSid(PSID pSid)
|
||||||
return (DWORD)RtlLengthSid(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.@]
|
* GetKernelObjectSecurity [ADVAPI32.@]
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue