summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2013-11-07 16:40:57 -0700
committerSteve French <smfrench@gmail.com>2013-11-11 16:58:11 -0600
commit2c957ddf30897787e39462ac56cdc4bf21eb0465 (patch)
tree5f968d8209f1a3546439a9ca5e46ee877a83df21 /fs/cifs/cifspdu.h
parentdca692880e887739a669f6c41a80ca68ce2b09fc (diff)
downloadblackbird-op-linux-2c957ddf30897787e39462ac56cdc4bf21eb0465.tar.gz
blackbird-op-linux-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.h8
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;
OpenPOWER on IntegriCloud