diff options
author | Shirish Pargaonkar <shirishpargaonkar@gmail.com> | 2010-09-18 23:01:58 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 15:04:29 -0400 |
commit | 5f98ca9afb9c004f8948c0d40920503de447918a (patch) | |
tree | b9b59bb6a8226925c42c8bbbef85de95e86a9133 /fs/cifs/sess.c | |
parent | aa91c7e4ab9b0842b7d7a7cbf8cca18b20df89b5 (diff) |
cifs NTLMv2/NTLMSSP Change variable name mac_key to session key to reflect the key it holds
Change name of variable mac_key to session key.
The reason mac_key was changed to session key is, this structure does not
hold message authentication code, it holds the session key (for ntlmv2,
ntlmv1 etc.). mac is generated as a signature in cifs_calc* functions.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r-- | fs/cifs/sess.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 0a57cb7db5dd..88820127650e 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -480,7 +480,7 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer, | |||
480 | /* calculate session key, BB what about adding similar ntlmv2 path? */ | 480 | /* calculate session key, BB what about adding similar ntlmv2 path? */ |
481 | SMBNTencrypt(ses->password, ses->server->cryptKey, ntlm_session_key); | 481 | SMBNTencrypt(ses->password, ses->server->cryptKey, ntlm_session_key); |
482 | if (first) | 482 | if (first) |
483 | cifs_calculate_mac_key(&ses->server->mac_signing_key, | 483 | cifs_calculate_session_key(&ses->server->session_key, |
484 | ntlm_session_key, ses->password); | 484 | ntlm_session_key, ses->password); |
485 | 485 | ||
486 | memcpy(tmp, ntlm_session_key, CIFS_SESS_KEY_SIZE); | 486 | memcpy(tmp, ntlm_session_key, CIFS_SESS_KEY_SIZE); |
@@ -690,7 +690,7 @@ ssetup_ntlmssp_authenticate: | |||
690 | 690 | ||
691 | if (first_time) /* should this be moved into common code | 691 | if (first_time) /* should this be moved into common code |
692 | with similar ntlmv2 path? */ | 692 | with similar ntlmv2 path? */ |
693 | cifs_calculate_mac_key(&ses->server->mac_signing_key, | 693 | cifs_calculate_session_key(&ses->server->session_key, |
694 | ntlm_session_key, ses->password); | 694 | ntlm_session_key, ses->password); |
695 | /* copy session key */ | 695 | /* copy session key */ |
696 | 696 | ||
@@ -765,15 +765,15 @@ ssetup_ntlmssp_authenticate: | |||
765 | } | 765 | } |
766 | /* bail out if key is too long */ | 766 | /* bail out if key is too long */ |
767 | if (msg->sesskey_len > | 767 | if (msg->sesskey_len > |
768 | sizeof(ses->server->mac_signing_key.data.krb5)) { | 768 | sizeof(ses->server->session_key.data.krb5)) { |
769 | cERROR(1, "Kerberos signing key too long (%u bytes)", | 769 | cERROR(1, "Kerberos signing key too long (%u bytes)", |
770 | msg->sesskey_len); | 770 | msg->sesskey_len); |
771 | rc = -EOVERFLOW; | 771 | rc = -EOVERFLOW; |
772 | goto ssetup_exit; | 772 | goto ssetup_exit; |
773 | } | 773 | } |
774 | if (first_time) { | 774 | if (first_time) { |
775 | ses->server->mac_signing_key.len = msg->sesskey_len; | 775 | ses->server->session_key.len = msg->sesskey_len; |
776 | memcpy(ses->server->mac_signing_key.data.krb5, | 776 | memcpy(ses->server->session_key.data.krb5, |
777 | msg->data, msg->sesskey_len); | 777 | msg->data, msg->sesskey_len); |
778 | } | 778 | } |
779 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 779 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |