Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/examples/fstab No devices on /usr -> mount -o nodev



details:   https://anonhg.NetBSD.org/src/rev/b38875973e93
branches:  trunk
changeset: 580701:b38875973e93
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed May 04 18:26:14 2005 +0000

description:
No devices on /usr              -> mount -o nodev
No setuid programs in /var      -> mount -o nodev,nosuid

Adding "noexec" in various places may cause too much damage
(e.g. for running DEINSTALL scripts from /var/db/pkg, configure
scripts, etc).

Inspired by OpenBSD's afterboot(8) manpage.

diffstat:

 share/examples/fstab/fstab.cdrom      |  4 ++--
 share/examples/fstab/fstab.nfs.1      |  6 +++---
 share/examples/fstab/fstab.ra         |  8 ++++----
 share/examples/fstab/fstab.ramdisk    |  4 ++--
 share/examples/fstab/fstab.rd         |  6 +++---
 share/examples/fstab/fstab.sd0.1      |  6 +++---
 share/examples/fstab/fstab.sd0.2      |  8 ++++----
 share/examples/fstab/fstab.sd0.amiga  |  4 ++--
 share/examples/fstab/fstab.sd0.atari  |  4 ++--
 share/examples/fstab/fstab.wd0.2      |  4 ++--
 share/examples/fstab/fstab.wd0.3      |  6 +++---
 share/examples/fstab/fstab.wd0.cobalt |  8 ++++----
 12 files changed, 34 insertions(+), 34 deletions(-)

diffs (198 lines):

diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.cdrom
--- a/share/examples/fstab/fstab.cdrom  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.cdrom  Wed May 04 18:26:14 2005 +0000
@@ -1,2 +1,2 @@
-#      $NetBSD: fstab.cdrom,v 1.1 2005/04/03 14:12:14 hubertf Exp $
-/dev/cd0a      /cdrom  cd9660  ro,noauto       0 0
+#      $NetBSD: fstab.cdrom,v 1.2 2005/05/04 18:26:14 hubertf Exp $
+/dev/cd0a      /cdrom  cd9660  ro,noauto,nodev,nosuid  0 0
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.nfs.1
--- a/share/examples/fstab/fstab.nfs.1  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.nfs.1  Wed May 04 18:26:14 2005 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: fstab.nfs.1,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.nfs.1,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 # 
 # Sample fstab for diskless clients using NFS, using reduced
 # read and write data size.
 #
-server:/export/netbsd.arch/root / nfs rw,-r=1024,-w=1024
-server:/export/netbsd.arch/usr /usr nfs ro,-r=1024,-w=1024
+server:/export/netbsd.arch/root        /       nfs rw,-r=1024,-w=1024
+server:/export/netbsd.arch/usr /usr    nfs ro,-r=1024,-w=1024,nodev
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.ra
--- a/share/examples/fstab/fstab.ra     Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.ra     Wed May 04 18:26:14 2005 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: fstab.ra,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.ra,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab config for VAX ra(4) disks.
 #
-/dev/ra0a      /               ffs     rw 1 1
-/dev/ra0g      /mnt            ffs     rw 1 3
-/dev/ra0h      /usr            ffs     rw 1 2
+/dev/ra0a      /               ffs     rw                      1 1
+/dev/ra0g      /usr            ffs     rw,nodev                1 2
+/dev/ra0h      /mnt            ffs     rw,nodev,nosuid         1 3
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.ramdisk
--- a/share/examples/fstab/fstab.ramdisk        Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.ramdisk        Wed May 04 18:26:14 2005 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: fstab.ramdisk,v 1.1 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.ramdisk,v 1.2 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab for ramdisk (mfs) based /tmp filesystem.
 # /tmp is on a 5MB mfs partition; see mount_mfs(8) for details.
 # Adjust the size according to the ammount of free RAM.
 #
-swap           /tmp    mfs     rw,-s=5m
+swap           /tmp    mfs     rw,-s=5m,nodev,nosuid
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.rd
--- a/share/examples/fstab/fstab.rd     Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.rd     Wed May 04 18:26:14 2005 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: fstab.rd,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.rd,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab file for hp300 rd(4) disks.
 #
 /dev/rd0a      /       ffs     rw              1 1
-/dev/rd0e      /usr    ffs     rw              1 2
-/dev/rd0f      /var    ffs     rw              1 2
+/dev/rd0e      /usr    ffs     rw,nodev        1 2
+/dev/rd0f      /var    ffs     rw,nodev,nosuid 1 2
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.sd0.1
--- a/share/examples/fstab/fstab.sd0.1  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.sd0.1  Wed May 04 18:26:14 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: fstab.sd0.1,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.sd0.1,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab for SCSI disk based system
 # see fstab(5) for details on what the fields mean
@@ -9,8 +9,8 @@
 #
 /dev/sd0a      /       ffs     rw              1 1
 /dev/sd0b      none    swap    sw              0 0
