smb://

Steve Langasek vorlon at netexpress.net
Fri Dec 29 00:05:46 GMT 2000


On Thu, 28 Dec 2000, Christopher R. Hertel wrote:

> > >    unwise      = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"

> > 	I think this is compelling information. Incedentally all
> > 	concerns that have been raised about parsing are
> > 	properly handled by the code I posted this morning.

> Then I think we have reached consensus.  Somewhat informally:

>   smb://[<server>/[service/[path/][file/]]]

>   <server>  :== [[ntdomain;]user[:password]@]<srvname>[:port]

>   <srvname> :== <NBTname> | <DNSname> | <IP>

>   <NBTname> :== NetBIOS-name [.scope]
>   <DNSname> :== hostname [.domain]
>   <IP>      :== nnn.nnn.nnn.nnn

One observation on the use of ';' as the delimiter between ntdomain and user
(and kudos to Kevin for bringing the RFC into this discussion -- I had gone
looking for that RFC and ended up with an older one by mistake :).  From RFC
2396, appendix G, section 2:

   The semicolon ";" character was added to those stated as being
   reserved within the authority component, since several new schemes
   are using it as a separator within userinfo to indicate the type of
   user authentication.

I'm guessing this is similar to its documented use in passing parameters to a
resource path, per section 3.3:

   The path may consist of a sequence of path segments separated by a
   single slash "/" character.  Within a path segment, the characters
   "/", ";", "=", and "?" are reserved.  Each path segment may include a
   sequence of parameters, indicated by the semicolon ";" character.
   The parameters are not significant to the parsing of relative
   references.

If so, I would expect something like the following to be more consistent with
existing usage:

  smb://[<user>[;domain=<domain>][:<password>]@]server/

I don't think this is desirable.  In any case, it may be helpful to know for
certain how the other 'new schemes' are using it, and perhaps choose a
different delimiter character if we want to stick with the Domain[\]user
syntax.

My personal feeling is that a backslash may still be preferable here.  I can't
imagine a situation where a modern client would maltreat this character, with
the exception of posix shell... and I already have to escape URLs at the
commandline because of the use of '&'.  I'd be interested to know the reasons
for marking the backslash as an 'unwise' character.  If this character really
no longer deserves the label 'unwise', it's always possible to change the RFC.
If it /is/ unwise to use \ in urls, I still think, based on my reading of the
RFC, that we'll want to avoid the semicolon.

Steve Langasek
postmodern programmer





More information about the samba-technical mailing list