diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifssmb.c | 11 | ||||
-rw-r--r-- | fs/cifs/transport.c | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 074923ce593d..f0cf934ba877 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -1576,9 +1576,14 @@ cifs_readv_callback(struct mid_q_entry *mid) | |||
1576 | /* result already set, check signature */ | 1576 | /* result already set, check signature */ |
1577 | if (server->sec_mode & | 1577 | if (server->sec_mode & |
1578 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { | 1578 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { |
1579 | if (cifs_verify_signature(rdata->iov, rdata->nr_iov, | 1579 | int rc = 0; |
1580 | server, mid->sequence_number + 1)) | 1580 | |
1581 | cERROR(1, "Unexpected SMB signature"); | 1581 | rc = cifs_verify_signature(rdata->iov, rdata->nr_iov, |
1582 | server, | ||
1583 | mid->sequence_number + 1); | ||
1584 | if (rc) | ||
1585 | cERROR(1, "SMB signature verification returned " | ||
1586 | "error = %d", rc); | ||
1582 | } | 1587 | } |
1583 | /* FIXME: should this be counted toward the initiating task? */ | 1588 | /* FIXME: should this be counted toward the initiating task? */ |
1584 | task_io_account_read(rdata->bytes); | 1589 | task_io_account_read(rdata->bytes); |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 83867ef348df..d9b639b95fa8 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -503,13 +503,16 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server, | |||
503 | /* convert the length into a more usable form */ | 503 | /* convert the length into a more usable form */ |
504 | if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { | 504 | if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { |
505 | struct kvec iov; | 505 | struct kvec iov; |
506 | int rc = 0; | ||
506 | 507 | ||
507 | iov.iov_base = mid->resp_buf; | 508 | iov.iov_base = mid->resp_buf; |
508 | iov.iov_len = len; | 509 | iov.iov_len = len; |
509 | /* FIXME: add code to kill session */ | 510 | /* FIXME: add code to kill session */ |
510 | if (cifs_verify_signature(&iov, 1, server, | 511 | rc = cifs_verify_signature(&iov, 1, server, |
511 | mid->sequence_number + 1) != 0) | 512 | mid->sequence_number + 1); |
512 | cERROR(1, "Unexpected SMB signature"); | 513 | if (rc) |
514 | cERROR(1, "SMB signature verification returned error = " | ||
515 | "%d", rc); | ||
513 | } | 516 | } |
514 | 517 | ||
515 | /* BB special case reconnect tid and uid here? */ | 518 | /* BB special case reconnect tid and uid here? */ |