Restore BSD behaviour - when creating new directory entry use parent directory

gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR:		kern/139076
Reported by:	Sean Winn <sean@gothic.net.au>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2009-09-23 09:18:16 +00:00
parent aae0914135
commit eb03c3cdfb

View file

@ -1841,7 +1841,7 @@ zfs_perm_init(znode_t *zp, znode_t *parent, int flag,
fgid = zfs_fuid_create_cred(zfsvfs,
ZFS_GROUP, tx, cr, fuidp);
#ifdef __FreeBSD__
gid = parent->z_phys->zp_gid;
gid = fgid = parent->z_phys->zp_gid;
#else
gid = crgetgid(cr);
#endif