Wed Jan  7 19:24:59 EST 2004
jcifs-0.7.18 released

Only  SMBs  that  follow  authentication  need to be actually signed if SMB
signing  is  enabled.  Because  it  was  assumed  that  SMBs  would  follow
authentication  an  Exception was coded to be thrown if password hashes are
determined  to be inadiquate to generate a MAC signing key. However because
the  NTLM  HTTP  Filter  does  not send additional SMBs, signing will never
actually  occur. The Exception is only generated if the password hashes are
"externel"  (meaning  from  the NTLM HTTP Filter) but this is precisely the
case  where  signing  will  never  occur. Therefore, the Exception coded to
detect  external  password  hashes has been removed so that additional SMBs
will generate a signing error but the NTLM HTTP Filter will be permitted to
proceed without error.

The  NtlmPasswordAuthencation  class  has  also  been  made Serializable to
permit  certain containers to serialize the state of an HTTP session. It is
not  known  however  if the client will seamlessly re-authenticate when the
NPA  is  de-serialized and discovered to be invalid. Regardless, the Filter
will  now  work with these containers albeit possibly not to their greatest
potential. 


Tue Dec 23 03:43:15 EST 2003
jcifs-0.7.17 released

JCIFS  will  now suppress the harmess "exception reading from socket input"
message  being  written  to  the log. Specifically when using the NTLM HTTP
Filter under load jCIFS would periodically write exceptions to the log like
the following: 

Dec 19 10:45:14.474 - exception reading from socket input: IKOO635<1B>/172.81.13.154
java.net.SocketException: Connection reset
  at java.net.SocketInputStream.read(SocketInputStream.java:168)
  ...

This was occuring because the domain controller is periodically closing the
socket  to the server. This is harmless. JCIFS will automatically reconnect
and proceed as usual. 

Dec  9 18:13:25 EST 2003
jcifs-0.7.16 released

If  NT  SMBs are not negotiated jCIFS will now use SMB_COM_WRITE as opposed
to  SMB_COM_WRITE_ANDX. This was done to support NetWare 6 which apparently
does not implement this ANDX command. 

Thu Oct 23 01:18:29 EDT 2003

jcifs-0.7.15 released

The name service code has been modified to return a different response with
each  0x1C  domain controller query. The range of servers is limited to the
top  jcifs.netbios.lookupRespLimit  entries  in  the  NetBIOS response. The
effect  that this will have is that the NtlmHttpFilter and NtlmServlet will
rotate  through  domain  controllers when authenticating WWW clients. Also,
because  different  transports are used, fewer sessions will be multiplexed
over  each  resulting  in  an  increase  in scalability proportional to the
number  of  domain  controllers  used.  This  behavior can be turned off by
setting the jcifs.http.loadBalance property to false (the default is true).

The  jcifs.smb.client.ssnLimit  property  default value has been changed to
250 from 100. 

Mon Oct  6 23:53:28 EDT 2003

jcifs-0.7.14 released

Eric's  LMv2  patch  has been merged. There is some uncertainty surrounding
the signing of SMBs if GUEST credentials are negotiated. On a related note;
the  "Concurrent  modification" issue has been resolved. The oversight with
this  one  was  that  it  was  believed  that only a thead calling into the
transport  should  ever  trigger  tryClose() which is not exactly true. The
transport  thread  can  call tryClose but prior to adding verify() calls it
was  rare  and  only  happend  when  the transport reached a state where no
further  operations  could  move  forward anyway. So rather than syncronize
tryClose,  I  have  changed  verify  to simply return a boolean value which
set's the new ServerMessageBlock.verifyFailed member. This is then examined
by  the  calling  thread  who will tryClose (with the transport locked) and
throw  the "Unverifyable signature" if verifyFailed. Finally there has been
a  straight  forward  but potentially dangerous change in SmbFile. All list
operations  now  build  a  list  of names or files using an ArrayList. This
assisted  in  fixing  another  problem  where NetServerEnum2 responses were
observed    to   return   server   names   of   0   length.   This   caused
ArrayIndexOutOfBounds exceptions. These entries are now ignored. 

Wed Sep 17 21:21:31 EDT 2003

JCIFS  now  supports SMB signing. If a server requires SMB signing (Windows
2003  requires  it  by  default)  or if the server supports signing and the
jcifs.smb.client.signingPreferred   property   is   true  signing  will  be
negotiated  and  used.  Signing does not work with NTLM HTTP authentication
because  the  original  password  hashes  are  required to generate the MAC
signing  key.  There  have  also been some adjustments to SmbFile.hashCode.
Previously  jCIFS  did  not precisely exhibit the behavior described in the
comments for hashCode() and equals(). 

Mon Sep  1 19:04:11 EDT 2003

CIFS  permits  multiple  users  to  be  logged  in  over the same transport
(socket).  JCIFS  takes  advantage  of  this and reuses existing transports
whenever  possible.  It  was  reported  that  a user using the NTLM Servlet
Filter  was  getting  ERRSRV/90  which  means "Too many Uids active on this
session". So it looks like the limit is ~150 sessions per transport. I have
added    code    to    logoff    1/10th    of    the    sessions   if   the
jcifs.smb.client.ssnLimit propery is exceeded (default 100). 

Thu Jul 10 22:07:09 EDT 2003

