From 2c957ddf30897787e39462ac56cdc4bf21eb0465 Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Thu, 7 Nov 2013 16:40:57 -0700 Subject: cifs: Use data structures to compute NTLMv2 response offsets A bit of cleanup plus some gratuitous variable renaming. I think using structures instead of numeric offsets makes this code much more understandable. Also added a comment about current time range expected by the server. Acked-by: Jeff Layton Reviewed-by: Shirish Pargaonkar Signed-off-by: Tim Gardner Signed-off-by: Steve French --- fs/cifs/cifspdu.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'fs/cifs/cifspdu.h') diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 9e5ee34de986..33df36ef9d52 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -697,7 +697,13 @@ struct ntlmssp2_name { } __attribute__((packed)); struct ntlmv2_resp { - char ntlmv2_hash[CIFS_ENCPWD_SIZE]; + union { + char ntlmv2_hash[CIFS_ENCPWD_SIZE]; + struct { + __u8 reserved[8]; + __u8 key[CIFS_SERVER_CHALLENGE_SIZE]; + } __attribute__((packed)) challenge; + } __attribute__((packed)); __le32 blob_signature; __u32 reserved; __le64 time; -- cgit v1.2.3