-/dev/sd0f      /var    ffs     rw              1 2
-/dev/sd0g      /usr    ffs     rw              1 2
+/dev/sd0f      /usr    ffs     rw,nodev        1 2
+/dev/sd0g      /var    ffs     rw,nodev,nosuid 1 2
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.sd0.2
--- a/share/examples/fstab/fstab.sd0.2  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.sd0.2  Wed May 04 18:26:14 2005 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: fstab.sd0.2,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.sd0.2,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
-/dev/sd0a / ffs rw 1 1
-/dev/sd0b none swap sw 0 0
-/dev/sd0g /usr ffs rw 1 2
+/dev/sd0a      /       ffs     rw              1 1
+/dev/sd0b      none    swap    sw              0 0
+/dev/sd0g      /usr    ffs     rw,nodev        1 2
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.sd0.amiga
--- a/share/examples/fstab/fstab.sd0.amiga      Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.sd0.amiga      Wed May 04 18:26:14 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: fstab.sd0.amiga,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.sd0.amiga,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab for Amiga.
 #
@@ -10,7 +10,7 @@
 # /etc/rc will find them, or you will have no swap space.
 /dev/sd0b      none    swap    sw              0       0
 #      fast file system on /usr (NBU\7) next to lowest scsi disk unit
-/dev/sd0d      /usr    ffs     rw              1       2       
+/dev/sd0d      /usr    ffs     rw,nodev        1       2       
 #      amigados file system on /amiga (DOS/1)
 #      It is recomended that you mount it on a dir that matches the
 #      volume name and then slinks will resolve correctly. All ados
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.sd0.atari
--- a/share/examples/fstab/fstab.sd0.atari      Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.sd0.atari      Wed May 04 18:26:14 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: fstab.sd0.atari,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.sd0.atari,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # All swap devices are now configured by swapctl(8), so a swap entry
 # is now needed for all swap partitions so that the "swapctl -A" in
@@ -8,7 +8,7 @@
 #
 /dev/sd0a      /       ffs     rw              1       1
 /dev/sd0b      none    swap    sw              0       0
-/dev/sd0d      /usr    ffs     rw              1       2       
+/dev/sd0d      /usr    ffs     rw,nodev        1       2       
 #/dev/sd0e     /atari  msdos   rw,-G
 #
 # Possibly include data from the following files here:
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.wd0.2
--- a/share/examples/fstab/fstab.wd0.2  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.wd0.2  Wed May 04 18:26:14 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: fstab.wd0.2,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.wd0.2,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab for IDE disk based system
 # see fstab(5) for details on what the fields mean
@@ -9,7 +9,7 @@
 #
 /dev/wd0a      /       ffs     rw              1 1
 /dev/wd0b      none    swap    sw              0 0
-/dev/wd0e      /usr    ffs     rw              1 2
+/dev/wd0e      /usr    ffs     rw,nodev        1 2
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.wd0.3
--- a/share/examples/fstab/fstab.wd0.3  Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.wd0.3  Wed May 04 18:26:14 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: fstab.wd0.3,v 1.2 2005/04/03 14:12:14 hubertf Exp $
+#      $NetBSD: fstab.wd0.3,v 1.3 2005/05/04 18:26:14 hubertf Exp $
 #
 # Sample fstab for IDE disk based system
 # see fstab(5) for details on what the fields mean
@@ -9,8 +9,8 @@
 #
 /dev/wd0a      /       ffs     rw              1 1
 /dev/wd0b      none    swap    sw              0 0
-/dev/wd0f      /var    ffs     rw              1 2
-/dev/wd0g      /usr    ffs     rw              1 2
+/dev/wd0f      /usr    ffs     rw,nodev        1 2
+/dev/wd0g      /var    ffs     rw,nodev,nosuid 1 2
 #
 # Possibly include data from the following files here:
 # fstab.cdrom
diff -r 11c53151f4a7 -r b38875973e93 share/examples/fstab/fstab.wd0.cobalt
--- a/share/examples/fstab/fstab.wd0.cobalt     Wed May 04 17:46:16 2005 +0000
+++ b/share/examples/fstab/fstab.wd0.cobalt     Wed May 04 18:26:14 2005 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: fstab.wd0.cobalt,v 1.2 2005/04/03 14:12:14 hubertf Exp $
-/dev/wd0a      /       ffs     rw              1 1
-/dev/wd0e      /stand  ext2fs  rw              1 2
-/dev/wd0f      none    swap    sw              0 0
+#      $NetBSD: fstab.wd0.cobalt,v 1.3 2005/05/04 18:26:14 hubertf Exp $
+/dev/wd0a      /       ffs     rw      1 1
+/dev/wd0e      /stand  ext2fs  rw      1 2
+/dev/wd0f      none    swap    sw      0 0
 #
 # Possibly include data from the following files here:
 # fstab.cdrom



Home | Main Index | Thread Index | Old Index