https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1fb32afefaa3563137ea1…
commit 1fb32afefaa3563137ea1fefd9c86aa4cbf0a68e
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Nov 10 10:02:34 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Nov 10 10:54:06 2018 +0100
[NTOSKRNL] Return quota information when querying object basic info
---
ntoskrnl/ob/oblife.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c
index 798cccad05..1a88438538 100644
--- a/ntoskrnl/ob/oblife.c
+++ b/ntoskrnl/ob/oblife.c
@@ -1487,6 +1487,7 @@ NtQueryObject(IN HANDLE ObjectHandle,
ULONG InfoLength = 0;
PVOID Object = NULL;
NTSTATUS Status;
+ POBJECT_HEADER_QUOTA_INFO ObjectQuota;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
PAGED_CODE();
@@ -1566,8 +1567,17 @@ NtQueryObject(IN HANDLE ObjectHandle,
}
/* Copy quota information */
- BasicInfo->PagedPoolCharge = 0; /* FIXME*/
- BasicInfo->NonPagedPoolCharge = 0; /* FIXME*/
+ ObjectQuota = OBJECT_HEADER_TO_QUOTA_INFO(ObjectHeader);
+ if (ObjectQuota != NULL)
+ {
+ BasicInfo->PagedPoolCharge = ObjectQuota->PagedPoolCharge;
+ BasicInfo->NonPagedPoolCharge =
ObjectQuota->NonPagedPoolCharge;
+ }
+ else
+ {
+ BasicInfo->PagedPoolCharge = 0;
+ BasicInfo->NonPagedPoolCharge = 0;
+ }
/* Copy name information */
BasicInfo->NameInfoSize = 0; /* FIXME*/