From patchwork Thu Sep 2 01:37:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 148101 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 o821bbxM005002 for ; Thu, 2 Sep 2010 01:55:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755198Ab0IBBix (ORCPT ); Wed, 1 Sep 2010 21:38:53 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:62421 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754964Ab0IBBix (ORCPT ); Wed, 1 Sep 2010 21:38:53 -0400 X-Authority-Analysis: v=1.1 cv=CjIrh0z8wN5M7DYqe8Bxtxzw6M45hYlnllSU75Z2ugA= c=1 sm=0 a=m0KnToiDVcUA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=urJWe36-Hgdc5W2GzDoA:9 a=Ie2gAkiB5PMzUdAvUS9LWuV5EGAA:4 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:45521] helo=mail.poochiereds.net) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id C3/E9-23480-0EFFE7C4; Thu, 02 Sep 2010 01:37:36 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id C107A58168; Wed, 1 Sep 2010 21:37:35 -0400 (EDT) From: Jeff Layton To: smfrench@gmail.com Cc: shirishpargaonkar@gmail.com, linux-cifs@vger.kernel.org Subject: [PATCH 5/6] Revert "missing changes during ntlmv2/ntlmssp auth and sign" Date: Wed, 1 Sep 2010 21:37:34 -0400 Message-Id: <1283391455-6848-6-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <1283391455-6848-1-git-send-email-jlayton@redhat.com> References: <1283391455-6848-1-git-send-email-jlayton@redhat.com> 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Sep 2010 01:55:02 +0000 (UTC) diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index eef78c2..051d000 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -553,8 +553,6 @@ calc_seckey(struct TCP_Server_Info *server) return 1; } - desc.tfm = tfm_arc4; - crypto_blkcipher_setkey(tfm_arc4, server->session_key.data.ntlmv2.key, CIFS_CPHTXT_SIZE); sg_init_one(&sgin, sec_key, CIFS_CPHTXT_SIZE); diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 4788e16..41fc532 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -408,8 +408,6 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, /* BB spec says that if AvId field of MsvAvTimestamp is populated then we must set the MIC field of the AUTHENTICATE_MESSAGE */ - ses->server->ntlmssp.server_flags = le32_to_cpu(pblob->NegotiateFlags); - tioffset = cpu_to_le16(pblob->TargetInfoArray.BufferOffset); tilen = cpu_to_le16(pblob->TargetInfoArray.Length); ses->server->tilen = tilen; @@ -442,13 +440,12 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, /* BB is NTLMV2 session security format easier to use here? */ flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | - NTLMSSP_NEGOTIATE_NTLM; + NTLMSSP_NEGOTIATE_NT_ONLY | NTLMSSP_NEGOTIATE_NTLM; if (ses->server->secMode & - (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { - flags |= NTLMSSP_NEGOTIATE_SIGN | - NTLMSSP_NEGOTIATE_KEY_XCH | - NTLMSSP_NEGOTIATE_EXTENDED_SEC; - } + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) + flags |= NTLMSSP_NEGOTIATE_SIGN; + if (ses->server->secMode & SECMODE_SIGN_REQUIRED) + flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; sec_blob->NegotiateFlags |= cpu_to_le32(flags);