From 01eaeb694fff4bd01414f44f8cc1938c7edac1a1 Mon Sep 17 00:00:00 2001 From: Felix Schumacher Date: Mon, 23 Feb 2009 14:48:36 +0100 Subject: [PATCH] jcifs-1.3.4a from tgz Sat Feb 21 13:43:43 EST 2009 jcifs-1.3.4a SMB parameter words were not decoded correctly. This caused an error with certain IBM clusters. The error code for 0xC000018B has been updated. --- README.txt | 6 ++++++ build.xml | 4 ++-- src/jcifs/smb/AndXServerMessageBlock.java | 10 ++++++---- src/jcifs/smb/NtStatus.java | 3 +++ src/jcifs/smb/SmbComNegotiateResponse.java | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.txt b/README.txt index 253ae60..9abd8c1 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,9 @@ +Sat Feb 21 13:43:43 EST 2009 +jcifs-1.3.4a + +SMB parameter words were not decoded correctly. This caused an error +with certain IBM clusters. The error code for 0xC000018B has been updated. + Sun Jan 25 14:31:31 EST 2009 jcifs-1.3.3 diff --git a/build.xml b/build.xml index 2e1674d..a9124da 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/src/jcifs/smb/AndXServerMessageBlock.java b/src/jcifs/smb/AndXServerMessageBlock.java index 6f28953..f0a2284 100644 --- a/src/jcifs/smb/AndXServerMessageBlock.java +++ b/src/jcifs/smb/AndXServerMessageBlock.java @@ -194,8 +194,8 @@ if (command == SMB_COM_NT_CREATE_ANDX) * so let's populate them here */ - andxCommand = buffer[bufferIndex]; bufferIndex += 2; - andxOffset = readInt2( buffer, bufferIndex ); bufferIndex += 2; + andxCommand = buffer[bufferIndex]; + andxOffset = readInt2( buffer, bufferIndex + 2 ); if( andxOffset == 0 ) { /* Snap server workaround */ andxCommand = (byte)0xFF; @@ -207,14 +207,16 @@ if (command == SMB_COM_NT_CREATE_ANDX) */ if( wordCount > 2 ) { - bufferIndex += readParameterWordsWireFormat( buffer, bufferIndex ); + readParameterWordsWireFormat( buffer, bufferIndex + 4 ); /* required for signing verification - */ if (command == SMB_COM_NT_CREATE_ANDX) { if (((SmbComNTCreateAndXResponse)this).isExtended) bufferIndex += 32; } + */ } + + bufferIndex += wordCount * 2; } byteCount = readInt2( buffer, bufferIndex ); bufferIndex += 2; diff --git a/src/jcifs/smb/NtStatus.java b/src/jcifs/smb/NtStatus.java index 02aebf9..0c93666 100644 --- a/src/jcifs/smb/NtStatus.java +++ b/src/jcifs/smb/NtStatus.java @@ -77,6 +77,7 @@ public interface NtStatus { public static final int NT_STATUS_PIPE_BROKEN = 0xC000014b; public static final int NT_STATUS_NO_SUCH_ALIAS = 0xC0000151; public static final int NT_STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015b; + public static final int NT_STATUS_NO_TRUST_SAM_ACCOUNT = 0xC000018b; public static final int NT_STATUS_TRUSTED_DOMAIN_FAILURE = 0xC000018c; public static final int NT_STATUS_PASSWORD_MUST_CHANGE = 0xC0000224; public static final int NT_STATUS_NOT_FOUND = 0xC0000225; @@ -138,6 +139,7 @@ public interface NtStatus { NT_STATUS_PIPE_BROKEN, NT_STATUS_NO_SUCH_ALIAS, NT_STATUS_LOGON_TYPE_NOT_GRANTED, + NT_STATUS_NO_TRUST_SAM_ACCOUNT, NT_STATUS_TRUSTED_DOMAIN_FAILURE, NT_STATUS_PASSWORD_MUST_CHANGE, NT_STATUS_NOT_FOUND, @@ -200,6 +202,7 @@ public interface NtStatus { "The pipe has been ended.", "The specified local group does not exist.", "Logon failure: the user has not been granted the requested logon type at this computer.", + "The SAM database on the Windows NT Server does not have a computer account for this workstation trust relationship.", "The trust relationship between the primary domain and the trusted domain failed.", "The user must change his password before he logs on the first time.", "NT_STATUS_NOT_FOUND", diff --git a/src/jcifs/smb/SmbComNegotiateResponse.java b/src/jcifs/smb/SmbComNegotiateResponse.java index 9b2d770..e2452e9 100644 --- a/src/jcifs/smb/SmbComNegotiateResponse.java +++ b/src/jcifs/smb/SmbComNegotiateResponse.java @@ -106,6 +106,7 @@ class SmbComNegotiateResponse extends ServerMessageBlock { } else { server.guid = new byte[16]; System.arraycopy(buffer, bufferIndex, server.guid, 0, 16); + server.oemDomainName = new String(); // ignore SPNEGO token for now ... } -- 2.11.0