s3: smbd: Fruit. Make the use of dom_sid_compare_domain() much clearer.
authorJeremy Allison <jra@samba.org>
Mon, 19 Mar 2018 22:46:41 +0000 (15:46 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 21 Mar 2018 12:11:14 +0000 (13:11 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c

index 19b78edb949655de5b2eef8ebea6f584d6d8a154..1a05d0bae3462bc5f3dc458defcf5be195ab5968 100644 (file)
@@ -2965,9 +2965,10 @@ static NTSTATUS remove_virtual_nfs_aces(struct security_descriptor *psd)
 
        for (i = 0; i < psd->dacl->num_aces; i++) {
                /* MS NFS style mode/uid/gid */
-               if (!dom_sid_compare_domain(
+               int cmp = dom_sid_compare_domain(
                                &global_sid_Unix_NFS,
-                               &psd->dacl->aces[i].trustee) == 0) {
+                               &psd->dacl->aces[i].trustee);
+               if (cmp != 0) {
                        /* Normal ACE entry. */
                        continue;
                }