summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2proto.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2018-12-19 02:49:05 +0300
committerSteve French <stfrench@microsoft.com>2018-12-19 16:55:32 +0300
commit271b9c0c80076bb1dd868dc384ef3aac87ec7dec (patch)
tree020b815b1a0e8fb08e54888d495e82f5a4bfc8ce /fs/cifs/smb2proto.h
parentddfbab46539f2d37a9e9d357b054486b51f7dc27 (diff)
downloadlinux-271b9c0c80076bb1dd868dc384ef3aac87ec7dec.tar.xz
smb3: Fix rmdir compounding regression to strict servers
Some servers require that the setinfo matches the exact size, and in this case compounding changes introduced by commit c2e0fe3f5aae ("cifs: make rmdir() use compounding") caused us to send 8 bytes (padded length) instead of 1 byte (the size of the structure). See MS-FSCC section 2.4.11. Fixing this when we send a SET_INFO command for delete file disposition, then ends up as an iov of a single byte but this causes problems with SMB3 and encryption. To avoid this, instead of creating a one byte iov for the disposition value and then appending an additional iov with a 7 byte padding we now handle this as a single 8 byte iov containing both the disposition byte as well as the padding in one single buffer. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Acked-by: Paulo Alcantara <palcantara@suse.de>
Diffstat (limited to 'fs/cifs/smb2proto.h')
-rw-r--r--fs/cifs/smb2proto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2proto.h b/fs/cifs/smb2proto.h
index 9f4e9ed9ce53..2fe78acd7d0c 100644
--- a/fs/cifs/smb2proto.h
+++ b/fs/cifs/smb2proto.h
@@ -117,7 +117,8 @@ extern int smb3_crypto_aead_allocate(struct TCP_Server_Info *server);
extern unsigned long smb_rqst_len(struct TCP_Server_Info *server,
struct smb_rqst *rqst);
extern void smb2_set_next_command(struct TCP_Server_Info *server,
- struct smb_rqst *rqst);
+ struct smb_rqst *rqst,
+ bool has_space_for_padding);
extern void smb2_set_related(struct smb_rqst *rqst);
/*