What can I say: don't allow people to mount DEVFS with option "nodev".

This commit is contained in:
Poul-Henning Kamp 2004-10-28 06:03:25 +00:00
parent f4d49654ae
commit 45628dd373
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137006
2 changed files with 2 additions and 8 deletions

View File

@ -67,10 +67,8 @@ devfs_mount(struct mount *mp, struct thread *td)
struct vnode *rvp;
error = 0;
/*
* XXX: flag changes.
*/
if (mp->mnt_flag & MNT_UPDATE)
if (mp->mnt_flag & (MNT_UPDATE | MNT_NODEV))
return (EOPNOTSUPP);
MALLOC(fmp, struct devfs_mount *, sizeof(struct devfs_mount),

View File

@ -707,10 +707,6 @@ devfs_open(ap)
if (vp->v_type == VBLK)
return (ENXIO);
/* Don't allow open if fs is mounted -nodev. */
if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV))
return (ENXIO);
if (dev == NULL)
return (ENXIO);