smb://

Kevin Colby kevinc at grainsystems.com
Thu Dec 28 22:04:20 GMT 2000


"Christopher R. Hertel" wrote:
> 
> As I understand it, based on other messages here, it is necessary that the
> '/' *not* be used to delimit the domain from the user in order to comply
> with the RFC specified syntax.

Yes.  I agree that the "domain/user@" could probably be parsed successfully.
However, it is a fairly large deviation from the standard URI format.  While
a certain parser might get it right, another might not be so lenient.  How
much this needs to conform to RFC is another question.  Even the RFC
indicates that an opaque URI is potentially permissible, although the
language seems a bit harsh about it:

   URI that do not make use of the slash "/" character for separating
   hierarchical components are considered opaque by the generic URI
   parser.

This is part of what gave me pause about the use of "domain/user@".

> Except that I do not know if an @ sign is a legitimate character in a
> service name, directory path, or filename.  I think that it is allowed,
> which would break the scheme you suggest.

An "@" in a share or path _would_ be compliant with the RFC.  Although
it could be escaped, it doesn't have to be.  Whether CIFS/SMB cares
may be another story.

> I think the two formats that we are narrowing towards are:
> 
>   smb://[[[domain;]user[:password]@]server/[share/[path/][file]]]
> or
>   smb://[[[domain\]user[:password]@]server/[share/[path/][file]]]
> 
> There is precedent for using the backslash and, since Microsoft uses that
> character as part of their UNC, it is unlikely at worst that it will be
> part of a username.

Neither ";" nor "\" will be part of the username or domain name.

I don't like "\", though, and not just because of the shell-escape
history associated with it.  Sorry if I'm boring everyone, but having
just read the RFC, I keep turning there:

   2.4.3. Excluded US-ASCII Characters

   Although they are disallowed within the URI syntax, we include here a
   description of those US-ASCII characters that have been excluded and
   the reasons for their exclusion.
   [...]
   Other characters are excluded because gateways and other transport
   agents are known to sometimes modify such characters, or they are
   used as delimiters.

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

   Data corresponding to excluded characters must be escaped in order to
   be properly represented within a URI.

> (Um, should that be [domain\]user or user[\domain] ??)

Definitely the former, regardless of the delimiter.

	- Kevin Colby
	  kevinc at grainsystems.com




More information about the samba-technical mailing list