GIT: unionfs2-2.6.27.y: cifs: remove bogus first_time check in NTLMv2 session setup code
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:34 EDT 2010
commit 0fd85ded784c60defd59d15a6a720793b4bfcad9
Author: Jeff Layton <jlayton at redhat.com>
Date: Wed Jun 16 13:40:18 2010 -0400
cifs: remove bogus first_time check in NTLMv2 session setup code
commit 8a224d489454b7457105848610cfebebdec5638d upstream.
This bug appears to be the result of a cut-and-paste mistake from the
NTLMv1 code. The function to generate the MAC key was commented out, but
not the conditional above it. The conditional then ended up causing the
session setup key not to be copied to the buffer unless this was the
first session on the socket, and that made all but the first NTLMv2
session setup fail.
Fix this by removing the conditional and all of the commented clutter
that made it difficult to see.
Reported-by: Gunther Deschner <gdeschne at redhat.com>
Signed-off-by: Jeff Layton <jlayton at redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 3890cc2..52c72ea 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -482,15 +482,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
/* calculate session key */
setup_ntlmv2_rsp(ses, v2_sess_key, nls_cp);
- if (first_time) /* should this be moved into common code
- with similar ntlmv2 path? */
- /* cifs_calculate_ntlmv2_mac_key(ses->server->mac_signing_key,
- response BB FIXME, v2_sess_key); */
-
- /* copy session key */
-
- /* memcpy(bcc_ptr, (char *)ntlm_session_key,LM2_SESS_KEY_SIZE);
- bcc_ptr += LM2_SESS_KEY_SIZE; */
+ /* FIXME: calculate MAC key */
memcpy(bcc_ptr, (char *)v2_sess_key,
sizeof(struct ntlmv2_resp));
bcc_ptr += sizeof(struct ntlmv2_resp);
More information about the unionfs-cvs
mailing list