From 1798e63df33700c5d58e1d66241b8b22a2c0785e Mon Sep 17 00:00:00 2001 From: downsj Date: Thu, 24 Apr 1997 08:28:54 +0000 Subject: [PATCH] Enforce read only mounts. No exceptions. --- sbin/mount_ext2fs/mount_ext2fs.c | 12 ++++++++++-- 1 file 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) -- 2.20.1