diff options
author | Steve French <smfrench@gmail.com> | 2013-11-16 00:50:24 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-11-16 00:50:24 -0500 |
commit | 0cbaa53cdd33080c1e2d67ad9295b83c7954f2b3 (patch) | |
tree | 2980f4a149b80f384ed3de6defabcd2f4974a76e /fs/cifs/smb2pdu.h | |
parent | b1d93356427be6f050dc55c86eb019d173700af6 (diff) |
[CIFS] Warn if SMB3 encryption required by server
We do not support SMB3 encryption yet, warn if server responds
that SMB3 encryption is mandatory.
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r-- | fs/cifs/smb2pdu.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index b50a129572cd..f88320bbb477 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h | |||
@@ -122,6 +122,23 @@ struct smb2_pdu { | |||
122 | __le16 StructureSize2; /* size of wct area (varies, request specific) */ | 122 | __le16 StructureSize2; /* size of wct area (varies, request specific) */ |
123 | } __packed; | 123 | } __packed; |
124 | 124 | ||
125 | struct smb2_transform_hdr { | ||
126 | __be32 smb2_buf_length; /* big endian on wire */ | ||
127 | /* length is only two or three bytes - with | ||
128 | one or two byte type preceding it that MBZ */ | ||
129 | __u8 ProtocolId[4]; /* 0xFD 'S' 'M' 'B' */ | ||
130 | __u8 Signature[16]; | ||
131 | __u8 Nonce[11]; | ||
132 | __u8 Reserved[5]; | ||
133 | __le32 OriginalMessageSize; | ||
134 | __u16 Reserved1; | ||
135 | __le16 EncryptionAlgorithm; | ||
136 | __u64 SessionId; | ||
137 | } __packed; | ||
138 | |||
139 | /* Encryption Algorithms */ | ||
140 | #define SMB2_ENCRYPTION_AES128_CCM __constant_cpu_to_le16(0x0001) | ||
141 | |||
125 | /* | 142 | /* |
126 | * SMB2 flag definitions | 143 | * SMB2 flag definitions |
127 | */ | 144 | */ |
@@ -237,6 +254,7 @@ struct smb2_sess_setup_req { | |||
237 | /* Currently defined SessionFlags */ | 254 | /* Currently defined SessionFlags */ |
238 | #define SMB2_SESSION_FLAG_IS_GUEST 0x0001 | 255 | #define SMB2_SESSION_FLAG_IS_GUEST 0x0001 |
239 | #define SMB2_SESSION_FLAG_IS_NULL 0x0002 | 256 | #define SMB2_SESSION_FLAG_IS_NULL 0x0002 |
257 | #define SMB2_SESSION_FLAG_ENCRYPT_DATA 0x0004 | ||
240 | struct smb2_sess_setup_rsp { | 258 | struct smb2_sess_setup_rsp { |
241 | struct smb2_hdr hdr; | 259 | struct smb2_hdr hdr; |
242 | __le16 StructureSize; /* Must be 9 */ | 260 | __le16 StructureSize; /* Must be 9 */ |