summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-04-24 08:28:55 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-04-24 08:28:55 +0000
commit7a00c463b7512f0d070e6be79bcd0b964d40c316 (patch)
treed572f59277699f025b4fdab5aaf29a263b11ac76 /sbin
parent576b84f64cb23aee9588f567bbdefcaf80684425 (diff)
Enforce read only mounts. No exceptions.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_ext2fs/mount_ext2fs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c
index 441010ec7f6..e9e2137fb6b 100644
--- a/sbin/mount_ext2fs/mount_ext2fs.c
+++ b/sbin/mount_ext2fs/mount_ext2fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_ext2fs.c,v 1.2 1997/01/15 23:41:18 millert Exp $ */
+/* $OpenBSD: mount_ext2fs.c,v 1.3 1997/04/24 08:28:54 downsj Exp $ */
/* $NetBSD: mount_ffs.c,v 1.3 1996/04/13 01:31:19 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_ufs.c 8.2 (Berkeley) 3/27/94";
#else
-static char rcsid[] = "$OpenBSD: mount_ext2fs.c,v 1.2 1997/01/15 23:41:18 millert Exp $";
+static char rcsid[] = "$OpenBSD: mount_ext2fs.c,v 1.3 1997/04/24 08:28:54 downsj Exp $";
#endif
#endif /* not lint */
@@ -98,6 +98,14 @@ main(argc, argv)
args.fspec = argv[0]; /* The name of the device file. */
fs_name = argv[1]; /* The mount point. */
+#if 1
+ /*
+ * This version of ext2fs is buggy. Enforce read only mounts.
+ * If the user wants a writeable mount, they remove this code.
+ */
+ mntflags |= MNT_RDONLY;
+#endif
+
#define DEFAULT_ROOTUID -2
args.export.ex_root = DEFAULT_ROOTUID;
if (mntflags & MNT_RDONLY)