diff options
author | Matthew Macy <[email protected]> | 2020-08-17 15:28:03 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-17 15:28:03 -0700 |
commit | cfdc432e644912bbd7e026110ee57cc0f22ec321 (patch) | |
tree | 23f3ce7db2ad5ee05051c89e5a77f004cca8c50c /module/os/freebsd/zfs/zfs_acl.c | |
parent | b0099072dfc38c502222c47172469d7245027f35 (diff) |
FreeBSD: fix merge error in zfs_acl_ids_create
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #10721
Diffstat (limited to 'module/os/freebsd/zfs/zfs_acl.c')
-rw-r--r-- | module/os/freebsd/zfs/zfs_acl.c | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/module/os/freebsd/zfs/zfs_acl.c b/module/os/freebsd/zfs/zfs_acl.c index 1c1a053b5..7446df1d1 100644 --- a/module/os/freebsd/zfs/zfs_acl.c +++ b/module/os/freebsd/zfs/zfs_acl.c @@ -1658,33 +1658,22 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *vap, cred_t *cr, acl_ids->z_fgid = 0; } if (acl_ids->z_fgid == 0) { - if (dzp->z_mode & S_ISGID) { - char *domain; - uint32_t rid; - - acl_ids->z_fgid = dzp->z_gid; - gid = zfs_fuid_map_id(zfsvfs, acl_ids->z_fgid, - cr, ZFS_GROUP); - - if (zfsvfs->z_use_fuids && - IS_EPHEMERAL(acl_ids->z_fgid)) { - domain = zfs_fuid_idx_domain( - &zfsvfs->z_fuid_idx, - FUID_INDEX(acl_ids->z_fgid)); - rid = FUID_RID(acl_ids->z_fgid); - zfs_fuid_node_add(&acl_ids->z_fuidp, - domain, rid, - FUID_INDEX(acl_ids->z_fgid), - acl_ids->z_fgid, ZFS_GROUP); - } - } else { - acl_ids->z_fgid = zfs_fuid_create_cred(zfsvfs, - ZFS_GROUP, cr, &acl_ids->z_fuidp); -#ifdef __FreeBSD_kernel__ - gid = acl_ids->z_fgid = dzp->z_gid; -#else - gid = crgetgid(cr); -#endif + char *domain; + uint32_t rid; + + acl_ids->z_fgid = dzp->z_gid; + gid = zfs_fuid_map_id(zfsvfs, acl_ids->z_fgid, + cr, ZFS_GROUP); + + if (zfsvfs->z_use_fuids && + IS_EPHEMERAL(acl_ids->z_fgid)) { + domain = + zfs_fuid_idx_domain(&zfsvfs->z_fuid_idx, + FUID_INDEX(acl_ids->z_fgid)); + rid = FUID_RID(acl_ids->z_fgid); + zfs_fuid_node_add(&acl_ids->z_fuidp, + domain, rid, FUID_INDEX(acl_ids->z_fgid), + acl_ids->z_fgid, ZFS_GROUP); } } } |