lkml.org 
[lkml]   [1999]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Updates to autofs
Date
Jeremy Fitzhardinge writes ("Updates to autofs"):
>
> I've been using this code for a while now and it seems stable, but it is quite
> new so there could still be problems. Tell me how it works for you, bug
> reports, comments, suggestions, etc.

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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2011 Jasper Spaans