Support  for  LMv2  authentication has been added. See the Overview page in
the  API  documentation  regarding  the jcifs.smb.lmCompatibility property.
Some  additonal  "cleanup"  has  also  been performed. One side-effect that
might be noticed is that the default domain/username/password can no longer
be  set  at runtime. Once the client is initialized the default credentials
are  fixed.  Setting  default  credentials are runtime was always an unsafe
operation. Create an NtlmPasswordAuthentication object instead. 

Thu Jul  3 20:59:25 EDT 2003

There  have  been  two small bug fixes in the SMB layer; the count field in
the  SMB_COM_WRITE_ANDX  response  was  being ignored. Apparently the count
specified  in the request is always honored or we would have seen plenty of
file corruption by now. Second, the list() and listFiles() did not properly
handle  Transaction  buffering  with  certain  values  for the listSize and
listCount  properties  (if  multipart transaction responses are send). Also
removed  a  few  obnoxious warnings getting logged during file transfers if
Log.WARNINGS is set. 

Regarding  NTLM  HTTP Authentication; there have been additions and updates
to  the  documentation  on the NTLM flags, a fix to NtlmSsp to only provide
the  target when requested by the client via the NTLM "request target" flag
(this   is   the   correct  behavior),  and  a  bugfix  to  NtlmSsp  to  do
Base64.encodeBytes(bytes,  false)  instead  of Base64.encodeBytes(bytes) (a
linewrap  in  the  header  can  cause  an  error).  Eric has also excellent
documentation detailing his analysis of the NTLM protocol: 

  http://davenport.sourceforge.net/ntlm.html

Thu Jun 12 00:18:05 EDT 2003

It  was  discovered  that if a server responds to the NBT session setup but
not  to  the  SMB_COM_NEGOTIATE  request the client will hang indefinately.
This  is not a likely thing to occur because servers usually respond or not
at  all.  Regardless  it  has  been  fixed.  The  client will timeout after
jcifs.netbios.soTimeout in this situation. 

Some tweeking of the NTLM http code has been performed.

Wed May 28 19:09:17 EDT 2003

jcifs-0.7.8 released

A bug in the new ntlm http client code was identified and fixed.

Tue May 27 21:40:58 EDT 2003

jcifs-0.7.7 released

A  deadlock  was  identified  in SmbTransport very similar to the one found
last  year.  A  significant  change  has  been made that greatly simplifies
synchronization in the transport layer. It eliminates this issue as well as
the  extra synchronization introduced to fix the previous problem. It is an
elemental change however so proceed with caution.

Two  new  packages  have  been  introduced.  The  jcifs.ntlmssp package now
contains  all NTLMSSP base code. This code is used by the NtlmHttpFilter as
well  has  the  new  NtlmHttpURLConnection class for transparently enabling
your  HTTP and HTTPS client to negotiate NTLM authentication. The other new
package  is  jcifs.https  which  just  contains  the HTTPS protocol handler
necesary for proper protocol handler registration. Please read the document
entitled  "Using  jCIFS  NTLM  Authentication  for  HTTP  Connections"  for
important details.

To permit SmbFileOutputStream to be used with unusual named pipe modes (see
5/1/03  message)  that  will  be  both  read  and written the open flags in
SmbFileOutputStream have been changed from O_WRONLY to O_RDWR.

The    attrExpiration    period    of    SmbFile    is    now    reset   in
SmbFileOutputStream.write()  to  prevent  jCIFS  from  reporting  incorrect
attributes  values  after  writing  the file. Previously it was possible to
write  to  the file and immediated check the timestamp or file size and get
an old value. This should no longer happen.

The  SmbFileInputStream.skip()  method  has  been implemented in a way that
will  not  result  in  any  IO to the server. Thus it is possible to resume
large downloads from the point of failure for instance. 

Wed Apr 16 22:46:07 EDT 2003

jcifs-0.7.6 released

The  isDirectory method has been changed to return false if the target does
not  exist.  Previously  this  would return true which is inconsistent with
java.io.File. 

Wed Apr  2 23:56:26 EST 2003

jcifs-0.7.5 released

More  refinement  to  the  NTLM  HTTP authentication code has been applied.
There  is  also  a fix for listing hosts from Windows ME/98/95 local master
browsers. 

Wed Mar 26 19:17:24 EST 2003

jcifs-0.7.4 released

Some NtlmHttpFilter issues were reported by several users of Win98 clients.
Eric  has  provided  a  new  NtlmSsp.java  that  works correctly with these
clients. 

Wed Feb 12 01:23:02 EST 2003

From    the    beginning   jCIFS   identified   SmbSessions   uniquely   by
domain\username. This meant that once a session was established it could be
shared  by  another  requestor even if they supplied an incorrect password.
This  was  done  for  reasons  that  strangely  enough  had  to do with SMB
chaining.  However  with  the  introduction  of  the http package it is now
common  to  use  jCIFS  to  authenticate  web  clients from a central jCIFS
instance.  This  introduces  a security flaw because there would be a brief
window  of  opportunity after a user logs in during which an impostor could
log  in  as that user with a simple change to their MSIE security settings.
This  problem has been fixed. Another related issue has also been fixed. If
the   NtlmHttpFilter  or  NetworkExplorer  servlet  is  supplied  with  bad
credentials  the  behavior  was to throw an SmbAuthException up through the
container.   Instead   these   classes   will  respond  with  the  standard
Authentication:   NTLM  response  triggering  the  password  dialog  to  be
displayed until correct credentials are displayed. 


Wed Feb  5 00:41:32 EST 2003

