Return-Path: Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: (qmail 98063 invoked from network); 29 Apr 2010 13:35:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 13:35:42 -0000 Received: (qmail 54859 invoked by uid 500); 29 Apr 2010 13:35:42 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 54831 invoked by uid 500); 29 Apr 2010 13:35:41 -0000 Mailing-List: contact connectors-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-dev@incubator.apache.org Delivered-To: mailing list connectors-commits@incubator.apache.org Received: (qmail 54824 invoked by uid 99); 29 Apr 2010 13:35:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 13:35:41 +0000 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 13:35:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 147E823889B6; Thu, 29 Apr 2010 13:34:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r939304 - /incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java Date: Thu, 29 Apr 2010 13:34:51 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100429133451.147E823889B6@eris.apache.org> Author: kwright Date: Thu Apr 29 13:34:50 2010 New Revision: 939304 URL: http://svn.apache.org/viewvc?rev=939304&view=rev Log: Fix for CONNECTORS-29. Use the non-escaped authentication method in JCIFS. Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java Modified: incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=939304&r1=939303&r2=939304&view=diff ============================================================================== --- incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java (original) +++ incubator/lcf/trunk/modules/connectors/jcifs/connector/org/apache/lcf/crawler/connectors/sharedrive/SharedDriveConnector.java Thu Apr 29 13:34:50 2010 @@ -114,23 +114,21 @@ public class SharedDriveConnector extend // make the smb connection to the server String authenticationString; if (domain == null || domain.length() == 0) - authenticationString = username + ":" + password; - else - authenticationString = domain + ";" + username + ":" + password; - + domain = null; + if (Logging.connectors.isDebugEnabled()) - Logging.connectors.debug("Connecting to: " + "smb://" + authenticationString.substring(0,authenticationString.indexOf(":")+1) + "@" + server + "/"); + Logging.connectors.debug("Connecting to: " + "smb://" + ((domain==null)?"":domain)+";"+username+":@" + server + "/"); try { // use NtlmPasswordAuthentication so that we can reuse credential for DFS support - pa = new NtlmPasswordAuthentication(authenticationString); + pa = new NtlmPasswordAuthentication(domain,username,password); SmbFile smbconnection = new SmbFile("smb://" + server + "/",pa); smbconnectionPath = getFileCanonicalPath(smbconnection); } catch (MalformedURLException e) { - Logging.connectors.error("Unable to access SMB/CIFS share: "+"smb://" + authenticationString.substring(0,authenticationString.indexOf(":")+1) + "@" + server + "/\n" + e); + Logging.connectors.error("Unable to access SMB/CIFS share: "+"smb://" + ((domain==null)?"":domain)+";"+username+":@"+ server + "/\n" + e); throw new LCFException("Unable to access SMB/CIFS share: "+server, e, LCFException.REPOSITORY_CONNECTION_ERROR); } }