]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbcacls: fix ace_compare
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 21 May 2024 08:20:36 +0000 (20:20 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2024 04:23:29 +0000 (04:23 +0000)
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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/smbcacls.c

index 45f98d36075e66ed57008975f6492ec6d8231f01..c157e9433fa6ad8dc9526b3a709d5554ed608ac8 100644 (file)
@@ -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 */