There   was   a   bug   introduced   in   jcifs-0.7.0   when   the  default
jcifs.smb.client.snd_buf_size was changed to 5000 from 1300. Writes of size
1501  to  1504 will trigger an ArrayIndexOutOfBounds exception. Two feature
enhancements  have  also  been  added. SmbFileOutputStream will now support
file  offsets  larger than 4GB. Second, the FILE_NO_SHARE, FILE_SHARE_READ,
FILE_SHARE_WRITE,  and  FILE_SHARE_DELETE  constants  have  been exposed in
SmbFile. They may be used to construct a shareAccess parameter for use with
SmbFileOutputStream  and  SmbFile to control whether or not other processes
(or  other  jCIFS  threads)  can  read, write, and/or delete the file while
jCIFS  has  it  open.  The default is (FILE_SHARE_READ | FILE_SHARE_WRITE |
FILE_SHARE_DELETE)  which  will permit other processes to have full access.
See examples/OpenExclusive and the SmbFileOutputStream API documentation. 

Wed Jan 15 22:34:14 EST 2003

jcifs-0.7.1 released

Previously the '#' character was being interpreted by the URL parser as the
delimeter  to  the '#ref' component of a URL. This character will no longer
be  treated  as a delimeter permitting files with '#'s to be addressed with
SMB   URLs.   The  getContentLength(),  getDate(),  getLastModified(),  and
getInputStream()  method  were  dropped  when  converting SmbFile to extend
URLConnection.  They  have been restored. Files returned by listFile() were
initialized  in  a  state such that isExists() would return false (at least
until the attrExpirationPeriod expired). This has been corrected. 

Wed Jan  8 23:46:47 EST 2003

jcifs-0.7.0 released

The  default  jcifs.smb.client.snd_buf_size  has  been changed from 1300 to
5000 and a bug regarding the resolveOrder mechanism was fixed. 

Mon Dec 30 20:18:54 EST 2002

jcifs-0.7.0b12 released

A  static  Handler instance is now passed to URL constructors internally to
avoid provoking the deficient jcifs.protocol.pkgs Handler detection that is
causing  the  "unknown  protocol:  smb"  exception  with  some  application
servers.  URL  decoding has been enabled. Previously there was no clean way
to  represent an '@' in a password in an SMB URL. Any character in the user
info  component  of  the  URL  can be protected with a hex code escape like
'%40'  for  '@'.  The  calling  name  in  the NetBIOS session establishment
message was incorrectly type 0x20. This has been changed to 0x00. A bug has
been  fixed regarding the use of plain text passwords with Unicode (obscure
combination).  A  patch  to  the  NTLM HTTP Filter has been applied to work
around a Weblogic 6.1 requrement. 

Fri Dec 20 15:59:50 EST 2002

jcifs-0.7.0b11 released

A  debugging  statement  was left uncommented in jcifs/UniAddress:173. When
listing  'smb://' or 'smb://workgroup/' URLs the following would be printed
to System.out: 

  sem.count=2,q1x.ans=null,q20.ans=null

Fri Dec 13 00:31:01 EST 2002

jcifs-0.7.0b10 released

Please  read  the  FAQ.  The  first  and last questions are new. Some minor
changes  have  been  made  to jcifs.Config try and assist with the "unknown
protocol:  smb"  exceptions.  Major  kudos  to Eric Glass for his help with
decipering  the exact source of those errors. Hopefully users will read the
FAQ  before  posting this question over and over. An obscure deadlock could
be  provoked  by  yanking  the  link  while doing IO on a server. Thanks to
Matthew  Tippett  for  reporting  that.  In  the course of fixing it I also
re-fixed  the  name service deadlock discovered in 0.7.0b7 :~) Somehow that
change  was  lost and I think I knew it at the time but could remember what
the  complete fix was. I'll have to release a 0.6.8 too because it's got it
too.  It  can  easily be provoked by using examples/ThreadedSmbCrawler with
"smb://"  and  10 threads on a big WAN. The jcifs.encoding property was not
being read correctly. 

Fri Nov 22 00:41:33 EST 2002

jcifs-0.7.0b9 released

Java  1.3  is  required.  I  thought the java.net.URL.set() variant that we
require  was  from  1.2  but  not  so. Oops. No turning back now. The 0.6.7
client  is  pretty  mature minus the 3 URL bugs. Use that with Java 1.1 and
up.

Thanks  to Chad for finding that calling getType() on a share returned in a
list from listFiles() was returning TYPE_FILESYSTEM. This has been fixed.

And  thanks  to Uwe for finding that calling close() on NamedPipe input and
output  streams  had  no  effect.  I believe this has been fixed but I have
limited testing capability.

The     NtlmAuthenticator     has    been    reinplemented.    Just    call
NtlmAuthenticator.setDefault(   this  )  where  this  extends  the  abstact
NtlmAuthenticator  class  and  implements the getNtlmPasswordAuthentication
method  (like  java.net.Authenticator)  and  your NtlmAuthenticator will be
called apon to return alternate credentials.

The   SmbShell   example   has   been   repaired   completely  and  extends
NtlmAuthenticator  which  means  when you cd around the WAN and hit a share
you're creds can't get through it will ask you: 

  $ java -Djcifs.properties=../miallen.prp SmbShell smb://storage15/docs/   
  docs/> cd smb://admin1-n/admin$/
  Access denied for smb://admin1-n/admin$/
  username: mydom\miallen
  password: fretos
  admin$/>

