diff options
author | phk <phk@FreeBSD.org> | 2004-10-29 11:10:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-29 11:10:55 +0000 |
commit | 8fa3fd0acf0ad7c1c643735ebdc1e396cf1087ca (patch) | |
tree | 085aad87f610caaf9cec2888dd7e77223f14de17 | |
parent | 9e9b22d7daa02885c04877215b73ca9a616c0764 (diff) | |
download | FreeBSD-src-8fa3fd0acf0ad7c1c643735ebdc1e396cf1087ca.zip FreeBSD-src-8fa3fd0acf0ad7c1c643735ebdc1e396cf1087ca.tar.gz |
Don't give disks special treatment, they don't come this way anymore.
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 59f89b3..5e12528 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -710,38 +710,6 @@ devfs_open(ap) if (dev->si_iosize_max == 0) dev->si_iosize_max = DFLTPHYS; - /* - * XXX: Disks get special billing here, but it is mostly wrong. - * XXX: Disk partitions can overlap and the real checks should - * XXX: take this into account, and consequently they need to - * XXX: live in the disk slice code. Some checks do. - */ - if (vn_isdisk(vp, NULL) && ap->a_cred != FSCRED && - (ap->a_mode & FWRITE)) { - /* - * Never allow opens for write if the disk is mounted R/W. - */ - if (vp->v_rdev->si_mountpoint != NULL && - !(vp->v_rdev->si_mountpoint->mnt_flag & MNT_RDONLY)) - return (EBUSY); - - /* - * When running in secure mode, do not allow opens - * for writing if the disk is mounted. - */ - error = securelevel_ge(td->td_ucred, 1); - if (error && vfs_mountedon(vp)) - return (error); - - /* - * When running in very secure mode, do not allow - * opens for writing of any disks. - */ - error = securelevel_ge(td->td_ucred, 2); - if (error) - return (error); - } - dsw = dev_refthread(dev); if (dsw == NULL) return (ENXIO); @@ -771,11 +739,6 @@ devfs_open(ap) if (error) return (error); - if (vn_isdisk(vp, NULL)) { - if (!dev->si_bsize_phys) - dev->si_bsize_phys = DEV_BSIZE; - vp->v_bufobj.bo_bsize = dev->si_bsize_phys; - } return (error); } |