Since NFSv4 byte range locking only works for regular files,
add a sanity check for the vnode type to the NFSv4 client. MFC after: 2 weeks
This commit is contained in:
parent
90379d6116
commit
670bf6f126
@ -2941,6 +2941,8 @@ nfs_advlock(struct vop_advlock_args *ap)
|
||||
u_quad_t size;
|
||||
|
||||
if (NFS_ISV4(vp) && (ap->a_flags & (F_POSIX | F_FLOCK)) != 0) {
|
||||
if (vp->v_type != VREG)
|
||||
return (EINVAL);
|
||||
if ((ap->a_flags & F_POSIX) != 0)
|
||||
cred = p->p_ucred;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user