summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-14 10:35:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-14 10:35:41 +0000
commit00c3d07c61eb41cfb5ef7afd46e0be87511ed671 (patch)
tree1497a8d2c0b42e80a9720f01b63852bcd5ca08e7
parentf92cfe41722b8bc85b66362d387122e7290a5545 (diff)
only start mountd if a non-commented line is in exports; decreased vulnerabilty in common cases
-rw-r--r--etc/rc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index a6add907ba4..3fbaed4ce65 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.45 1997/09/02 14:49:25 kstailey Exp $
+# $OpenBSD: rc,v 1.46 1997/09/14 10:35:40 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -152,7 +152,8 @@ fi
# $nfs_server is imported from /etc/netstart;
# if $nfs_server == YES, the machine is setup for being an nfs server
-if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then
+if [ X${nfs_server} = X"YES" -a -r /etc/exports -a \
+ `cat /etc/exports | sed -e '/^#/d' | wc -l` -ne 0]; then
rm -f /var/db/mountdtab
echo -n > /var/db/mountdtab
echo -n ' mountd'; mountd