[jcifs] Server resolution for Windows 98

Matthew Tippett matthew.tippett at sympatico.ca
Sun Nov 10 18:16:13 EST 2002


Hello,

I seem to have found (and fixed) a problem with the fallback from the
*SMBSERVER called name not present condition when connecto to a master
browser to retrieve a list of known domains.

The problem manifested itself when attempting to talk to windows 98 SE
systems.  It looks like *SMBSERVER as a name is present in the CIFS
standard, and is implemented in XP/NT and above, but not Win98.  The
Nautilus implementation of smb (most likely though libsmb has similar
behaviour except it does a NBSTAT of
*<00><00><00><00><00><00><00><00><00><00><00><00><00><00><00> vs the
*<00> that jcifs currently does.

By applying the patch attached, I can now connect to a windows 98 master
browser and it all works great :).

Chris or Michael, can you make a comment on the 'correctness' of doing this?

Matt
-- 
Matthew Tippett - matthew.tippett at sympatico.ca - (416) 435-4118
Technology Forum - http://www.technology-forum.org/
Commercial Open Source - http://www.commercialos.org/
-------------- next part --------------
--- NbtAddress.java.orig	2002-11-04 02:27:37.000000000 -0500
+++ NbtAddress.java	2002-11-10 02:08:29.000000000 -0500
@@ -83,7 +83,7 @@
  * on a network querying a workgroup group name is the preferred method.
  */ 
 
-    static final String ANY_HOSTS_NAME = "*              ";
+    static final String ANY_HOSTS_NAME = "*\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
 
 /** 
  * This is a special name for querying the master browser that serves the


More information about the jcifs mailing list