suggestion for libsmbclient feature

Michael B Allen mba2000 at ioplex.com
Sat Jan 29 23:34:58 GMT 2005


On Sun, 30 Jan 2005 02:14:25 +0300
Alexander Vodomerov <alex at sectorb.msk.ru> wrote:

> > Well the proper solution for this would be for libsmbclient to
> > automatically retry with different CalledNames. The algorithm used by
> > the JCIFS client [1] is:
> > 
> > 	if (IP specified) {
> > 		CalledName = '*SMBSERVER'
> > 	} else if (hexcode == 0x1D || hexcode == 0x1C) {
> > 		CalledName = '*SMBSERVER'
> > 	} else {
> > 		CalledName = NetBIOS Name [2]
> > 	}
> If it is DNS domain with all suffixes cut away - it will work in my
> case. Can we have such code in libsmbclient? Does it break something?

Actually with Win95/98/ME I think this algorithm will fail with a DNS
name. With non-Win95/98/ME it will actually work with a DNS name because
it will either just work (many servers actually register the name.dom.net
FQDN name so I assume it will work as the CalledName) or it will fail
(because 'MYHOSTNAME.doma' is just wrong) and fall through to trying
the special '*SMBSERVER' name which will work. For Win95/98/ME I think
you would have to add another case that tries the first label of the dns
name. But even then there's no guarantee it will work with Win95/98/ME. I
no longer test JCIFS against those servers and do not plan to support
them moving forward. AFIAC they don't exist :->

> > [1] The JCIFS client is very very good at quickly crawling large
> > networks.
>
> I don't want to depend on Sun's JVM. Does jCIFS run on some open-source
> Java implementation, e.g GCJ? If it does, it changes a lot. May be I
> would use it in my project.

Well IBM also has a very good VM that is known to work with JCIFS but I
believe GCJ is just the compiler so you should probably be more concerned
with the VM and/or class libraries (i.e. GNU Classpath) but I believe
it might work. Someone actually contacted me recently with a bugfix
that had to do with running with the GNU Java env. I don't know if he
actually had it working though.

Mike

-- 
Greedo shoots first? Not in my Star Wars.


More information about the samba-technical mailing list