summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorAurelien Aptel2018-06-04 22:29:34 +0200
committerSteve French2018-06-05 02:17:59 +0200
commit57f933ce9fba4a1cecb6e34ffafe841d093493cb (patch)
tree49c78900055e02d765889b299bde161e5d71288b /fs/cifs/cifsproto.h
parentMerge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
downloadkernel-qcow2-linux-57f933ce9fba4a1cecb6e34ffafe841d093493cb.tar.gz
kernel-qcow2-linux-57f933ce9fba4a1cecb6e34ffafe841d093493cb.tar.xz
kernel-qcow2-linux-57f933ce9fba4a1cecb6e34ffafe841d093493cb.zip
CIFS: Fix signing for SMB2/3
It seems Ronnie's preamble removal broke signing. the signing functions are called when: A) we send a request (to sign it) B) when we recv a response (to check the signature). On code path A, the smb2 header is in iov[1] but on code path B, the smb2 header is in iov[0] (and there's only one vector). So we have different iov indexes for the smb2 header but the signing function always use index 1. Fix this by checking the nb of io vectors in the signing function as a hint. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 7933c5f9c076..7f0c773d5f6b 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -544,7 +544,7 @@ int cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
struct cifs_sb_info *cifs_sb,
const unsigned char *path, char *pbuf,
unsigned int *pbytes_written);
-int __cifs_calc_signature(struct smb_rqst *rqst,
+int __cifs_calc_signature(struct smb_rqst *rqst, int start,
struct TCP_Server_Info *server, char *signature,
struct shash_desc *shash);
enum securityEnum cifs_select_sectype(struct TCP_Server_Info *,