s3-smbd: Fix the creation of duplicate SMB_ACL_GROUP entries
authorAndrew Bartlett <abartlet@samba.org>
Wed, 9 May 2012 04:35:55 +0000 (14:35 +1000)
committerJeremy Allison <jra@samba.org>
Wed, 9 May 2012 11:17:28 +0000 (13:17 +0200)
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 <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May  9 13:17:29 CEST 2012 on sn-devel-104

source3/smbd/posix_acls.c

index f54bfa1648aa5c063ac9127e3ad99f52c07c477e..bbf0eae0f19d0bd635296d2c9f610c39401410b1 100644 (file)
@@ -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;
                        }