Wed Nov 13 00:35:13 EST 2002

jcifs-0.7.0b8 released

I  forgot  to  mention  that as of jcifs-0.7.0b4 jcifs now requires Java 2.
Recently  there was confusion over this so we have added a check for Java 2
in   the   static  initializer  of  jcifs.Config.  If  the  version  string
startsWith(  "1.1."  )  an error message will be printed to System.err. The
getUncPath  method  was  not  including  the share name. The ANY_HOSTS_NAME
member  of  NbtAddress was incorrectly using spaces rather than '\0' nulls.
Suprisingly  this  only affected nbtstat of Win98. A null pointer exception
was  being  generated  by  UniAddress. I was decrementing the semaphore too
agressively. 

I  have not restored the Authenticator functionality. It requires a hook in
SmbTransport so I will wait for a little more stability (next release).

Mon Nov 4 02:11:05 EST 2002

jcifs-0.7.0b7 released

A  deadlock  was  found and properly fixed in the name service code (stable
series  is also affected; update to 0.6.7). Some URL handling was still not
quite right after the big java.net.URL conversion. Creating an SmbFile with
smb://workgroup/        +       server/share/path/       would       create
smb://workgroup/server/share/path/  which  is  illegal. This has been fixed
and will now correctly create smb://server/share/path/.

Sun Oct 27 18:37:34 EST 2002 

jcifs-0.7.0b6 released

o Very  pervasive  character  encoding  changes  have  been made so that an
  encoding  (see  new jcifs.encoding property) can be changed. This should,
  for   example,  enable  the  client  to  operate  in  the  EBCDIC  OS/390
  environment.

o The  client  is  supposed  to connect to IPC$ using anonymous credentials
  (sometimes   referred   to   as  "null"  credentials")  if  the  supplied
  credentials  fail.  The  was  broken in the 0.7 series however it has now
  been repaired.

o A  concurrency  issue  in  copyTo  was identified an fixed. This was most
  reproducible when issuing many simple requests (SMB_COM_CREATE_DIRECTORY,
  SMB_COM_DELETE_DIRECTORY)  in  rapid  succession  (like when copying deep
  trees) and could result in "Access Denied" SmbAuthExceptions. 
  
o Minor jcifs.http package cleanups 

Tue Oct 22 03:01:13 EDT 2002

jcifs-0.7.0b5 released

Some issues with the NTLM HTTP Authentication Filter have been repaired. An
abstract  NtlmServlet  has been added to the jcifs.http package for pre-2.3
servlet  containers  to use. The NTLM HTTP Authentication documentation has
been updated. The API documentation has been slightly updated. 

Wed Oct 16 23:10:20 EDT 2002

jcifs-0.7.0b4 released

                 ! -=   I M P O R T A N T   =- !

URLs for directories now require a trailing '/'. This will break
existing code. To assit you the getName() method will return a name
with a trailing '/' if the SmbFile is a directory. Take care because
these illegal URLs will in some cases work. But if you try to list the
contents of a directory for example you will get an Exception:

jcifs.smb.SmbException: smb://server/share/dir directory must end with '/'
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1191)
        at jcifs.smb.SmbFile.listFiles(SmbFile.java:1157)
        ...

There are three additional changes (at least) regarding SMB URLs:

  1) Canonicalization does not exceed the host component. For example:

    smb://host/share/foo/ + ../.././../../foo/ --> smb://host/foo/

  whereas perviously you would get smb://foo/.

  2) For constructors that accept a second parameter, that parameter
  can no longer be null.

  3) Composing a URL with smb://workgroup/ and server/ used to be smart
  enough to reduce the URL to just smb://server/. This is no longer
  true. Doing this will yield smb://workgroup/server/ which is illegal.

The trailing '/' requirement is because the java.net.URL class is now
used internally for all URL handling and it (and the RFCs) requires it. I
have updated the obvious places in the API documentation but there are
undoubtedly lingering examples and documentation that need to be updated.

The reason we have converted to the java.net.URL class for URL
handling internally is because a) the few remaining bugs were
pervasive SMB URL bugs and b) the existing java.net.URL Handler was
serverly flawed. Committing whole-heartedly to java.net.URL solved both
problems. Quite well too actually. The whole thing is quite a bit more
elegant. SmbFile now extends URLConnection.

The jcifs.http.NtlmHttpFilter and jcifs.http.NetworkExplorer classes
should work quite well at this point. The Filter is now stateless so it
should net generate NullPointerExceptions like some Tomcat users were
experiencing. The NetworkExplorer servlet will now use the negotiated
credentials to access SMB resources. You cannot use the NetworkExporer
servlet and NtlmHttpFilter at the same time (meaning the Filter cannot
be used to protect the servlet).

NtlmAuthenticator has been zapped for the time being. It will be repaired
in another beta.

Sun Aug 25 05:19:00 EDT 2002

jcifs-0.7.0b3 released

Network Explorer was hoplessly broken. Countless bugs were fixed
(including removing a hardcoded BASEREF of my workstation, oops!). In
fact I factored out the BASEREF entirely. Link HREFs are much simpler
as a result. The style sheet has been extracted from the source and
loaded from jcifs/http/ne.css in the jar as a resource like the mime.map
which means it can easily be edited to taste. Default mime type is now
text/html unless there's an extension that's not in jcifs/util/mime.map
in which case it's application/octet-stream but you can always easily
add extensions to the map.

