From patchwork Tue May 28 12:11:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 2624271 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 850E840077 for ; Tue, 28 May 2013 12:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933441Ab3E1MMK (ORCPT ); Tue, 28 May 2013 08:12:10 -0400 Received: from mail-ye0-f174.google.com ([209.85.213.174]:48448 "EHLO mail-ye0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933405Ab3E1MMJ (ORCPT ); Tue, 28 May 2013 08:12:09 -0400 Received: by mail-ye0-f174.google.com with SMTP id r9so975825yen.5 for ; Tue, 28 May 2013 05:12:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=h5aeeWXyz9+y8TnLphf5C8YHBsGSv0wziYY9WqXJDRY=; b=JIZrH8EIqbZ4noIRvsdpEkL0i+Pgw1SCOsRQFr2wX2+A3a3pOjo2Cag7nIV3S8h8BS 6C9co3WabnFkc2LQZ9Nejazv2aLqWl6NsIVtRjsMYaChshfuNUW/BlNzf63xELPMEV69 loyOJl/9gkrozrqR8dwcdroztGARU9zXIDgoESUkqJGgVV2THr6GK5rGvpBYd0B5SXtA r6/z/lyAhoIjRhXyn0AG7BCo11Bx4dEVEDnQoFnitDRrVmzJXMDe85zEhXTzjkZYaQyP 1fhpRj8WC7dMcr3vLyGD043Bg4oskTbAJc5o+3INeqzhOyrw2cS/QvVih4vA9/lyNGhM 1JdQ== X-Received: by 10.236.157.104 with SMTP id n68mr1130158yhk.167.1369743128451; Tue, 28 May 2013 05:12:08 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-107-015-124-230.nc.res.rr.com. [107.15.124.230]) by mx.google.com with ESMTPSA id d24sm14409623yhi.17.2013.05.28.05.12.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 May 2013 05:12:07 -0700 (PDT) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, idra@samba.org, piastryyy@gmail.com Subject: [PATCH v2 02/19] cifs: remove useless memset in LANMAN auth code Date: Tue, 28 May 2013 08:11:43 -0400 Message-Id: <1369743120-18941-3-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1369743120-18941-1-git-send-email-jlayton@redhat.com> References: <1369743120-18941-1-git-send-email-jlayton@redhat.com> X-Gm-Message-State: ALoCoQkY451Fw6iAsW7/5yvV4uKT/yPHlGyeCnJFzp1nqv4mkmHOrox/NELdlr9yeIyBkI/Tktx9 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org It turns out that CIFS_SESS_KEY_SIZE == CIFS_ENCPWD_SIZE, so this memset doesn't do anything useful. Signed-off-by: Jeff Layton Acked-by: Pavel Shilovsky --- fs/cifs/cifsencrypt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 71436d1..a85a83d 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -276,7 +276,6 @@ int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt, strncpy(password_with_pad, password, CIFS_ENCPWD_SIZE); if (!encrypt && global_secflags & CIFSSEC_MAY_PLNTXT) { - memset(lnm_session_key, 0, CIFS_SESS_KEY_SIZE); memcpy(lnm_session_key, password_with_pad, CIFS_ENCPWD_SIZE); return 0;