[linux-cifs-client] Re: [PATCH] CIFS: convert all delimiters in prefix path to match unix extensions

Steve French smfrench at gmail.com
Mon Feb 25 18:49:40 GMT 2008


I remember this coming up a few years ago ...
sharenames and server names can not include embedded / or \
This is easy enough to verify in Windows in their GUIs

On Mon, Feb 25, 2008 at 12:41 PM, Jeff Layton <jlayton at redhat.com> wrote:
> On Mon, 25 Feb 2008 12:19:43 -0600
>
> "Steve French" <smfrench at gmail.com> wrote:
>
>
> > Accepting either //server/share or \\server\share is fine with me -
>  > beyond that all is left alone in userspace (although I don't mind
>  > allowing the slash before the dir name to be either way if you think
>  > that that would help \\server\share\<dir>  )
>  >
>
>  Is '\' a legit character in a share name? If so then we can't do that...
>
>  I suppose there's no harm in allowing (and autoconverting) '\' to
>  '/' in places where we *know* that the thing is a delimiter and not
>  something else. As best I can tell that includes the two characters
>  before the servername and the character just after it. Maybe the
>  character after the sharename too if '\' is not a legit character in a
>  sharename.
>
>  The main danger as I see it is confusion on the part of users. If we
>  autoconvert just those characters then a mount like this may not work:
>
>  \\server\share\foo\bar\baz
>
>  ...is the share called "share" here or is it "share\foo\bar\baz"?
>
>  Presuming it's share, is the path really "/foo/bar/baz" or
>  "/foo\bar\baz" (1 path component)? This seems very unintuitive for the
>  average user.
>
>  If we take a harder line on enforcing '/' as a delimiter then some
>  people's mounts will break, but it does make things more clear. Adding
>  a good description of this issue to the manpage will help, but there
>  may be some broken prepath mounts before users get around to reading
>  it.
>
>  --
>
>
> Jeff Layton <jlayton at redhat.com>
>



-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list