I have improved the NTLM HTTP Authentication/Network Explorer
documentation significantly (Thanks to Jason for the important
links). This should really be just a drop'n-go process now for most users.

I stumbled on a potentially serious but in the inners of SMB transport;
Uniaddress' were not matching resulting in reduntant SmbTransport
objects. Not sure if that ever impacted users though.

Graceful-reconnect  was  fixed  after being broken with the introduction
of NtlmPasswordAuthentication. Had to reorganize some credential
handling. The matching  routine  uses  logical  comparison  of
NtlmPasswordAuthentication objects  rather   than   comparing   hashes.
That made  fixing graceful-reconnect as easy as just setting the
NtlmPasswordAuthentication hashes to null so that they would be
recalculated with the new challange.

mkdirs() has been implemented.

Implemented setting LastModified time in SMB_COM_CLOSE for copyTo (it
will preserve modified time) but sadly it does not work with NT. Only
Samba and Win98 identified to work so far.

Implemented Named Pipes available(). Natrually this only applies to file
IO style named pipes. Hasn't seen thourough testing however.

Wed Aug 21 04:35:05 EDT 2002

jcifs-0.7.0b2 released

Thanks  to instructions from skeetz, the NTLM HTTP Authentication interface
has  been  greatly  simplified. It is now only necessary to drop in the jar
and add a filter-mapping. 

An obvious application for jCIFS is a Network Neighborhood/Windows Explorer
type application. With the addition of the jcifs.http package this is easy.
I  have  added  a "Network Explorer" file browser servlet to the jcifs.http
package. 

For  much  improved instructions regarding NTLM HTTP Authentication and the
jcifs.http.NetworkExplorer servlet see: 

  http://jcifs.samba.org/src/docs/ntlmhttpauth.html 

To  actually use credentials negotiated during the NTLM HTTP Authentication
it    was    necessary    to   add   SmbFile   constructors   that   accept
NtlmPasswordAuthentication   objects   which   can   be  obtained  from  an
HttpSession like: 

  NtlmHttpSession ntlm = (NtlmHttpSession)req.getSession().getAttribute( "NtlmHttpSession" );
  NtlmPasswordAuthentication auth = ntlm.getNtlmPasswordAuthentication();
  SmbFile f = new SmbFile( "smb://server/share/path", auth );

The   internal   datatype   used   to   maintain   file   offsets   in  the
SmbFileInputStream class is not a long which in Java is 64 bits. I have not
received  confirmation  that  files  >4GB  can be transfered but that's the
intention. 

Thu Aug  8 04:05:28 EDT 2002

jcifs-0.7.0b released

This  beta  introduces  some  new functionality rather than refactoring and
general cleanup which was the focus of the 0.6 series. There's more to come
but here's what has made it in so far: 

o jcifs.smb.client.codepage  property  specifies codepage of 8 bit strings.
This  should  resolve  the  issue  reported  by  Dmitry  Khlonin  who  says
codepage=Cp866  is common on Russian LANs. This does not imply running with
useUnicode=false however. Some commands like the ones that enumerate shares
and  workgroups will return 8 bit encoded strings regardless of wheather or
not Unicode is negotiated. If workgroups, servers, and shares do not appear
correctly  try  setting  this property. If you *are* using useUnicode=false
setting  the  codepage  property  may also have an effect if the JRE is not
running  an  a locale compatible with the target machine. This link appears
to have a good list of valid identifiers. 

  http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

o Added SmbFile.getType() which will return one of

  SmbFile.TYPE_WORKGROUP
  SmbFile.TYPE_SERVER
  SmbFile.TYPE_SHARE
  SmbFile.TYPE_NAMED_PIPE
  SmbFile.TYPE_PRINTER
  SmbFile.TYPE_FILESYSTEM

isWorkgroup() is now deprecated.

o  Added  a  "lookup"  table  to  jcifs.netbios.NbtAddress  like the one in
java.net.InetAddress to prevent redundant queries from reaching the wire. 

o  Plain  text  passwords  have  been  implemented but must be enabled with
jcifs.smb.client.enablePlainTextPasswords=true.  This  is  false by default
and  will  generate  a "Plain text passwords are disabled" RuntimeException
exception if you try to use it. 

o  The  SmbFile.length()  method  now  returns  the capacity of the disk if
getType() is TYPE_SHARE. 

o  Added  an  SmbFile.freeDiskSpace() method has that reports the amount of
free  disk  space  in bytes on a disk exported by a share (the SmbFile need
not refer to a share however it may not refer to a workgroup or server). 

o  Added  SmbFile.copyTo  method.  This method can copy directories accross
hosts  however at the momement it does not mirror file attributes. See this
message for a little more discussion about copyTo: 

  http://lists.samba.org/pipermail/jcifs/2002-August/002357.html

o    Replaced    jcifs.util.AuthHandler    and   jcifs.util.AuthInfo   with
jcifs.smb.NtlmAuthenticator  and jcifs.smb.NtlmPasswordAuthentication to be
consistent  with java.net package Authenticator and PasswordAuthentication.
Underlying behaviour remains the same. This has not been tested thuroughly.

Wed May 29 21:51:36 EDT 2002

jcifs-0.6.5 released

