From: Felix Schumacher Date: Thu, 4 Jun 2009 16:58:28 +0000 (+0200) Subject: jcifs-1.3.10 from tgz X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=434e944def18bc8e1bd766ff995dee3cf496056b;p=jcifs_without_docs.git jcifs-1.3.10 from tgz Wed Jun 3 19:42:58 EDT 2009 jcifs-1.3.10 When re-establishing a session an old UID could be set in the SMB_COM_SESSION_SETUP_ANDX and cause a "The parameter is incorrect" SmbException. This release explicitly sets the uid to 0 before initiating a new session which fixes this error. --- diff --git a/README.txt b/README.txt index f6c4b32..0201a95 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,11 @@ +Wed Jun 3 19:42:58 EDT 2009 +jcifs-1.3.10 + +When re-establishing a session an old UID could be set in the +SMB_COM_SESSION_SETUP_ANDX and cause a "The parameter is incorrect" +SmbException. This release explicitly sets the uid to 0 before initiating +a new session which fixes this error. + Fri May 30 00:40:26 EDT 2009 jcifs-1.3.9 diff --git a/build.xml b/build.xml index 6bcddc9..5cba503 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/src/jcifs/smb/SmbSession.java b/src/jcifs/smb/SmbSession.java index ef0af41..a2da7e0 100644 --- a/src/jcifs/smb/SmbSession.java +++ b/src/jcifs/smb/SmbSession.java @@ -254,6 +254,13 @@ synchronized( transport() ) { if( transport.log.level >= 4 ) transport.log.println( "sessionSetup: accountName=" + auth.username + ",primaryDomain=" + auth.domain ); + /* We explicitly set uid to 0 here to prevent a new + * SMB_COM_SESSION_SETUP_ANDX from having it's uid set to an + * old value when the session is re-established. Otherwise a + * "The parameter is incorrect" error can occur. + */ + uid = 0; + do { switch (state) { case 10: /* NTLM */ diff --git a/src/jcifs/smb/SmbTree.java b/src/jcifs/smb/SmbTree.java index c66c941..7ecabb5 100644 --- a/src/jcifs/smb/SmbTree.java +++ b/src/jcifs/smb/SmbTree.java @@ -89,7 +89,6 @@ class SmbTree { case SmbComTransaction.TRANS2_GET_DFS_REFERRAL: break; default: -System.out.println(request); throw new SmbException( "Invalid operation for " + service + " service" ); } break;