jcifs-1.3.4b from tgz
authorFelix Schumacher <felix@cat.(none)>
Mon, 23 Feb 2009 13:50:46 +0000 (14:50 +0100)
committerFelix Schumacher <felix@cat.(none)>
Mon, 23 Feb 2009 13:50:46 +0000 (14:50 +0100)
Sun Feb 22 15:14:55 EST 2009
jcifs-1.3.4b

SMB parameter words were not decoded correctly (which were ultimately
related to the fact that the WordCount of the SMB_COM_NT_CREATE_ANDX
response is wrong because an extra 16 bytes for "offline files /
client side caching (CSC)". Ultimately this caused an error with the
SMB_COM_TREE_CONNECT_ANDX response of certain IBM clusters. This should
now be fixed.

The error code for 0xC000018B has been updated.

Server capabilities in the SMB_COM_NEGOTIATE response were not being
read correctly.

README.txt
build.xml
src/jcifs/smb/AndXServerMessageBlock.java
src/jcifs/smb/SmbComNegotiateResponse.java

index 9abd8c1..d971dd5 100644 (file)
@@ -1,8 +1,17 @@
-Sat Feb 21 13:43:43 EST 2009
-jcifs-1.3.4a
+Sun Feb 22 15:14:55 EST 2009
+jcifs-1.3.4b
 
-SMB parameter words were not decoded correctly. This caused an error
-with certain IBM clusters. The error code for 0xC000018B has been updated.
+SMB parameter words were not decoded correctly (which were ultimately
+related to the fact that the WordCount of the SMB_COM_NT_CREATE_ANDX
+response is wrong because an extra 16 bytes for "offline files /
+client side caching (CSC)". Ultimately this caused an error with the
+SMB_COM_TREE_CONNECT_ANDX response of certain IBM clusters. This should
+now be fixed.
+
+The error code for 0xC000018B has been updated.
+
+Server capabilities in the SMB_COM_NEGOTIATE response were not being
+read correctly.
 
 Sun Jan 25 14:31:31 EST 2009
 jcifs-1.3.3
index a9124da..ddff5bf 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <project name="jcifs" default="usage" basedir=".">
 
-    <property name="version" value="1.3.4a"/>
-    <property name="reldate" value="Feb 21, 2009"/>
+    <property name="version" value="1.3.4b"/>
+    <property name="reldate" value="Feb 22, 2009"/>
 
     <target name="usage">
         <echo>
index f0a2284..4c3d266 100644 (file)
@@ -185,8 +185,6 @@ abstract class AndXServerMessageBlock extends ServerMessageBlock {
         int start = bufferIndex;
 
         wordCount = buffer[bufferIndex++];
-if (command == SMB_COM_NT_CREATE_ANDX)
-    wordCount = 42;
 
         if( wordCount != 0 ) {
             /*
@@ -208,15 +206,18 @@ if (command == SMB_COM_NT_CREATE_ANDX)
  
             if( wordCount > 2 ) {
                 readParameterWordsWireFormat( buffer, bufferIndex + 4 );
-/* required for signing verification
-if (command == SMB_COM_NT_CREATE_ANDX) {
-    if (((SmbComNTCreateAndXResponse)this).isExtended)
-        bufferIndex += 32;
-}
- */
+
+                /* The SMB_COM_NT_CREATE_ANDX response wordCount is wrong. There's an
+                 * extra 16 bytes for some "Offline Files (CSC or Client Side Caching)"
+                 * junk. We need to bump up the wordCount here so that this method returns
+                 * the correct number of bytes for signing purposes. Otherwise we get a
+                 * signing verification failure.
+                 */
+                if (command == SMB_COM_NT_CREATE_ANDX && ((SmbComNTCreateAndXResponse)this).isExtended)
+                    wordCount += 8;
             }
 
-            bufferIndex += wordCount * 2;
+            bufferIndex = start + 1 + (wordCount * 2);
         }
 
         byteCount = readInt2( buffer, bufferIndex ); bufferIndex += 2;
index e2452e9..3f7677e 100644 (file)
@@ -66,7 +66,7 @@ class SmbComNegotiateResponse extends ServerMessageBlock {
                                     int bufferIndex ) {
         int start = bufferIndex;
 
-        if ((server.capabilities & FLAGS2_EXTENDED_SECURITY_NEGOTIATION) == 0) {
+        if ((server.capabilities & CAP_EXTENDED_SECURITY) == 0) {
             server.encryptionKey = new byte[server.encryptionKeyLength];
             System.arraycopy( buffer, bufferIndex,
                     server.encryptionKey, 0, server.encryptionKeyLength );