Thanks to Tony for running FileOps.java against Netware. Apparently Netware
does not like the word alignment pad in SMB_COM_WRITE_ANDX. Just commenting
out  that  part  of  the  serialization  *appears*  to work fine with other
servers  as well but keep your eyes open. In the process of testing things,
I  also found that the fix for read() not returning -1 in the 0.6.2 release
causes  reads  to  return -1 prematurely if the buffer is a particular size
and  a  multiple  of the files size etc. Unfortunately Word files and other
OLE Compound Documents are often multiples of 512 so this is quite possible
if  you  use  a  buffer  size  like 8192. I've created a new example called
VerifyIO.java  that  will  identify and therefore prevent these problems in
the future.

Sat May 18 15:59:33 EDT 2002

jcifs-0.6.4 released

The recurDesired and Broadcast flags where on in Node Status
Request. Apparently XP doesn't respond to this. Should have never
had them on anyway. This should fix getAllByAddress problems with XP
(probably Win2K too). Listing on shares should send a UNC path like '\*'
but jCIFS was incorrectly sending '\\*'. This confused Netware 5.0. This
has also been fixed.

Fri May  3 04:44:14 EDT 2002

jcifs-0.6.3 released

Finally the SMB URL has been fixed. It required only small changes but of
course the effect should be dramatic; no more URL encoding and decoding
of paths. As discussed on the jCIFS mailing list it is now necessary to
URL encode passords. For example, instead of:

  smb://miallen:p@ss@server/share/path/to/file.doc

it's:

  smb://miallen:p%40ss@server/share/path/to/file.doc

Actually I URL decode the entire authority section so you might also do:

  smb://domain%2bmiallen:p%40ss@server/share/path/to/file.doc

I added a fix for an ArrayIndexOutOfBounds Exception with passwords
longer than 14 characters. Thanks, MJZ. I removed all references to
e-mail address. I think the harvesters are getting out of hand.

Thu Mar 21 21:30:45 EST 2002

jcifs-0.6.2 released

It was discovered that the SmbFileInputStream.read() methods would
not return -1 when EOF was reached (returned 0 instead which is good
enough for most code) and that writing to a named pipe with clients that
support NT SMBs would trigger an "Invalid operation for IPC service"
exception. Both issues have been fixed.

Thu Feb 21 03:02:23 EST 2002

jcifs-0.6.1 released

If a file is retrived using the SmbFileInputStream class, the file's size
is precisely a multiple of 4096 and the byte[] b and int len parameters
used in a read() operation are both larger than 4096, the read( byte[]
b ) and read( byte[] b, int off, int len ) methods will return -1. The <=
condition in the middle of read( b, off, len ) has been changed to just <.

Wed Feb 20 02:42:20 EST 2002

jcifs-0.6.0 released

This long and winding beta cycle is finally at an end. There have been
no problems reported for some time now. This release is simply 0.6b9
renamed with some improvements to the docuementation.

Now how about that RPC layer ...

Wed Feb  6 02:34:52 EST 2002

jcifs-0.6b9 released

The jcifs.util.ThreadInterruptor has been removed. It was a feable attempt
to try and interrupt threads stalled within new Socket() because the
destination host is not responding to the initial SYN packet. These calls
eventually timeout (3 min 15 sec on Linux). I think most Java network
clients do the same in this situation. Some logic has been added to
prevent certain erronous operations such as listFiles() on IPC$. There
have also been two fixes regarding proper URL enocoding and a getName
issue. I have caught a few "Timeout waiting for response from server"
errors with the use of AuthHandler that I have added a fix for but I
an unable to reproduce the problem now. The todo has been updated as
well as the documentation. The 0.6.0 release is very close, we're just
working on API documentation at this point.

Sat Jan 12 16:34:11 EST 2002

jcifs-0.6b8 released

Fixed a problem with deleteing derectories on Win98 and Novell. Also,
fixed erronous result of calling exists() on a directories created
immediately before (attributes needed to be artificially expired).

Fri Jan 11 03:16:49 EST 2002

jcifs-0.6b7 released

The introduction of listFiles at the last minute created an issue
with caching file attributes and enumerating workgroups and hosts of a
workgroup. There was a compilation problem with URLDecoder and a possible
null pointer exception in the gracefull reconnect code. Generally the
last beta was a flop. I strongly advise that you erase it and use this
release. I have high hopes for it. The good news is listFiles has turned
out to be quite a screemer on regular directories. I can list every file
on my NT machine with T2Crawler in 10.095 seconds (yes, over the network).

Mon Jan  7 01:24:54 EST 2002

jcifs-0.6b6 released

There have been a few issues discovered and fixed:

o The listFiles() methods will no longer throw MalformedURLException or
UnknownHostException - These where there because the SmbFile constructors
throw them. However they should never be thrown within these methods
because the URLs are constructed internally (i.e. they should not be
"malformed") and the host should not be different from the host used
to create the file listFiles() is being invoked on (i.e. the hostname
should be cached or valid).

o Gracefull reconnect and internal state consistencey - Previously,
jCIFS was not very smart about how to handle socket failure on the
server. If for example, the server was restarted, jCIFS would gernerate
exceptions and generally fall over in a heap. We have revisited the
code that invalidates transports, their sessions, and the sessions
trees and found that the code was somewhat deficient. If for example
an error occured and the transport instructed it's sessions to "logoff"
they might try to send a message to the server indicating so. Of course,
this message too might fail resulting in an inconsistent state. There
was one report of invlid UID exceptions. This is likely the cause of
that problem and should not happen again. We have added a boolean inError
parameter to the tryClose, logoff, and treeDisconnect methods that if
called with inError = true ensure that the state of all sessions and trees
associates with a transport are reset forceing jCIFS to reestablish new
sessions and tree connects. All of this happends under the hood of course.

