SMB URL

Michael B. Allen miallen at eskimo.com
Wed Mar 26 08:42:34 GMT 2003


On Wed, 26 Mar 2003 08:20:17 +0100
Stephan Kulow <coolo at kde.org> wrote:

> > We did reach an important conclusion that would be influential to anyone
> > writing an SMB URL parser. That is, even though SMB URLs do not require
> > Unicode characters be escaped (for practical reasons) they should be
> > able to decode escaped Unicode characters. This begs the question; how
> > do you escape Unicode characters? The prevailing answer appears to be
> > specified in the W3C IRI documents which suggest each escape should be
> > treated as a byte in a UTF-8 multibyte sequence.
> >
> > Otherwise, the SMB URL is reasonably well defined. Unicode handling was
> > the only remaining issue I believe. The jCIFS client implements all of
> > this functionality minus the decoding of escaped UTF-8 sequences.
> >
> > Please join the jCIFS mailing list if you have specific questions. We
> > have had many interesting discussions there about the SMB URL, we have
> > implemented it completely, and there are three people who understand it
> > quite well. Chris and Eric have the brains. Me type.
> >
> > I'm not familiar with the state of the libsmbclient SMB URL handling.
> Well, as you say yourself, the client needs to be able to decode escaped
> characters (you always say unicode characters, but that's not the only 
> problem, you need to descape '?', '=', '@' and similar characters too, that

Sure.

> So while libsmbclient doesn't need code to escape any characters as it
> never returns URLs, but just names or data, it urgently needs code to
> descape them.

I wouldn't say "urgently". JCIFS is getting along without it ok at the
moment. It depends where their being used. One such case is when they
are embedded in the PATH_INFO of an HTTP URL however it would also be
necessary to provide an escape function to the author so that the URLs
are properly escaped using UTF-8.

> The other part missing is the query handling. Currently libsmbclient relies
> on ~/.smb/smb.conf for the workgroup (which is a bit problematic when you
> want to copy files from one workgroup to another from a linux client ;(
> Above that it gives a ?WORKGROUP=COOLO - no such file

I'm not sure I understand this. Do you mean domain? Does libsmbclient
support the forms:

  smb://domain;user:pass@server/share/path/to/file

and

  smb://workgroup/

Wouldn't these resolve the issue (which ever it is) you describe. I think
SCOPE and WINS (or Chris prefers NBNS) are probably the only parameters
that are necessary for a completely autonomous SMB URL.

I fear the different SMB URL implementations are probably quite different
when it comes to semantic details :-( It would be nice to see them become
uniform.

Mike

-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 


More information about the samba-technical mailing list