Date: Wed, 19 Nov 2008 18:08:10 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153224 for review Message-ID: <200811191808.mAJI8ADU041546@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153224 Change 153224 by trasz@trasz_victim7 on 2008/11/19 18:08:02 New ZFS seems to put garbage into ae_id entry when its contens don't matter, i.e. with USER_OBJ, GROUP_OBJ and EVERYONE ACEs, which results in acl_is_trivial_np returning false negatives. Fix this by being more strict in conversion from ace_t to acl_t. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/acl_compat.c#4 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/acl_compat.c#4 (text+ko) ==== @@ -155,8 +155,6 @@ entry = &(aclp->acl_entry[i]); ace = &(aces[i]); - entry->ae_id = ace->a_who; - if (ace->a_flags & ACE_OWNER) entry->ae_tag = ACL_USER_OBJ; else if (ace->a_flags & ACE_GROUP) @@ -168,6 +166,11 @@ else entry->ae_tag = ACL_USER; + if (entry->ae_tag == ACL_USER || entry->ae_tag == ACL_GROUP) + entry->ae_id = ace->a_who; + else + entry->ae_id = ACL_UNDEFINED_ID; + _bsd_from_sun(&(entry->ae_perm), ace->a_access_mask, perms); _bsd_from_sun(&(entry->ae_flags), ace->a_flags, flags);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811191808.mAJI8ADU041546>