diff options
| author | Marcel Telka <Marcel.Telka@Sun.COM> | 2009-11-07 02:08:39 +0100 |
|---|---|---|
| committer | Marcel Telka <Marcel.Telka@Sun.COM> | 2009-11-07 02:08:39 +0100 |
| commit | 35fc240ba80ac4ea20a52b66d532569f23f1b401 (patch) | |
| tree | 3428f08751e942931ca9bfaf9dfa6b2a138dc1ae /usr/src | |
| parent | eb0357753ad848b62125fd773f12bec5ea6a20d4 (diff) | |
| download | illumos-joyent-35fc240ba80ac4ea20a52b66d532569f23f1b401.tar.gz | |
6888022 NFSv4: grpid mount flag is not effective for files
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_vnops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_vnops.c b/usr/src/uts/common/fs/nfs/nfs4_vnops.c index 271133645b..5e79c7138f 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_vnops.c +++ b/usr/src/uts/common/fs/nfs/nfs4_vnops.c @@ -804,15 +804,18 @@ nfs4open_otw(vnode_t *dvp, char *file_name, struct vattr *in_va, if (create_flag && in_va) { /* - * If the parent's directory has the setgid bit set + * If there is grpid mount flag used or + * the parent's directory has the setgid bit set * _and_ the client was able to get a valid mapping * for the parent dir's owner_group, we want to * append NVERIFY(owner_group == dva.va_gid) and * SETATTR to the CREATE compound. */ mutex_enter(&drp->r_statelock); - if (drp->r_attr.va_mode & VSGID && + if ((VTOMI4(dvp)->mi_flags & MI4_GRPID || + drp->r_attr.va_mode & VSGID) && drp->r_attr.va_gid != GID_NOBODY) { + in_va->va_mask |= AT_GID; in_va->va_gid = drp->r_attr.va_gid; setgid_flag = 1; } @@ -1140,10 +1143,6 @@ recov_retry: return (e.error); } } else if (create_flag) { - /* - * For setgid case, we need to: - * 4:savefh(new) 5:putfh(dir) 6:getattr(dir) 7:restorefh(new) - */ argop[1].argop = OP_SAVEFH; argop[5].argop = OP_RESTOREFH; |
