diff options
author | chris <chris@FreeBSD.org> | 2000-06-02 07:02:45 +0000 |
---|---|---|
committer | chris <chris@FreeBSD.org> | 2000-06-02 07:02:45 +0000 |
commit | 571f018249dbe4c8af33c77952d6d5414594e1e2 (patch) | |
tree | 2973d1ad00835d83b15f920c9534b05c86c30d91 /sys/fs/fdescfs | |
parent | 7e994844ceceb23ce5ce625de614609553a6cccd (diff) | |
download | FreeBSD-src-571f018249dbe4c8af33c77952d6d5414594e1e2.zip FreeBSD-src-571f018249dbe4c8af33c77952d6d5414594e1e2.tar.gz |
- Do not allow VOP_SETATTR to modify underlying vnodes at all. This caused
problems when fetch(1) was passed `-o -'. The rationale of this change
is that applications attempting to change underlying vnodes for /dev/fd
nodes are improperly written and the use of this interface should not
ever have been encouraged. Proper alternatives are fchmod, fchown and
others.
PR: 18952
- Remove stale, unused fdescnode->fd_link structure member.
Diffstat (limited to 'sys/fs/fdescfs')
-rw-r--r-- | sys/fs/fdescfs/fdesc.h | 1 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 5 |
2 files changed, 0 insertions, 6 deletions
diff --git a/sys/fs/fdescfs/fdesc.h b/sys/fs/fdescfs/fdesc.h index 60b6006..6d2d201 100644 --- a/sys/fs/fdescfs/fdesc.h +++ b/sys/fs/fdescfs/fdesc.h @@ -56,7 +56,6 @@ struct fdescnode { struct vnode *fd_vnode; /* Back ptr to vnode */ fdntype fd_type; /* Type of this node */ unsigned fd_fd; /* Fd to be dup'ed */ - char *fd_link; /* Link to fd/n */ int fd_ix; /* filesystem index */ }; diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 368d844..19882d6 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -143,7 +143,6 @@ loop: fd->fd_vnode = *vpp; fd->fd_type = ftype; fd->fd_fd = -1; - fd->fd_link = 0; fd->fd_ix = ix; LIST_INSERT_HEAD(fc, fd, fd_hash); @@ -408,10 +407,6 @@ fdesc_setattr(ap) 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_KQUEUE: if (vap->va_flags != VNOVAL) |