Remove some redundant code in _posix1e_acl_strip_np

This was discovered through examination -- acl_copy_entry() copies the
tag type and permset fields.

Reviewed by:	trasz, pfg
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D19240
This commit is contained in:
Sean Eric Fagan 2019-02-19 19:15:15 +00:00
parent 5671e0d62e
commit 237f4abc57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344294

View File

@ -70,7 +70,6 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask)
{
acl_t acl_new, acl_old;
acl_entry_t entry, entry_new;
acl_permset_t perm;
acl_tag_t tag;
int entry_id, have_mask_entry;
@ -104,16 +103,8 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask)
case ACL_USER_OBJ:
case ACL_GROUP_OBJ:
case ACL_OTHER:
if (acl_get_tag_type(entry, &tag) == -1)
goto fail;
if (acl_get_permset(entry, &perm) == -1)
goto fail;
if (acl_create_entry(&acl_new, &entry_new) == -1)
goto fail;
if (acl_set_tag_type(entry_new, tag) == -1)
goto fail;
if (acl_set_permset(entry_new, perm) == -1)
goto fail;
if (acl_copy_entry(entry_new, entry) == -1)
goto fail;
assert(_entry_brand(entry_new) == ACL_BRAND_POSIX);