What can I say: don't allow people to mount DEVFS with option "nodev".
This commit is contained in:
parent
f4d49654ae
commit
45628dd373
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137006
@ -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),
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user