o Improve SMB header discovery - The detection of the first for "magic"
bytes of the SMB header (0xFF 'S' 'M' 'B') has been greatly improved. Some
servers leave garbage bytes at the end of messages which jCIFS is
sensitive about. This should solve the problem reported with NetWare 5.

o Ensure safe URLDecoding of SMB URL - It was discovered that an SmbFile
derived from another SmbFile created with URL encoded characters might
generate an error. This was because the first SmbFile would decode the
URL and then pass the now invalid characters on to the second file. This
as been fixed by only decoding the string used to reprsent the files
path internally and thus not pass it to derived SmbFiles.

o Improved choice of authentication credentials to IPC$ - We recently
found some strange situations where AuthExceptions would be thrown
were that probably should not have. For example, if you connect to a
Win98 share using normal credentials and then try to perform an IPC$
operation (e.g. list shares) Win98 would not take the "null" login
credentials and return Access denied. If you connect to IPC$ with "null"
logon creadentials *first* then everything is fine. So we have made the
choice of credentials for connecting to IPC$ a little smarter. If normal
credentials have been supplied jCIFS will try those and if that fails
it tries the "null" creadentials.

o Ensure share names are submitted in CAPS - Win98 (again *sigh*)
will reject share names that are not capitalized. Shares will now be
presented to servers in all CAPS. I guess this was broken during the
revamping, it worked in 0.5. Again, this happends under the hood; no
user action necessary.

Wed Dec 19 04:42:28 EST 2001

jcifs-0.6b5 released

I realize we're in the middle of a beta cycle but the listFiles
methods really need to go in. I didn't realize that the FilenameFilter
interface is to pass each file to an the accept(File dir, String name)
method. This is would require retrieving all the files from the server. I
will implement this but I for now I have created a listFiles( String
wildcard ) method instead. This is much more efficent because the CIFS
protocol provides for a wildcard expression to be passed to the server
and return only the entries that match. For a large directory is really
is far superior to the default java.io.FilenameFilter interface.

Rob et al. You might as well stick with 6b4 for a while. The listFiles is
the way to go for you ultimately but they need a little growing time and
my preliminary benchmarks do not show a real performance improvement. I'll
leave 0.6b4 up for a while.

Sat Dec 15 17:20:59 EST 2001

jcifs-0.6b4 released

A bug that caused exists() (and methods that call it) to return erronious
results has been fixed. There have also been numerous other smaller bug
fixes mostly regarding the behavior of SmbFile methods. This release
should be fairly stable. I have updated and tested all example programs
and added a few new tests. I have noticed a problem with certain SMB
URLs that I'm not sure how to fix yet but they are unusal cases.

PS: The depth argument of the T2Crawler does not work. It causes threads
to exit prematurely. It will likely never be fixed.

Wed Nov 28 04:39:40 EST 2001

jcifs-0.6b3 released

More refactoring. I found a pretty serious Object sink. I fixed the
deadlock in beta 2. I'm also trying out a new buffer strategy. There
are only two 64K buffers (plus the BufferCache for transactions) for
all transports now. Looks like a nice speed boost from that two. Eww,
this is getting embarassing :~)

TIP:

Try the T2Crawler.java with:

soTimeout=3
resolveOrder=WINS

Also, you may have noticed that the crawler example will stall on some
hosts. This is because they don't respond to SYN packets. This has
been fixed.


Wed Nov 21 03:37:28 EST 2001

jcifs-0.6b2 released

Previously jCIFS could not list hosts of a workgroup/domain if that
workgroup/domain's master browser was on a different network segment. This
has been fixed. The client can now enumerate hosts of an entire WAN. There
have also been two trivial bug fixes. I'm seeing some strange behaviour
from the ThreadedSmbCrawler test. One particularly slow host seems to
cause it to stall (although on a small network it flies).

Fri Nov 16 04:07:05 EST 2001

jcifs-0.6b released

This is the first beta of 0.6.

There have been significant changes under the hood. The primitives such
as packet encoding/decoding and transport have proven very sturdy however
the top level glue and logic driving the client really needed an overhaul
in hindsight. The client is much smarter now whereas previously jCIFS was
quite chatty and used some messages abusively (NodeStatusRequest). Some
other cleanups that took into account allocation of buffers and
large numbers of objects have resulted in measureable performance
improvements. All of this should be transparent to the user however my
confidence in the stabilty of 0.5.1 no longer applies. It will take some
time to confirm everything works as advertised. I am confident however
that any bugs will only require minor adjustments to fix. Of course the
name resolution bug that triggered this crusade has been fixed.

There are some API changes. Most methods of SmbFile throw the now public
SmbException. Natrually, this will require changes to existing code. For
example, if your code was:

if( r.delete() ) {
  System.out.println( "delete successfull" );
} else {
  System.out.println( "error!" );
}

you might replace this with:

try {
  f.delete();
  System.out.println( "delete successfull" );
} catch( SmbException se ) {
  System.out.println( "error: " + se.getMessage() );
}

There are quite a few different messages that can be provoked such as:

The file is being used by another process
The device is not ready
All pipe instances are busy
...

