From: Andrew Bartlett Date: Wed, 9 May 2012 04:35:55 +0000 (+1000) Subject: s3-smbd: Fix the creation of duplicate SMB_ACL_GROUP entries X-Git-Tag: samba-4.0.0alpha21~256 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d46ddfa748523b5d75c7ea2bb5664bfb48ab3814;p=thirdparty%2Fsamba.git s3-smbd: Fix the creation of duplicate SMB_ACL_GROUP entries The issue was a simple copy and paste bug, which casued a duplicate SMB_ACL_GROUP to be added when we already had one. Andrew Bartlett Signed-off-by: Jeremy Allison Autobuild-User: Jeremy Allison Autobuild-Date: Wed May 9 13:17:29 CEST 2012 on sn-devel-104 --- diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index f54bfa1648a..bbf0eae0f19 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1510,8 +1510,8 @@ static bool ensure_canon_entry_valid(connection_struct *conn, canon_ace **pp_ace pace->unix_ug.uid == pace_user->unix_ug.uid) { /* Already got one. */ got_duplicate_user = true; - } else if (pace->type == SMB_ACL_USER && - pace->unix_ug.uid == pace_user->unix_ug.uid) { + } else if (pace->type == SMB_ACL_GROUP && + pace->unix_ug.gid == pace_user->unix_ug.gid) { /* Already got one. */ got_duplicate_group = true; }