summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-05-24 07:41:00 -0400
committerSteve French <smfrench@gmail.com>2013-06-24 01:56:39 -0500
commitffa598a5373d072a675f882999f5b46fb5ec2f69 (patch)
treedcb84fef7a918c55597906579f3c6001916e12ff /fs/cifs/cifsencrypt.c
parent6f709494a74938f98769fba76d3a1f8b0f12b606 (diff)
downloadop-kernel-dev-ffa598a5373d072a675f882999f5b46fb5ec2f69.zip
op-kernel-dev-ffa598a5373d072a675f882999f5b46fb5ec2f69.tar.gz
cifs: remove useless memset in LANMAN auth code
It turns out that CIFS_SESS_KEY_SIZE == CIFS_ENCPWD_SIZE, so this memset doesn't do anything useful. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c1
1 files changed, 0 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud