autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Yury Krivopalov <ykrivopalov@yandex.ru>, autofs@vger.kernel.org
Subject: Re: Automounting of smb shares with dollar sign
Date: Fri, 01 Jul 2016 11:44:00 +0800	[thread overview]
Message-ID: <1467344640.3900.21.camel@themaw.net> (raw)
In-Reply-To: <1467342935.3900.17.camel@themaw.net>

On Fri, 2016-07-01 at 11:15 +0800, Ian Kent wrote:
> On Thu, 2016-06-30 at 13:21 +0300, Yury Krivopalov wrote:
> > Hello,
> > I found a problem, that started to reproduce on my new environment
> > (archlinux), before that I used Debian Wheezy and everything worked fine.
> > The point is that I can't automount smb shares with dollar sign (Ex.:
> > //hostname/C$).
> >  
> > It happend because two facts:
> > 1. Autofs reads '$' as a special symbol
> > 2. mount.cifs reads '\\' as a delimiter
> >  
> > So in my case if I returns "//hostname/C$" from auto.smb, then automount
> > daemon replace '$' to '' and if I returns "//hostname/C\\$" then mount.cifs
> > crops "\\$" and uses '$' as a prefixpath mount option.
> 
> Escaping of cifs mount entries has been a long standing problem over and over
> again.
> 
> Mostly fixes seem to always to have bad side effects, dropping them of trying
> to
> fix them often results in the problems returning.
> 
> I'll have a look at this and try and work out if it would have side effects
> for
> other than cifs mounts.
> 
> >  
> > I attached simple fix for autofs-5.1.2, that drops back slash after
> > arguments
> > parsing. It works in my case, 

Actually, now I look closer, this might be a bug in expandsunent().

The expandsunent() function is called before parsing the map entry not after so
changing this could have unexpected side effects.

I'll run parser tests with this change and see what happens, when I get a
chance.

> >  
> 
> Thanks for our patch.
> Ian
> --
> To unsubscribe from this list: send the line "unsubscribe autofs" in
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

      reply	other threads:[~2016-07-01  3:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 10:21 Automounting of smb shares with dollar sign Yury Krivopalov
2016-07-01  3:15 ` Ian Kent
2016-07-01  3:44   ` Ian Kent [this message]

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=1467344640.3900.21.camel@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=ykrivopalov@yandex.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).