All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Ian Kent <raven@themaw.net>
Cc: autofs@linux.kernel.org
Subject: Re: unable to automount windows C$
Date: Wed, 13 May 2009 07:54:09 -0400	[thread overview]
Message-ID: <20090513075409.7a962fe5@tleilax.poochiereds.net> (raw)
In-Reply-To: <4A0A5B0A.1060701@themaw.net>

On Wed, 13 May 2009 13:30:50 +0800
Ian Kent <raven@themaw.net> wrote:

> Ian Kent wrote:
> >> May 13 14:43:28 gw automount[15573]: mount_mount: mount(generic):
> >> calling mount -t cifs -s -o username=USERNAME,password=PASSWORD
> >> //xp0/C\$ /tmp/auto6t8L4W
> 
> Ohh, I get it, the "\" is a path separator for mount.cifs and I think
> the handling of it may have changed recently ish.

Around a year ago, yes.

> 
> So catch 22, autofs must escaped the "$" to prevent it being interpreted
> as a macro and the generic mount module has no special knowledge of cifs
> so it can't do anything about it. Worse, since "\" is a valid path
> separator for UNC paths we can't just check the fs type and translate
> them all. For example, what if we get :\\\\<server>\\service as the
> location?
> 

Right -- and it's even worse than that. '\' is a valid character in
posix path components. It's perfectly legitimate (though insane) to
have a file named:

/home/jlayton/crazy\file

'crazy\file' is a valid file/dir name.

I did a small writeup on this for the mount.cifs(8) manpage -- see the
section called 'SERVICE FORMATTING AND DELIMITERS'.

I think the only real way to solve this is to make sure that autofs
doesn't try to escape these characters before it calls mount. I don't
think mount does any variable interpolation, and I know mount.cifs
doesn't so there shouldn't be any need for escape chars before '$'
signs, assuming you're not handing these off to a shell of some sort.

-- 
Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2009-05-13 11:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 19:49 unable to automount windows C$ Scott Belnap
2008-12-23  6:13 ` Ian Kent
2009-05-11  0:43   ` Matthew Jurgens
2009-05-12  4:45     ` Ian Kent
2009-05-13  4:57       ` Matthew Jurgens
2009-05-13  5:05         ` Ian Kent
2009-05-13  5:30           ` Ian Kent
2009-05-13 11:54             ` Jeff Layton [this message]
2009-05-13 14:08               ` Ian Kent
     [not found]           ` <4A0A59F5.1090308@edcint.co.nz>
2009-05-13  5:32             ` Ian Kent
2009-05-13  5:47               ` Matthew Jurgens
2009-05-13  5:58                 ` Matthew Jurgens
2009-05-13  8:09                   ` Ian Kent
2009-05-13  8:16                     ` Ian Kent
2009-05-13  8:03                 ` Ian Kent
2009-05-13 23:55                   ` Matthew Jurgens
2009-05-14  2:23                     ` Ian Kent
     [not found]                       ` <4A0CC262.7020105@edcint.co.nz>
2009-05-15  7:13                         ` Ian Kent
2009-05-17  7:48                           ` Matthew Jurgens
2009-05-18  1:39                             ` Ian Kent
2009-06-02  5:45                               ` Matthew Jurgens
2009-06-02 11:17                                 ` Ian Kent
2009-06-04  0:15                                   ` Matthew Jurgens
2009-06-04  4:24                                     ` Ian Kent
     [not found]                                       ` <4A2DADEA.3010406@edcint.co.nz>
2009-06-09  3:05                                         ` Ian Kent
2009-06-09  3:21                                         ` Ian Kent
2009-06-09  8:03                                           ` Matthew Jurgens
2009-06-09  9:35                       ` Matthew Jurgens
2009-06-11  6:23                         ` Ian Kent
2009-06-11 12:13                           ` Matthew Jurgens

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=20090513075409.7a962fe5@tleilax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=autofs@linux.kernel.org \
    --cc=raven@themaw.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.