]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nfs4_acls: Use correct type when checking ownerGID
authorChristof Schmitt <cs@samba.org>
Tue, 25 Jun 2019 22:21:06 +0000 (15:21 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 26 Aug 2019 10:23:27 +0000 (10:23 +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>
(cherry picked from commit 3b3d722ce579c19c7b08d06a3adea275537545dc)

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)) {