diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-10-17 03:29:53 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-10-17 03:29:53 +0000 |
commit | cb57dd08ddaba1f3cd7d4ac5d56431f120cd8f17 (patch) | |
tree | 092b9ba93cfdc1e9918807d712b5a09ab9f2dfe7 /sys/isofs | |
parent | 49d8776e0336b16eec91f42c284c191e2b13315a (diff) | |
download | FreeBSD-src-cb57dd08ddaba1f3cd7d4ac5d56431f120cd8f17.zip FreeBSD-src-cb57dd08ddaba1f3cd7d4ac5d56431f120cd8f17.tar.gz |
Unconditionally mount a CD9660 filesystem as read-only, instead of
returning EROFS if we forget to mount it as read-only.
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 6266fb8..5eec0c9 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -135,8 +135,10 @@ cd9660_mount(struct mount *mp, struct thread *td) struct nameidata ndp; struct iso_mnt *imp = 0; - if ((mp->mnt_flag & MNT_RDONLY) == 0) - return (EROFS); + /* + * Unconditionally mount as read-only. + */ + mp->mnt_flag |= MNT_RDONLY; fspec = vfs_getopts(mp->mnt_optnew, "from", &error); if (error) |