From patchwork Thu Jan 6 15:24:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 459311 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p06FRDgZ010976 for ; Thu, 6 Jan 2011 15:27:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249Ab1AFP1R (ORCPT ); Thu, 6 Jan 2011 10:27:17 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:65417 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128Ab1AFP1Q (ORCPT ); Thu, 6 Jan 2011 10:27:16 -0500 Received: by iyi12 with SMTP id 12so14942819iyi.19 for ; Thu, 06 Jan 2011 07:27:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=1zyh49V8OBdXuwxfLPSTowCxqojz1u3bOB/vTteADOQ=; b=xCHYlGCTHCQ3y4joDMUrwAUX80RW5ruMte+93T3bHuSpMXf9FYDoUQF0XnT3Bu7QMV /WGIvfKMGJK6ByEylGaHFAEMztjXcJEV4O43R1+rUU1wJtcMtu86tGX+/jTUjerL1JJP MuHVZYifW1iTHpFpTPtxpDOLEwxTkNiJgFBBA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=LNz/rnd+lMLpvGcnqF3/iX1alKSdzEbTxAT4elfFaxpxGwnrpUE/qdCzZ8H10T8d1J lNqWGp6Zrm1/KjOqjV3WBJNcptDS2/4uaxOj8pPg2A+8D/m+J/+gi/0X/wXCy4mK0hJL jlebWVPW85YPPSn0tlApx6lROpIxVl9i7jXlE= Received: by 10.42.170.201 with SMTP id g9mr25095297icz.30.1294327635817; Thu, 06 Jan 2011 07:27:15 -0800 (PST) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id o8sm4729277icz.16.2011.01.06.07.27.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 07:27:14 -0800 (PST) From: shirishpargaonkar@gmail.com To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, Shirish Pargaonkar Subject: [PATCH] cifs: Fix regression during share-level security mounts Date: Thu, 6 Jan 2011 09:24:03 -0600 Message-Id: <1294327443-24293-1-git-send-email-shirishpargaonkar@gmail.com> X-Mailer: git-send-email 1.6.0.2 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 15:27:17 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 41f002f..cdba196 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2966,7 +2966,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, bcc_ptr++; /* skip password */ /* already aligned so no need to do it below */ } else { - pSMB->PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); + pSMB->PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE); /* BB FIXME add code to fail this if NTLMv2 or Kerberos specified as required (when that support is added to the vfs in the future) as only NTLM or the much @@ -2984,7 +2984,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, #endif /* CIFS_WEAK_PW_HASH */ SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr); - bcc_ptr += CIFS_SESS_KEY_SIZE; + bcc_ptr += CIFS_AUTH_RESP_SIZE; if (ses->capabilities & CAP_UNICODE) { /* must align unicode strings */ *bcc_ptr = 0; /* null byte password */