From 5c909ea4530d4e7e4aa27046c45e3e48b094a411 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 19 Mar 2018 15:46:41 -0700 Subject: [PATCH] s3: smbd: Fruit. Make the use of dom_sid_compare_domain() much clearer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/modules/vfs_fruit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 19b78edb949..1a05d0bae34 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -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; }