+++ /dev/null
-Thu May 27 23:25:57 EDT 2004
-jcifs-0.9.0 released
-
-The 0.9 series is no longer beta as there have been no reports of problems.
-The documentation has been updated but still needs a little work. Please
-report anything inaccurate or confusing.
-
-Thu May 13 23:34:43 EDT 2004
-jcifs-0.9.0p released
-
-Thus begins the 0.9 series. See multiple entries below for details.
-
-Thu May 13 18:52:52 EDT 2004
-
-NetServerEnum2 has been added to support large lists of workgroups and
-servers. Note that enumerating large lists of shares is still limited by
-one 64K buffer.
-
-The NtlmHttpFilter has been modified to support "preauthentication" using
-the default credentials so that a valid signing key can be generated for
-servers that require SMB signing (although it will probably still work
-without).
-
-Mon May 10 21:56:49 EDT 2004
-
-Several minor changes have been made to the NTLM HTTP Authentication
-Filter. First, it is now not possible for an NtlmPasswordAuthentication
-object (NPA) with externally supplied hashes (i.e. via NTLM HTTP Filter) to
-be used with an SMB_COM_SESSION_SETUP if the challenge used to build the
-hashes no longer matches the transport over which the request is being
-issued (i.e. the challenge has expired). Second, should such a condition
-arise an SmbAuthException will be thrown from SmbSession.sessionSetup with
-a status of NT_STATUS_ACCESS_VIOLATION (this status code is not returned by
-the server in this case but is not used by any other natrually occuring
-SmbAuthException but could in theory be emitted as a plain SmbException).
-The NtlmHttpFilter will catch this exception and issue an HTTP redirect to
-the requested URL thereby reinitiating the NTLM negotiation. In theory this
-condition cannot arise as the NPA's presence in the HttpSession is all that
-is necessary for the request to bypass NTLM and call chain.doFilter but it
-is believed there are unforseen conditions under which the Filter can
-provoke NTLM to be renegotiated back-to-back thereby causing the Network
-Password dialog to appear (clustering env?) so this modification should
-ensures bad password hashes are never passed to the domain controller and
-any error will be transparent to the user due to the redirect (i.e. the
-Network Password dialog will not be provoked).
-
-The NetworkExplorer servlet has been adjusted to accomodate underlying
-changes that manafested themselves as excessive netbios name querying for
-workgoup and server names. The NT_STATUS_ACCESS_VIOLATION challenge check
-has also been implemented in NetworkExplorer. These changes permit
-NetworkExplorer to browse across DFS shares. When a directory is discovered
-to be in DFS, a DfsReferral is thrown. This exception is caught by
-NetworkExplorer which then issues a redirect with a new URL build with the
-DfsReferral.node string.
-
-Sun May 2 22:57:30 EDT 2004
-
-Multiple WINS servers may now be specified as a comma separated list.
-
-Most SMB signature code has been moved into jcifs/smb/SigningDigest.java
-where it's state can more easily be tracked. This is more favorable for
-dealing with issues such as failure during signature initialization or the
-scenario where NULL creds to IPC$ should not use signing after
-LOGON_FAILURE with previous session setup.
-
-The behavior of SmbNamedPipe.getOutputStream has changed. If
-PIPE_TYPE_TRANSACT and PIPE_TYPE_CALL are NOT specified a
-TRANS_WAIT_NAMED_PIPE will be issued before the file is opened. This
-emulates a WaitNamedPipe follow by CreateFile client.
-
-The return value of readWriteFormat is now checked against the NBT header
-length (from in.available()). If it does not match it is skip()'d and a log
-message is written. This should allow jCIFS to get by the OS/400 bug in the
-Negotiate response.
-
-The ssnLimit property will now cause new transports to be created to
-accomodate new sessions as opposed to the previous behavior of closing
-stale sessions when the ssnLimit is reached. Values can be 0 meaning
-unlimited, 1 meaning strict 1:1 sessions:transports, and N for N sessions
-per transport. A value of 1 should permit the NTLM HTTP Filter to operated
-with domain controllers that require SMB signatures. This functionality
-should prove to be useful for a variety of other reasons as well.
-
-Added additional checks to close NbtSocket in connect() in the event of an
-error. This should curb the CLOSE_WAIT sockets reported by Gary but
-apparently this is not enough to completely eliminate them as traces show
-even an ACK'd FIN can still leave a socket in this state.
-
-The SmbFiles resulting from listing a workgroup could result in those files
-have type TYPE_WORKGROUP when they should have been TYPE_SERVER.
-
-Several bugs in the SMB signatures code have been fixed; 1) a concurrency
-flaw could result in the signing digest being updated inappropriately 2)
-the signature of an errant session setup should be ignored 3) a padding
-byte was not properly considered that could sporatically result in
-"Unverifiable signature" errors reading files (this is the outstanding
-mystery bug mentioned in the 0.7.19 release).
-
-Fixed some incorrect path handling in the DFS referral code.
-
-Two property defaults have been changed; jcifs.smb.client.listSize from
-1200 to 65535 and jcifs.smb.client.listCount from 15 to 200. For high
-latency networks I recommend changing the values back.
-
-All access specifiers have been reviewed and changed to private or
-protected wherever possible and appropriate.
-
-The NetBIOS socket OutputStream has been reduced to a virtually useless
-shell. The NetBIOS header is now handled within ServerMessageBlock.java.
-Unfortunately it does not appear to have improved performance considerably.
-It's hard to tell from the testing performed.
-
-The MpxControl inner class has been removed in favor of something much
-simpler. It no longer creates Integer objects with each transmission.
-Unfortunately it does not appear to have improved performance either.
-
-Tue Feb 10 23:44:45 EST 2004
-jcifs-0.8.0 released
-
-This completes the 0.8 beta cycle. There is no technical difference between
-this release and 0.8.0b1.
-
-Mon Nov 24 04:06:55 EST 2003
-jcifs-0.8.0b1 released
-
-Some work on NetworkExplorer and DFS referrals has been performed but it
-still doesn't work right. Currently if a DFS referral is encountered the
-DfsReferral will be thrown into NetworkExplorer which then sends an HTTP
-redirect. The problem is that when the SmbTransports close after being idle
-for jcifs.smb.client.soTimeout, attempting to access servers with NPAs in
-the session can cause a succession of authentication failures which on my
-network equates to your account being locked (like mine is right now :)
-
-An artifact of this work is that NetworkExplorer will store the
-NtlmPasswordAuthentication objects in the HttpSession as npa-servername
-where 'servername' is the name of the server that supplied the challenge.
-
-And all of the fixes to the 0.7 series since 0.7.15 are included:
-
-It was discovered that SmbComNTCreateAndX as well as SmbComReadAndx
-commands did not calculate MAC response signitures properly. In one case a
-field was not properly decoded and in the case of reading the payload,
-which is read directly from the stream into the supplied buffer as an
-optimization, was not being properly factored into the signature. These
-issues have been fixed.
-
-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.
-
-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.
-
-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.
-
-jcifs-0.8.0b released
-
-This is the first beta release of the 0.8 series. There have been
-significant additions to this package. The most noteable is Distributed
-FileSystem (DFS) support. This client fully supports DFS with deep paths,
-multiple redirects, you name it. This functionality required pervasive
-changes so DFS users should proceed with caution and report any problems to
-the mailing list. Support for setting file attributes has been added as is
-the long awaited RandomAccessFile.
-
-o DFS - DFS support is thorough. All DFS operations are completely
- transparent. It Just Works. The client can be redirected an infinate
- number of times. It will reuse mappings established by other callers.
- Components of a path that do not fall within the DFS space and deep paths
- are handled properly. Also, note the new <tt>getDfsPath</tt> method can
- be used to determine if a file or directory falls within a DFS space.
- This support required pervasive changes so proceed with caution and run
- your unit tests with files that span DFS volumes. Please report any
- problems to the jCIFS mailing list.
-
-o Random Access Files - The <tt>SmbRandomAccessFile</tt> class has been
- added. All features of the analygous <tt>java.io.RandomAccessFile</tt>
- class are supported and should function as a drop in replacement. Notice
- it is now possible to set the size of a file with the
- <tt>SmbRandomAccessFile.setLength()</tt> method.
-
-o File Filters - Support for <tt>SmbFilenameFilter</tt> and
- <tt>SmbFileFilter</tt> is complete. Because CIFS servers can accept
- attributes and a wildcard expression for filtering entries on the server
- side, a <tt>DosFileFilter</tt> is provided that will accept these
- parameters and pass them to the server. The <tt>DosFileFilter</tt> can
- also be extended to create highly sophisticated and efficient file
- filters. Because of this work the <tt>list()</tt> and <tt>listFiles</tt>
- methods have been refactored and actually reduced in size.
-
-o Complete copyTo - The <tt>SmbFile.copyTo</tt> operation will now copy all
- file attributes as well as create and last write times. Directories
- copied using this method should be indistinquishable from the original
- minus ACLs. This method can now copy entire shares whereas previously
- only sud-directories could be specified.
-
-o Setting Attributes and Times - It is now possible to set file attribites,
- the create time, and last write time in a variety of ways. The new
- methods are <tt>setCreateTime</tt>, <tt>setLastModified</tt>,
- <tt>getAttributes</tt>, <tt>setAttributes</tt>, <tt>setReadOnly</tt>, and
- <tt>setReadWrite</tt>.
-
-o Complete Delete - The <tt>SmbFile.delete()</tt> method will now
- completely delete directories regardless of wheather or not there are
- read-only files in them.
-
-o The createNewFile Method - An <tt>SmbFile.createFile</tt> method has been
- added.
-
-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-0.7.13 released
-
-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
-
-jcifs-0.7.12 released
-
-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
-
-jcifs-0.7.11 released
-
-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
-
-jcifs-0.7.10 released
-
-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
-
-jcifs-0.7.9 released
-
-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.
+Sun Sep 5 19:02:41 EDT 2004
+jcifs-1.0.0 released
+
+Other than minor changes in packaging this code is identical to 0.9.8
+released 3 days ago. From now one all development will continue in the ???
+branch so that the 1.x series remains as stable as possible.
+
Thu Sep 2 18:45:35 EDT 2004
jcifs-0.9.8 released
headers, a new SmbFile constructor has been added and a rogue debugging
statement has been removed.
-Thu Jul 22 23:06:47 EDT 2004
-jcifs-0.9.6 released
-
-A bug in copyTo() has been found that could result in the operation failing
-and timeing out if the negotiated buffer sizes between source and
-destination servers were different. The default
-jcifs.smb.client.snd_buf_size has been changed from 5000 to 16644. When
-copying data between servers that negotiate larger buffer sizes this
-results in a noticable preformance increase.
-
-Adjustments have been made regarding a null pointer exception triggered in
-releaseMid() during certain error conditions. The releaseMid method should
-not be passed null Mids.
-
-Failover to the jcifs.smb.client.domain DC for browser info if the local
-master browser query fails.
-
-Methods have been added to SmbSession.java that support the specification
-of alternative port.
-
-Fixed some debugging output.
-
-Added clause to SmbFile.delete() to subvert exception "cannot find the file
-specified" exception generated because Oracle FilesOnline version 9.0.4
-doesn't send '.' and '..' like other servers.
-
-Ammended the ntlm http doc to mention that the domain or domainController
-property is required and that it will be suitable to authenticate clients
-for which it is an authority as well as domains with which it has
-established trust relationships.
-
-Thu Jul 1 18:53:20 EDT 2004
-jcifs-0.9.5
-
-A bug introduced in 0.9.3 could result in an infinite loop that exhausts
-all memory in the VM when enumerating workgroups and servers. This issue
-has been fixed. Also included is an updated to the NtlmHttpURLConnection
-(now works with org.apache.xmlrpc.XmlRpcClient).
-
-Mon Jun 28 13:29:39 EDT 2004
-jcifs-0.9.3 released
-
-The specification of a port in the SMB URL has been fixed. Full workgroup
-and server enumeration was also broken. JCIFS can now enumerate ALL
-workgroups and servers. The NtlmHttpURLConnection class for negotiating
-NTLM with HTTP clients has been updated to be more robust and support POST.
-
-jcifs-0.9.2 released
-
-Removed the HTTP redirect from the filter.
-
-Tue Jun 1 23:23:08 EDT 2004
-jcifs-0.9.1 released
-
-If the "guest" account is enabled on a CIFS server it is possible for jCIFS
-to successfully authenticate even with an invalid username. Windows
-networks virtually always disable this account but apparently it is not
-difficult to enable this condition when using Samba. NTLM HTTP Filter users
-that are not certain the "guest" account is disable should upgrade. This
-release eliminates the possability of authenticating anyone without a valid
-username. Specifically, a small clause as been added that throws an
-SmbAuthException if the server responds with the "is logged in as guest"
-bit on.
-
-Thu May 27 23:25:57 EDT 2004
-jcifs-0.9.0 released
-
-The 0.9 series is no longer beta. Aside from a very small code change this
-release only includes documentation updates.
-
-Thu May 13 23:34:43 EDT 2004
-jcifs-0.9.0p released
-
-Thus begins the 0.9 series. See CHANGES.txt for details. The documentation
-hasn't been revisited so some of it is incorrect.
-
-Tue Feb 10 23:44:45 EST 2004
-jcifs-0.8.0 released
-
-This completes the 0.8 beta cycle. There is no technical difference between
-this release and 0.8.0b1.
-
-Tue Feb 3 00:54:04 EST 2004
-jcifs-0.8.0b1 released
-
-There has been some work in trying to get NetworkExplorer to work with DFS
-and all fixes from the 0.7 series since 0.7.15 have been incorporated.
-
-Mon Nov 24 04:06:55 EST 2003
-
-jcifs-0.8.0b released
-
-This is the first beta release of the 0.8 series. There have been
-significant additions to this package including DFS support, random access
-files, filename and file filters, setting attributes and times, and copyTo
-and delete improvements.
-
-Thu Oct 23 01:18:29 EDT 2003
-
-jcifs-0.7.15 released
-
-The NTLM HTTP Authentication behavoir has been modified to permit load
-balancing between many domain controllers. The jcifs.smb.client.ssnLimit
-property default value has also been changed to 250 from 100.
-
-Mon Oct 6 23:53:28 EDT 2003
-
-jcifs-0.7.14 released
-
-Eric's latest signing patch has been merged, a few adjustments have been
-made to eliminate a concurrency issue, and a fix for browse servers that
-return zero length server names has been incorporated.
-
-Wed Sep 17 21:21:31 EDT 2003
-
-SMB signing is now supported and there have been some adjustments to
-SmbFile.hashCode() and SmbFile.equals()
-
-Mon Sep 1 19:18:52 EDT 2003
-
-Added code to logoff 1/10th of all sessions over a transport if
-jcifs.smb.client.ssnLimit is reached (fix for ERRSVR/90 errors).
-
-Thu Jul 10 22:07:09 EDT 2003
-
-Support for LMv2 authentication has been added.
-
-Thu Jul 3 20:59:25 EDT 2003
-
-There have been minor bug fixes in the NTLM code and SMB layer as well as
-documentation updates.
-
-Thu Jun 12 00:22:05 EDT 2003
-
-jcifs-0.7.9 released
-
-A bug that could cause a connection to hang indefinately has been fixed and
-some NTLM HTTP authentication tweeking has been applied.
-
-Wed May 28 19:09:17 EDT 2003
-
-jcifs-0.7.8 released
-
-A bug in the new ntlm http client code that would cause it to hang for ~60
-seconds before retreiving the target document has been fixed.
-
-Tue May 27 21:40:58 EDT 2003
-
-jcifs-0.7.7 released
-
-A deadlock has been identified and fixed, NTLM authentication for HTTP and
-HTTPS clients has been added (the inverse of the NtlmHttpFilter), the
-SmbFileInputStream.skip() method will skip without reading, and there have
-two other small fixes.
-
-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
-
-A security issue regarding the SmbSession.logon() method used by NTLM HTTP
-Authentication has been fixed and a modification has been made to trigger
-MSIE to redisplay the Network Password dialog repeatedly until correct
-credentials are supplied. The change was made in the core jcifs.smb package
-however so test this in your dev environments.
-
-Wed Feb 5 00:41:32 EST 2003
-
-The jcifs-0.7.0 and 0.7.1 releases will incorrectly throw an
-ArrayIndexOutOfBounds exception if a write of 1501 to 1504 is performed.
-This release fixes that bug. You may also set jcifs.smb.client.snd_buf_size
-= 1300 as a temporary work-around. It is also now possible to specify a
-"ShareAccess" with SmbFileOutputStream and SmbFile to restrict other
-processes from accessing files jCIFS opens. Also, SmbFileOutputStream now
-supports writing files larger than 4GB.
-
-Wed Jan 15 22:34:14 EST 2003
-
-jcifs-0.7.1 released
-
-Three bugs have been fixed regarding filenames with '#' signs in them, the
-getInputStream(), getLastModified(), getDate(), and getContentLength()
-methods of the URLConnection implementation, and isExists() incorrectly
-returning false.
-
-Thu Jan 9 00:06:23 EST 2003
-
-jcifs-0.7.0 released
-
-This is the 0.7.0 release of jCIFS, the Java SMB client. There is new
-functionality specifically targeting Web applications as well as some
-critical SMB URL fixes and feature improvements:
-
-o The new jcifs.http package is very handy when building Web applications
- that need to integrate with MS corporate intranets. Adding a hyperlink to
- a document on a network drive is easy with Network Explorer (pictured
- right) and will transparently negotiate credentials with MSIE to browse
- SMB resources (really, no password dialog necessary). This package also
- boasts an NTLM HTTP Authentication servlet Filter for authenticating MSIE
- clients. These are useful features because many of the tasks surrounding
- user management now fall back to computer support and HR. It is not
- necessary to add and remove users as they join and leave the company.
- Perhaps most important from the user's perspective; they do not need to
- enter a username or password if their workstation is a member of an NTLM
- domain. The password hashes generated when they logged on to their
- workstation will be negotiated during the initial request for a session,
- passed through jCIFS, and validated against a PDC or BDC. This also makes
- the user's domain, username, and password available for managing session
- information, profiles, preferences, etc.
-
-o The functionality used to authenticate and manage arbitrary creadentials
- has been exposed in the SmbSession and NtlmPasswordAuthentication
- classes. This permits NTLM password authentication to be integrated into
- applications without requiring Microsoft components or JNI.
-
-o With the introduction of the jcifs.encoding property the client is now
- truely internationalized. It has been used successfully on OS/390 with
- native EBCDIC character encoding. See the Sun JRE documentation for a
- list of supported encodings.
-
-o The URL issues remaining in the 0.6 series have been fixed in 0.7 by
- converting all SMB URL handling internally to use the java.net.URL class
- (Note: directories must now have a trailing slash and Java 1.3 is
- required). Also a deadlock in the name service code was identified and
- fixed (repaired in 0.6.8 as well).
-
-o A copyTo() method has been added to SmbFile that is very fast at copying
- large directories across hosts.
-
-o There have been numerous other changes including the mkdirs() and
- getType() methods, plain text password support (disabled by default), the
- available() method and close() fix for Named Pipes, reading files larger
- than 4 GB, the NtlmAuthenticator class, and more.
-
-All documentation has been completely reviewed and updated.
-
--8<--
- jCIFS
- Common Internet File System Client in 100% Java
- http://jcifs.samba.org
-
+ JCIFS
+ The Java CIFS Client Library
+ http://jcifs.samba.org
-This is the jCIFS SMB client library written in Java. In short, it will
-enable Java applications to remotely access shared directories on SMB file
-servers(i.e. a Microsoft Windows "share"). It is a fairly religious
-implementation of the CIFS specification supporting Unicode, batching,
-multiplexing, encrypted authentication, transactions, named pipes,
-domain/workgroup/server/share/directory/file enumeration, RAPs and more. It
-is licensed under LGPL which means commercial organizations can
-legitimately use it with their propertietary code (you just can't modify
-the library itself without providing the source for those changes to it's
-users, see the LGPL for details).
+JCIFS is an Open Source client library that implements the CIFS/SMB
+networking protocol in 100% Java. CIFS is the standard file sharing
+protocol on the Microsoft Windows platform (e.g. Map Network Drive ...).
+This client is used extensively in production on large Intranets.
REQUIREMENTS:
+JCIFS jar file - http://jcifs.samba.org/src/
Java 1.3 or above - http://java.sun.com/products/
INSTALLATION:
(see critical properties discussed on the Overview page). Put it someplace
reasonable and extract it. For example:
- $ gunzip jcifs-0.7.0.tgz
- $ tar -xvf jcifs-0.7.0.tar
+ $ gunzip jcifs-1.0.0.tgz
+ $ tar -xvf jcifs-1.0.0.tar
Add the jar to your classpath. There are two ways to do this. One is to
explicitly set it on the command line when you run your application like:
- $ java -cp myjars/jcifs-0.7.0.jar MyApplication
+ $ java -cp myjars/jcifs-1.0.0.jar MyApplication
but a more robust solution is to export it in your ~/.profile or
~/.bash_profile like:
- CLASSPATH=$CLASSPATH:/home/produser/myapp/myjars/jcifs-0.7.0.jar
+ CLASSPATH=$CLASSPATH:/home/produser/myapp/myjars/jcifs-1.0.0.jar
export CLASSPATH
WINDOWS:
Add the jar to your classpath. There are two ways to do this. One is to
explicitly set it on the command line when you run your application like:
- C:\> java -cp myjars\jcifs-0.7.0.jar MyApplication
+ C:\> java -cp myjars\jcifs-1.0.0.jar MyApplication
but a more robust solution would be to change your system environment but
I'm not confident I can tell you accurately how to do that.
import jcifs.smb.*;
- jcifs.Config.setProperty( "wins", "192.168.1.230" );
+ jcifs.Config.setProperty( "jcifs.netbios.wins", "192.168.1.230" );
SmbFileInputStream in = new SmbFileInputStream(
- "smb://username:password@host/c/My Documents/report.txt" );
+ "smb://dom;user:pass@host/c/My Documents/report.txt" );
byte[] b = new byte[8192];
int n;
while(( n = in.read( b )) > 0 ) {
example:
jcifs.Config.registerSmbURLHandler(); //ensure protocol handler is loaded
- URL url = new URL( "smb://user:pass@host/share/dir/file.doc" );
+ URL url = new URL( "smb://dom;user:pass@host/share/dir/file.doc" );
InputStream in = url.openStream();
-There are many example programs in the jcifs_0.7.0/examples/ directory. To
-execute the Put example you might do:
-
- $ java -cp examples:jcifs-0.7.0.jar -Djcifs.properties=jcifs.prp \
- Put smb://usr:pass@host/share/dir/file.doc
- ##########
- 582K transfered
-
This will also work with whatever else uses the URL class internally. For
example if you use RMI you can serve class files from an SMB share and use
the codebase property:
-Djava.rmi.server.codebase=smb://mymachine/c/download/myapp.jar
-See the extensive API documentation included in the distribution.
-
-BUILDING JCIFS FROM SOURCE:
-
-If you wish to modify and/or build the jCIFS source simply download the
-ant.tgz or ant.zip available at http://jcifs.samba.org and extract it in
-the jcifs_0.7.0 directory. Edit the build.sh or build.bat file to
-appropriately reflect the location of the JDK on your system and bootstrap
-the Ant build tool. Now type:
-
- $ ./build.sh
-
-You will be presented with a list of target arguments. The build file is a
-standard Ant build.xml config. You may also integrate the package into your
-existing Ant installation or get the latest version of Ant here:
-
- http://jakarta.apache.org/ant/
-
-WHAT IS SMB AND CIFS?
-
-Server Message Block (SMB) is an application layer networking protocol for
-file and print sharing. It is the de-facto networking protocol for
-Microsoft Windows platforms. The Common Internet File System (CIFS) is the
-more generic name for all that encompasses the protocol and its many
-layers. Collectively this is the networking protocol used when you "Map
-Network Drive...", issue "net use * \\server\share" commands, use smbclient
-on UNIX, smbfs on Linux, Sharity, OS2, server vendors such as Network
-Appliance, EMC, and Novell NetWare.
-
-WHY DO YOU NEED JCIFS?
-
-This client is 100% Java and will work the same in a variety of
-environments from Palm Pilots and applets to any UNIX that supports Java.
-Naturally you can choose to run your applications on a platform that
-supports mapping or mounting remote volumes into the local filesystem but
-this assumes you know what shares you are accessing in advance and what
-platform your application is running on(do you use /mnt/pnt or H:\dir). The
-latency involed makes this approach unsatisfactory for certain applications
-(e.g. Web Gateway). Using locally mapped filesystems is also not portable,
-unstable due to unnecessary dependencies, and more difficult to manage. The
-JCIFS infrastructure is also highly extensible. If there is a demand it
-will include a great deal of additional functionality not available through
-a filesystem API such as printing, RPC, NT file change notification, etc.
-
-ACKNOWLEDGEMENTS
-
-Special thanks to the Samba organization and Christopher R. Hertel for
-starting the JCIFS project.
-
-
-Mon Nov 24 04:06:55 EST 2003
-
-jcifs-0.8.0b released
-
-This is the first beta release of the 0.8 series. There have been
-significant additions to this package including DFS support, random access
-files, filename and file filters, setting attributes and times, and copyTo
-and delete improvements.
-
-Thu Oct 23 01:18:29 EDT 2003
-
-jcifs-0.7.15 released
-
-The NTLM HTTP Authentication behavoir has been modified to permit load
-balancing between many domain controllers. The jcifs.smb.client.ssnLimit
-property default value has also been changed to 250 from 100.
-
-Mon Oct 6 23:53:28 EDT 2003
-
-jcifs-0.7.14 released
-
-Eric's latest signing patch has been merged, a few adjustments have been
-made to eliminate a concurrency issue, and a fix for browse servers that
-return zero length server names has been incorporated.
-
-Wed Sep 17 21:21:31 EDT 2003
-
-SMB signing is now supported and there have been some adjustments to
-SmbFile.hashCode() and SmbFile.equals()
-
-Mon Sep 1 19:18:52 EDT 2003
-
-Added code to logoff 1/10th of all sessions over a transport if
-jcifs.smb.client.ssnLimit is reached (fix for ERRSVR/90 errors).
-
-Thu Jul 10 22:07:09 EDT 2003
-
-Support for LMv2 authentication has been added.
-
-Thu Jul 3 20:59:25 EDT 2003
-
-There have been minor bug fixes in the NTLM code and SMB layer as well as
-documentation updates.
-
-Thu Jun 12 00:22:05 EDT 2003
-
-jcifs-0.7.9 released
-
-A bug that could cause a connection to hang indefinately has been fixed and
-some NTLM HTTP authentication tweeking has been applied.
-
-Wed May 28 19:09:17 EDT 2003
-
-jcifs-0.7.8 released
-
-A bug in the new ntlm http client code that would cause it to hang for ~60
-seconds before retreiving the target document has been fixed.
-
-Tue May 27 21:40:58 EDT 2003
-
-jcifs-0.7.7 released
-
-A deadlock has been identified and fixed, NTLM authentication for HTTP and
-HTTPS clients has been added (the inverse of the NtlmHttpFilter), the
-SmbFileInputStream.skip() method will skip without reading, and there have
-two other small fixes.
-
-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
-
-A security issue regarding the SmbSession.logon() method used by NTLM HTTP
-Authentication has been fixed and a modification has been made to trigger
-MSIE to redisplay the Network Password dialog repeatedly until correct
-credentials are supplied. The change was made in the core jcifs.smb package
-however so test this in your dev environments.
-
-Wed Feb 5 00:41:32 EST 2003
-
-The jcifs-0.7.0 and 0.7.1 releases will incorrectly throw an
-ArrayIndexOutOfBounds exception if a write of 1501 to 1504 is performed.
-This release fixes that bug. You may also set jcifs.smb.client.snd_buf_size
-= 1300 as a temporary work-around. It is also now possible to specify a
-"ShareAccess" with SmbFileOutputStream and SmbFile to restrict other
-processes from accessing files jCIFS opens. Also, SmbFileOutputStream now
-supports writing files larger than 4GB.
-
-Wed Jan 15 22:34:14 EST 2003
-
-jcifs-0.7.1 released
-
-Three bugs have been fixed regarding filenames with '#' signs in them, the
-getInputStream(), getLastModified(), getDate(), and getContentLength()
-methods of the URLConnection implementation, and isExists() incorrectly
-returning false.
-
-Thu Jan 9 00:06:23 EST 2003
-
-jcifs-0.7.0 released
-
-This is the 0.7.0 release of jCIFS, the Java SMB client. There is new
-functionality specifically targeting Web applications as well as some
-critical SMB URL fixes and feature improvements:
-
-o The new jcifs.http package is very handy when building Web applications
- that need to integrate with MS corporate intranets. Adding a hyperlink to
- a document on a network drive is easy with Network Explorer (pictured
- right) and will transparently negotiate credentials with MSIE to browse
- SMB resources (really, no password dialog necessary). This package also
- boasts an NTLM HTTP Authentication servlet Filter for authenticating MSIE
- clients. These are useful features because many of the tasks surrounding
- user management now fall back to computer support and HR. It is not
- necessary to add and remove users as they join and leave the company.
- Perhaps most important from the user's perspective; they do not need to
- enter a username or password if their workstation is a member of an NTLM
- domain. The password hashes generated when they logged on to their
- workstation will be negotiated during the initial request for a session,
- passed through jCIFS, and validated against a PDC or BDC. This also makes
- the user's domain, username, and password available for managing session
- information, profiles, preferences, etc.
-
-o The functionality used to authenticate and manage arbitrary creadentials
- has been exposed in the SmbSession and NtlmPasswordAuthentication
- classes. This permits NTLM password authentication to be integrated into
- applications without requiring Microsoft components or JNI.
-
-o With the introduction of the jcifs.encoding property the client is now
- truely internationalized. It has been used successfully on OS/390 with
- native EBCDIC character encoding. See the Sun JRE documentation for a
- list of supported encodings.
-
-o The URL issues remaining in the 0.6 series have been fixed in 0.7 by
- converting all SMB URL handling internally to use the java.net.URL class
- (Note: directories must now have a trailing slash and Java 1.3 is
- required). Also a deadlock in the name service code was identified and
- fixed (repaired in 0.6.8 as well).
-
-o A copyTo() method has been added to SmbFile that is very fast at copying
- large directories across hosts.
-
-o There have been numerous other changes including the mkdirs() and
- getType() methods, plain text password support (disabled by default), the
- available() method and close() fix for Named Pipes, reading files larger
- than 4 GB, the NtlmAuthenticator class, and more.
-
-All documentation has been completely reviewed and updated.
-
---8<--
-
- jCIFS
- Common Internet File System Client in 100% Java
- http://jcifs.samba.org
-
-
-This is the jCIFS SMB client library written in Java. In short, it will
-enable Java applications to remotely access shared directories on SMB file
-servers(i.e. a Microsoft Windows "share"). It is a fairly religious
-implementation of the CIFS specification supporting Unicode, batching,
-multiplexing, encrypted authentication, transactions, named pipes,
-domain/workgroup/server/share/directory/file enumeration, RAPs and more. It
-is licensed under LGPL which means commercial organizations can
-legitimately use it with their propertietary code (you just can't modify
-the library itself without providing the source for those changes to it's
-users, see the LGPL for details).
-
-REQUIREMENTS:
-
-Java 1.3 or above - http://java.sun.com/products/
-
-INSTALLATION:
-
-Just add the jar file to you classpath as you would with any other jar.
-More specifically:
-
-UNIX:
-
-Go to http://jcifs.samba.org and download the latest jar. If you download
-the tgz archive you also get the source code and javadoc API documentation
-(see critical properties discussed on the Overview page). Put it someplace
-reasonable and extract it. For example:
-
- $ gunzip jcifs-0.7.0.tgz
- $ tar -xvf jcifs-0.7.0.tar
-
-Add the jar to your classpath. There are two ways to do this. One is to
-explicitly set it on the command line when you run your application like:
-
- $ java -cp myjars/jcifs-0.7.0.jar MyApplication
-
-but a more robust solution is to export it in your ~/.profile or
-~/.bash_profile like:
-
- CLASSPATH=$CLASSPATH:/home/produser/myapp/myjars/jcifs-0.7.0.jar
- export CLASSPATH
-
-WINDOWS:
-
-Go to http://jcifs.samba.org and download the latest jar. If you download
-the zip archive you also get the source code and javadoc API documentation
-(see critical properties discussed on the Overview page). Put it someplace
-reasonable and extract it with something like Winzip.
-
-Add the jar to your classpath. There are two ways to do this. One is to
-explicitly set it on the command line when you run your application like:
-
- C:\> java -cp myjars\jcifs-0.7.0.jar MyApplication
-
-but a more robust solution would be to change your system environment but
-I'm not confident I can tell you accurately how to do that.
-
-It is also common that the CLASSPATH be specified in a shell script or
-batch file. See the build.bat batch file that runs the Ant build tool as an
-example.
-
-USING JCIFS:
-
-In general the public API is extremely simple. The jcifs.smb.SmbFile,
-jcifs.smb.SmbFileInputStream, and jcifs.smb.SmbFileOutputStream classes are
-analogous to the java.io.File, java.io.FileInputStream, and
-java.io.FileOutputStream classes so if you know how to use those it should
-be obvious how to use jCIFS provided you set any necessary properties(such
-as WINS) and understand the smb:// URL syntax.
-
-Here's an example to retrieve a file:
-
- import jcifs.smb.*;
-
- jcifs.Config.setProperty( "wins", "192.168.1.230" );
- SmbFileInputStream in = new SmbFileInputStream(
- "smb://username:password@host/c/My Documents/report.txt" );
- byte[] b = new byte[8192];
- int n;
- while(( n = in.read( b )) > 0 ) {
- System.out.write( b, 0, n );
- }
-
-You can also write, rename, list contents of a directory, enumerate shares,
-communicate with Win32 Named Pipe Servers, ...etc.
-
-The protocol handler for java.net.URL is also in place which means you
-retrieve files using the URL class as you would with other protocols. For
-example:
-
- jcifs.Config.registerSmbURLHandler(); //ensure protocol handler is loaded
- URL url = new URL( "smb://user:pass@host/share/dir/file.doc" );
- InputStream in = url.openStream();
-
-There are many example programs in the jcifs_0.7.0/examples/ directory. To
+There are many example programs in the jcifs_1.0.0/examples/ directory. To
execute the Put example you might do:
- $ java -cp examples:jcifs-0.7.0.jar -Djcifs.properties=jcifs.prp \
- Put smb://usr:pass@host/share/dir/file.doc
+ $ java -cp examples:jcifs-1.0.0.jar -Djcifs.properties=jcifs.prp \
+ Put smb://dom;usr:pass@host/share/dir/file.doc
##########
582K transfered
-This will also work with whatever else uses the URL class internally. For
-example if you use RMI you can serve class files from an SMB share and use
-the codebase property:
-
- -Djava.rmi.server.codebase=smb://mymachine/c/download/myapp.jar
-
-See the extensive API documentation included in the distribution.
+See the API documentation and supplimentary documents in the docs directory
+or on the JCIFS website.
BUILDING JCIFS FROM SOURCE:
-If you wish to modify and/or build the jCIFS source simply download the
-ant.tgz or ant.zip available at http://jcifs.samba.org and extract it in
-the jcifs_0.7.0 directory. Edit the build.sh or build.bat file to
-appropriately reflect the location of the JDK on your system and bootstrap
-the Ant build tool. Now type:
-
- $ ./build.sh
-
-You will be presented with a list of target arguments. The build file is a
-standard Ant build.xml config. You may also integrate the package into your
-existing Ant installation or get the latest version of Ant here:
+The Ant build tool is required to build JCIFS:
http://jakarta.apache.org/ant/
-WHAT IS SMB AND CIFS?
-
-Server Message Block (SMB) is an application layer networking protocol for
-file and print sharing. It is the de-facto networking protocol for
-Microsoft Windows platforms. The Common Internet File System (CIFS) is the
-more generic name for all that encompasses the protocol and its many
-layers. Collectively this is the networking protocol used when you "Map
-Network Drive...", issue "net use * \\server\share" commands, use smbclient
-on UNIX, smbfs on Linux, Sharity, OS2, server vendors such as Network
-Appliance, EMC, and Novell NetWare.
-
-WHY DO YOU NEED JCIFS?
-
-This client is 100% Java and will work the same in a variety of
-environments from Palm Pilots and applets to any UNIX that supports Java.
-Naturally you can choose to run your applications on a platform that
-supports mapping or mounting remote volumes into the local filesystem but
-this assumes you know what shares you are accessing in advance and what
-platform your application is running on(do you use /mnt/pnt or H:\dir). The
-latency involed makes this approach unsatisfactory for certain applications
-(e.g. Web Gateway). Using locally mapped filesystems is also not portable,
-unstable due to unnecessary dependencies, and more difficult to manage. The
-JCIFS infrastructure is also highly extensible. If there is a demand it
-will include a great deal of additional functionality not available through
-a filesystem API such as printing, RPC, NT file change notification, etc.
+After installing Ant just run 'ant' in the JCIFS directory. It should read
+the build.xml and present a list of targets. To build a new jar after
+modifying the source for example simply type 'ant jar'.
ACKNOWLEDGEMENTS
-Special thanks to the Samba organization and Christopher R. Hertel for
-starting the JCIFS project.
-
+Special thanks to Eric Glass for work on NTLM, the NTLM HTTP Authentication
+Filter, and RPCs. Thanks is also due to the Samba organization and
+Christopher R. Hertel for starting the JCIFS project. Finally, thanks to
+users who diagnose problems and provide the critical feedback and solutions
+that make the Open Source model great.