From: Ian Kent <raven@themaw.net>
To: "Jason T. Masker" <jason.fmic@masker.net>
Cc: autofs@linux.kernel.org
Subject: Re: More CIFS $ Share Woes
Date: Tue, 01 Sep 2009 10:46:25 +0800 [thread overview]
Message-ID: <4A9C8B01.9060708@themaw.net> (raw)
In-Reply-To: <85c7eb2d0908311255j5b457221ld88131f111611f04@mail.gmail.com>
Jason T. Masker wrote:
> I also tried changing the print line to the following:
>
> print " \\\n\t \"/" dir "\"", "://" key "/" lo
>
>
>
> so that the output looks like this:
>
> $ sudo /etc/auto.cifs VMW1013
> -fstype=cifs,file_mode=0644,dir_mode=0755,uid=jmasker,gid=users,credentials=/etc/auto.smb.jmasker
> \
> "/My Documents" ://VMW1013/My Documents \
> "/ADMIN$" ://VMW1013/ADMIN\$ \
> "/C$" ://VMW1013/C\$ \
> "/Shared" ://VMW1013/Shared
>
>
> However, this results in automount dropping the $ as well. The debug
> looks identical to what I just posted.
Yes, the location does need to double escape the dollar in the mount.
The double quotes are meant to preserve any spaces present in the
location but the "$" is also used as a macro introducer so it needs to
be escaped a second time so it doesn't get substituted with NULL when
the entry is expanded. What makes this difficult is the "\" is also a
separator and gets translated to "/" by mount.cifs. When you run the
mount from the command line the shell translates the "\$" to "$" before
it gets to mount.cifs.
I think the problem occurs because, when the entry is initially broken
up into mount triggers for each share and each is mounted, expanding the
map entry needs to preserve the "\$", but when the individual triggers
are walked on expanding the entry needs to substitute the "\$" for "$"
so the mount works. The problem being that the expand subroutine doesn't
know the difference between these two invocations.
I'll have a look and see.
Ian
next prev parent reply other threads:[~2009-09-01 2:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 14:09 More CIFS $ Share Woes Jason T. Masker
2009-08-28 14:58 ` Jason T. Masker
2009-08-31 4:32 ` Ian Kent
2009-08-31 12:22 ` Jason T. Masker
2009-08-31 19:55 ` Jason T. Masker
2009-08-31 20:34 ` Jason T. Masker
2009-09-01 2:46 ` Ian Kent [this message]
2009-09-07 7:33 ` Ian Kent
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=4A9C8B01.9060708@themaw.net \
--to=raven@themaw.net \
--cc=autofs@linux.kernel.org \
--cc=jason.fmic@masker.net \
/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.