Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322462
b: refs/heads/master
c: 985e4ff
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Aug 20, 2012
1 parent 2276fb7 commit 374efa8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7411286088d5ba879e9ffcaaa296f657642ef2c4
refs/heads/master: 985e4ff016b5f3d95c12fe8073d1df89300dab3d
11 changes: 8 additions & 3 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,9 +1576,14 @@ cifs_readv_callback(struct mid_q_entry *mid)
/* result already set, check signature */
if (server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
if (cifs_verify_signature(rdata->iov, rdata->nr_iov,
server, mid->sequence_number + 1))
cERROR(1, "Unexpected SMB signature");
int rc = 0;

rc = cifs_verify_signature(rdata->iov, rdata->nr_iov,
server,
mid->sequence_number + 1);
if (rc)
cERROR(1, "SMB signature verification returned "
"error = %d", rc);
}
/* FIXME: should this be counted toward the initiating task? */
task_io_account_read(rdata->bytes);
Expand Down
9 changes: 6 additions & 3 deletions trunk/fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,16 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
/* convert the length into a more usable form */
if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
struct kvec iov;
int rc = 0;

iov.iov_base = mid->resp_buf;
iov.iov_len = len;
/* FIXME: add code to kill session */
if (cifs_verify_signature(&iov, 1, server,
mid->sequence_number + 1) != 0)
cERROR(1, "Unexpected SMB signature");
rc = cifs_verify_signature(&iov, 1, server,
mid->sequence_number + 1);
if (rc)
cERROR(1, "SMB signature verification returned error = "
"%d", rc);
}

/* BB special case reconnect tid and uid here? */
Expand Down

0 comments on commit 374efa8

Please sign in to comment.