From d4f9272b7e9ebf51c82f22b9c877cf37ed66218a Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Tue, 21 May 2024 20:20:36 +1200 Subject: [PATCH] s3:smbcacls: fix ace_compare We got this wrong in commit 31101a9fa1503be9d8137e42466f57d85136a156. In fact, we should probably not reorder the inherited ACLs, but that is for another patch series. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625 Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett (cherry picked from commit 5abeb724d74af2b861f2ee6bc27762bb5bf07bca) Autobuild-User(v4-19-test): Jule Anger Autobuild-Date(v4-19-test): Mon Jun 10 14:40:17 UTC 2024 on atb-devel-224 --- source3/utils/smbcacls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index afebcd40b32..b9d46b21d36 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -506,7 +506,7 @@ static int ace_compare(struct security_ace *ace1, struct security_ace *ace2) return -1; if ((ace1->flags & SEC_ACE_FLAG_INHERITED_ACE) && (ace2->flags & SEC_ACE_FLAG_INHERITED_ACE)) - return NUMERIC_CMP(ace1, ace2); + return NUMERIC_CMP(ace2->type, ace1->type); if (ace1->type != ace2->type) { /* note the reverse order */ -- 2.47.2