mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Cleaned up RtlpQuerySecurityDescriptor() and fixed SaclLength.
svn path=/trunk/; revision=6322
This commit is contained in:
+14
-10
@@ -1,4 +1,4 @@
|
||||
/* $Id: sd.c,v 1.12 2003/09/12 17:51:48 vizzini Exp $
|
||||
/* $Id: sd.c,v 1.13 2003/10/15 11:00:33 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -392,11 +392,7 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
PACL* Sacl,
|
||||
PULONG SaclLength)
|
||||
{
|
||||
if (SecurityDescriptor->Owner == NULL)
|
||||
{
|
||||
*Owner = NULL;
|
||||
}
|
||||
else
|
||||
if (SecurityDescriptor->Owner != NULL)
|
||||
{
|
||||
*Owner = SecurityDescriptor->Owner;
|
||||
if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
|
||||
@@ -404,6 +400,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
*Owner = (PSID)((ULONG)*Owner + (ULONG)SecurityDescriptor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*Owner = NULL;
|
||||
}
|
||||
|
||||
if (*Owner != NULL)
|
||||
{
|
||||
@@ -438,10 +438,6 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
}
|
||||
|
||||
if (SecurityDescriptor->Group != NULL)
|
||||
{
|
||||
*Group = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
*Group = SecurityDescriptor->Group;
|
||||
if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
|
||||
@@ -449,6 +445,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
*Group = (PSID)((ULONG)*Group + (ULONG)SecurityDescriptor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*Group = NULL;
|
||||
}
|
||||
|
||||
if (*Group != NULL)
|
||||
{
|
||||
@@ -477,6 +477,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
{
|
||||
*SaclLength = ((*Sacl)->AclSize + 3) & ~3;
|
||||
}
|
||||
else
|
||||
{
|
||||
*SaclLength = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+14
-10
@@ -1,4 +1,4 @@
|
||||
/* $Id: sd.c,v 1.11 2003/10/12 17:05:50 hbirr Exp $
|
||||
/* $Id: sd.c,v 1.12 2003/10/15 11:02:04 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -601,11 +601,7 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
PACL* Sacl,
|
||||
PULONG SaclLength)
|
||||
{
|
||||
if (SecurityDescriptor->Owner == NULL)
|
||||
{
|
||||
*Owner = NULL;
|
||||
}
|
||||
else
|
||||
if (SecurityDescriptor->Owner != NULL)
|
||||
{
|
||||
*Owner = SecurityDescriptor->Owner;
|
||||
if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
|
||||
@@ -613,6 +609,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
*Owner = (PSID)((ULONG)*Owner + (ULONG)SecurityDescriptor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*Owner = NULL;
|
||||
}
|
||||
|
||||
if (*Owner != NULL)
|
||||
{
|
||||
@@ -647,10 +647,6 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
}
|
||||
|
||||
if (SecurityDescriptor->Group != NULL)
|
||||
{
|
||||
*Group = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
*Group = SecurityDescriptor->Group;
|
||||
if (SecurityDescriptor->Control & SE_SELF_RELATIVE)
|
||||
@@ -658,6 +654,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
*Group = (PSID)((ULONG)*Group + (ULONG)SecurityDescriptor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*Group = NULL;
|
||||
}
|
||||
|
||||
if (*Group != NULL)
|
||||
{
|
||||
@@ -686,6 +686,10 @@ RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||
{
|
||||
*SaclLength = ((*Sacl)->AclSize + 3) & ~3;
|
||||
}
|
||||
else
|
||||
{
|
||||
*SaclLength = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user