[jcifs] Re: SMB URL

Michael B.Allen mba2000 at ioplex.com
Wed Mar 26 20:29:16 EST 2003


> > > 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
> So it can't browse my host named @home? :)

Ahh, I see. I was still thinking about Unicode.

> > 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.
> Well, I browse within konqueror and KDE does have a correct URL handling,
> so either I descape these in the mapping to libsmbclient or I fix it where it
> belongs: in libsmbclient.

Well it's reasonable for konqueror to do it but I believe the feeling is
the SMB URL is after all a URL so it should have the ability to descape
as well.

> > > 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
> Yes. But what if a server appears in two workgroups? Even if you have 
> anonymous access to both of them. The DRAFT specifies WORKGROUP
> query for that, libsmbclient doesn't even code yet to ignore queries.

I'm still drawing a blank on this. If a server appears in two workgroups
you should be able to view the servers in each workgroup without an issue.

> >   smb://workgroup/
> It does. And when I enter a directory within that, I can't simply make sure
> the URLs are unique in using smb://host/?WORKGROUP=workgroup

Ahh, I guess you mean two physically different servers in two different
workgroups. Well the server namespace is still global. Workgroups are
just a hack to filter out everything but a select group of machines. If
two servers with the same name exist there will be other problems. Also
the process required for the client to find which server corresponds
to which WORKGROUP would mean connecting to each and examining the
OEMDomainName field. That's a little much to ask I think.

> I think, I would even have gone for smb:///?WORKGROUP=workgroup
> to make this even less ambiguous.

Now I'm confused again. What would this URL resolve?

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 jcifs mailing list