Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 14

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

---
 modules/parse_sun.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- autofs-5.0.1.orig/modules/parse_sun.c
+++ autofs-5.0.1/modules/parse_sun.c
@@ -810,12 +810,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++;
 		}