summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordownsj <downsj@openbsd.org>1997-04-24 08:28:54 +0000
committerdownsj <downsj@openbsd.org>1997-04-24 08:28:54 +0000
commit1798e63df33700c5d58e1d66241b8b22a2c0785e (patch)
tree6bac50566fadb2b8802e8230a14ca952a28e512c
parentDon't build LFS, it doesn't work. (diff)
downloadwireguard-openbsd-1798e63df33700c5d58e1d66241b8b22a2c0785e.tar.xz
wireguard-openbsd-1798e63df33700c5d58e1d66241b8b22a2c0785e.zip
Enforce read only mounts. No exceptions.
-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)