All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Spashett <jason@spashett.com>
To: autofs@linux.kernel.org
Subject: Patch: Correctly escape $ in auto.smb
Date: Thu, 11 Jun 2009 15:54:33 +0100	[thread overview]
Message-ID: <4A311AA9.90701@spashett.com> (raw)

https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/385244

auto.smb does not escape the $ common in windows administrative shares. 
auto.smb has been changed to do this.

--- auto.smb.orig    2009-06-11 14:18:39.000000000 +0100
+++ auto.smb    2009-06-11 15:21:47.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 }; gsub(/[ $]/, 
"\\\&", $2); print " \\\n\t /" $2, "://" key "/" $2 }
     END     { if (!first) print "\n"; else exit 1 }
     '

                 reply	other threads:[~2009-06-11 14:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A311AA9.90701@spashett.com \
    --to=jason@spashett.com \
    --cc=autofs@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.