not all of which have text messages (and which ones do have messages are
in only English at the moment). You can test and make dicisions based on
the errorClass and errorCode of an SmbException. All SmbExceptions are
thrown through these methods unless an object implementing the AuthHandler
interface has been called with the static SmbFile.setAuthHanler method. If
an AuthHandler has been specified the following authentication related
SmbExceptions:

Access denied
Bad password
The client does not have the necessary access rights for the
  requested function
The user account has expired
The user is not allowed to access this server from this client
The user is not permitted to access the server at this time
The password of the user has expired

will not be thrown by SmbFile methods but rather passed in the AuthInfo
object to the AuthHandler's authenticate() method along with the username,
password, domain, and target URL if one of these SmbExceptions occurs. See
http://lists.samba.org/pipermail/jcifs/2001-October/001553.html for a
related discussion. I believe this is a powerfull feature in itself. This
provides for sophisticated error handling and consistent error messages
(the messages are the same as those reported by Windows clients). There
is also an oppurunity to introduce a ResourceBundle of text messages
here. I beleive it will work quite well and in practice I do not believe
code will be cluttered with try/catch.

The NbtAddress class was designed to handle NetBIOS name queries
similarly to the common InetAddress class. Unfortunately a lapse in
judgment integrated DNS queries into this class in jcifs-0.5 (thus the
name service bug). The solution is to remove this DNS code and provide
a wrapper class that handles both DNS queries as well as NetBIOS queries
mainly delegating the work to InetAddress and NbtAddress. This class is
UniAddress. Here is how each of these classes should be used:

o InetAddress - Lookup a DNS name
o NbtAddress - Lookup a NetBIOS name or perform NetBIOS specific
    queries (NodeStatus with getAllByAddress)
o UniAddress - Don't know or care what type of name it is, try to
    find the name with both DNS and NetBIOS queries if necessary. Query
    behavior is governed by the jcifs.resolveOrder property.

So generally the UniAddress class should be used if you wish to interface
with name services directly (normally not necessary when working with
the jcifs.smb package).

In summary the classes that have been added or made public are:

jcifs.UniAddress
jcifs.util.AuthHandler
jcifs.util.AuthInfo
jcifs.smb.SmbException

Mon Aug 27 00:29:02 EDT 2001

jcifs-0.5.1

Chris did some great testing at the CIFS Conference Interoperability
Lab and found three minor bugs. They are described in detail here:

http://lists.samba.org/pipermail/jcifs/2001-August/001428

These packages will now work with Java 1.1 as well as Java 2.

Sun Jul 29 04:01:18 EDT 2001

jcifs-0.5

This is the final release of the 0.5 series. It is the most stable and
complete product the jCIFS team has to offer. There are no known bugs. A bug
in the renameTo operation (would not always return false when it should have)
has been fixed, API documentation improvements have been made, and a
entry to the FAQ has been added.

Fri Jul 13 18:54:37 EDT 2001

jcifs-0.5b2

Thanks to Rob for realizing that attempting to read the same file from
different processes/threads yielded an "The file is being used by another
process" exception. We had the share flags and access masks wrong. A
Log.CRITICAL_EXCEPTIONS mask has been added for logging messages to the
console. If:

    Log.setMask( Log.CRITICAL_EXCEPTIONS );

is set, the "Access denied", "Bad password", and "The device is not
ready" sorts of exceptions will NOT be printed. The default is still
Log.EXCEPTIONS which encompasses both Log.CRITICAL_EXCEPTIONS and regular
Log.EXCEPTIONS so existing code will not be affected.

Thu Jun 28 21:04:15 EDT 2001

jcifs-0.5b

This is the beta release of jcifs-0.5. The 0.5 series has already been
through a stable release and there are no know bugs so we are confident
that it will perform well. New features since jcifs-0.4 include:

o SmbFile.list() Bug Fix - The jcifs-0.4 package had a serious bug that
  caused a TRANS2_FIND_FIRST2/NEXT2 endless loop. It has been properly
  fixed. This should be the first *complete* stable release.
o Share, Server, and Workroup Enumeration - jCIFS can now list the shares
  on a server, servers of a workgroup, and workgroups on a network.
o CallNamedPipe, TransactNamedPipe, and CreateFile Named Pipe API (Paul)
o Complete SMB Filesharing URL Scheme IETF Draft Support - The smb://
  URL scheme has been fully implemented. (Chris)
o Transactions and RAP API
o Transactions - Full multi-part Transaction requests(used by Transact
  Named Pipes)
o Daylight Savings Bug Fix - jCIFS was not properly correcting for
  daylight savings. (Urban)
o Full SmbComNTCreateAndX Support - We now look just like NT 4 instead
  of Winblows 95 :~)
o Unicode Alignment Bug Fix - Unicode alignment was generally not
  correct and caused many problems in early 0.5dev releases.
o SmbFile Method Behaviors - Fixed canRead() and re-thought and soul
  searched over the meaning of each of these methods and their behavior
  in the smb://, smb://name, and Named Pipe contexts. These methods
  should start to get pretty stable at this point.
o Clean, No Wait Exiting - Examples and other programs would wait 15
  seconds before exiting. This has been fixed by making the Transport
  thread setDaemon( true ). Same for the NameServiceClient Thread.
o Full Tuneable Batching
o NetBIOS Scope Fix
o New getServer, getShare, isWorkgroup Methods
o SmbShell and SmbCrawler Utilities

Thanks deserved for this release to Chris, Steve, Paul, The DJ, Urban,
James, Thierry, savaJe Technologies, and Josef.
