aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2010-10-27 16:20:36 -0400
committerSteve French <sfrench@us.ibm.com>2010-10-28 21:47:30 -0400
commitd3ba50b17aa7a391bb5b3dcd8d6ba7a02c4f031c (patch)
tree452ddaeb1d52387a852d0c3cf46c4253347d0a27 /fs/cifs/connect.c
parent6b03590412c977ae8fa1635c9b80854ab19a5b78 (diff)
NTLM auth and sign - Use appropriate server challenge
Need to have cryptkey or server challenge in smb connection (struct TCP_Server_Info) for ntlm and ntlmv2 auth types for which cryptkey (Encryption Key) is supplied just once in Negotiate Protocol response during an smb connection setup for all the smb sessions over that smb connection. For ntlmssp, cryptkey or server challenge is provided for every smb session in type 2 packet of ntlmssp negotiation, the cryptkey provided during Negotiation Protocol response before smb connection does not count. Rename cryptKey to cryptkey and related changes. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 469c3ddba463..4d8004ce5834 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3002,13 +3002,13 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3002#ifdef CONFIG_CIFS_WEAK_PW_HASH 3002#ifdef CONFIG_CIFS_WEAK_PW_HASH
3003 if ((global_secflags & CIFSSEC_MAY_LANMAN) && 3003 if ((global_secflags & CIFSSEC_MAY_LANMAN) &&
3004 (ses->server->secType == LANMAN)) 3004 (ses->server->secType == LANMAN))
3005 calc_lanman_hash(tcon->password, ses->cryptKey, 3005 calc_lanman_hash(tcon->password, ses->server->cryptkey,
3006 ses->server->secMode & 3006 ses->server->secMode &
3007 SECMODE_PW_ENCRYPT ? true : false, 3007 SECMODE_PW_ENCRYPT ? true : false,
3008 bcc_ptr); 3008 bcc_ptr);
3009 else 3009 else
3010#endif /* CIFS_WEAK_PW_HASH */ 3010#endif /* CIFS_WEAK_PW_HASH */
3011 SMBNTencrypt(tcon->password, ses->cryptKey, bcc_ptr); 3011 SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr);
3012 3012
3013 bcc_ptr += CIFS_SESS_KEY_SIZE; 3013 bcc_ptr += CIFS_SESS_KEY_SIZE;
3014 if (ses->capabilities & CAP_UNICODE) { 3014 if (ses->capabilities & CAP_UNICODE) {