ntdll: Fix RtlGetSacl/DaclSecurityDescriptor for relative descriptors on 64-bit.
This commit is contained in:
parent
c485996e5e
commit
ab7efe7273
|
@ -604,12 +604,15 @@ NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
|
||||||
|
|
||||||
if ( (*lpbDaclPresent = (SE_DACL_PRESENT & lpsd->Control) ? 1 : 0) )
|
if ( (*lpbDaclPresent = (SE_DACL_PRESENT & lpsd->Control) ? 1 : 0) )
|
||||||
{
|
{
|
||||||
if ((SE_SELF_RELATIVE & lpsd->Control) && lpsd->Dacl)
|
if (lpsd->Control & SE_SELF_RELATIVE)
|
||||||
*pDacl = (PACL)SELF_RELATIVE_FIELD( lpsd, Dacl );
|
{
|
||||||
else
|
SECURITY_DESCRIPTOR_RELATIVE *sdr = pSecurityDescriptor;
|
||||||
*pDacl = lpsd->Dacl;
|
if (sdr->Dacl) *pDacl = (PACL)SELF_RELATIVE_FIELD( sdr, Dacl );
|
||||||
|
else *pDacl = NULL;
|
||||||
|
}
|
||||||
|
else *pDacl = lpsd->Dacl;
|
||||||
|
|
||||||
*lpbDaclDefaulted = (( SE_DACL_DEFAULTED & lpsd->Control ) ? 1 : 0);
|
*lpbDaclDefaulted = (lpsd->Control & SE_DACL_DEFAULTED) != 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -673,12 +676,15 @@ NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(
|
||||||
|
|
||||||
if ( (*lpbSaclPresent = (SE_SACL_PRESENT & lpsd->Control) ? 1 : 0) )
|
if ( (*lpbSaclPresent = (SE_SACL_PRESENT & lpsd->Control) ? 1 : 0) )
|
||||||
{
|
{
|
||||||
if ((SE_SELF_RELATIVE & lpsd->Control) && lpsd->Sacl)
|
if (lpsd->Control & SE_SELF_RELATIVE)
|
||||||
*pSacl = (PACL)SELF_RELATIVE_FIELD( lpsd, Sacl );
|
{
|
||||||
else
|
SECURITY_DESCRIPTOR_RELATIVE *sdr = pSecurityDescriptor;
|
||||||
*pSacl = lpsd->Sacl;
|
if (sdr->Sacl) *pSacl = (PACL)SELF_RELATIVE_FIELD( sdr, Sacl );
|
||||||
|
else *pSacl = NULL;
|
||||||
|
}
|
||||||
|
else *pSacl = lpsd->Sacl;
|
||||||
|
|
||||||
*lpbSaclDefaulted = (( SE_SACL_DEFAULTED & lpsd->Control ) ? 1 : 0);
|
*lpbSaclDefaulted = (lpsd->Control & SE_SACL_DEFAULTED) != 0;
|
||||||
}
|
}
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue