diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-17 04:19:31 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-17 04:19:31 +0400 |
commit | 1213959d4ad2f523290d0d7c94f712edef63852c (patch) | |
tree | 530a5f546b52a5b6e459b8f42d823a3570eb390f /fs/cifs/smb2pdu.h | |
parent | 673fdfe3f0630b03f3854d0361b1232f2e5ef7fb (diff) | |
parent | 0cbaa53cdd33080c1e2d67ad9295b83c7954f2b3 (diff) | |
download | linux-1213959d4ad2f523290d0d7c94f712edef63852c.tar.xz |
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French:
"A set of cifs fixes most important of which is Pavel's fix for some
problems with handling Windows reparse points and also the security
fix for setfacl over a cifs mount to Samba removing part of the ACL.
Both of these fixes are for stable as well.
Also added most of copychunk (copy offload) support to cifs although I
expect a final patch in that series (to fix handling of larger files)
in a few days (had to hold off on that in order to incorporate some
additional code review feedback).
Also added support for O_DIRECT on forcedirectio mounts (needed in
order to run some of the server benchmarks over cifs and smb2/smb3
mounts)"
* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
[CIFS] Warn if SMB3 encryption required by server
setfacl removes part of ACL when setting POSIX ACLs to Samba
[CIFS] Set copychunk defaults
CIFS: SMB2/SMB3 Copy offload support (refcopy) phase 1
cifs: Use data structures to compute NTLMv2 response offsets
[CIFS] O_DIRECT opens should work on directio mounts
cifs: don't spam the logs on unexpected lookup errors
cifs: change ERRnomem error mapping from ENOMEM to EREMOTEIO
CIFS: Fix symbolic links usage
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r-- | fs/cifs/smb2pdu.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index 6183b1b7550f..f88320bbb477 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h @@ -122,6 +122,23 @@ struct smb2_pdu { __le16 StructureSize2; /* size of wct area (varies, request specific) */ } __packed; +struct smb2_transform_hdr { + __be32 smb2_buf_length; /* big endian on wire */ + /* length is only two or three bytes - with + one or two byte type preceding it that MBZ */ + __u8 ProtocolId[4]; /* 0xFD 'S' 'M' 'B' */ + __u8 Signature[16]; + __u8 Nonce[11]; + __u8 Reserved[5]; + __le32 OriginalMessageSize; + __u16 Reserved1; + __le16 EncryptionAlgorithm; + __u64 SessionId; +} __packed; + +/* Encryption Algorithms */ +#define SMB2_ENCRYPTION_AES128_CCM __constant_cpu_to_le16(0x0001) + /* * SMB2 flag definitions */ @@ -237,6 +254,7 @@ struct smb2_sess_setup_req { /* Currently defined SessionFlags */ #define SMB2_SESSION_FLAG_IS_GUEST 0x0001 #define SMB2_SESSION_FLAG_IS_NULL 0x0002 +#define SMB2_SESSION_FLAG_ENCRYPT_DATA 0x0004 struct smb2_sess_setup_rsp { struct smb2_hdr hdr; __le16 StructureSize; /* Must be 9 */ @@ -534,9 +552,16 @@ struct create_durable { } Data; } __packed; +#define COPY_CHUNK_RES_KEY_SIZE 24 +struct resume_key_req { + char ResumeKey[COPY_CHUNK_RES_KEY_SIZE]; + __le32 ContextLength; /* MBZ */ + char Context[0]; /* ignored, Windows sets to 4 bytes of zero */ +} __packed; + /* this goes in the ioctl buffer when doing a copychunk request */ struct copychunk_ioctl { - char SourceKey[24]; + char SourceKey[COPY_CHUNK_RES_KEY_SIZE]; __le32 ChunkCount; /* we are only sending 1 */ __le32 Reserved; /* array will only be one chunk long for us */ @@ -546,6 +571,12 @@ struct copychunk_ioctl { __u32 Reserved2; } __packed; +struct copychunk_ioctl_rsp { + __le32 ChunksWritten; + __le32 ChunkBytesWritten; + __le32 TotalBytesWritten; +} __packed; + /* Response and Request are the same format */ struct validate_negotiate_info { __le32 Capabilities; |