[NTOS:SE] Allocate pool memory for security descriptor based on the caller pool type request

We're indiscriminately allocate the pool as non paged all the time, thus further ignoring the pool type parameter of the function.
This commit is contained in:
George Bișoc
2021-07-03 18:20:43 +02:00
parent 89f5f5bb95
commit ff0a325116

View File

@@ -920,7 +920,7 @@ SeSetSecurityDescriptorInfoEx(
}
SaclLength = Sacl ? ROUND_UP((ULONG)Sacl->AclSize, 4) : 0;
NewSd = ExAllocatePoolWithTag(NonPagedPool,
NewSd = ExAllocatePoolWithTag(PoolType,
sizeof(SECURITY_DESCRIPTOR_RELATIVE) +
OwnerLength + GroupLength +
DaclLength + SaclLength,