From patchwork Wed Jan 19 04:33:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirish Pargaonkar X-Patchwork-Id: 488081 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 p0J4a8CC015595 for ; Wed, 19 Jan 2011 04:36:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143Ab1ASEgI (ORCPT ); Tue, 18 Jan 2011 23:36:08 -0500 Received: from mail-qw0-f46.google.com ([209.85.216.46]:51845 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358Ab1ASEgH (ORCPT ); Tue, 18 Jan 2011 23:36:07 -0500 Received: by qwa26 with SMTP id 26so406357qwa.19 for ; Tue, 18 Jan 2011 20:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=fI4+1fU5ChC5V50C+zo779SnkZdE2J1LYjP2p4bJF18=; b=feX8PehqjoQubiD9bheWlNw0AVxvMQJOofAyZMbXT2cXSM48fXdz6RkU5X5aXiXQ+c PFpq+0wNgfxHWYl/eAGtpm8YRy1/ox9Vrd/YCs797+HZ619LHEfmf8M194OSVlGUcVve X56gSgFmPMryjqkuSb3/7hQfXGQxGc0q8rTjU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=VXhvRqbgpP2QCkbb8r480Hnqpynr6kLWFZ7/mgsdUXaSEkZiAu4XTQxuBWrPlqxDWX clgXKWvhpkXzpssZgMuVMpXIkxLkDkZC5/mLS65NZw84B6X2qubdKdKd0z5nXvgKQUqG lvbloBKHzNAtv7sfiYeQzCHSCed3RWmTOZtEY= Received: by 10.229.192.149 with SMTP id dq21mr222634qcb.57.1295411766112; Tue, 18 Jan 2011 20:36:06 -0800 (PST) Received: from localhost ([32.97.110.58]) by mx.google.com with ESMTPS id t7sm4412787qcs.28.2011.01.18.20.36.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 Jan 2011 20:36:05 -0800 (PST) From: shirishpargaonkar@gmail.com To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, Shirish Pargaonkar , stable@kernel.org Subject: [PATCH] cifs: Fix regression during share-level security mounts (Repost) Date: Tue, 18 Jan 2011 22:33:54 -0600 Message-Id: <1295411634-18733-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]); Wed, 19 Jan 2011 04:36:09 +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 */