diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2013-11-07 16:40:57 -0700 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-11-11 16:58:11 -0600 |
commit | 2c957ddf30897787e39462ac56cdc4bf21eb0465 (patch) | |
tree | 5f968d8209f1a3546439a9ca5e46ee877a83df21 /fs/cifs/cifspdu.h | |
parent | dca692880e887739a669f6c41a80ca68ce2b09fc (diff) | |
download | lwn-2c957ddf30897787e39462ac56cdc4bf21eb0465.tar.gz lwn-2c957ddf30897787e39462ac56cdc4bf21eb0465.zip |
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 <jlayton@redhat.com>
Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r-- | fs/cifs/cifspdu.h | 8 |
1 files changed, 7 insertions, 1 deletions
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; |