[jcifs] jcifs bug

Christopher R.Hertel crh at ubiqx.mn.org
Sat Mar 23 10:58:57 EST 2002

On Fri, Mar 22, 2002 at 06:46:14PM -0500, Michael B. Allen wrote:
> > To solve our current problem, I end up rethrowing the smb exception
> > as a runtime exception in parse (evil hack until fixed).
> There's a noteworthy problem here. The jCIFS SMB URL is based on an IETF
> draft that requires the authority component to be resolved *during the
> parse* in order to determine if it's a servername

Well, that's why it's a draft.  ;)

> like:
>   smb://server
> or a workgroup name:
>   smb://mygroup

You should be able to completely parse the URL string into component
pieces and then handle the server vs. workgroup question as part of the
semantics of the connection establishment.

In our case, the <authority> field will typically be in the form of a
"Server-based Naming Authority", which means:

  <authority> :== <userinfo>@<host>:<port>

If the <userinfo> portion is present, then the following semantic rule
applies (assuming I'm not talking through my shorts):  Since the browse
service does not require authentication, the specification of <userinfo>
indicates that the request is for an smb server, not a workgroup.

> You can see this URL is "overloaded". So a query (actually two concurrent
> queries) must go out on the wire. Otherwise there would be no reason to
> go out on the wire; name resolution could be handled lazily.

How do you mean lazily?  Just curious.

> Chris,
> Are you even considering the:
>   smb:mygroup
> format suggested by the other URL IETF people?

I considered it, but I'm not sure that it works.  It falls into the
<opaque_part> category and I don't think it buys us much.  Also, we
already have people who are implementing in commercial products.  I think
their products will clash with the final version of the SMB URL spec, but
the current mechanism is intuitive and I really don't want to collide if I
don't need to collide.

Chris -)-----

Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

More information about the jcifs mailing list