Sophie

Sophie

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

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

autofs-5.0.1 - fix ampersand escape in auto.smb

From: Ian Kent <raven@themaw.net>

CIFS share names containing an ampersand need to be escaped.
---

 samples/auto.smb |    1 +
 1 file changed, 1 insertion(+)


--- autofs-5.0.1.orig/samples/auto.smb
+++ autofs-5.0.1/samples/auto.smb
@@ -28,6 +28,7 @@ $SMBCLIENT -gNL $key 2>/dev/null| awk -v
 		  # Enclose mount dir and location in quotes
 		  # Double quote "$" in location as it is special
 		  gsub(/\$$/, "\\$", loc);
+		  gsub(/\&/,"\\\\&",loc)
 		  print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
 		}
 	END 	{ if (!first) print "\n"; else exit 1 }