From 2e7453d0caa29d663fac74f1223c07d3e44dbbeb Mon Sep 17 00:00:00 2001 From: Felix Schumacher Date: Fri, 20 Mar 2009 18:12:57 +0100 Subject: [PATCH] jcifs-1.3.7 from tgz Seems to be share-security related as 1.3.6(a) --- build.xml | 4 ++-- src/jcifs/smb/SmbComSessionSetupAndX.java | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index cd5cc6e..93963b0 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/src/jcifs/smb/SmbComSessionSetupAndX.java b/src/jcifs/smb/SmbComSessionSetupAndX.java index 6547275..35cfe00 100644 --- a/src/jcifs/smb/SmbComSessionSetupAndX.java +++ b/src/jcifs/smb/SmbComSessionSetupAndX.java @@ -81,6 +81,18 @@ class SmbComSessionSetupAndX extends AndXServerMessageBlock { } else { throw new SmbException("Unsupported credential type"); } + } else if (session.transport.server.security == SECURITY_SHARE) { + if (cred instanceof NtlmPasswordAuthentication) { + NtlmPasswordAuthentication auth = (NtlmPasswordAuthentication)cred; + lmHash = new byte[0]; + ntHash = new byte[0]; + accountName = auth.username; + if (useUnicode) + accountName = accountName.toUpperCase(); + primaryDomain = auth.domain.toUpperCase(); + } else { + throw new SmbException("Unsupported credential type"); + } } else { throw new SmbException("Unsupported"); } -- 2.11.0