mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
don't copy the entire security descriptor to the stack in SeCaptureSecurityDescriptor() when previous mode is kernel mode and capturing for kernel mode is undesired
svn path=/trunk/; revision=13237
This commit is contained in:
parent
064504a61d
commit
e453a1e961
1 changed files with 10 additions and 6 deletions
|
@ -154,18 +154,22 @@ SeCaptureSecurityDescriptor(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(!CaptureIfKernel)
|
||||||
|
{
|
||||||
|
if(OriginalSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1)
|
||||||
|
{
|
||||||
|
return STATUS_UNKNOWN_REVISION;
|
||||||
|
}
|
||||||
|
|
||||||
|
*CapturedSecurityDescriptor = OriginalSecurityDescriptor;
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* make a copy on the stack */
|
/* make a copy on the stack */
|
||||||
DescriptorCopy = *OriginalSecurityDescriptor;
|
DescriptorCopy = *OriginalSecurityDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CurrentMode == KernelMode && !CaptureIfKernel)
|
|
||||||
{
|
|
||||||
*CapturedSecurityDescriptor = OriginalSecurityDescriptor;
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DescriptorCopy.Revision != SECURITY_DESCRIPTOR_REVISION1)
|
if(DescriptorCopy.Revision != SECURITY_DESCRIPTOR_REVISION1)
|
||||||
{
|
{
|
||||||
return STATUS_UNKNOWN_REVISION;
|
return STATUS_UNKNOWN_REVISION;
|
||||||
|
|
Loading…
Reference in a new issue