https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d72025649b769061b5f9f…
commit d72025649b769061b5f9f38aa57742ef17ae7c9e
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Sun Oct 1 15:02:48 2023 +0200
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Wed Oct 4 18:04:30 2023 +0200
[NTOS:SE] Mute the access denied DPRINTs
They can be spammy. Also clarify these debug prints, because some people
think that "failed to grant access rights" means there's something
wrong
in the core access check functions.
---
ntoskrnl/se/accesschk.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/ntoskrnl/se/accesschk.c b/ntoskrnl/se/accesschk.c
index 858bfeef994..ad931da38fb 100644
--- a/ntoskrnl/se/accesschk.c
+++ b/ntoskrnl/se/accesschk.c
@@ -1174,7 +1174,7 @@ SepAccessCheckWorker(
RemainingAccess &= ~(MAXIMUM_ALLOWED |
AccessCheckRights.GrantedAccessRights);
if (RemainingAccess != 0)
{
- DPRINT1("Failed to grant access rights. RemainingAccess = 0x%08lx
DesiredAccess = 0x%08lx\n", RemainingAccess, DesiredAccess);
+ DPRINT("Failed to grant access rights, access denied.
RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n", RemainingAccess,
DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
@@ -1188,7 +1188,7 @@ SepAccessCheckWorker(
}
else
{
- DPRINT1("Failed to grant access rights. PreviouslyGrantedAccess == 0
DesiredAccess = %08lx\n", DesiredAccess);
+ DPRINT("Failed to grant access rights, access denied.
PreviouslyGrantedAccess == 0 DesiredAccess = %08lx\n", DesiredAccess);
Status = STATUS_ACCESS_DENIED;
}
@@ -1217,7 +1217,7 @@ SepAccessCheckWorker(
RemainingAccess &= ~(MAXIMUM_ALLOWED | GrantedRights);
if (RemainingAccess != 0)
{
- DPRINT1("Failed to grant access rights to the whole object hierarchy
list. RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n",
+ DPRINT("Failed to grant access rights to the whole object hierarchy
list, access denied. RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n",
RemainingAccess, DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
@@ -1232,7 +1232,7 @@ SepAccessCheckWorker(
}
else
{
- DPRINT1("Failed to grant access rights to the whole object hierarchy
list. PreviouslyGrantedAccess == 0 DesiredAccess = %08lx\n",
+ DPRINT("Failed to grant access rights to the whole object hierarchy
list, access denied. PreviouslyGrantedAccess == 0 DesiredAccess = %08lx\n",
DesiredAccess);
Status = STATUS_ACCESS_DENIED;
}
@@ -1262,7 +1262,7 @@ SepAccessCheckWorker(
RemainingAccess = (~GrantedRights & WantedRights);
if (RemainingAccess != 0)
{
- DPRINT1("Failed to grant access rights at specific object at
index %lu. RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n",
+ DPRINT("Failed to grant access rights at specific object at
index %lu, access denied. RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n",
ObjectTypeIndex, RemainingAccess, DesiredAccess);
AccessStatusList[ObjectTypeIndex] = STATUS_ACCESS_DENIED;
}
@@ -1274,7 +1274,7 @@ SepAccessCheckWorker(
else
{
/* No access is given */
- DPRINT1("Failed to grant access rights at specific object at
index %lu. No access is given\n", ObjectTypeIndex);
+ DPRINT("Failed to grant access rights at specific object at
index %lu. No access is given\n", ObjectTypeIndex);
AccessStatusList[ObjectTypeIndex] = STATUS_ACCESS_DENIED;
}
@@ -1324,7 +1324,7 @@ SepAccessCheckWorker(
/* Fail if some rights have not been granted */
if (AccessCheckRights.RemainingAccessRights != 0)
{
- DPRINT1("Failed to grant access rights. RemainingAccess = 0x%08lx
DesiredAccess = 0x%08lx\n", AccessCheckRights.RemainingAccessRights,
DesiredAccess);
+ DPRINT("Failed to grant access rights, access denied. RemainingAccess =
0x%08lx DesiredAccess = 0x%08lx\n", AccessCheckRights.RemainingAccessRights,
DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
@@ -1349,7 +1349,7 @@ SepAccessCheckWorker(
if (!AccessIsGranted)
{
- DPRINT1("Failed to grant access rights to the whole object hierarchy
list. DesiredAccess = 0x%08lx\n", DesiredAccess);
+ DPRINT("Failed to grant access rights to the whole object hierarchy
list, access denied. DesiredAccess = 0x%08lx\n", DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
@@ -1381,7 +1381,7 @@ SepAccessCheckWorker(
/* Fail if some rights have not been granted */
if (AccessCheckRights.RemainingAccessRights != 0)
{
- DPRINT1("Failed to grant access rights. RemainingAccess = 0x%08lx
DesiredAccess = 0x%08lx\n", AccessCheckRights.RemainingAccessRights,
DesiredAccess);
+ DPRINT("Failed to grant access rights, access denied.
RemainingAccess = 0x%08lx DesiredAccess = 0x%08lx\n",
AccessCheckRights.RemainingAccessRights, DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
@@ -1410,7 +1410,7 @@ SepAccessCheckWorker(
if (!AccessIsGranted)
{
- DPRINT1("Failed to grant access rights to the whole object hierarchy
list. DesiredAccess = 0x%08lx\n", DesiredAccess);
+ DPRINT("Failed to grant access rights to the whole object hierarchy
list, access denied. DesiredAccess = 0x%08lx\n", DesiredAccess);
PreviouslyGrantedAccess = 0;
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
@@ -1424,7 +1424,7 @@ SepAccessCheckWorker(
/* Fail if no rights have been granted */
if (PreviouslyGrantedAccess == 0)
{
- DPRINT1("Failed to grant access rights. PreviouslyGrantedAccess == 0
DesiredAccess = %08lx\n", DesiredAccess);
+ DPRINT("Failed to grant access rights, access denied.
PreviouslyGrantedAccess == 0 DesiredAccess = %08lx\n", DesiredAccess);
Status = STATUS_ACCESS_DENIED;
goto ReturnCommonStatus;
}