diff options
author | mpp <mpp@FreeBSD.org> | 1995-09-02 20:19:12 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1995-09-02 20:19:12 +0000 |
commit | 42b9759b7895279bcd10bf11355e7aba5fb2d425 (patch) | |
tree | 3707f04873da387bb247e535d8a634c279ba05b8 /sys/fs | |
parent | 5998ed1acf1d48d7280ef9ff58fd1ff0fa2c3b0c (diff) | |
download | FreeBSD-src-42b9759b7895279bcd10bf11355e7aba5fb2d425.zip FreeBSD-src-42b9759b7895279bcd10bf11355e7aba5fb2d425.tar.gz |
Do not allow delete/rename lookup request to prevent
panics if a user attempts to remove/rename files in
a fdesc file system.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 420320a..fec7b44 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -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; |