On Sat, 2007-06-09 at 19:10 -0400, [EMAIL PROTECTED] wrote:
> Greetings:
>
> My NIS auto.net has an entry that looks similar to:
>
> my_dir -fstype=fuse,reconnect,allow_other [EMAIL PROTECTED]:/my_dir
>
> It works fine with CentOS 4 x86, x86_64 and ia64 distributions using autofs4.
> I
> installed CentOS 5 x86_64 which uses autofs5 and this NIS mount failed.
>
> Note: In order to allow NIS to properly provide the auto.net entry, I needed
> to
> make a minor change to the /var/yp/Makefile to allow '#' in the NIS database.
>
> The 'automount -v -d' reports in /var/messages something like:
>
> Jun 8 19:02:23 c1 automount[27076]: attempting to mount entry /net/my_dir
> Jun 8 19:02:24 c1 automount[27076]: parse_mount: parse(sun): invalid
> location
> Jun 8 19:02:24 c1 automount[27076]: failed to mount /net/my_dir
>
>
> Does autofs-5.0.1/modules/parse_sun.c 'validate_location' function need to
> allow the '#' to get this working again? If it's something simple like this,
> would it be possible to add this to the next release?
Can you verify that this patch does the trick please.
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 99961c3..5e14c75 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -762,12 +762,17 @@ static int validate_location(char *loc)
if (*ptr == ':')
return 1;
- /* If a ':' is present now it must be a host name */
+ /*
+ * If a ':' is present now it must be a host name, except
+ * for those special file systems like sshfs which use "#"
+ * and "@" in the host name part.
+ */
if (check_colon(ptr)) {
while (*ptr && *ptr != ':') {
if (!(isalnum(*ptr) ||
*ptr == '-' || *ptr == '.' || *ptr == '_' ||
- *ptr == ',' || *ptr == '(' || *ptr == ')'))
+ *ptr == ',' || *ptr == '(' || *ptr == ')' ||
+ *ptr == '#' || *ptr == '@'))
return 0;
ptr++;
}
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs