On Wed, 27 Oct 2010 11:38:38 -0500
[email protected] wrote:
> From: Shirish Pargaonkar <[email protected]>
>
> 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.
>
>
> Signed-off-by: Shirish Pargaonkar <[email protected]>
> ---
> fs/cifs/cifsencrypt.c | 10 +++++++---
> fs/cifs/cifsglob.h | 3 ++-
> fs/cifs/cifssmb.c | 4 ++--
> fs/cifs/connect.c | 4 ++--
> fs/cifs/sess.c | 10 +++++++---
> 5 files changed, 20 insertions(+), 11 deletions(-)
>
[...]
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index 67d6a22..7255657 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
> @@ -196,6 +196,7 @@ struct TCP_Server_Info {
> int capabilities; /* allow selective disabling of caps by smb sess */
> int timeAdj; /* Adjust for difference in server time zone in sec */
> __u16 CurrentMid; /* multiplex id - rotating counter */
> + char cryptKey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlm, ntlmv2 etc */
^^^^^^^^^^
Please, no camel-case on new fields.
> /* 16th byte of RFC1001 workstation name is always null */
> char workstation_RFC1001_name[RFC1001_NAME_LEN_WITH_NULL];
> __u32 sequence_number; /* needed for CIFS PDU signature */
> @@ -240,7 +241,7 @@ struct cifsSesInfo {
> char userName[MAX_USERNAME_SIZE + 1];
> char *domainName;
> char *password;
> - char cryptKey[CIFS_CRYPTO_KEY_SIZE];
> + char cryptKey[CIFS_CRYPTO_KEY_SIZE]; /* used by ntlmssp */
^^^^^
And it wouldn't hurt to fix this one while you're in here.
> struct session_key auth_key;
> char ntlmv2_hash[16];
> unsigned int tilen; /* length of the target info blob */
--
Jeff Layton <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html