cifs: Fix encryption/signing
Since the rfc1002 generation was moved down to __smb_send_rqst(), the transform header is now in rqst->rq_iov[0]. Correctly assign the transform header pointer in crypt_message(). Signed-off-by: Paulo Alcantara <palcantara@suse.de> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
07cd952f3a
commit
cd2dca60be
@ -2187,7 +2187,7 @@ static inline void smb2_sg_set_buf(struct scatterlist *sg, const void *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Assumes:
|
/* Assumes:
|
||||||
* rqst->rq_iov[0] is tranform header
|
* rqst->rq_iov[0] is transform header
|
||||||
* rqst->rq_iov[1+] data to be encrypted/decrypted
|
* rqst->rq_iov[1+] data to be encrypted/decrypted
|
||||||
*/
|
*/
|
||||||
static struct scatterlist *
|
static struct scatterlist *
|
||||||
@ -2249,7 +2249,7 @@ static int
|
|||||||
crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
|
crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
|
||||||
{
|
{
|
||||||
struct smb2_transform_hdr *tr_hdr =
|
struct smb2_transform_hdr *tr_hdr =
|
||||||
(struct smb2_transform_hdr *)rqst->rq_iov[1].iov_base;
|
(struct smb2_transform_hdr *)rqst->rq_iov[0].iov_base;
|
||||||
unsigned int assoc_data_len = sizeof(struct smb2_transform_hdr) - 20;
|
unsigned int assoc_data_len = sizeof(struct smb2_transform_hdr) - 20;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user