nfs4_acls: Use correct type when checking ownerGID
authorChristof Schmitt <cs@samba.org>
Tue, 25 Jun 2019 22:21:06 +0000 (15:21 -0700)
committerChristof Schmitt <cs@samba.org>
Tue, 23 Jul 2019 18:27:26 +0000 (18:27 +0000)
uid and gid are members of the same union so this makes no difference,
but for type correctness and readability use the gid to check for
ownerGID.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14032

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/nfs4_acls.c

index f8861e9058ba700823db173bcc8c6ec2104e159e..b2ba4d1d7019080b5cec51a2754be43302503bf3 100644 (file)
@@ -856,7 +856,7 @@ static int smbacl4_substitute_simple(
 
                if (!(ace->flags & SMB_ACE4_ID_SPECIAL) &&
                    ace->aceFlags & SMB_ACE4_IDENTIFIER_GROUP &&
-                   ace->who.uid == ownerGID &&
+                   ace->who.gid == ownerGID &&
                    !(ace->aceFlags & SMB_ACE4_INHERIT_ONLY_ACE) &&
                    !(ace->aceFlags & SMB_ACE4_FILE_INHERIT_ACE) &&
                    !(ace->aceFlags & SMB_ACE4_DIRECTORY_INHERIT_ACE)) {