Do not allow delete/rename lookup request to prevent

panics if a user attempts to remove/rename files in
a fdesc file system.
This commit is contained in:
mpp 1995-09-02 20:19:12 +00:00
parent f190c1a42f
commit d38d126a21
2 changed files with 14 additions and 2 deletions

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.8 1995/03/28 07:56:44 bde Exp $
* $Id: fdesc_vnops.c,v 1.9 1995/05/30 08:06:57 rgrimes Exp $
*/
/*
@ -192,6 +192,12 @@ fdesc_lookup(ap)
struct vnode *fvp;
char *ln;
if (ap->a_cnp->cn_nameiop == DELETE ||
ap->a_cnp->cn_nameiop == RENAME) {
error = EROFS;
goto bad;
}
pname = ap->a_cnp->cn_nameptr;
if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
*vpp = dvp;

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.8 1995/03/28 07:56:44 bde Exp $
* $Id: fdesc_vnops.c,v 1.9 1995/05/30 08:06:57 rgrimes Exp $
*/
/*
@ -192,6 +192,12 @@ fdesc_lookup(ap)
struct vnode *fvp;
char *ln;
if (ap->a_cnp->cn_nameiop == DELETE ||
ap->a_cnp->cn_nameiop == RENAME) {
error = EROFS;
goto bad;
}
pname = ap->a_cnp->cn_nameptr;
if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
*vpp = dvp;