1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00

Instead of completely disallowing VOP_SETATTR, just do it where there is

an underlying vnode.

Suggested by:	bde
This commit is contained in:
Chris Costello 2000-06-06 00:35:39 +00:00
parent d2cb162e9c
commit f574046378
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61315
2 changed files with 12 additions and 4 deletions

View File

@ -401,13 +401,17 @@ fdesc_setattr(ap)
return (EBADF);
/*
* Do not allow anybody to actually setattr anything.
* Allow setattr where there is an underlying vnode.
*/
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_PIPE:
case DTYPE_VNODE:
error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap,
ap->a_cred, ap->a_p);
break;
case DTYPE_SOCKET:
case DTYPE_PIPE:
case DTYPE_KQUEUE:
if (vap->va_flags != VNOVAL)
error = EOPNOTSUPP;

View File

@ -401,13 +401,17 @@ fdesc_setattr(ap)
return (EBADF);
/*
* Do not allow anybody to actually setattr anything.
* Allow setattr where there is an underlying vnode.
*/
switch (fp->f_type) {
case DTYPE_FIFO:
case DTYPE_PIPE:
case DTYPE_VNODE:
error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap,
ap->a_cred, ap->a_p);
break;
case DTYPE_SOCKET:
case DTYPE_PIPE:
case DTYPE_KQUEUE:
if (vap->va_flags != VNOVAL)
error = EOPNOTSUPP;