Fix bug 9376 - ensure_canon_entry_valid generates duplicate SMB_ACL_GROUP, acl_valid...
authorArvid Requate <requate@univention.de>
Sat, 10 Nov 2012 17:21:30 +0000 (09:21 -0800)
committerKarolin Seeger <kseeger@samba.org>
Tue, 13 Nov 2012 08:45:51 +0000 (09:45 +0100)
s3:smbd: typo in got_duplicate_group check.

Due to a typo in posix_acl.c:ensure_canon_entry_valid_on_set the function
returns invalid ACLs in some cases. Specifically it genereates a SMB_ACL_GROUP
for a SMB_ACL_GROUP_OBJ, where the required SMB_ACL_GROUP ace is already
present. This can result in a failure of acl_valid in vfs_acl_xattr.

source3/smbd/posix_acls.c

index 503727fb9998033d6e0b9804d6a402a315751f77..d437b288da2b6496e583090821f6a0cfebe37067 100644 (file)
@@ -1536,7 +1536,7 @@ static bool ensure_canon_entry_valid(connection_struct *conn,
                                /* Already got one. */
                                got_duplicate_user = true;
                        } else if (pace->type == SMB_ACL_GROUP &&
-                                       pace->unix_ug.id == pace_user->unix_ug.id) {
+                                       pace->unix_ug.id == pace_group->unix_ug.id) {
                                /* Already got one. */
                                got_duplicate_group = true;
                        } else if ((pace->type == SMB_ACL_GROUP)