From: Douglas Bagnall Date: Tue, 21 May 2024 08:20:36 +0000 (+1200) Subject: s3:smbcacls: fix ace_compare X-Git-Tag: tdb-1.4.11~604 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5abeb724d74af2b861f2ee6bc27762bb5bf07bca;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 45f98d36075..c157e9433fa 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -511,7 +511,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 */