If you have a file/program in your current directory with the name of a map listed in auto.master, the init script may use that file/program instead of the one in /etc.
For example: cat auto.master /home auto.home if you have the file auto.home in your current directory, the init script will use that instead of the one in /etc/ or yp. This patch makes sure that a map is an absolute pathname (begins with a /) before checking anywhere but /etc. Thanks, Chris
--- autofs-4.1.3/samples/rc.autofs.in.orig 2004-05-10 08:57:14.000000000 -0500 +++ autofs-4.1.3/samples/rc.autofs.in 2004-11-03 15:30:34.060290822 -0600 @@ -199,12 +199,12 @@ function getmounts() maptype=`echo $map | cut -f1 -d:` # Handle degenerate map specifiers if [ "$maptype" = "$map" ] ; then - if [ -x "$map" ]; then + if `echo $map | grep -q "^/"` && [ -x "$map" ]; then maptype=program elif [ -x "/etc/$map" ]; then maptype=program map=`echo /etc/$map | sed 's^//^/^g'` - elif [ -f "$map" ]; then + elif `echo $map | grep -q "^/"` && [ -f "$map" ]; then maptype=file elif [ "$map" = "hesiod" -o "$map" = "userhome" ] ; then maptype=$map
_______________________________________________ autofs mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/autofs
