https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cad780e17caddbe7660d9…
commit cad780e17caddbe7660d95755be5c145c4ada98b
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Wed Jul 5 20:31:23 2023 +0200
Commit: unknown <george.bisoc(a)reactos.org>
CommitDate: Tue Aug 22 17:54:18 2023 +0200
[SDK:RTL] Fix the ACE revision check in RtlpAddKnownObjectAce
Object ACEs are supported starting from Revision 4, the current code checks
if the revision is above Revision 4. An Object ACE has to be strictly set on that
revision,
whereas Object ACLs can be of any revision starting from ACL_REVISION4.
---
sdk/lib/rtl/acl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/lib/rtl/acl.c b/sdk/lib/rtl/acl.c
index afe41d0bcdb..efe7d331a57 100644
--- a/sdk/lib/rtl/acl.c
+++ b/sdk/lib/rtl/acl.c
@@ -173,7 +173,7 @@ RtlpAddKnownObjectAce(IN PACL Acl,
if (!RtlValidSid(Sid)) return STATUS_INVALID_SID;
/* Check the validity of the revision */
- if ((Acl->AclRevision > ACL_REVISION4) || (Revision > ACL_REVISION4))
+ if ((Acl->AclRevision > ACL_REVISION4) || (Revision != ACL_REVISION4))
{
return STATUS_REVISION_MISMATCH;
}