The mount options for /net should be more restrictive, and soft mounts
should never be encouraged:
--- autofs-3.1.3-jsgf-990410/samples/auto.net~ Sun Apr 4 22:25:28 1999
+++ autofs-3.1.3-jsgf-990410/samples/auto.net Sun Apr 11 23:30:52 1999
@@ -5,6 +5,6 @@
# each filesystem, or whether its RO or RW. For the future...
key="$1"
-opts="-fstype=nfs,soft,intr"
+opts="-fstype=nfs,hard,intr,nosuid,nodev"
showmount -e "$key" | tail +2 | sort | sed -e "s|^\([^ ]*\).*|$key\1 $opts $key:\1|"
$key could do with a more checking too. You should force $key to be a
hostname (see the DNS RFC for the set of valid characters), and you
should throw away hostnames beginning with "-". This will avoid $key
being passed to showmount as an option or to sed with an extra "|".
Also, you should throw away any entry from showmount that contains the
string "/../" or fails to have a leading '/'.
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/