Browse Source

only start mountd if a non-commented line is in exports; decreased vulnerabilty in common cases

OPENBSD_2_2
deraadt 27 years ago
parent
commit
7fe87b02c4
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/etc/rc

+ 3
- 2
src/etc/rc View File

@ -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


Loading…
Cancel
Save