]> 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)
committerJule Anger <janger@samba.org>
Mon, 10 Jun 2024 14:40:17 +0000 (14:40 +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>
(cherry picked from commit 5abeb724d74af2b861f2ee6bc27762bb5bf07bca)

Autobuild-User(v4-19-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-19-test): Mon Jun 10 14:40:17 UTC 2024 on atb-devel-224

source3/utils/smbcacls.c

index afebcd40b32269f0870537424197a45efe71b05b..b9d46b21d362ccaf9e60db98e330ce0378105d6d 100644 (file)
@@ -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 */