Corrected patch added.
** Description changed:
auto.smb script correctly escapes space characters in windows share
names, but does not escape shares with $ in them. (common for admin
shares) Hence mounting fails.
Here is a potential patch. I am sure that there are other characters
that need to be escaped too. Unfortunately awk doesn't do capture groups
so I've added an extra subst at the moment:
- r...@pandora:/etc# diff -u auto.smb.orig auto.smb
- --- auto.smb.orig 2009-06-09 15:52:12.000000000 +0100
- +++ auto.smb 2009-06-09 16:05:44.000000000 +0100
- @@ -29,7 +29,7 @@
-
- $SMBCLIENT $smbopts -gL $key 2>/dev/null| awk -v key="$key" -v
opts="$mountopts" -F'|' -- '
- BEGIN { ORS=""; first=1 }
- - /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2);
print " \\\n\t /" $2, "://" key "/" $2 }
- + /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2);
sub(/$/, "\\$", $2); print " \\\n\t /" $2, "://" key "/" $2 }
- END { if (!first) print "\n"; else exit 1 }
- '
- Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); sub(/$/,
"\\$", $2); print " \\\n\t /" $2, "://" key "/" $2 }
-
patch as attachment
** Attachment added: "Correct patch to escape " " and $"
http://launchpadlibrarian.net/27780297/auto.smb
--
autofs auto.smb doesn't escape $
https://bugs.launchpad.net/bugs/385244
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs